| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751 |
- /*!-----------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
- *-----------------------------------------------------------*/(function(){var X=["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/base/common/async","vs/platform/contextkey/common/contextkey","vs/editor/browser/editorExtensions","vs/base/common/arrays","vs/base/common/platform","vs/base/common/types","vs/editor/common/services/languageFeatures","vs/base/common/uri","vs/base/common/cancellation","vs/editor/common/editorContextKeys","vs/editor/common/core/selection","vs/platform/theme/common/themeService","vs/platform/commands/common/commands","vs/platform/configuration/common/configuration","vs/base/common/codicons","vs/editor/common/languages/languageConfigurationRegistry","vs/platform/actions/common/actions","vs/base/common/themables","vs/editor/common/languages","vs/editor/browser/services/codeEditorService","vs/platform/theme/common/colorRegistry","vs/platform/keybinding/common/keybinding","vs/platform/registry/common/platform","vs/base/browser/fastDomNode","vs/base/common/color","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/common/network","vs/base/browser/ui/aria/aria","vs/platform/instantiation/common/extensions","vs/editor/common/services/model","vs/platform/opener/common/opener","vs/base/common/iterator","vs/editor/browser/view/viewPart","vs/platform/contextview/browser/contextView","vs/base/common/map","vs/base/common/stopwatch","vs/base/browser/touch","vs/base/common/keyCodes","vs/base/common/linkedList","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/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/quickinput/common/quickInput","vs/base/common/observable","vs/editor/common/viewModel","vs/editor/common/standaloneStrings","vs/platform/progress/common/progress","vs/platform/storage/common/storage","vs/base/common/assert","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/editor/common/tokens/lineTokens","vs/base/common/path","vs/platform/accessibility/common/accessibility","vs/platform/markers/common/markers","vs/platform/configuration/common/configurationRegistry","vs/platform/theme/common/theme","vs/base/common/functional","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/contrib/snippet/browser/snippetParser","vs/editor/common/core/stringBuilder","vs/platform/clipboard/common/clipboardService","vs/editor/contrib/editorState/browser/editorState","vs/platform/theme/browser/defaultStyles","vs/base/common/decorators","vs/base/common/lazy","vs/base/common/mime","vs/base/common/severity","vs/editor/common/core/lineRange","vs/editor/common/languages/languageConfiguration","vs/editor/common/textModelEvents","vs/editor/browser/view/dynamicViewOverlay","vs/editor/contrib/codeAction/common/types","vs/base/browser/ui/list/listWidget","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/common/services/editorWorker","vs/platform/keybinding/common/keybindingsRegistry","vs/base/common/keybindings","vs/base/common/iconLabels","vs/editor/browser/stableEditorScroll","vs/editor/common/core/characterClassifier","vs/editor/common/core/eolCounter","vs/editor/common/core/offsetRange","vs/editor/common/commands/replaceCommand","vs/editor/common/encodedTokenAttributes","vs/editor/common/languages/supports","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/standalone/common/standaloneTheme","vs/platform/layout/browser/layoutService","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/editor/contrib/suggest/browser/suggest","vs/platform/quickinput/common/quickAccess","vs/editor/contrib/codeAction/browser/codeAction","vs/editor/contrib/peekView/browser/peekView","vs/platform/workspace/common/workspace","vs/base/browser/ui/tree/tree","vs/base/common/buffer","vs/base/common/numbers","vs/base/common/observableImpl/logging","vs/base/common/observableImpl/base","vs/base/common/hash","vs/editor/browser/view/renderingContext","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/viewEventHandler","vs/editor/common/viewLayout/lineDecorations","vs/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/editor/browser/services/bulkEditService","vs/platform/dialogs/common/dialogs","vs/platform/label/common/label","vs/editor/contrib/message/browser/messageController","vs/editor/browser/editorDom","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/base/common/idGenerator","vs/base/browser/dnd","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/diff/linesDiffComputer","vs/editor/common/editorCommon","vs/editor/browser/editorBrowser","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/common/model/textModelSearch","vs/editor/contrib/folding/browser/foldingRanges","vs/base/common/scrollable","vs/base/browser/ui/tree/abstractTree","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/common/services/textResourceConfiguration","vs/platform/audioCues/browser/audioCueService","vs/platform/instantiation/common/serviceCollection","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/browser/coreCommands","vs/platform/list/browser/listService","vs/platform/undoRedo/common/undoRedo","vs/editor/browser/widget/codeEditorWidget","vs/editor/contrib/find/browser/findModel","vs/base/common/ternarySearchTree","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","vs/editor/common/core/indentation","vs/editor/common/editorFeatures","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/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/common/config/editorConfigurationSchema","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/snippet/browser/snippetController2","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/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/editor/browser/widget/diffNavigator","vs/platform/contextkey/common/contextkeys","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/standalone/browser/standaloneLayoutService","vs/platform/quickinput/browser/quickInputUtils","vs/platform/dnd/browser/dnd","vs/editor/browser/dnd","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/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/autorun","vs/base/common/observableImpl/derived","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/dropIntoEditor/browser/postDropWidget","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/codeActionMenu","vs/nls!vs/editor/contrib/codeAction/browser/codeActionUi","vs/nls!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/browser/codelensController","vs/nls!vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/nls!vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/copyPaste/browser/copyPasteContribution","vs/nls!vs/editor/contrib/copyPaste/browser/copyPasteController","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/dropIntoEditor/browser/defaultOnDropProviders","vs/nls!vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution","vs/nls!vs/editor/contrib/dropIntoEditor/browser/postDropWidget","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/inlineCompletions/browser/ghostTextWidget","vs/editor/contrib/links/browser/getLinks","vs/editor/standalone/browser/colorizer","vs/editor/contrib/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/contextkey/browser/contextKeyService","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/editor/contrib/dropIntoEditor/browser/postDropWidget","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/accessibility/browser/accessibilityService","vs/platform/contextview/browser/contextViewService","vs/platform/clipboard/browser/clipboardService","vs/platform/log/common/logService","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/opener/browser/link","vs/platform/quickinput/browser/pickerQuickAccess","vs/platform/quickinput/browser/quickInputBox","vs/platform/quickinput/browser/quickInputList","vs/platform/quickinput/browser/quickInput","vs/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/suggest/browser/suggestModel","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/platform/actions/browser/toolbar","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/editor/browser/viewParts/minimap/minimap","vs/editor/contrib/codeAction/browser/codeActionMenu","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/platform/actionWidget/browser/actionList","vs/platform/actionWidget/browser/actionWidget","vs/editor/contrib/codeAction/browser/codeActionUi","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/widget/diffReview","vs/editor/contrib/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/copyPaste/browser/copyPasteController","vs/editor/contrib/copyPaste/browser/copyPasteContribution","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/links/browser/links","vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/editor/contrib/hover/browser/markerHoverParticipant","vs/editor/contrib/colorPicker/browser/colorContributions","vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/editor/contrib/inlayHints/browser/inlayHintsContribution","vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/editor/contrib/stickyScroll/browser/stickyScrollContribution","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/dropIntoEditor/browser/defaultOnDropProviders","vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","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(K){for(var e=[],_=0,k=K.length;_<k;_++)e[_]=X[K[_]];return e};define(X[889],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=void 0;function _(b,S,g,p){if(p=p||{},(p["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,p){if(y(b,S)){g();return}E(b,S,g,p)}function y(b,S){const g=document.getElementsByTagName("link");for(let p=0,n=g.length;p<n;p++){const t=g[p].getAttribute("data-name"),i=g[p].getAttribute("href");if(t===b||i===S)return!0}return!1}function E(b,S,g,p){const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("data-name",b),w(b,n,g,p),n.setAttribute("href",S),(document.head||document.getElementsByTagName("head")[0]).appendChild(n)}function w(b,S,g,p){const n=()=>{S.removeEventListener("load",t),S.removeEventListener("error",i)},t=s=>{n(),g()},i=s=>{n(),p(s)};S.addEventListener("load",t),S.addEventListener("error",i)}});var we=this&&this.__awaiter||function(K,e,_,k){function y(E){return E instanceof _?E:new _(function(w){w(E)})}return new(_||(_=Promise))(function(E,w){function b(p){try{g(k.next(p))}catch(n){w(n)}}function S(p){try{g(k.throw(p))}catch(n){w(n)}}function g(p){p.done?E(p.value):y(p.value).then(b,S)}g((k=k.apply(K,e||[])).next())})};define(X[3],ee([1,0]),function(K,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 y(s,r){let d;return r.length===0?d=s:d=s.replace(/\{(\d+)\}/g,(h,o)=>{const c=o[0],l=r[c];let a=h;return typeof l=="string"?a=l:(typeof l=="number"||typeof l=="boolean"||l===void 0||l===null)&&(a=String(l)),a}),_&&(d="\uFF3B"+d.replace(/[aouei]/g,"$&$&")+"\uFF3D"),d}function E(s,r){let d=s[r];return d||(d=s["*"],d)?d:null}function w(s){return s.charAt(s.length-1)==="/"?s:s+"/"}function b(s,r,d){return we(this,void 0,void 0,function*(){const h=w(s)+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(s){return function(r,d){const h=Array.prototype.slice.call(arguments,2);return y(s[r],h)}}function g(s,r,...d){return y(r,d)}e.localize=g;function p(s){}e.getConfiguredDefaultLocale=p;function n(s){_=s}e.setPseudoTranslation=n;function t(s,r){var d;return{localize:S(r[s]),getConfiguredDefaultLocale:(d=r.getConfiguredDefaultLocale)!==null&&d!==void 0?d:h=>{}}}e.create=t;function i(s,r,d,h){var o;const c=(o=h["vs/nls"])!==null&&o!==void 0?o:{};if(!s||s.length===0)return d({localize:g,getConfiguredDefaultLocale:()=>{var f;return(f=c.availableLanguages)===null||f===void 0?void 0:f["*"]}});const l=c.availableLanguages?E(c.availableLanguages,s):null,a=l===null||l===k;let u=".nls";a||(u=u+"."+l);const v=f=>{Array.isArray(f)?f.localize=S(f):f.localize=S(f[s]),f.getConfiguredDefaultLocale=()=>{var m;return(m=c.availableLanguages)===null||m===void 0?void 0:m["*"]},d(f)};typeof c.loadBundle=="function"?c.loadBundle(s,l,(f,m)=>{f?r([s+".nls"],v):v(m)}):c.translationServiceUrl&&!a?we(this,void 0,void 0,function*(){var f;try{const m=yield b(c.translationServiceUrl,l,s);return v(m)}catch(m){if(!l.includes("-"))return console.error(m),r([s+".nls"],v);try{const C=l.split("-")[0],L=yield b(c.translationServiceUrl,C,s);return(f=c.availableLanguages)!==null&&f!==void 0||(c.availableLanguages={}),c.availableLanguages["*"]=C,v(L)}catch(C){return console.error(C),r([s+".nls"],v)}}}):r([s+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 ${l}. Falling back to the default language:`,f),r([s+".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 mn(K){if(Array.isArray(K)){for(var e=0,_=Array(K.length);e<K.length;e++)_[e]=K[e];return _}else return Array.from(K)}var pn=Object.hasOwnProperty,wi=Object.setPrototypeOf,vn=Object.isFrozen,Cn=Object.getPrototypeOf,bn=Object.getOwnPropertyDescriptor,mt=Object.freeze,_t=Object.seal,_n=Object.create,Li=typeof Reflect<"u"&&Reflect,Ut=Li.apply,ei=Li.construct;Ut||(Ut=function(e,_,k){return e.apply(_,k)}),mt||(mt=function(e){return e}),_t||(_t=function(e){return e}),ei||(ei=function(e,_){return new(Function.prototype.bind.apply(e,[null].concat(mn(_))))});var Sn=pt(Array.prototype.forEach),yi=pt(Array.prototype.pop),Ot=pt(Array.prototype.push),It=pt(String.prototype.toLowerCase),Di=pt(String.prototype.match),Dt=pt(String.prototype.replace),wn=pt(String.prototype.indexOf),Ln=pt(String.prototype.trim),St=pt(RegExp.prototype.test),Ei=yn(TypeError);function pt(K){return function(e){for(var _=arguments.length,k=Array(_>1?_-1:0),y=1;y<_;y++)k[y-1]=arguments[y];return Ut(K,e,k)}}function yn(K){return function(){for(var e=arguments.length,_=Array(e),k=0;k<e;k++)_[k]=arguments[k];return ei(K,_)}}function et(K,e){wi&&wi(K,null);for(var _=e.length;_--;){var k=e[_];if(typeof k=="string"){var y=It(k);y!==k&&(vn(e)||(e[_]=y),k=y)}K[k]=!0}return K}function kt(K){var e=_n(null),_=void 0;for(_ in K)Ut(pn,K,[_])&&(e[_]=K[_]);return e}function Kt(K,e){for(;K!==null;){var _=bn(K,e);if(_){if(_.get)return pt(_.get);if(typeof _.value=="function")return pt(_.value)}K=Cn(K)}function k(y){return console.warn("fallback value for",y),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"]),En=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"]),In=_t(/\{\{[\s\S]*|[\s\S]*\}\}/gm),kn=_t(/<%[\s\S]*|[\s\S]*%>/gm),Tn=_t(/^data-[\-\w.\u00B7-\uFFFF]/),Nn=_t(/^aria-[\-\w]+$/),Mn=_t(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),An=_t(/^(?:\w+script|data):/i),Pn=_t(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K};function vt(K){if(Array.isArray(K)){for(var e=0,_=Array(K.length);e<K.length;e++)_[e]=K[e];return _}else return Array.from(K)}var Rn=function(){return typeof window>"u"?null:window},On=function(e,_){if((typeof e>"u"?"undefined":Ft(e))!=="object"||typeof e.createPolicy!="function")return null;var k=null,y="data-tt-policy-suffix";_.currentScript&&_.currentScript.hasAttribute(y)&&(k=_.currentScript.getAttribute(y));var E="dompurify"+(k?"#"+k:"");try{return e.createPolicy(E,{createHTML:function(b){return b}})}catch{return console.warn("TrustedTypes policy "+E+" could not be created."),null}};function Mi(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rn(),e=function(Ae){return Mi(Ae)};if(e.version="2.3.1",e.removed=[],!K||!K.document||K.document.nodeType!==9)return e.isSupported=!1,e;var _=K.document,k=K.document,y=K.DocumentFragment,E=K.HTMLTemplateElement,w=K.Node,b=K.Element,S=K.NodeFilter,g=K.NamedNodeMap,p=g===void 0?K.NamedNodeMap||K.MozNamedAttrMap:g,n=K.Text,t=K.Comment,i=K.DOMParser,s=K.trustedTypes,r=b.prototype,d=Kt(r,"cloneNode"),h=Kt(r,"nextSibling"),o=Kt(r,"childNodes"),c=Kt(r,"parentNode");if(typeof E=="function"){var l=k.createElement("template");l.content&&l.content.ownerDocument&&(k=l.content.ownerDocument)}var a=On(s,_),u=a&&ge?a.createHTML(""):"",v=k,f=v.implementation,m=v.createNodeIterator,C=v.createDocumentFragment,L=v.getElementsByTagName,D=_.importNode,I={};try{I=kt(k).documentMode?k.documentMode:{}}catch{}var T={};e.isSupported=typeof c=="function"&&f&&typeof f.createHTMLDocument<"u"&&I!==9;var O=In,R=kn,A=Tn,N=Nn,P=An,x=Pn,F=Mn,B=null,V=et({},[].concat(vt(Ii),vt(ti),vt(ii),vt(ni),vt(ki))),$=null,M=et({},[].concat(vt(Ti),vt(si),vt(Ni),vt(jt))),Q=null,ie=null,re=!0,ne=!0,se=!1,H=!1,W=!1,q=!1,Z=!1,Y=!1,oe=!1,ce=!0,ge=!1,le=!0,ue=!0,j=!1,z={},U=null,J=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),te=null,G=et({},["audio","video","img","source","image","track"]),ae=null,me=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",Se="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml",Ee=ye,De=!1,ke=null,Ie=k.createElement("form"),he=function(Ae){ke&&ke===Ae||((!Ae||(typeof Ae>"u"?"undefined":Ft(Ae))!=="object")&&(Ae={}),Ae=kt(Ae),B="ALLOWED_TAGS"in Ae?et({},Ae.ALLOWED_TAGS):V,$="ALLOWED_ATTR"in Ae?et({},Ae.ALLOWED_ATTR):M,ae="ADD_URI_SAFE_ATTR"in Ae?et(kt(me),Ae.ADD_URI_SAFE_ATTR):me,te="ADD_DATA_URI_TAGS"in Ae?et(kt(G),Ae.ADD_DATA_URI_TAGS):G,U="FORBID_CONTENTS"in Ae?et({},Ae.FORBID_CONTENTS):J,Q="FORBID_TAGS"in Ae?et({},Ae.FORBID_TAGS):{},ie="FORBID_ATTR"in Ae?et({},Ae.FORBID_ATTR):{},z="USE_PROFILES"in Ae?Ae.USE_PROFILES:!1,re=Ae.ALLOW_ARIA_ATTR!==!1,ne=Ae.ALLOW_DATA_ATTR!==!1,se=Ae.ALLOW_UNKNOWN_PROTOCOLS||!1,H=Ae.SAFE_FOR_TEMPLATES||!1,W=Ae.WHOLE_DOCUMENT||!1,Y=Ae.RETURN_DOM||!1,oe=Ae.RETURN_DOM_FRAGMENT||!1,ce=Ae.RETURN_DOM_IMPORT!==!1,ge=Ae.RETURN_TRUSTED_TYPE||!1,Z=Ae.FORCE_BODY||!1,le=Ae.SANITIZE_DOM!==!1,ue=Ae.KEEP_CONTENT!==!1,j=Ae.IN_PLACE||!1,F=Ae.ALLOWED_URI_REGEXP||F,Ee=Ae.NAMESPACE||ye,H&&(ne=!1),oe&&(Y=!0),z&&(B=et({},[].concat(vt(ki))),$=[],z.html===!0&&(et(B,Ii),et($,Ti)),z.svg===!0&&(et(B,ti),et($,si),et($,jt)),z.svgFilters===!0&&(et(B,ii),et($,si),et($,jt)),z.mathMl===!0&&(et(B,ni),et($,Ni),et($,jt))),Ae.ADD_TAGS&&(B===V&&(B=kt(B)),et(B,Ae.ADD_TAGS)),Ae.ADD_ATTR&&($===M&&($=kt($)),et($,Ae.ADD_ATTR)),Ae.ADD_URI_SAFE_ATTR&&et(ae,Ae.ADD_URI_SAFE_ATTR),Ae.FORBID_CONTENTS&&(U===J&&(U=kt(U)),et(U,Ae.FORBID_CONTENTS)),ue&&(B["#text"]=!0),W&&et(B,["html","head","body"]),B.table&&(et(B,["tbody"]),delete Q.tbody),mt&&mt(Ae),ke=Ae)},ve=et({},["mi","mo","mn","ms","mtext"]),de=et({},["foreignobject","desc","title","annotation-xml"]),pe=et({},ti);et(pe,ii),et(pe,Dn);var Le=et({},ni);et(Le,En);var Ne=function(Ae){var xe=c(Ae);(!xe||!xe.tagName)&&(xe={namespaceURI:ye,tagName:"template"});var Ve=It(Ae.tagName),$e=It(xe.tagName);if(Ae.namespaceURI===Se)return xe.namespaceURI===ye?Ve==="svg":xe.namespaceURI===Ce?Ve==="svg"&&($e==="annotation-xml"||ve[$e]):!!pe[Ve];if(Ae.namespaceURI===Ce)return xe.namespaceURI===ye?Ve==="math":xe.namespaceURI===Se?Ve==="math"&&de[$e]:!!Le[Ve];if(Ae.namespaceURI===ye){if(xe.namespaceURI===Se&&!de[$e]||xe.namespaceURI===Ce&&!ve[$e])return!1;var Je=et({},["title","style","font","a","script"]);return!Le[Ve]&&(Je[Ve]||!pe[Ve])}return!1},be=function(Ae){Ot(e.removed,{element:Ae});try{Ae.parentNode.removeChild(Ae)}catch{try{Ae.outerHTML=u}catch{Ae.remove()}}},_e=function(Ae,xe){try{Ot(e.removed,{attribute:xe.getAttributeNode(Ae),from:xe})}catch{Ot(e.removed,{attribute:null,from:xe})}if(xe.removeAttribute(Ae),Ae==="is"&&!$[Ae])if(Y||oe)try{be(xe)}catch{}else try{xe.setAttribute(Ae,"")}catch{}},Te=function(Ae){var xe=void 0,Ve=void 0;if(Z)Ae="<remove></remove>"+Ae;else{var $e=Di(Ae,/^[\r\n\t ]+/);Ve=$e&&$e[0]}var Je=a?a.createHTML(Ae):Ae;if(Ee===ye)try{xe=new i().parseFromString(Je,"text/html")}catch{}if(!xe||!xe.documentElement){xe=f.createDocument(Ee,"template",null);try{xe.documentElement.innerHTML=De?"":Je}catch{}}var Ke=xe.body||xe.documentElement;return Ae&&Ve&&Ke.insertBefore(k.createTextNode(Ve),Ke.childNodes[0]||null),Ee===ye?L.call(xe,W?"html":"body")[0]:W?xe.documentElement:Ke},Oe=function(Ae){return m.call(Ae.ownerDocument||Ae,Ae,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT,null,!1)},Pe=function(Ae){return Ae instanceof n||Ae instanceof t?!1:typeof Ae.nodeName!="string"||typeof Ae.textContent!="string"||typeof Ae.removeChild!="function"||!(Ae.attributes instanceof p)||typeof Ae.removeAttribute!="function"||typeof Ae.setAttribute!="function"||typeof Ae.namespaceURI!="string"||typeof Ae.insertBefore!="function"},Be=function(Ae){return(typeof w>"u"?"undefined":Ft(w))==="object"?Ae instanceof w:Ae&&(typeof Ae>"u"?"undefined":Ft(Ae))==="object"&&typeof Ae.nodeType=="number"&&typeof Ae.nodeName=="string"},Fe=function(Ae,xe,Ve){T[Ae]&&Sn(T[Ae],function($e){$e.call(e,xe,Ve,ke)})},ze=function(Ae){var xe=void 0;if(Fe("beforeSanitizeElements",Ae,null),Pe(Ae)||Di(Ae.nodeName,/[\u0080-\uFFFF]/))return be(Ae),!0;var Ve=It(Ae.nodeName);if(Fe("uponSanitizeElement",Ae,{tagName:Ve,allowedTags:B}),!Be(Ae.firstElementChild)&&(!Be(Ae.content)||!Be(Ae.content.firstElementChild))&&St(/<[/\w]/g,Ae.innerHTML)&&St(/<[/\w]/g,Ae.textContent)||Ve==="select"&&St(/<template/i,Ae.innerHTML))return be(Ae),!0;if(!B[Ve]||Q[Ve]){if(ue&&!U[Ve]){var $e=c(Ae)||Ae.parentNode,Je=o(Ae)||Ae.childNodes;if(Je&&$e)for(var Ke=Je.length,Xe=Ke-1;Xe>=0;--Xe)$e.insertBefore(d(Je[Xe],!0),h(Ae))}return be(Ae),!0}return Ae instanceof b&&!Ne(Ae)||(Ve==="noscript"||Ve==="noembed")&&St(/<\/no(script|embed)/i,Ae.innerHTML)?(be(Ae),!0):(H&&Ae.nodeType===3&&(xe=Ae.textContent,xe=Dt(xe,O," "),xe=Dt(xe,R," "),Ae.textContent!==xe&&(Ot(e.removed,{element:Ae.cloneNode()}),Ae.textContent=xe)),Fe("afterSanitizeElements",Ae,null),!1)},Ze=function(Ae,xe,Ve){if(le&&(xe==="id"||xe==="name")&&(Ve in k||Ve in Ie))return!1;if(!(ne&&!ie[xe]&&St(A,xe))){if(!(re&&St(N,xe))){if(!$[xe]||ie[xe])return!1;if(!ae[xe]){if(!St(F,Dt(Ve,x,""))){if(!((xe==="src"||xe==="xlink:href"||xe==="href")&&Ae!=="script"&&wn(Ve,"data:")===0&&te[Ae])){if(!(se&&!St(P,Dt(Ve,x,"")))){if(Ve)return!1}}}}}}return!0},Ge=function(Ae){var xe=void 0,Ve=void 0,$e=void 0,Je=void 0;Fe("beforeSanitizeAttributes",Ae,null);var Ke=Ae.attributes;if(Ke){var Xe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};for(Je=Ke.length;Je--;){xe=Ke[Je];var rt=xe,st=rt.name,dt=rt.namespaceURI;if(Ve=Ln(xe.value),$e=It(st),Xe.attrName=$e,Xe.attrValue=Ve,Xe.keepAttr=!0,Xe.forceKeepAttr=void 0,Fe("uponSanitizeAttribute",Ae,Xe),Ve=Xe.attrValue,!Xe.forceKeepAttr&&(_e(st,Ae),!!Xe.keepAttr)){if(St(/\/>/i,Ve)){_e(st,Ae);continue}H&&(Ve=Dt(Ve,O," "),Ve=Dt(Ve,R," "));var Ye=Ae.nodeName.toLowerCase();if(Ze(Ye,$e,Ve))try{dt?Ae.setAttributeNS(dt,st,Ve):Ae.setAttribute(st,Ve),yi(e.removed)}catch{}}}Fe("afterSanitizeAttributes",Ae,null)}},tt=function He(Ae){var xe=void 0,Ve=Oe(Ae);for(Fe("beforeSanitizeShadowDOM",Ae,null);xe=Ve.nextNode();)Fe("uponSanitizeShadowNode",xe,null),!ze(xe)&&(xe.content instanceof y&&He(xe.content),Ge(xe));Fe("afterSanitizeShadowDOM",Ae,null)};return e.sanitize=function(He,Ae){var xe=void 0,Ve=void 0,$e=void 0,Je=void 0,Ke=void 0;if(De=!He,De&&(He="<!-->"),typeof He!="string"&&!Be(He)){if(typeof He.toString!="function")throw Ei("toString is not a function");if(He=He.toString(),typeof He!="string")throw Ei("dirty is not a string, aborting")}if(!e.isSupported){if(Ft(K.toStaticHTML)==="object"||typeof K.toStaticHTML=="function"){if(typeof He=="string")return K.toStaticHTML(He);if(Be(He))return K.toStaticHTML(He.outerHTML)}return He}if(q||he(Ae),e.removed=[],typeof He=="string"&&(j=!1),!j)if(He instanceof w)xe=Te("<!---->"),Ve=xe.ownerDocument.importNode(He,!0),Ve.nodeType===1&&Ve.nodeName==="BODY"||Ve.nodeName==="HTML"?xe=Ve:xe.appendChild(Ve);else{if(!Y&&!H&&!W&&He.indexOf("<")===-1)return a&&ge?a.createHTML(He):He;if(xe=Te(He),!xe)return Y?null:u}xe&&Z&&be(xe.firstChild);for(var Xe=Oe(j?He:xe);$e=Xe.nextNode();)$e.nodeType===3&&$e===Je||ze($e)||($e.content instanceof y&&tt($e.content),Ge($e),Je=$e);if(Je=null,j)return He;if(Y){if(oe)for(Ke=C.call(xe.ownerDocument);xe.firstChild;)Ke.appendChild(xe.firstChild);else Ke=xe;return ce&&(Ke=D.call(_,Ke,!0)),Ke}var rt=W?xe.outerHTML:xe.innerHTML;return H&&(rt=Dt(rt,O," "),rt=Dt(rt,R," ")),a&&ge?a.createHTML(rt):rt},e.setConfig=function(He){he(He),q=!0},e.clearConfig=function(){ke=null,q=!1},e.isValidAttribute=function(He,Ae,xe){ke||he({});var Ve=It(He),$e=It(Ae);return Ze(Ve,$e,xe)},e.addHook=function(He,Ae){typeof Ae=="function"&&(T[He]=T[He]||[],Ot(T[He],Ae))},e.removeHook=function(He){T[He]&&yi(T[He])},e.removeHooks=function(He){T[He]&&(T[He]=[])},e.removeAllHooks=function(){T={}},e}var Fn=Mi();define("vs/base/browser/dompurify/dompurify",function(){return Fn}),define(X[36],ee([1,0]),function(K,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(E){return typeof E=="number"?`${E}px`:E}function y(E){return new _(E)}e.createFastDomNode=y}),define(X[360],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let _=!1,k=null;function y(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 E{static getSameOriginWindowChain(){if(!k){k=[];let b=window,S;do S=y(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,p=0;const n=this.getSameOriginWindowChain();for(const t of n){if(g+=t.window.scrollY,p+=t.window.scrollX,t.window===S||!t.iframeElement)break;const i=t.iframeElement.getBoundingClientRect();g+=i.top,p+=i.left}return{top:g,left:p}}}e.IframeUtils=E}),define(X[248],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputLatency=void 0;var _;(function(k){const y={total:0,min:Number.MAX_VALUE,max:0},E=Object.assign({},y),w=Object.assign({},y),b=Object.assign({},y);let S=0;const g={keydown:0,input:0,render:0};function p(){l(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),g.keydown=1,queueMicrotask(n)}k.onKeyDown=p;function n(){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(s)}k.onInput=i;function s(){g.input===1&&(performance.mark("input/end"),g.input=2)}function r(){l()}k.onKeyUp=r;function d(){l()}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(l)}function l(){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"),a("keydown",y),a("input",E),a("render",w),a("inputlatency",b),S++,u())}function a(C,L){const D=performance.getEntriesByName(C)[0].duration;L.total+=D,L.min=Math.min(L.min,D),L.max=Math.max(L.max,D)}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(y),input:f(E),render:f(w),total:f(b),sampleCount:S};return m(y),m(E),m(w),m(b),S=0,C}k.getAndClearMeasurements=v;function f(C){return{average:C.total/S,max:C.max,min:C.min}}function m(C){C.total=0,C.min=Number.MAX_VALUE,C.max=0}})(_||(e.inputLatency=_={}))}),define(X[361],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class _ extends Error{constructor(y,E){super(`ListError [${y}] ${E}`)}}e.ListError=_}),define(X[362],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class _{constructor(y){this.spliceables=y}splice(y,E,w){this.spliceables.forEach(b=>b.splice(y,E,w))}}e.CombinedSpliceable=_}),define(X[249],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const _=20;class k{constructor(E,w,b,S,g,p){this._scrollbarSize=Math.round(w),this._oppositeScrollbarSize=Math.round(b),this._arrowSize=Math.round(E),this._visibleSize=S,this._scrollSize=g,this._scrollPosition=p,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new k(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(E){const w=Math.round(E);return this._visibleSize!==w?(this._visibleSize=w,this._refreshComputedValues(),!0):!1}setScrollSize(E){const w=Math.round(E);return this._scrollSize!==w?(this._scrollSize=w,this._refreshComputedValues(),!0):!1}setScrollPosition(E){const w=Math.round(E);return this._scrollPosition!==w?(this._scrollPosition=w,this._refreshComputedValues(),!0):!1}setScrollbarSize(E){this._scrollbarSize=Math.round(E)}setOppositeScrollbarSize(E){this._oppositeScrollbarSize=Math.round(E)}static _computeValues(E,w,b,S,g){const p=Math.max(0,b-E),n=Math.max(0,p-2*w),t=S>0&&S>b;if(!t)return{computedAvailableSize:Math.round(p),computedIsNeeded:t,computedSliderSize:Math.round(n),computedSliderRatio:0,computedSliderPosition:0};const i=Math.round(Math.max(_,Math.floor(b*n/S))),s=(n-i)/(S-b),r=g*s;return{computedAvailableSize:Math.round(p),computedIsNeeded:t,computedSliderSize:Math.round(i),computedSliderRatio:s,computedSliderPosition:Math.round(r)}}_refreshComputedValues(){const E=k._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=E.computedAvailableSize,this._computedIsNeeded=E.computedIsNeeded,this._computedSliderSize=E.computedSliderSize,this._computedSliderRatio=E.computedSliderRatio,this._computedSliderPosition=E.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(E){if(!this._computedIsNeeded)return 0;const w=E-this._arrowSize-this._computedSliderSize/2;return Math.round(w/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(E){if(!this._computedIsNeeded)return 0;const w=E-this._arrowSize;let b=this._scrollPosition;return w<this._computedSliderPosition?b-=this._visibleSize:b+=this._visibleSize,b}getDesiredScrollPositionFromDelta(E){if(!this._computedIsNeeded)return 0;const w=this._computedSliderPosition+E;return Math.round(w/this._computedSliderRatio)}}e.ScrollbarState=k}),define(X[131],ee([1,0]),function(K,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 y extends Error{constructor(b,S){super(`TreeError [${b}] ${S}`)}}e.TreeError=y;class E{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=E}),define(X[16],ee([1,0]),function(K,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 y(F,B,V=($,M)=>$===M){if(F===B)return!0;if(!F||!B||F.length!==B.length)return!1;for(let $=0,M=F.length;$<M;$++)if(!V(F[$],B[$]))return!1;return!0}e.equals=y;function E(F,B){const V=F.length-1;B<V&&(F[B]=F[V]),F.pop()}e.removeFastWithoutKeepingOrder=E;function w(F,B,V){return b(F.length,$=>V(F[$],B))}e.binarySearch=w;function b(F,B){let V=0,$=F-1;for(;V<=$;){const M=(V+$)/2|0,Q=B(M);if(Q<0)V=M+1;else if(Q>0)$=M-1;else return M}return-(V+1)}e.binarySearch2=b;function S(F,B){let V=0,$=F.length;if($===0)return 0;for(;V<$;){const M=Math.floor((V+$)/2);B(F[M])?$=M:V=M+1}return V}e.findFirstInSorted=S;function g(F,B,V){if(F=F|0,F>=B.length)throw new TypeError("invalid index");const $=B[Math.floor(B.length*Math.random())],M=[],Q=[],ie=[];for(const re of B){const ne=V(re,$);ne<0?M.push(re):ne>0?Q.push(re):ie.push(re)}return F<M.length?g(F,M,V):F<M.length+ie.length?ie[0]:g(F-(M.length+ie.length),Q,V)}e.quickSelect=g;function p(F,B){const V=[];let $;for(const M of F.slice(0).sort(B))!$||B($[0],M)!==0?($=[M],V.push($)):$.push(M);return V}e.groupBy=p;function n(F){return F.filter(B=>!!B)}e.coalesce=n;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 s(F){return Array.isArray(F)&&F.length>0}e.isNonEmptyArray=s;function r(F,B=V=>V){const V=new Set;return F.filter($=>{const M=B($);return V.has(M)?!1:(V.add(M),!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 $=F[V];if(B($))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 $=[];if(V<=B)for(let M=V;M<B;M++)$.push(M);else for(let M=V;M>B;M--)$.push(M);return $}e.range=c;function l(F,B,V){const $=F.slice(0,B),M=F.slice(B);return $.concat(V,M)}e.arrayInsert=l;function a(F,B){const V=F.indexOf(B);V>-1&&(F.splice(V,1),F.unshift(B))}e.pushToStart=a;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 m(F,B){for(const V of F){const $=B(V);if($!==void 0)return $}}e.mapFind=m;function C(F,B,V){const $=D(F,B),M=F.length,Q=V.length;F.length=M+Q;for(let ie=M-1;ie>=$;ie--)F[ie+Q]=F[ie];for(let ie=0;ie<Q;ie++)F[ie+$]=V[ie]}e.insertInto=C;function L(F,B,V,$){const M=D(F,B),Q=F.splice(M,V);return C(F,M,$),Q}e.splice=L;function D(F,B){return B<0?Math.max(B+F.length,0):Math.min(B,F.length)}var I;(function(F){function B(M){return M<0}F.isLessThan=B;function V(M){return M>0}F.isGreaterThan=V;function $(M){return M===0}F.isNeitherLessOrGreaterThan=$,F.greaterThan=1,F.lessThan=-1,F.neitherLessOrGreaterThan=0})(I||(e.CompareResult=I={}));function T(F,B){return(V,$)=>B(F(V),F($))}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 $=1;$<F.length;$++){const M=F[$];B(M,V)>0&&(V=M)}return V}e.findMaxBy=R;function A(F,B){if(F.length===0)return;let V=F[0];for(let $=1;$<F.length;$++){const M=F[$];B(M,V)>=0&&(V=M)}return V}e.findLastMaxBy=A;function N(F,B){return R(F,(V,$)=>-B(V,$))}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 $=V===this.firstIdx?null:this.items.slice(this.firstIdx,V);return this.firstIdx=V,$}takeFromEndWhile(B){let V=this.lastIdx;for(;V>=0&&B(this.items[V]);)V--;const $=V===this.lastIdx?null:this.items.slice(V+1,this.lastIdx+1);return this.lastIdx=V,$}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($=>B($)?V($):!0))}map(B){return new x(V=>this.iterate($=>V(B($))))}findLast(B){let V;return this.iterate($=>(B($)&&(V=$),!0)),V}findLastMaxBy(B){let V,$=!0;return this.iterate(M=>(($||I.isGreaterThan(B(M,V)))&&($=!1,V=M),!0)),V}}e.CallbackIterable=x,x.empty=new x(F=>{})}),define(X[132],ee([1,0]),function(K,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 _=typeof Buffer<"u";let k;class y{static wrap(t){return _&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new y(t)}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}toString(){return _?this.buffer.toString():(k||(k=new TextDecoder),k.decode(this.buffer))}}e.VSBuffer=y;function E(n,t){return n[t+0]<<0>>>0|n[t+1]<<8>>>0}e.readUInt16LE=E;function w(n,t,i){n[i+0]=t&255,t=t>>>8,n[i+1]=t&255}e.writeUInt16LE=w;function b(n,t){return n[t]*Math.pow(2,24)+n[t+1]*Math.pow(2,16)+n[t+2]*Math.pow(2,8)+n[t+3]}e.readUInt32BE=b;function S(n,t,i){n[i+3]=t,t=t>>>8,n[i+2]=t,t=t>>>8,n[i+1]=t,t=t>>>8,n[i]=t}e.writeUInt32BE=S;function g(n,t){return n[t]}e.readUInt8=g;function p(n,t,i){n[i]=t}e.writeUInt8=p}),define(X[250],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=void 0;class _{constructor(E){this.fn=E,this.lastCache=void 0,this.lastArgKey=void 0}get(E){const w=JSON.stringify(E);return this.lastArgKey!==w&&(this.lastArgKey=w,this.lastCache=this.fn(E)),this.lastCache}}e.LRUCachedFunction=_;class k{get cachedValues(){return this._map}constructor(E){this.fn=E,this._map=new Map}get(E){if(this._map.has(E))return this._map.get(E);const w=this.fn(E);return this._map.set(E,w),w}}e.CachedFunction=k}),define(X[363],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=void 0;class _{constructor(){this.map=new Map}add(y,E){let w=this.map.get(y);w||(w=new Set,this.map.set(y,w)),w.add(E)}delete(y,E){const w=this.map.get(y);w&&(w.delete(E),w.size===0&&this.map.delete(y))}forEach(y,E){const w=this.map.get(y);w&&w.forEach(E)}}e.SetMap=_}),define(X[37],ee([1,0]),function(K,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,p,n=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,p))|0,this.a=_(Math.max(Math.min(1,n),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 y{constructor(S,g,p,n){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,p),0),3),this.a=_(Math.max(Math.min(1,n),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,p=S.g/255,n=S.b/255,t=S.a,i=Math.max(g,p,n),s=Math.min(g,p,n);let r=0,d=0;const h=(s+i)/2,o=i-s;if(o>0){switch(d=Math.min(h<=.5?o/(2*h):o/(2-2*h),1),i){case g:r=(p-n)/o+(p<n?6:0);break;case p:r=(n-g)/o+2;break;case n:r=(g-p)/o+4;break}r*=60,r=Math.round(r)}return new y(r,d,h,t)}static _hue2rgb(S,g,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?S+(g-S)*6*p:p<1/2?g:p<2/3?S+(g-S)*(2/3-p)*6:S}static toRGBA(S){const g=S.h/360,{s:p,l:n,a:t}=S;let i,s,r;if(p===0)i=s=r=n;else{const d=n<.5?n*(1+p):n+p-n*p,h=2*n-d;i=y._hue2rgb(h,d,g+1/3),s=y._hue2rgb(h,d,g),r=y._hue2rgb(h,d,g-1/3)}return new k(Math.round(i*255),Math.round(s*255),Math.round(r*255),t)}}e.HSLA=y;class E{constructor(S,g,p,n){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,p),0),3),this.a=_(Math.max(Math.min(1,n),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,p=S.g/255,n=S.b/255,t=Math.max(g,p,n),i=Math.min(g,p,n),s=t-i,r=t===0?0:s/t;let d;return s===0?d=0:t===g?d=((p-n)/s%6+6)%6:t===p?d=(n-g)/s+2:d=(g-p)/s+4,new E(Math.round(d*60),r,t,S.a)}static toRGBA(S){const{h:g,s:p,v:n,a:t}=S,i=n*p,s=i*(1-Math.abs(g/60%2-1)),r=n-i;let[d,h,o]=[0,0,0];return g<60?(d=i,h=s):g<120?(d=s,h=i):g<180?(h=i,o=s):g<240?(h=s,o=i):g<300?(d=s,o=i):g<=360&&(d=i,o=s),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=E;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:y.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:E.fromRGBA(this.rgba)}constructor(S){if(S)if(S instanceof k)this.rgba=S;else if(S instanceof y)this._hsla=S,this.rgba=y.toRGBA(S);else if(S instanceof E)this._hsva=S,this.rgba=E.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)&&y.equals(this.hsla,S.hsla)&&E.equals(this.hsva,S.hsva)}getRelativeLuminance(){const S=w._relativeLuminanceForComponent(this.rgba.r),g=w._relativeLuminanceForComponent(this.rgba.g),p=w._relativeLuminanceForComponent(this.rgba.b),n=.2126*S+.7152*g+.0722*p;return _(n,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(),p=S.getRelativeLuminance();return g>p}isDarkerThan(S){const g=this.getRelativeLuminance(),p=S.getRelativeLuminance();return g<p}lighten(S){return new w(new y(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*S,this.hsla.a))}darken(S){return new w(new y(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*S,this.hsla.a))}transparent(S){const{r:g,g:p,b:n,a:t}=this.rgba;return new w(new k(g,p,n,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:p,b:n,a:t}=this.rgba;return new w(new k(S.rgba.r-t*(S.rgba.r-g),S.rgba.g-t*(S.rgba.g-p),S.rgba.b-t*(S.rgba.b-n),1))}toString(){return this._toString||(this._toString=w.Format.CSS.format(this)),this._toString}static getLighterColor(S,g,p){if(S.isLighterThan(g))return S;p=p||.5;const n=S.getRelativeLuminance(),t=g.getRelativeLuminance();return p=p*(t-n)/t,S.lighten(p)}static getDarkerColor(S,g,p){if(S.isDarkerThan(g))return S;p=p||.5;const n=S.getRelativeLuminance(),t=g.getRelativeLuminance();return p=p*(n-t)/n,S.darken(p)}}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 p;(function(n){function t(u){return u.rgba.a===1?`rgb(${u.rgba.r}, ${u.rgba.g}, ${u.rgba.b})`:b.Format.CSS.formatRGBA(u)}n.formatRGB=t;function i(u){return`rgba(${u.rgba.r}, ${u.rgba.g}, ${u.rgba.b}, ${+u.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(u){return u.hsla.a===1?`hsl(${u.hsla.h}, ${(u.hsla.s*100).toFixed(2)}%, ${(u.hsla.l*100).toFixed(2)}%)`:b.Format.CSS.formatHSLA(u)}n.formatHSL=s;function r(u){return`hsla(${u.hsla.h}, ${(u.hsla.s*100).toFixed(2)}%, ${(u.hsla.l*100).toFixed(2)}%, ${u.hsla.a.toFixed(2)})`}n.formatHSLA=r;function 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)}`}n.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))}`}n.formatHexA=o;function c(u){return u.isOpaque()?b.Format.CSS.formatHex(u):b.Format.CSS.formatRGBA(u)}n.format=c;function l(u){const v=u.length;if(v===0||u.charCodeAt(0)!==35)return null;if(v===7){const f=16*a(u.charCodeAt(1))+a(u.charCodeAt(2)),m=16*a(u.charCodeAt(3))+a(u.charCodeAt(4)),C=16*a(u.charCodeAt(5))+a(u.charCodeAt(6));return new b(new k(f,m,C,1))}if(v===9){const f=16*a(u.charCodeAt(1))+a(u.charCodeAt(2)),m=16*a(u.charCodeAt(3))+a(u.charCodeAt(4)),C=16*a(u.charCodeAt(5))+a(u.charCodeAt(6)),L=16*a(u.charCodeAt(7))+a(u.charCodeAt(8));return new b(new k(f,m,C,L/255))}if(v===4){const f=a(u.charCodeAt(1)),m=a(u.charCodeAt(2)),C=a(u.charCodeAt(3));return new b(new k(16*f+f,16*m+m,16*C+C))}if(v===5){const f=a(u.charCodeAt(1)),m=a(u.charCodeAt(2)),C=a(u.charCodeAt(3)),L=a(u.charCodeAt(4));return new b(new k(16*f+f,16*m+m,16*C+C,(16*L+L)/255))}return null}n.parseHex=l;function a(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}})(p=g.CSS||(g.CSS={}))})(S=b.Format||(b.Format={}))}(w||(e.Color=w={}))}),define(X[100],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=void 0;function _(k,y,E){let w=null,b=null;if(typeof E.value=="function"?(w="value",b=E.value,b.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof E.get=="function"&&(w="get",b=E.get),!b)throw new Error("not supported");const S=`$memoize$${y}`;E[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(X[364],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class _{constructor(y,E,w,b){this.originalStart=y,this.originalLength=E,this.modifiedStart=w,this.modifiedLength=b}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=_}),define(X[11],ee([1,0]),function(K,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+`
- `+d.stack):new Error(d.message+`
- `+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 y(r){b(r)||e.errorHandler.onUnexpectedExternalError(r)}e.onUnexpectedExternalError=y;function E(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=E;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 p(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}e.illegalArgument=p;function n(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}e.illegalState=n;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 s extends Error{constructor(d){super(d||"An unexpected bug occurred."),Object.setPrototypeOf(this,s.prototype);debugger}}e.BugIndicatingError=s}),define(X[85],ee([1,0,11]),function(K,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 y(b,S="Unreachable"){throw new Error(S)}e.assertNever=y;function E(b){if(!b()){debugger;b(),(0,_.onUnexpectedError)(new _.BugIndicatingError("Assertion Failed"))}}e.assertFn=E;function w(b,S){let g=0;for(;g<b.length-1;){const p=b[g],n=b[g+1];if(!S(p,n))return!1;g++}return!0}e.checkAdjacentItems=w}),define(X[93],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function _(k){const y=this;let E=!1,w;return function(){return E||(E=!0,w=k.apply(y,arguments)),w}}e.once=_}),define(X[158],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class _{constructor(y){this._prefix=y,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=_,e.defaultGenerator=new _("id#")}),define(X[53],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var _;(function(k){function y(l){return l&&typeof l=="object"&&typeof l[Symbol.iterator]=="function"}k.is=y;const E=Object.freeze([]);function w(){return E}k.empty=w;function*b(l){yield l}k.single=b;function S(l){return y(l)?l:b(l)}k.wrap=S;function g(l){return l||E}k.from=g;function p(l){return!l||l[Symbol.iterator]().next().done===!0}k.isEmpty=p;function n(l){return l[Symbol.iterator]().next().value}k.first=n;function t(l,a){for(const u of l)if(a(u))return!0;return!1}k.some=t;function i(l,a){for(const u of l)if(a(u))return u}k.find=i;function*s(l,a){for(const u of l)a(u)&&(yield u)}k.filter=s;function*r(l,a){let u=0;for(const v of l)yield a(v,u++)}k.map=r;function*d(...l){for(const a of l)for(const u of a)yield u}k.concat=d;function h(l,a,u){let v=u;for(const f of l)v=a(v,f);return v}k.reduce=h;function*o(l,a,u=l.length){for(a<0&&(a+=l.length),u<0?u+=l.length:u>l.length&&(u=l.length);a<u;a++)yield l[a]}k.slice=o;function c(l,a=Number.POSITIVE_INFINITY){const u=[];if(a===0)return[u,l];const v=l[Symbol.iterator]();for(let f=0;f<a;f++){const m=v.next();if(m.done)return[u,k.empty()];u.push(m.value)}return[u,{[Symbol.iterator](){return v}}]}k.consume=c})(_||(e.Iterable=_={}))}),define(X[59],ee([1,0]),function(K,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 _,y=new _,E=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 n=0;n<=193;n++)e.IMMUTABLE_CODE_TO_KEY_CODE[n]=-1;for(let n=0;n<=132;n++)e.IMMUTABLE_KEY_CODE_TO_CODE[n]=-1;(function(){const n="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",n,n],[1,1,"Hyper",0,n,0,n,n,n],[1,2,"Super",0,n,0,n,n,n],[1,3,"Fn",0,n,0,n,n,n],[1,4,"FnLock",0,n,0,n,n,n],[1,5,"Suspend",0,n,0,n,n,n],[1,6,"Resume",0,n,0,n,n,n],[1,7,"Turbo",0,n,0,n,n,n],[1,8,"Sleep",0,n,0,"VK_SLEEP",n,n],[1,9,"WakeUp",0,n,0,n,n,n],[0,10,"KeyA",31,"A",65,"VK_A",n,n],[0,11,"KeyB",32,"B",66,"VK_B",n,n],[0,12,"KeyC",33,"C",67,"VK_C",n,n],[0,13,"KeyD",34,"D",68,"VK_D",n,n],[0,14,"KeyE",35,"E",69,"VK_E",n,n],[0,15,"KeyF",36,"F",70,"VK_F",n,n],[0,16,"KeyG",37,"G",71,"VK_G",n,n],[0,17,"KeyH",38,"H",72,"VK_H",n,n],[0,18,"KeyI",39,"I",73,"VK_I",n,n],[0,19,"KeyJ",40,"J",74,"VK_J",n,n],[0,20,"KeyK",41,"K",75,"VK_K",n,n],[0,21,"KeyL",42,"L",76,"VK_L",n,n],[0,22,"KeyM",43,"M",77,"VK_M",n,n],[0,23,"KeyN",44,"N",78,"VK_N",n,n],[0,24,"KeyO",45,"O",79,"VK_O",n,n],[0,25,"KeyP",46,"P",80,"VK_P",n,n],[0,26,"KeyQ",47,"Q",81,"VK_Q",n,n],[0,27,"KeyR",48,"R",82,"VK_R",n,n],[0,28,"KeyS",49,"S",83,"VK_S",n,n],[0,29,"KeyT",50,"T",84,"VK_T",n,n],[0,30,"KeyU",51,"U",85,"VK_U",n,n],[0,31,"KeyV",52,"V",86,"VK_V",n,n],[0,32,"KeyW",53,"W",87,"VK_W",n,n],[0,33,"KeyX",54,"X",88,"VK_X",n,n],[0,34,"KeyY",55,"Y",89,"VK_Y",n,n],[0,35,"KeyZ",56,"Z",90,"VK_Z",n,n],[0,36,"Digit1",22,"1",49,"VK_1",n,n],[0,37,"Digit2",23,"2",50,"VK_2",n,n],[0,38,"Digit3",24,"3",51,"VK_3",n,n],[0,39,"Digit4",25,"4",52,"VK_4",n,n],[0,40,"Digit5",26,"5",53,"VK_5",n,n],[0,41,"Digit6",27,"6",54,"VK_6",n,n],[0,42,"Digit7",28,"7",55,"VK_7",n,n],[0,43,"Digit8",29,"8",56,"VK_8",n,n],[0,44,"Digit9",30,"9",57,"VK_9",n,n],[0,45,"Digit0",21,"0",48,"VK_0",n,n],[1,46,"Enter",3,"Enter",13,"VK_RETURN",n,n],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",n,n],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",n,n],[1,49,"Tab",2,"Tab",9,"VK_TAB",n,n],[1,50,"Space",10,"Space",32,"VK_SPACE",n,n],[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,n,0,n,n,n],[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",n,n],[1,64,"F1",59,"F1",112,"VK_F1",n,n],[1,65,"F2",60,"F2",113,"VK_F2",n,n],[1,66,"F3",61,"F3",114,"VK_F3",n,n],[1,67,"F4",62,"F4",115,"VK_F4",n,n],[1,68,"F5",63,"F5",116,"VK_F5",n,n],[1,69,"F6",64,"F6",117,"VK_F6",n,n],[1,70,"F7",65,"F7",118,"VK_F7",n,n],[1,71,"F8",66,"F8",119,"VK_F8",n,n],[1,72,"F9",67,"F9",120,"VK_F9",n,n],[1,73,"F10",68,"F10",121,"VK_F10",n,n],[1,74,"F11",69,"F11",122,"VK_F11",n,n],[1,75,"F12",70,"F12",123,"VK_F12",n,n],[1,76,"PrintScreen",0,n,0,n,n,n],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",n,n],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",n,n],[1,79,"Insert",19,"Insert",45,"VK_INSERT",n,n],[1,80,"Home",14,"Home",36,"VK_HOME",n,n],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",n,n],[1,82,"Delete",20,"Delete",46,"VK_DELETE",n,n],[1,83,"End",13,"End",35,"VK_END",n,n],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",n,n],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",n],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",n],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",n],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",n],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",n,n],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",n,n],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",n,n],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",n,n],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",n,n],[1,94,"NumpadEnter",3,n,0,n,n,n],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",n,n],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",n,n],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",n,n],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",n,n],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",n,n],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",n,n],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",n,n],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",n,n],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",n,n],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",n,n],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",n,n],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",n,n],[1,107,"ContextMenu",58,"ContextMenu",93,n,n,n],[1,108,"Power",0,n,0,n,n,n],[1,109,"NumpadEqual",0,n,0,n,n,n],[1,110,"F13",71,"F13",124,"VK_F13",n,n],[1,111,"F14",72,"F14",125,"VK_F14",n,n],[1,112,"F15",73,"F15",126,"VK_F15",n,n],[1,113,"F16",74,"F16",127,"VK_F16",n,n],[1,114,"F17",75,"F17",128,"VK_F17",n,n],[1,115,"F18",76,"F18",129,"VK_F18",n,n],[1,116,"F19",77,"F19",130,"VK_F19",n,n],[1,117,"F20",78,"F20",0,"VK_F20",n,n],[1,118,"F21",79,"F21",0,"VK_F21",n,n],[1,119,"F22",80,"F22",0,"VK_F22",n,n],[1,120,"F23",81,"F23",0,"VK_F23",n,n],[1,121,"F24",82,"F24",0,"VK_F24",n,n],[1,122,"Open",0,n,0,n,n,n],[1,123,"Help",0,n,0,n,n,n],[1,124,"Select",0,n,0,n,n,n],[1,125,"Again",0,n,0,n,n,n],[1,126,"Undo",0,n,0,n,n,n],[1,127,"Cut",0,n,0,n,n,n],[1,128,"Copy",0,n,0,n,n,n],[1,129,"Paste",0,n,0,n,n,n],[1,130,"Find",0,n,0,n,n,n],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",n,n],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",n,n],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",n,n],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",n,n],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",n,n],[1,136,"KanaMode",0,n,0,n,n,n],[0,137,"IntlYen",0,n,0,n,n,n],[1,138,"Convert",0,n,0,n,n,n],[1,139,"NonConvert",0,n,0,n,n,n],[1,140,"Lang1",0,n,0,n,n,n],[1,141,"Lang2",0,n,0,n,n,n],[1,142,"Lang3",0,n,0,n,n,n],[1,143,"Lang4",0,n,0,n,n,n],[1,144,"Lang5",0,n,0,n,n,n],[1,145,"Abort",0,n,0,n,n,n],[1,146,"Props",0,n,0,n,n,n],[1,147,"NumpadParenLeft",0,n,0,n,n,n],[1,148,"NumpadParenRight",0,n,0,n,n,n],[1,149,"NumpadBackspace",0,n,0,n,n,n],[1,150,"NumpadMemoryStore",0,n,0,n,n,n],[1,151,"NumpadMemoryRecall",0,n,0,n,n,n],[1,152,"NumpadMemoryClear",0,n,0,n,n,n],[1,153,"NumpadMemoryAdd",0,n,0,n,n,n],[1,154,"NumpadMemorySubtract",0,n,0,n,n,n],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",n,n],[1,156,"NumpadClearEntry",0,n,0,n,n,n],[1,0,n,5,"Ctrl",17,"VK_CONTROL",n,n],[1,0,n,4,"Shift",16,"VK_SHIFT",n,n],[1,0,n,6,"Alt",18,"VK_MENU",n,n],[1,0,n,57,"Meta",91,"VK_COMMAND",n,n],[1,157,"ControlLeft",5,n,0,"VK_LCONTROL",n,n],[1,158,"ShiftLeft",4,n,0,"VK_LSHIFT",n,n],[1,159,"AltLeft",6,n,0,"VK_LMENU",n,n],[1,160,"MetaLeft",57,n,0,"VK_LWIN",n,n],[1,161,"ControlRight",5,n,0,"VK_RCONTROL",n,n],[1,162,"ShiftRight",4,n,0,"VK_RSHIFT",n,n],[1,163,"AltRight",6,n,0,"VK_RMENU",n,n],[1,164,"MetaRight",57,n,0,"VK_RWIN",n,n],[1,165,"BrightnessUp",0,n,0,n,n,n],[1,166,"BrightnessDown",0,n,0,n,n,n],[1,167,"MediaPlay",0,n,0,n,n,n],[1,168,"MediaRecord",0,n,0,n,n,n],[1,169,"MediaFastForward",0,n,0,n,n,n],[1,170,"MediaRewind",0,n,0,n,n,n],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",n,n],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",n,n],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",n,n],[1,174,"Eject",0,n,0,n,n,n],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",n,n],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",n,n],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",n,n],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",n,n],[1,179,"LaunchApp1",0,n,0,"VK_MEDIA_LAUNCH_APP1",n,n],[1,180,"SelectTask",0,n,0,n,n,n],[1,181,"LaunchScreenSaver",0,n,0,n,n,n],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",n,n],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",n,n],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",n,n],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",n,n],[1,186,"BrowserStop",0,n,0,"VK_BROWSER_STOP",n,n],[1,187,"BrowserRefresh",0,n,0,"VK_BROWSER_REFRESH",n,n],[1,188,"BrowserFavorites",0,n,0,"VK_BROWSER_FAVORITES",n,n],[1,189,"ZoomToggle",0,n,0,n,n,n],[1,190,"MailReply",0,n,0,n,n,n],[1,191,"MailForward",0,n,0,n,n,n],[1,192,"MailSend",0,n,0,n,n,n],[1,0,n,114,"KeyInComposition",229,n,n,n],[1,0,n,116,"ABNT_C2",194,"VK_ABNT_C2",n,n],[1,0,n,96,"OEM_8",223,"VK_OEM_8",n,n],[1,0,n,0,n,0,"VK_KANA",n,n],[1,0,n,0,n,0,"VK_HANGUL",n,n],[1,0,n,0,n,0,"VK_JUNJA",n,n],[1,0,n,0,n,0,"VK_FINAL",n,n],[1,0,n,0,n,0,"VK_HANJA",n,n],[1,0,n,0,n,0,"VK_KANJI",n,n],[1,0,n,0,n,0,"VK_CONVERT",n,n],[1,0,n,0,n,0,"VK_NONCONVERT",n,n],[1,0,n,0,n,0,"VK_ACCEPT",n,n],[1,0,n,0,n,0,"VK_MODECHANGE",n,n],[1,0,n,0,n,0,"VK_SELECT",n,n],[1,0,n,0,n,0,"VK_PRINT",n,n],[1,0,n,0,n,0,"VK_EXECUTE",n,n],[1,0,n,0,n,0,"VK_SNAPSHOT",n,n],[1,0,n,0,n,0,"VK_HELP",n,n],[1,0,n,0,n,0,"VK_APPS",n,n],[1,0,n,0,n,0,"VK_PROCESSKEY",n,n],[1,0,n,0,n,0,"VK_PACKET",n,n],[1,0,n,0,n,0,"VK_DBE_SBCSCHAR",n,n],[1,0,n,0,n,0,"VK_DBE_DBCSCHAR",n,n],[1,0,n,0,n,0,"VK_ATTN",n,n],[1,0,n,0,n,0,"VK_CRSEL",n,n],[1,0,n,0,n,0,"VK_EXSEL",n,n],[1,0,n,0,n,0,"VK_EREOF",n,n],[1,0,n,0,n,0,"VK_PLAY",n,n],[1,0,n,0,n,0,"VK_ZOOM",n,n],[1,0,n,0,n,0,"VK_NONAME",n,n],[1,0,n,0,n,0,"VK_PA1",n,n],[1,0,n,0,n,0,"VK_OEM_CLEAR",n,n]],i=[],s=[];for(const r of t){const[d,h,o,c,l,a,u,v,f]=r;if(s[h]||(s[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,!l)throw new Error(`String representation missing for key code ${c} around scan code ${o}`);k.define(c,l),y.define(c,v||l),E.define(c,f||v||l)}a&&(e.EVENT_KEY_CODE_MAP[a]=c),u&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[u]=c)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var g;(function(n){function t(o){return k.keyCodeToStr(o)}n.toString=t;function i(o){return k.strToKeyCode(o)}n.fromString=i;function s(o){return y.keyCodeToStr(o)}n.toUserSettingsUS=s;function r(o){return E.keyCodeToStr(o)}n.toUserSettingsGeneral=r;function d(o){return y.strToKeyCode(o)||E.strToKeyCode(o)}n.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)}n.toElectronAccelerator=h})(g||(e.KeyCodeUtils=g={}));function p(n,t){const i=(t&65535)<<16>>>0;return(n|i)>>>0}e.KeyChord=p}),define(X[113],ee([1,0,11]),function(K,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(p,n){if(typeof p=="number"){if(p===0)return null;const t=(p&65535)>>>0,i=(p&4294901760)>>>16;return i!==0?new b([y(t,n),y(i,n)]):new b([y(t,n)])}else{const t=[];for(let i=0;i<p.length;i++)t.push(y(p[i],n));return new b(t)}}e.decodeKeybinding=k;function y(p,n){const t=!!(p&2048),i=!!(p&256),s=n===2?i:t,r=!!(p&1024),d=!!(p&512),h=n===2?t:i,o=p&255;return new E(s,r,d,h,o)}e.createSimpleKeybinding=y;class E{constructor(n,t,i,s,r){this.ctrlKey=n,this.shiftKey=t,this.altKey=i,this.metaKey=s,this.keyCode=r}equals(n){return n instanceof E&&this.ctrlKey===n.ctrlKey&&this.shiftKey===n.shiftKey&&this.altKey===n.altKey&&this.metaKey===n.metaKey&&this.keyCode===n.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.KeyCodeChord=E;class w{constructor(n,t,i,s,r){this.ctrlKey=n,this.shiftKey=t,this.altKey=i,this.metaKey=s,this.scanCode=r}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeChord=w;class b{constructor(n){if(n.length===0)throw(0,_.illegalArgument)("chords");this.chords=n}}e.Keybinding=b;class S{constructor(n,t,i,s,r,d){this.ctrlKey=n,this.shiftKey=t,this.altKey=i,this.metaKey=s,this.keyLabel=r,this.keyAriaLabel=d}}e.ResolvedChord=S;class g{}e.ResolvedKeybinding=g}),define(X[101],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class _{constructor(y){this.executor=y,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(y){this._error=y}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=_}),define(X[365],ee([1,0,101]),function(K,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}}),y=new _.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),E=new _.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function w(g,p,n=!1){const t=g||"",i=p||"",s=k.value.collator.compare(t,i);return k.value.collatorIsNumeric&&s===0&&t!==i?t<i?-1:1:s}e.compareFileNames=w;function b(g,p,n){const t=g.toLowerCase(),i=p.toLowerCase(),s=S(g,p,n);if(s)return s;const r=t.endsWith(n),d=i.endsWith(n);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,p,n){const t=g.toLowerCase(),i=p.toLowerCase(),s=t.startsWith(n),r=i.startsWith(n);if(s!==r)return s?-1:1;if(s&&r){if(t.length<i.length)return-1;if(t.length>i.length)return 1}return 0}e.compareByPrefix=S}),define(X[2],ee([1,0,93,53]),function(K,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 y=!1;let E=null;function w(v){E=v}if(e.setDisposableTracker=w,y){const v="__is_disposable_tracked__";w(new class{trackDisposable(f){const m=new Error("Potentially leaked disposable").stack;setTimeout(()=>{f[v]||console.log(m)},3e3)}setParent(f,m){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 E?.trackDisposable(v),v}function S(v){E?.markAsDisposed(v)}function g(v,f){E?.setParent(v,f)}function p(v,f){if(E)for(const m of v)E.setParent(m,f)}function n(v){return E?.markAsSingleton(v),v}e.markAsSingleton=n;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 m of v)if(m)try{m.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 s(...v){const f=r(()=>i(v));return p(v,f),f}e.combinedDisposable=s;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 m;this._isDisposed||f===this._value||((m=this._value)===null||m===void 0||m.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 l{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,b(this)}set(f){let m=f;return this.unset=()=>m=void 0,this.isset=()=>m!==void 0,this.dispose=()=>{m&&(m(),m=void 0,S(this))},this}}e.SafeDisposable=l;class a{constructor(f){this.object=f}dispose(){}}e.ImmortalReference=a;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,m,C=!1){var L;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),C||(L=this._store.get(f))===null||L===void 0||L.dispose(),this._store.set(f,m)}deleteAndDispose(f){var m;(m=this._store.get(f))===null||m===void 0||m.dispose(),this._store.delete(f)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=u}),define(X[60],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class _{constructor(E){this.element=E,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 E=this._first;for(;E!==_.Undefined;){const w=E.next;E.prev=_.Undefined,E.next=_.Undefined,E=w}this._first=_.Undefined,this._last=_.Undefined,this._size=0}unshift(E){return this._insert(E,!1)}push(E){return this._insert(E,!0)}_insert(E,w){const b=new _(E);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 E=this._first.element;return this._remove(this._first),E}}pop(){if(this._last!==_.Undefined){const E=this._last.element;return this._remove(this._last),E}}_remove(E){if(E.prev!==_.Undefined&&E.next!==_.Undefined){const w=E.prev;w.next=E.next,E.next.prev=w}else E.prev===_.Undefined&&E.next===_.Undefined?(this._first=_.Undefined,this._last=_.Undefined):E.next===_.Undefined?(this._last=this._last.prev,this._last.next=_.Undefined):E.prev===_.Undefined&&(this._first=this._first.next,this._first.prev=_.Undefined);this._size-=1}*[Symbol.iterator](){let E=this._first;for(;E!==_.Undefined;)yield E.element,E=E.next}}e.LinkedList=k});var Me=this&&this.__decorate||function(K,e,_,k){var y=arguments.length,E=y<3?e:k===null?k=Object.getOwnPropertyDescriptor(e,_):k,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(K,e,_,k);else for(var b=K.length-1;b>=0;b--)(w=K[b])&&(E=(y<3?w(E):y>3?w(e,_,E):w(e,_))||E);return y>3&&E&&Object.defineProperty(e,_,E),E};define(X[366],ee([1,0,100]),function(K,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,Me([_.memoize],k.prototype,"toString",null);const y=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function E(w){const b=[];let S=0,g;for(;g=y.exec(w);){g.index-S>0&&b.push(w.substring(S,g.index));const[,p,n,,t]=g;t?b.push({label:p,href:n,title:t}):b.push({label:p,href:n}),S=g.index+g[0].length}return S<w.length&&b.push(w.substring(S)),new k(b)}e.parseLinkedText=E}),define(X[56],ee([1,0]),function(K,e){"use strict";var _,k;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.ResourceMap=void 0;class y{constructor(g,p){this.uri=g,this.value=p}}class E{constructor(g,p){this[_]="ResourceMap",g instanceof E?(this.map=new Map(g.map),this.toKey=p??E.defaultToKey):(this.map=new Map,this.toKey=g??E.defaultToKey)}set(g,p){return this.map.set(this.toKey(g),new y(g,p)),this}get(g){var p;return(p=this.map.get(this.toKey(g)))===null||p===void 0?void 0:p.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,p){typeof p<"u"&&(g=g.bind(p));for(const[n,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=E,E.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,p=0){const n=this._map.get(g);if(n)return p!==0&&this.touch(n,p),n.value}set(g,p,n=0){let t=this._map.get(g);if(t)t.value=p,n!==0&&this.touch(t,n);else{switch(t={key:g,value:p,next:void 0,previous:void 0},n){case 0:this.addItemLast(t);break;case 1:this.addItemFirst(t);break;case 2:this.addItemLast(t);break;default:this.addItemLast(t);break}this._map.set(g,t),this._size++}return this}delete(g){return!!this.remove(g)}remove(g){const p=this._map.get(g);if(p)return this._map.delete(g),this.removeItem(p),this._size--,p.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,p){const n=this._state;let t=this._head;for(;t;){if(p?g.bind(p)(t.value,t.key,this):g(t.value,t.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");t=t.next}}keys(){const g=this,p=this._state;let n=this._head;const t={[Symbol.iterator](){return t},next(){if(g._state!==p)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return t}values(){const g=this,p=this._state;let n=this._head;const t={[Symbol.iterator](){return t},next(){if(g._state!==p)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return t}entries(){const g=this,p=this._state;let n=this._head;const t={[Symbol.iterator](){return t},next(){if(g._state!==p)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return t}[(k=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(g){if(g>=this.size)return;if(g===0){this.clear();return}let p=this._head,n=this.size;for(;p&&n>g;)this._map.delete(p.key),p=p.next,n--;this._head=p,this._size=n,p&&(p.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 p=g.next,n=g.previous;if(!p||!n)throw new Error("Invalid list");p.previous=n,n.next=p}g.next=void 0,g.previous=void 0,this._state++}touch(g,p){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(p!==1&&p!==2)){if(p===1){if(g===this._head)return;const n=g.next,t=g.previous;g===this._tail?(t.next=void 0,this._tail=t):(n.previous=t,t.next=n),g.previous=void 0,g.next=this._head,this._head.previous=g,this._head=g,this._state++}else if(p===2){if(g===this._tail)return;const n=g.next,t=g.previous;g===this._head?(n.previous=void 0,this._head=n):(n.previous=t,t.next=n),g.next=void 0,g.previous=this._tail,this._tail.next=g,this._tail=g,this._state++}}}toJSON(){const g=[];return this.forEach((p,n)=>{g.push([n,p])}),g}fromJSON(g){this.clear();for(const[p,n]of g)this.set(p,n)}}e.LinkedMap=w;class b extends w{constructor(g,p=1){super(),this._limit=g,this._ratio=Math.min(Math.max(0,p),1)}get limit(){return this._limit}set limit(g){this._limit=g,this.checkTrim()}get(g,p=2){return super.get(g,p)}peek(g){return super.get(g,0)}set(g,p){return super.set(g,p,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=b}),function(K,e){typeof define=="function"&&define.amd?define(X[367],ee([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):(K=typeof globalThis<"u"?globalThis:K||self,e(K.marked={}))}(this,function(K){"use strict";function e(le,ue){for(var j=0;j<ue.length;j++){var z=ue[j];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(le,z.key,z)}}function _(le,ue,j){return ue&&e(le.prototype,ue),j&&e(le,j),Object.defineProperty(le,"prototype",{writable:!1}),le}function k(le,ue){if(le){if(typeof le=="string")return y(le,ue);var j=Object.prototype.toString.call(le).slice(8,-1);if(j==="Object"&&le.constructor&&(j=le.constructor.name),j==="Map"||j==="Set")return Array.from(le);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return y(le,ue)}}function y(le,ue){(ue==null||ue>le.length)&&(ue=le.length);for(var j=0,z=new Array(ue);j<ue;j++)z[j]=le[j];return z}function E(le,ue){var j=typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(j)return(j=j.call(le)).next.bind(j);if(Array.isArray(le)||(j=k(le))||ue&&le&&typeof le.length=="number"){j&&(le=j);var z=0;return function(){return z>=le.length?{done:!0}:{done:!1,value:le[z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
- In 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}}K.defaults=w();function b(le){K.defaults=le}var S=/[&<>"']/,g=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,t={"&":"&","<":"<",">":">",'"':""","'":"'"},i=function(ue){return t[ue]};function s(le,ue){if(ue){if(S.test(le))return le.replace(g,i)}else if(p.test(le))return le.replace(n,i);return le}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(le){return le.replace(r,function(ue,j){return j=j.toLowerCase(),j==="colon"?":":j.charAt(0)==="#"?j.charAt(1)==="x"?String.fromCharCode(parseInt(j.substring(2),16)):String.fromCharCode(+j.substring(1)):""})}var h=/(^|[^\[])\^/g;function o(le,ue){le=typeof le=="string"?le:le.source,ue=ue||"";var j={replace:function(U,J){return J=J.source||J,J=J.replace(h,"$1"),le=le.replace(U,J),j},getRegex:function(){return new RegExp(le,ue)}};return j}var c=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(le,ue,j){if(le){var z;try{z=decodeURIComponent(d(j)).replace(c,"").toLowerCase()}catch{return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}ue&&!l.test(j)&&(j=C(ue,j));try{j=encodeURI(j).replace(/%25/g,"%")}catch{return null}return j}var u={},v=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(le,ue){u[" "+le]||(v.test(le)?u[" "+le]=le+"/":u[" "+le]=T(le,"/",!0)),le=u[" "+le];var j=le.indexOf(":")===-1;return ue.substring(0,2)==="//"?j?ue:le.replace(f,"$1")+ue:ue.charAt(0)==="/"?j?ue:le.replace(m,"$1")+ue:le+ue}var L={exec:function(){}};function D(le){for(var ue=1,j,z;ue<arguments.length;ue++){j=arguments[ue];for(z in j)Object.prototype.hasOwnProperty.call(j,z)&&(le[z]=j[z])}return le}function I(le,ue){var j=le.replace(/\|/g,function(J,te,G){for(var ae=!1,me=te;--me>=0&&G[me]==="\\";)ae=!ae;return ae?"|":" |"}),z=j.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(le,ue,j){var z=le.length;if(z===0)return"";for(var U=0;U<z;){var J=le.charAt(z-U-1);if(J===ue&&!j)U++;else if(J!==ue&&j)U++;else break}return le.slice(0,z-U)}function O(le,ue){if(le.indexOf(ue[1])===-1)return-1;for(var j=le.length,z=0,U=0;U<j;U++)if(le[U]==="\\")U++;else if(le[U]===ue[0])z++;else if(le[U]===ue[1]&&(z--,z<0))return U;return-1}function R(le){le&&le.sanitize&&!le.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 A(le,ue){if(ue<1)return"";for(var j="";ue>1;)ue&1&&(j+=le),ue>>=1,le+=le;return j+le}function N(le,ue,j,z){var U=ue.href,J=ue.title?s(ue.title):null,te=le[1].replace(/\\([\[\]])/g,"$1");if(le[0].charAt(0)!=="!"){z.state.inLink=!0;var G={type:"link",raw:j,href:U,title:J,text:te,tokens:z.inlineTokens(te)};return z.state.inLink=!1,G}return{type:"image",raw:j,href:U,title:J,text:s(te)}}function P(le,ue){var j=le.match(/^(\s+)(?:```)/);if(j===null)return ue;var z=j[1];return ue.split(`
- `).map(function(U){var J=U.match(/^\s+/);if(J===null)return U;var te=J[0];return te.length>=z.length?U.slice(z.length):U}).join(`
- `)}var x=function(){function le(j){this.options=j||K.defaults}var ue=le.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 J=U[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:U[0],codeBlockStyle:"indented",text:this.options.pedantic?J:T(J,`
- `)}}},ue.fences=function(z){var U=this.rules.block.fences.exec(z);if(U){var J=U[0],te=P(J,U[3]||"");return{type:"code",raw:J,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 J=U[2].trim();if(/#$/.test(J)){var te=T(J,"#");(this.options.pedantic||!te||/ $/.test(te))&&(J=te.trim())}return{type:"heading",raw:U[0],depth:U[1].length,text:J,tokens:this.lexer.inline(J)}}},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 J=U[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:U[0],tokens:this.lexer.blockTokens(J,[]),text:J}}},ue.list=function(z){var U=this.rules.block.list.exec(z);if(U){var J,te,G,ae,me,Ce,Se,ye,Ee,De,ke,Ie,he=U[1].trim(),ve=he.length>1,de={type:"list",raw:"",ordered:ve,start:ve?+he.slice(0,-1):"",loose:!1,items:[]};he=ve?"\\d{1,9}\\"+he.slice(-1):"\\"+he,this.options.pedantic&&(he=ve?he:"[*+-]");for(var pe=new RegExp("^( {0,3}"+he+")((?:[ ][^\\n]*)?(?:\\n|$))");z&&(Ie=!1,!(!(U=pe.exec(z))||this.rules.block.hr.test(z)));){if(J=U[0],z=z.substring(J.length),ye=U[2].split(`
- `,1)[0],Ee=z.split(`
- `,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(Ee)&&(J+=Ee+`
- `,z=z.substring(Ee.length+1),Ie=!0),!Ie)for(var Le=new RegExp("^ {0,"+Math.min(3,ae-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),Ne=new RegExp("^ {0,"+Math.min(3,ae-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),be=new RegExp("^ {0,"+Math.min(3,ae-1)+"}(?:```|~~~)"),_e=new RegExp("^ {0,"+Math.min(3,ae-1)+"}#");z&&(De=z.split(`
- `,1)[0],ye=De,this.options.pedantic&&(ye=ye.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(be.test(ye)||_e.test(ye)||Le.test(ye)||Ne.test(z)));){if(ye.search(/[^ ]/)>=ae||!ye.trim())ke+=`
- `+ye.slice(ae);else if(!Ce)ke+=`
- `+ye;else break;!Ce&&!ye.trim()&&(Ce=!0),J+=De+`
- `,z=z.substring(De.length+1)}de.loose||(Se?de.loose=!0:/\n *\n *$/.test(J)&&(Se=!0)),this.options.gfm&&(te=/^\[[ xX]\] /.exec(ke),te&&(G=te[0]!=="[ ] ",ke=ke.replace(/^\[[ xX]\] +/,""))),de.items.push({type:"list_item",raw:J,task:!!te,checked:G,loose:!1,text:ke}),de.raw+=J}de.items[de.items.length-1].raw=J.trimRight(),de.items[de.items.length-1].text=ke.trimRight(),de.raw=de.raw.trimRight();var Te=de.items.length;for(me=0;me<Te;me++){this.lexer.state.top=!1,de.items[me].tokens=this.lexer.blockTokens(de.items[me].text,[]);var Oe=de.items[me].tokens.filter(function(Be){return Be.type==="space"}),Pe=Oe.every(function(Be){for(var Fe=Be.raw.split(""),ze=0,Ze=E(Fe),Ge;!(Ge=Ze()).done;){var tt=Ge.value;if(tt===`
- `&&(ze+=1),ze>1)return!0}return!1});!de.loose&&Oe.length&&Pe&&(de.loose=!0,de.items[me].loose=!0)}return de}},ue.html=function(z){var U=this.rules.block.html.exec(z);if(U){var J={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]):s(U[0]);J.type="paragraph",J.text=te,J.tokens=this.lexer.inline(te)}return J}},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 J=U[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:J,raw:U[0],href:U[2],title:U[3]}}},ue.table=function(z){var U=this.rules.block.table.exec(z);if(U){var J={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(`
- `):[]};if(J.header.length===J.align.length){J.raw=U[0];var te=J.align.length,G,ae,me,Ce;for(G=0;G<te;G++)/^ *-+: *$/.test(J.align[G])?J.align[G]="right":/^ *:-+: *$/.test(J.align[G])?J.align[G]="center":/^ *:-+ *$/.test(J.align[G])?J.align[G]="left":J.align[G]=null;for(te=J.rows.length,G=0;G<te;G++)J.rows[G]=I(J.rows[G],J.header.length).map(function(Se){return{text:Se}});for(te=J.header.length,ae=0;ae<te;ae++)J.header[ae].tokens=this.lexer.inline(J.header[ae].text);for(te=J.rows.length,ae=0;ae<te;ae++)for(Ce=J.rows[ae],me=0;me<Ce.length;me++)Ce[me].tokens=this.lexer.inline(Ce[me].text);return J}}},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 J=U[1].charAt(U[1].length-1)===`
- `?U[1].slice(0,-1):U[1];return{type:"paragraph",raw:U[0],text:J,tokens:this.lexer.inline(J)}}},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:s(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]):s(U[0]):U[0]}},ue.link=function(z){var U=this.rules.inline.link.exec(z);if(U){var J=U[2].trim();if(!this.options.pedantic&&/^</.test(J)){if(!/>$/.test(J))return;var te=T(J.slice(0,-1),"\\");if((J.length-te.length)%2===0)return}else{var G=O(U[2],"()");if(G>-1){var ae=U[0].indexOf("!")===0?5:4,me=ae+U[1].length+G;U[2]=U[2].substring(0,G),U[0]=U[0].substring(0,me).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(J)?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 J;if((J=this.rules.inline.reflink.exec(z))||(J=this.rules.inline.nolink.exec(z))){var te=(J[2]||J[1]).replace(/\s+/g," ");if(te=U[te.toLowerCase()],!te||!te.href){var G=J[0].charAt(0);return{type:"text",raw:G,text:G}}return N(J,te,J[0],this.lexer)}},ue.emStrong=function(z,U,J){J===void 0&&(J="");var te=this.rules.inline.emStrong.lDelim.exec(z);if(te&&!(te[3]&&J.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&&(J===""||this.rules.inline.punctuation.exec(J))){var ae=te[0].length-1,me,Ce,Se=ae,ye=0,Ee=te[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ee.lastIndex=0,U=U.slice(-1*z.length+ae);(te=Ee.exec(U))!=null;)if(me=te[1]||te[2]||te[3]||te[4]||te[5]||te[6],!!me){if(Ce=me.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 De=z.slice(1,ae+te.index+Ce);return{type:"em",raw:z.slice(0,ae+te.index+Ce+1),text:De,tokens:this.lexer.inlineTokens(De)}}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 J=U[2].replace(/\n/g," "),te=/[^ ]/.test(J),G=/^ /.test(J)&&/ $/.test(J);return te&&G&&(J=J.substring(1,J.length-1)),J=s(J,!0),{type:"codespan",raw:U[0],text:J}}},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 J=this.rules.inline.autolink.exec(z);if(J){var te,G;return J[2]==="@"?(te=s(this.options.mangle?U(J[1]):J[1]),G="mailto:"+te):(te=s(J[1]),G=te),{type:"link",raw:J[0],text:te,href:G,tokens:[{type:"text",raw:te,text:te}]}}},ue.url=function(z,U){var J;if(J=this.rules.inline.url.exec(z)){var te,G;if(J[2]==="@")te=s(this.options.mangle?U(J[0]):J[0]),G="mailto:"+te;else{var ae;do ae=J[0],J[0]=this.rules.inline._backpedal.exec(J[0])[0];while(ae!==J[0]);te=s(J[0]),J[1]==="www."?G="http://"+te:G=te}return{type:"link",raw:J[0],text:te,href:G,tokens:[{type:"text",raw:te,text:te}]}}},ue.inlineText=function(z,U){var J=this.rules.inline.text.exec(z);if(J){var te;return this.lexer.state.inRawBlock?te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):s(J[0]):J[0]:te=s(this.options.smartypants?U(J[0]):J[0]),{type:"text",raw:J[0],text:te}}},le}(),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:L,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=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,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=D({},F),F.gfm=D({},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=D({},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:L,paragraph:o(F.normal._paragraph).replace("hr",F.hr).replace("heading",` *#{1,6} *[^
- ]`).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:L,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:L,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};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("(?:-->|$)","-->").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=D({},B),B.pedantic=D({},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=D({},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=D({},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(le){return le.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 $(le){var ue="",j,z,U=le.length;for(j=0;j<U;j++)z=le.charCodeAt(j),Math.random()>.5&&(z="x"+z.toString(16)),ue+="&#"+z+";";return ue}var M=function(){function le(j){this.tokens=[],this.tokens.links=Object.create(null),this.options=j||K.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}le.lex=function(z,U){var J=new le(U);return J.lex(z)},le.lexInline=function(z,U){var J=new le(U);return J.inlineTokens(z)};var ue=le.prototype;return ue.lex=function(z){z=z.replace(/\r\n|\r/g,`
- `),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 J=this;U===void 0&&(U=[]),this.options.pedantic?z=z.replace(/\t/g," ").replace(/^ +$/gm,""):z=z.replace(/^( *)(\t+)/gm,function(Se,ye,Ee){return ye+" ".repeat(Ee.length)});for(var te,G,ae,me;z;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Se){return(te=Se.call({lexer:J},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+=`
- `: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+=`
- `+te.raw,G.text+=`
- `+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+=`
- `+te.raw,G.text+=`
- `+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),Ee=void 0;J.options.extensions.startBlock.forEach(function(De){Ee=De.call({lexer:this},ye),typeof Ee=="number"&&Ee>=0&&(Se=Math.min(Se,Ee))}),Se<1/0&&Se>=0&&(ae=z.substring(0,Se+1))}(),this.state.top&&(te=this.tokenizer.paragraph(ae))){G=U[U.length-1],me&&G.type==="paragraph"?(G.raw+=`
- `+te.raw,G.text+=`
- `+te.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=G.text):U.push(te),me=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+=`
- `+te.raw,G.text+=`
- `+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 J=this;U===void 0&&(U=[]);var te,G,ae,me=z,Ce,Se,ye;if(this.tokens.links){var Ee=Object.keys(this.tokens.links);if(Ee.length>0)for(;(Ce=this.tokenizer.rules.inline.reflinkSearch.exec(me))!=null;)Ee.includes(Ce[0].slice(Ce[0].lastIndexOf("[")+1,-1))&&(me=me.slice(0,Ce.index)+"["+A("a",Ce[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ce=this.tokenizer.rules.inline.blockSkip.exec(me))!=null;)me=me.slice(0,Ce.index)+"["+A("a",Ce[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ce=this.tokenizer.rules.inline.escapedEmSt.exec(me))!=null;)me=me.slice(0,Ce.index)+"++"+me.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;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:J},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,me,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,$)){z=z.substring(te.raw.length),U.push(te);continue}if(!this.state.inLink&&(te=this.tokenizer.url(z,$))){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,Ie=z.slice(1),he=void 0;J.options.extensions.startInline.forEach(function(ve){he=ve.call({lexer:this},Ie),typeof he=="number"&&he>=0&&(ke=Math.min(ke,he))}),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 De="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(De);break}else throw new Error(De)}}return U},_(le,null,[{key:"rules",get:function(){return{block:F,inline:B}}}]),le}(),Q=function(){function le(j){this.options=j||K.defaults}var ue=le.prototype;return ue.code=function(z,U,J){var te=(U||"").match(/\S*/)[0];if(this.options.highlight){var G=this.options.highlight(z,te);G!=null&&G!==z&&(J=!0,z=G)}return z=z.replace(/\n$/,"")+`
- `,te?'<pre><code class="'+this.options.langPrefix+s(te,!0)+'">'+(J?z:s(z,!0))+`</code></pre>
- `:"<pre><code>"+(J?z:s(z,!0))+`</code></pre>
- `},ue.blockquote=function(z){return`<blockquote>
- `+z+`</blockquote>
- `},ue.html=function(z){return z},ue.heading=function(z,U,J,te){if(this.options.headerIds){var G=this.options.headerPrefix+te.slug(J);return"<h"+U+' id="'+G+'">'+z+"</h"+U+`>
- `}return"<h"+U+">"+z+"</h"+U+`>
- `},ue.hr=function(){return this.options.xhtml?`<hr/>
- `:`<hr>
- `},ue.list=function(z,U,J){var te=U?"ol":"ul",G=U&&J!==1?' start="'+J+'"':"";return"<"+te+G+`>
- `+z+"</"+te+`>
- `},ue.listitem=function(z){return"<li>"+z+`</li>
- `},ue.checkbox=function(z){return"<input "+(z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ue.paragraph=function(z){return"<p>"+z+`</p>
- `},ue.table=function(z,U){return U&&(U="<tbody>"+U+"</tbody>"),`<table>
- <thead>
- `+z+`</thead>
- `+U+`</table>
- `},ue.tablerow=function(z){return`<tr>
- `+z+`</tr>
- `},ue.tablecell=function(z,U){var J=U.header?"th":"td",te=U.align?"<"+J+' align="'+U.align+'">':"<"+J+">";return te+z+("</"+J+`>
- `)},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,J){if(z=a(this.options.sanitize,this.options.baseUrl,z),z===null)return J;var te='<a href="'+s(z)+'"';return U&&(te+=' title="'+U+'"'),te+=">"+J+"</a>",te},ue.image=function(z,U,J){if(z=a(this.options.sanitize,this.options.baseUrl,z),z===null)return J;var te='<img src="'+z+'" alt="'+J+'"';return U&&(te+=' title="'+U+'"'),te+=this.options.xhtml?"/>":">",te},ue.text=function(z){return z},le}(),ie=function(){function le(){}var ue=le.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,J){return""+J},ue.image=function(z,U,J){return""+J},ue.br=function(){return""},le}(),re=function(){function le(){this.seen={}}var ue=le.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 J=z,te=0;if(this.seen.hasOwnProperty(J)){te=this.seen[z];do te++,J=z+"-"+te;while(this.seen.hasOwnProperty(J))}return U||(this.seen[z]=te,this.seen[J]=0),J},ue.slug=function(z,U){U===void 0&&(U={});var J=this.serialize(z);return this.getNextSafeSlug(J,U.dryrun)},le}(),ne=function(){function le(j){this.options=j||K.defaults,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new re}le.parse=function(z,U){var J=new le(U);return J.parse(z)},le.parseInline=function(z,U){var J=new le(U);return J.parseInline(z)};var ue=le.prototype;return ue.parse=function(z,U){U===void 0&&(U=!0);var J="",te,G,ae,me,Ce,Se,ye,Ee,De,ke,Ie,he,ve,de,pe,Le,Ne,be,_e,Te=z.length;for(te=0;te<Te;te++){if(ke=z[te],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ke.type]&&(_e=this.options.extensions.renderers[ke.type].call({parser:this},ke),_e!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(ke.type))){J+=_e||"";continue}switch(ke.type){case"space":continue;case"hr":{J+=this.renderer.hr();continue}case"heading":{J+=this.renderer.heading(this.parseInline(ke.tokens),ke.depth,d(this.parseInline(ke.tokens,this.textRenderer)),this.slugger);continue}case"code":{J+=this.renderer.code(ke.text,ke.lang,ke.escaped);continue}case"table":{for(Ee="",ye="",me=ke.header.length,G=0;G<me;G++)ye+=this.renderer.tablecell(this.parseInline(ke.header[G].tokens),{header:!0,align:ke.align[G]});for(Ee+=this.renderer.tablerow(ye),De="",me=ke.rows.length,G=0;G<me;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]});De+=this.renderer.tablerow(ye)}J+=this.renderer.table(Ee,De);continue}case"blockquote":{De=this.parse(ke.tokens),J+=this.renderer.blockquote(De);continue}case"list":{for(Ie=ke.ordered,he=ke.start,ve=ke.loose,me=ke.items.length,De="",G=0;G<me;G++)pe=ke.items[G],Le=pe.checked,Ne=pe.task,de="",pe.task&&(be=this.renderer.checkbox(Le),ve?pe.tokens.length>0&&pe.tokens[0].type==="paragraph"?(pe.tokens[0].text=be+" "+pe.tokens[0].text,pe.tokens[0].tokens&&pe.tokens[0].tokens.length>0&&pe.tokens[0].tokens[0].type==="text"&&(pe.tokens[0].tokens[0].text=be+" "+pe.tokens[0].tokens[0].text)):pe.tokens.unshift({type:"text",text:be}):de+=be),de+=this.parse(pe.tokens,ve),De+=this.renderer.listitem(de,Ne,Le);J+=this.renderer.list(De,Ie,he);continue}case"html":{J+=this.renderer.html(ke.text);continue}case"paragraph":{J+=this.renderer.paragraph(this.parseInline(ke.tokens));continue}case"text":{for(De=ke.tokens?this.parseInline(ke.tokens):ke.text;te+1<Te&&z[te+1].type==="text";)ke=z[++te],De+=`
- `+(ke.tokens?this.parseInline(ke.tokens):ke.text);J+=U?this.renderer.paragraph(De):De;continue}default:{var Oe='Token with "'+ke.type+'" type was not found.';if(this.options.silent){console.error(Oe);return}else throw new Error(Oe)}}}return J},ue.parseInline=function(z,U){U=U||this.renderer;var J="",te,G,ae,me=z.length;for(te=0;te<me;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))){J+=ae||"";continue}switch(G.type){case"escape":{J+=U.text(G.text);break}case"html":{J+=U.html(G.text);break}case"link":{J+=U.link(G.href,G.title,this.parseInline(G.tokens,U));break}case"image":{J+=U.image(G.href,G.title,G.text);break}case"strong":{J+=U.strong(this.parseInline(G.tokens,U));break}case"em":{J+=U.em(this.parseInline(G.tokens,U));break}case"codespan":{J+=U.codespan(G.text);break}case"br":{J+=U.br();break}case"del":{J+=U.del(this.parseInline(G.tokens,U));break}case"text":{J+=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 J},le}();function se(le,ue,j){if(typeof le>"u"||le===null)throw new Error("marked(): input parameter is undefined or null");if(typeof le!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(le)+", string expected");if(typeof ue=="function"&&(j=ue,ue=null),ue=D({},se.defaults,ue||{}),R(ue),j){var z=ue.highlight,U;try{U=M.lex(le,ue)}catch(me){return j(me)}var J=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?j(Ce):j(null,Se)};if(!z||z.length<3||(delete ue.highlight,!U.length))return J();var te=0;se.walkTokens(U,function(me){me.type==="code"&&(te++,setTimeout(function(){z(me.text,me.lang,function(Ce,Se){if(Ce)return J(Ce);Se!=null&&Se!==me.text&&(me.text=Se,me.escaped=!0),te--,te===0&&J()})},0))}),te===0&&J();return}function G(me){if(me.message+=`
- Please report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+s(me.message+"",!0)+"</pre>";throw me}try{var ae=M.lex(le,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(me){G(me)}}se.options=se.setOptions=function(le){return D(se.defaults,le),b(se.defaults),se},se.getDefaults=w,se.defaults=K.defaults,se.use=function(){for(var le=arguments.length,ue=new Array(le),j=0;j<le;j++)ue[j]=arguments[j];var z=D.apply(void 0,[{}].concat(ue)),U=se.defaults.extensions||{renderers:{},childTokens:{}},J;ue.forEach(function(te){if(te.extensions&&(J=!0,te.extensions.forEach(function(ae){if(!ae.name)throw new Error("extension name required");if(ae.renderer){var me=U.renderers?U.renderers[ae.name]:null;me?U.renderers[ae.name]=function(){for(var Ce=arguments.length,Se=new Array(Ce),ye=0;ye<Ce;ye++)Se[ye]=arguments[ye];var Ee=ae.renderer.apply(this,Se);return Ee===!1&&(Ee=me.apply(this,Se)),Ee}: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 Q,me=function(ye){var Ee=ae[ye];ae[ye]=function(){for(var De=arguments.length,ke=new Array(De),Ie=0;Ie<De;Ie++)ke[Ie]=arguments[Ie];var he=te.renderer[ye].apply(ae,ke);return he===!1&&(he=Ee.apply(ae,ke)),he}};for(var Ce in te.renderer)me(Ce);z.renderer=ae}(),te.tokenizer&&function(){var ae=se.defaults.tokenizer||new x,me=function(ye){var Ee=ae[ye];ae[ye]=function(){for(var De=arguments.length,ke=new Array(De),Ie=0;Ie<De;Ie++)ke[Ie]=arguments[Ie];var he=te.tokenizer[ye].apply(ae,ke);return he===!1&&(he=Ee.apply(ae,ke)),he}};for(var Ce in te.tokenizer)me(Ce);z.tokenizer=ae}(),te.walkTokens){var G=se.defaults.walkTokens;z.walkTokens=function(ae){var me=[];return me.push(te.walkTokens.call(this,ae)),G&&(me=me.concat(G.call(this,ae))),me}}J&&(z.extensions=U),se.setOptions(z)})},se.walkTokens=function(le,ue){for(var j=[],z=function(){var G=J.value;switch(j=j.concat(ue.call(se,G)),G.type){case"table":{for(var ae=E(G.header),me;!(me=ae()).done;){var Ce=me.value;j=j.concat(se.walkTokens(Ce.tokens,ue))}for(var Se=E(G.rows),ye;!(ye=Se()).done;)for(var Ee=ye.value,De=E(Ee),ke;!(ke=De()).done;){var Ie=ke.value;j=j.concat(se.walkTokens(Ie.tokens,ue))}break}case"list":{j=j.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(he){j=j.concat(se.walkTokens(G[he],ue))}):G.tokens&&(j=j.concat(se.walkTokens(G.tokens,ue)))}},U=E(le),J;!(J=U()).done;)z();return j},se.parseInline=function(le,ue){if(typeof le>"u"||le===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof le!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(le)+", string expected");ue=D({},se.defaults,ue||{}),R(ue);try{var j=M.lexInline(le,ue);return ue.walkTokens&&se.walkTokens(j,ue.walkTokens),ne.parseInline(j,ue)}catch(z){if(z.message+=`
- Please report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+s(z.message+"",!0)+"</pre>";throw z}},se.Parser=ne,se.parser=ne.parse,se.Renderer=Q,se.TextRenderer=ie,se.Lexer=M,se.lexer=M.lex,se.Tokenizer=x,se.Slugger=re,se.parse=se;var H=se.options,W=se.setOptions,q=se.use,Z=se.walkTokens,Y=se.parseInline,oe=se,ce=ne.parse,ge=M.lex;K.Lexer=M,K.Parser=ne,K.Renderer=Q,K.Slugger=re,K.TextRenderer=ie,K.Tokenizer=x,K.getDefaults=w,K.lexer=ge,K.marked=se,K.options=H,K.parse=oe,K.parseInline=Y,K.parser=ce,K.setOptions=W,K.use=q,K.walkTokens=Z,Object.defineProperty(K,"__esModule",{value:!0})}),define(X[102],ee([1,0]),function(K,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(X[159],ee([1,0,102]),function(K,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}}),define(X[368],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class _{constructor(y,E=0,w=y.length,b=E-1){this.items=y,this.start=E,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(X[369],ee([1,0,368]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class k{constructor(E=[],w=10){this._initialize(E),this._limit=w,this._onChange()}getHistory(){return this._elements}add(E){this._history.delete(E),this._history.add(E),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(E){return this._history.has(E)}_onChange(){this._reduceToLimit();const E=this._elements;this._navigator=new _.ArrayNavigator(E,0,E.length,E.length)}_reduceToLimit(){const E=this._elements;E.length>this._limit&&this._initialize(E.slice(E.length-this._limit))}_currentPosition(){const E=this._navigator.current();return E?this._elements.indexOf(E):-1}_initialize(E){this._history=new Set;for(const w of E)this._history.add(w)}get _elements(){const E=[];return this._history.forEach(w=>E.push(w)),E}}e.HistoryNavigator=k}),define(X[133],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function _(E,w,b){return Math.min(Math.max(E,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 y{constructor(w){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(w),this._values.fill(0,0,w)}update(w){const b=this._values[this._index];return this._values[this._index]=w,this._index=(this._index+1)%this._values.length,this._sum-=b,this._sum+=w,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=y}),define(X[134],ee([1,0]),function(K,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 y(){return _}e.getLogger=y;class E{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(d){return w([b(i("| ",this.indentation)),d])}formatInfo(d){return d.didChange?[b(" "),g(p(d.oldValue,70),{color:"red",strikeThrough:!0}),b(" "),g(p(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=E;function w(r){const d=new Array,o={};let c="";function l(u){if("length"in u)for(const v of u)v&&l(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)}l(r);const a=[c,...d];return Object.keys(o).length>0&&a.push(o),a}function b(r){return g(r,{color:"black"})}function S(r){return g(s(`${r}: `,10),{color:"black",bold:!0})}function g(r,d={color:"black"}){function h(c){return Object.entries(c).reduce((l,[a,u])=>`${l}${a}:${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 p(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)?n(r,d):t(r,d);case"symbol":return r.toString();case"function":return`[[Function${r.name?" "+r.name:""}]]`;default:return""+r}}function n(r,d){let h="[ ",o=!0;for(const c of r){if(o||(h+=", "),h.length-5>d){h+="...";break}o=!1,h+=`${p(c,d-h.length)}`}return h+=" ]",h}function t(r,d){let h="{ ",o=!0;for(const[c,l]of Object.entries(r)){if(o||(h+=", "),h.length-5>d){h+="...";break}o=!1,h+=`${c}: ${p(l,d-h.length)}`}return h+=" }",h}function i(r,d){let h="";for(let o=1;o<=d;o++)h+=r;return h}function s(r,d){for(;r.length<d;)r+=" ";return r}}),define(X[370],ee([1,0,134]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutorunObserver=e.autorunHandleChanges=e.autorun=void 0;function k(w,b){return new E(w,b,void 0)}e.autorun=k;function y(w,b,S){return new E(w,S,b.handleChange)}e.autorunHandleChanges=y;class E{constructor(b,S,g){var p;this.debugName=b,this.runFn=S,this._handleChange=g,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,(p=(0,_.getLogger)())===null||p===void 0||p.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const b of this.dependencies)b.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var b;if(this.state===3)return;const S=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=S,this.state=3,(b=(0,_.getLogger)())===null||b===void 0||b.handleAutorunTriggered(this);try{this.runFn(this)}finally{for(const g of this.dependenciesToBeRemoved)g.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 b of this.dependencies)if(b.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--}handlePossibleChange(b){this.state===3&&this.dependencies.has(b)&&(this.state=1)}handleChange(b,S){this.dependencies.has(b)&&(!this._handleChange||this._handleChange({changedObservable:b,change:S,didChange:p=>p===b}))&&(this.state=2)}readObservable(b){if(this.disposed)return b.get();b.addObserver(this);const S=b.get();return this.dependencies.add(b),this.dependenciesToBeRemoved.delete(b),S}}e.AutorunObserver=E,function(w){w.Observer=E}(k||(e.autorun=k={}))}),define(X[135],ee([1,0,134]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableObservableValue=e.disposableObservableValue=e.ObservableValue=e.observableValue=e.getFunctionName=e.TransactionImpl=e.transaction=e.BaseObservable=e.ConvenientObservable=e._setDerived=void 0;let k;function y(s){k=s}e._setDerived=y;class E{get TChange(){return null}reportChanges(){this.get()}read(r){return r?r.readObservable(this):this.get()}map(r){return k(()=>{const d=g(r);return d!==void 0?d:`${this.debugName} (mapped)`},d=>r(this.read(d),d))}}e.ConvenientObservable=E;class w extends E{constructor(){super(...arguments),this.observers=new Set}addObserver(r){const d=this.observers.size;this.observers.add(r),d===0&&this.onFirstObserverAdded()}removeObserver(r){this.observers.delete(r)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=w;function b(s,r){var d,h;const o=new S(s,r);try{(d=(0,_.getLogger)())===null||d===void 0||d.handleBeginTransaction(o),s(o)}finally{o.finish(),(h=(0,_.getLogger)())===null||h===void 0||h.handleEndTransaction()}}e.transaction=b;class S{constructor(r,d){this.fn=r,this._getDebugName=d,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():g(this.fn)}updateObserver(r,d){this.updatingObservers.push({observer:r,observable:d}),r.beginUpdate(d)}finish(){const r=this.updatingObservers;this.updatingObservers=null;for(const{observer:d,observable:h}of r)d.endUpdate(h)}}e.TransactionImpl=S;function g(s){const r=s.toString(),h=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(r),o=h?h[1]:void 0;return o?.trim()}e.getFunctionName=g;function p(s,r){return new n(s,r)}e.observableValue=p;class n extends w{constructor(r,d){super(),this.debugName=r,this._value=d}get(){return this._value}set(r,d,h){var o;if(this._value===r)return;let c;d||(d=c=new S(()=>{},()=>`Setting ${this.debugName}`));try{const l=this._value;this._setValue(r),(o=(0,_.getLogger)())===null||o===void 0||o.handleObservableChanged(this,{oldValue:l,newValue:r,change:h,didChange:!0});for(const a of this.observers)d.updateObserver(a,this),a.handleChange(this,h)}finally{c&&c.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(r){this._value=r}}e.ObservableValue=n;function t(s,r){return new i(s,r)}e.disposableObservableValue=t;class i extends n{_setValue(r){this._value!==r&&(this._value&&this._value.dispose(),this._value=r)}dispose(){var r;(r=this._value)===null||r===void 0||r.dispose()}}e.DisposableObservableValue=i}),define(X[371],ee([1,0,11,135,134]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Derived=e.derived=void 0;function E(b,S){return new w(b,S)}e.derived=E,(0,k._setDerived)(E);class w extends k.BaseObservable{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(S,g){var p;super(),this._debugName=S,this.computeFn=g,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,(p=(0,y.getLogger)())===null||p===void 0||p.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const S of this.dependencies)S.removeObserver(this);this.dependencies.clear()}get(){if(this.observers.size===0){const S=this.computeFn(this);return this.onLastObserverRemoved(),S}else{do{if(this.state===1){this.state=3;for(const S of this.dependencies)if(S.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var S;if(this.state===3)return;const g=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=g;const p=this.state!==0,n=this.value;this.state=3;try{this.value=this.computeFn(this)}finally{for(const i of this.dependenciesToBeRemoved)i.removeObserver(this);this.dependenciesToBeRemoved.clear()}const t=p&&n!==this.value;if((S=(0,y.getLogger)())===null||S===void 0||S.handleDerivedRecomputed(this,{oldValue:n,newValue:this.value,change:void 0,didChange:t}),t)for(const i of this.observers)i.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(){this.updateCount++;const S=this.updateCount===1;if(this.state===3&&(this.state=1,!S))for(const g of this.observers)g.handlePossibleChange(this);if(S)for(const g of this.observers)g.beginUpdate(this)}endUpdate(){if(this.updateCount--,this.updateCount===0){const S=[...this.observers];for(const g of S)g.endUpdate(this)}if(this.updateCount<0)throw new _.BugIndicatingError}handlePossibleChange(S){if(this.state===3&&this.dependencies.has(S)){this.state=1;for(const g of this.observers)g.handlePossibleChange(this)}}handleChange(S,g){const p=this.state===3;if((this.state===1||p)&&this.dependencies.has(S)&&(this.state=2,p))for(const n of this.observers)n.handlePossibleChange(this)}readObservable(S){S.addObserver(this);const g=S.get();return this.dependencies.add(S),this.dependenciesToBeRemoved.delete(S),g}}e.Derived=w}),define(X[372],ee([1,0,135,134]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.constObservable=void 0;function y(t){return new E(t)}e.constObservable=y;class E extends _.ConvenientObservable{constructor(i){super(),this.value=i}get debugName(){return this.toString()}get(){return this.value}addObserver(i){}removeObserver(i){}toString(){return`Const: ${this.value}`}}function w(t,i){return new b(t,i)}e.observableFromEvent=w;class b extends _.BaseObservable{constructor(i,s){super(),this.event=i,this.getValue=s,this.hasValue=!1,this.handleEvent=r=>{var d;const h=this.getValue(r),o=!this.hasValue||this.value!==h;(d=(0,k.getLogger)())===null||d===void 0||d.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:h,change:void 0,didChange:o}),o&&(this.value=h,this.hasValue&&(0,_.transaction)(c=>{for(const l of this.observers)c.updateObserver(l,this),l.handleChange(this,void 0)},()=>{const c=this.getDebugName();return"Event fired"+(c?`: ${c}`:"")}),this.hasValue=!0)}}getDebugName(){return(0,_.getFunctionName)(this.getValue)}get debugName(){const i=this.getDebugName();return"From Event"+(i?`: ${i}`:"")}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=b,function(t){t.Observer=b}(w||(e.observableFromEvent=w={}));function S(t,i){return new g(t,i)}e.observableSignalFromEvent=S;class g extends _.BaseObservable{constructor(i,s){super(),this.debugName=i,this.event=s,this.handleEvent=()=>{(0,_.transaction)(r=>{for(const d of this.observers)r.updateObserver(d,this),d.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function p(t){return new n(t)}e.observableSignal=p;class n extends _.BaseObservable{constructor(i){super(),this.debugName=i}trigger(i,s){if(!i){(0,_.transaction)(r=>{this.trigger(r,s)},()=>`Trigger signal ${this.debugName}`);return}for(const r of this.observers)i.updateObserver(r,this),r.handleChange(this,s)}get(){}}});var ri=this&&this.__createBinding||(Object.create?function(K,e,_,k){k===void 0&&(k=_);var y=Object.getOwnPropertyDescriptor(e,_);(!y||("get"in y?!e.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return e[_]}}),Object.defineProperty(K,k,y)}:function(K,e,_,k){k===void 0&&(k=_),K[k]=e[_]}),ai=this&&this.__exportStar||function(K,e){for(var _ in K)_!=="default"&&!Object.prototype.hasOwnProperty.call(e,_)&&ri(e,K,_)};define(X[80],ee([1,0,135,371,370,372,134]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autorunHandleChanges=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 y.autorun}}),Object.defineProperty(e,"autorunHandleChanges",{enumerable:!0,get:function(){return y.autorunHandleChanges}}),ai(E,e),!1&&(0,w.setLogger)(new w.ConsoleObservableLogger)}),define(X[160],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var _;(function(k){function y(S,g){if(S.start>=g.end||g.start>=S.end)return{start:0,end:0};const p=Math.max(S.start,g.start),n=Math.min(S.end,g.end);return n-p<=0?{start:0,end:0}:{start:p,end:n}}k.intersect=y;function E(S){return S.end-S.start<=0}k.isEmpty=E;function w(S,g){return!E(y(S,g))}k.intersects=w;function b(S,g){const p=[],n={start:S.start,end:Math.min(g.start,S.end)},t={start:Math.max(g.end,S.start),end:S.end};return E(n)||p.push(n),E(t)||p.push(t),p}k.relativeComplement=b})(_||(e.Range=_={}))}),define(X[373],ee([1,0,160]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function k(S,g){const p=[];for(const n of g){if(S.start>=n.range.end)continue;if(S.end<n.range.start)break;const t=_.Range.intersect(S,n.range);_.Range.isEmpty(t)||p.push({range:t,size:n.size})}return p}e.groupIntersect=k;function y({start:S,end:g},p){return{start:S+p,end:g+p}}e.shift=y;function E(S){const g=[];let p=null;for(const n of S){const t=n.range.start,i=n.range.end,s=n.size;if(p&&s===p.size){p.range.end=i;continue}p={range:{start:t,end:i},size:s},g.push(p)}return g}e.consolidate=E;function w(...S){return E(S.reduce((g,p)=>g.concat(p),[]))}class b{constructor(){this.groups=[],this._size=0}splice(g,p,n=[]){const t=n.length-p,i=k({start:0,end:g},this.groups),s=k({start:g+p,end:Number.POSITIVE_INFINITY},this.groups).map(d=>({range:y(d.range,t),size:d.size})),r=n.map((d,h)=>({range:{start:g+h,end:g+h+1},size:d.size}));this.groups=w(i,r,s),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 p=0,n=0;for(const t of this.groups){const i=t.range.end-t.range.start,s=n+i*t.size;if(g<s)return p+Math.floor((g-n)/t.size);p+=i,n=s}return p}indexAfter(g){return Math.min(this.indexAt(g)+1,this.count)}positionAt(g){if(g<0)return-1;let p=0,n=0;for(const t of this.groups){const i=t.range.end-t.range.start,s=n+i;if(g<s)return p+(g-n)*t.size;p+=i*t.size,n=s}return-1}}e.RangeMap=b}),define(X[9],ee([1,0,250,101]),function(K,e,_,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.singleLetterHash=e.containsUppercaseCharacter=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.escapeRegExpCharacters=e.escape=e.format=e.isFalsyOrWhitespace=void 0;function E(G){return!G||typeof G!="string"?!0:G.trim().length===0}e.isFalsyOrWhitespace=E;const w=/{(\d+)}/g;function b(G,...ae){return ae.length===0?G:G.replace(w,function(me,Ce){const Se=parseInt(Ce,10);return isNaN(Se)||Se<0||Se>=ae.length?me: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 p(G,ae=" "){const me=n(G,ae);return t(me,ae)}e.trim=p;function n(G,ae){if(!G||!ae)return G;const me=ae.length;if(me===0||G.length===0)return G;let Ce=0;for(;G.indexOf(ae,Ce)===Ce;)Ce=Ce+me;return G.substring(Ce)}e.ltrim=n;function t(G,ae){if(!G||!ae)return G;const me=ae.length,Ce=G.length;if(me===0||Ce===0)return G;let Se=Ce,ye=-1;for(;ye=G.lastIndexOf(ae,Se-1),!(ye===-1||ye+me!==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 s(G){return G.replace(/\*/g,"")}e.stripWildcards=s;function r(G,ae,me={}){if(!G)throw new Error("Cannot create regex from empty string");ae||(G=g(G)),me.wholeWord&&(/\B/.test(G.charAt(0))||(G="\\b"+G),/\B/.test(G.charAt(G.length-1))||(G=G+"\\b"));let Ce="";return me.global&&(Ce+="g"),me.matchCase||(Ce+="i"),me.multiline&&(Ce+="m"),me.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,me=G.length;ae<me;ae++){const Ce=G.charCodeAt(ae);if(Ce!==32&&Ce!==9)return ae}return-1}e.firstNonWhitespaceIndex=c;function l(G,ae=0,me=G.length){for(let Ce=ae;Ce<me;Ce++){const Se=G.charCodeAt(Ce);if(Se!==32&&Se!==9)return G.substring(ae,Ce)}return G.substring(ae,me)}e.getLeadingWhitespace=l;function a(G,ae=G.length-1){for(let me=ae;me>=0;me--){const Ce=G.charCodeAt(me);if(Ce!==32&&Ce!==9)return me}return-1}e.lastNonWhitespaceIndex=a;function u(G,ae){return G<ae?-1:G>ae?1:0}e.compare=u;function v(G,ae,me=0,Ce=G.length,Se=0,ye=ae.length){for(;me<Ce&&Se<ye;me++,Se++){const ke=G.charCodeAt(me),Ie=ae.charCodeAt(Se);if(ke<Ie)return-1;if(ke>Ie)return 1}const Ee=Ce-me,De=ye-Se;return Ee<De?-1:Ee>De?1:0}e.compareSubstring=v;function f(G,ae){return m(G,ae,0,G.length,0,ae.length)}e.compareIgnoreCase=f;function m(G,ae,me=0,Ce=G.length,Se=0,ye=ae.length){for(;me<Ce&&Se<ye;me++,Se++){let ke=G.charCodeAt(me),Ie=ae.charCodeAt(Se);if(ke===Ie)continue;if(ke>=128||Ie>=128)return v(G.toLowerCase(),ae.toLowerCase(),me,Ce,Se,ye);L(ke)&&(ke-=32),L(Ie)&&(Ie-=32);const he=ke-Ie;if(he!==0)return he}const Ee=Ce-me,De=ye-Se;return Ee<De?-1:Ee>De?1:0}e.compareSubstringIgnoreCase=m;function C(G){return G>=48&&G<=57}e.isAsciiDigit=C;function L(G){return G>=97&&G<=122}e.isLowerAsciiLetter=L;function D(G){return G>=65&&G<=90}e.isUpperAsciiLetter=D;function I(G,ae){return G.length===ae.length&&m(G,ae)===0}e.equalsIgnoreCase=I;function T(G,ae){const me=ae.length;return ae.length>G.length?!1:m(G,ae,0,me)===0}e.startsWithIgnoreCase=T;function O(G,ae){const me=Math.min(G.length,ae.length);let Ce;for(Ce=0;Ce<me;Ce++)if(G.charCodeAt(Ce)!==ae.charCodeAt(Ce))return Ce;return me}e.commonPrefixLength=O;function R(G,ae){const me=Math.min(G.length,ae.length);let Ce;const Se=G.length-1,ye=ae.length-1;for(Ce=0;Ce<me;Ce++)if(G.charCodeAt(Se-Ce)!==ae.charCodeAt(ye-Ce))return Ce;return me}e.commonSuffixLength=R;function A(G){return 55296<=G&&G<=56319}e.isHighSurrogate=A;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,me){const Ce=G.charCodeAt(me);if(A(Ce)&&me+1<ae){const Se=G.charCodeAt(me+1);if(N(Se))return P(Ce,Se)}return Ce}e.getNextCodePoint=x;function F(G,ae){const me=G.charCodeAt(ae-1);if(N(me)&&ae>1){const Ce=G.charCodeAt(ae-2);if(A(Ce))return P(Ce,me)}return me}class B{get offset(){return this._offset}constructor(ae,me=0){this._str=ae,this._len=ae.length,this._offset=me}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,me=0){this._iterator=new B(ae,me)}nextGraphemeLength(){const ae=le.getInstance(),me=this._iterator,Ce=me.offset;let Se=ae.getGraphemeBreakType(me.nextCodePoint());for(;!me.eol();){const ye=me.offset,Ee=ae.getGraphemeBreakType(me.nextCodePoint());if(ge(Se,Ee)){me.setOffset(ye);break}Se=Ee}return me.offset-Ce}prevGraphemeLength(){const ae=le.getInstance(),me=this._iterator,Ce=me.offset;let Se=ae.getGraphemeBreakType(me.prevCodePoint());for(;me.offset>0;){const ye=me.offset,Ee=ae.getGraphemeBreakType(me.prevCodePoint());if(ge(Ee,Se)){me.setOffset(ye);break}Se=Ee}return Ce-me.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=V;function $(G,ae){return new V(G,ae).nextGraphemeLength()}e.nextCharLength=$;function M(G,ae){return new V(G,ae).prevGraphemeLength()}e.prevCharLength=M;function Q(G,ae){ae>0&&N(G.charCodeAt(ae))&&ae--;const me=ae+$(G,ae);return[me-M(G,me),me]}e.getCharContainingOffset=Q;let ie;function re(){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=re()),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 q(G){return G>=11904&&G<=55215||G>=63744&&G<=64255||G>=65281&&G<=65374}e.isFullWidthCharacter=q;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 Y(G){return!!(G&&G.length>0&&G.charCodeAt(0)===65279)}e.startsWithUTF8BOM=Y;function oe(G,ae=!1){return G?(ae&&(G=G.replace(/\\./g,"")),G.toLowerCase()!==G):!1}e.containsUppercaseCharacter=oe;function ce(G){return G=G%(2*26),G<26?String.fromCharCode(97+G):String.fromCharCode(65+G-26)}e.singleLetterHash=ce;function ge(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 le{static getInstance(){return le._INSTANCE||(le._INSTANCE=new le),le._INSTANCE}constructor(){this._data=ue()}getGraphemeBreakType(ae){if(ae<32)return ae===10?3:ae===13?2:4;if(ae<127)return 0;const me=this._data,Ce=me.length/3;let Se=1;for(;Se<=Ce;)if(ae<me[3*Se])Se=2*Se;else if(ae>me[3*Se+1])Se=2*Se+1;else return me[3*Se+2];return 0}}le._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 j(G,ae){if(G===0)return 0;const me=z(G,ae);if(me!==void 0)return me;const Ce=new B(ae,G);return Ce.prevCodePoint(),Ce.offset}e.getLeftDeleteOffset=j;function z(G,ae){const me=new B(ae,G);let Ce=me.prevCodePoint();for(;U(Ce)||Ce===65039||Ce===8419;){if(me.offset===0)return;Ce=me.prevCodePoint()}if(!Z(Ce))return;let Se=me.offset;return Se>0&&me.prevCodePoint()===8205&&(Se=me.offset),Se}function U(G){return 127995<=G&&G<=127999}e.noBreakWhitespace="\xA0";class J{static getInstance(ae){return J.cache.get(Array.from(ae))}static getLocales(){return J._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=J,y=J,J.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]}')),J.cache=new _.LRUCachedFunction(G=>{function ae(Ie){const he=new Map;for(let ve=0;ve<Ie.length;ve+=2)he.set(Ie[ve],Ie[ve+1]);return he}function me(Ie,he){const ve=new Map(Ie);for(const[de,pe]of he)ve.set(de,pe);return ve}function Ce(Ie,he){if(!Ie)return he;const ve=new Map;for(const[de,pe]of Ie)he.has(de)&&ve.set(de,pe);return ve}const Se=y.ambiguousCharacterData.value;let ye=G.filter(Ie=>!Ie.startsWith("_")&&Ie in Se);ye.length===0&&(ye=["_default"]);let Ee;for(const Ie of ye){const he=ae(Se[Ie]);Ee=Ce(Ee,he)}const De=ae(Se._common),ke=me(De,Ee);return new J(ke)}),J._locales=new k.Lazy(()=>Object.keys(J.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(X[64],ee([1,0,56,9]),function(K,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 y(...j){return function(z,U){for(let J=0,te=j.length;J<te;J++){const G=j[J](z,U);if(G)return G}return null}}e.or=y,e.matchesStrictPrefix=E.bind(void 0,!1),e.matchesPrefix=E.bind(void 0,!0);function E(j,z,U){if(!U||U.length<z.length)return null;let J;return j?J=k.startsWithIgnoreCase(U,z):J=U.indexOf(z)===0,J?z.length>0?[{start:0,end:z.length}]:[]:null}function w(j,z){const U=z.toLowerCase().indexOf(j.toLowerCase());return U===-1?null:[{start:U,end:U+j.length}]}e.matchesContiguousSubString=w;function b(j,z){return S(j.toLowerCase(),z.toLowerCase(),0,0)}e.matchesSubString=b;function S(j,z,U,J){if(U===j.length)return[];if(J===z.length)return null;if(j[U]===z[J]){let te=null;return(te=S(j,z,U+1,J+1))?h({start:J,end:J+1},te):null}return S(j,z,U,J+1)}function g(j){return 97<=j&&j<=122}function p(j){return 65<=j&&j<=90}e.isUpper=p;function n(j){return 48<=j&&j<=57}function t(j){return j===32||j===9||j===10||j===13}const i=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(j=>i.add(j.charCodeAt(0)));function s(j){return t(j)||i.has(j)}function r(j,z){return j===z||s(j)&&s(z)}function d(j){return g(j)||p(j)||n(j)}function h(j,z){return z.length===0?z=[j]:j.end===z[0].start?z[0].start=j.start:z.unshift(j),z}function o(j,z){for(let U=z;U<j.length;U++){const J=j.charCodeAt(U);if(p(J)||n(J)||U>0&&!d(j.charCodeAt(U-1)))return U}return j.length}function c(j,z,U,J){if(U===j.length)return[];if(J===z.length)return null;if(j[U]!==z[J].toLowerCase())return null;{let te=null,G=J+1;for(te=c(j,z,U+1,J+1);!te&&(G=o(z,G))<z.length;)te=c(j,z,U+1,G),G++;return te===null?null:h({start:J,end:J+1},te)}}function l(j){let z=0,U=0,J=0,te=0,G=0;for(let ye=0;ye<j.length;ye++)G=j.charCodeAt(ye),p(G)&&z++,g(G)&&U++,d(G)&&J++,n(G)&&te++;const ae=z/j.length,me=U/j.length,Ce=J/j.length,Se=te/j.length;return{upperPercent:ae,lowerPercent:me,alphaPercent:Ce,numericPercent:Se}}function a(j){const{upperPercent:z,lowerPercent:U}=j;return U===0&&z>.6}function u(j){const{upperPercent:z,lowerPercent:U,alphaPercent:J,numericPercent:te}=j;return U>.2&&z<.8&&J>.6&&te<.2}function v(j){let z=0,U=0,J=0,te=0;for(let G=0;G<j.length;G++)J=j.charCodeAt(G),p(J)&&z++,g(J)&&U++,t(J)&&te++;return(z===0||U===0)&&te===0?j.length<=30:z<=5}function f(j,z){if(!z||(z=z.trim(),z.length===0)||!v(j)||z.length>60)return null;const U=l(z);if(!u(U)){if(!a(U))return null;z=z.toLowerCase()}let J=null,te=0;for(j=j.toLowerCase();te<z.length&&(J=c(j,z,0,te))===null;)te=o(z,te+1);return J}e.matchesCamelCase=f;function m(j,z,U=!1){if(!z||z.length===0)return null;let J=null,te=0;for(j=j.toLowerCase(),z=z.toLowerCase();te<z.length&&(J=C(j,z,0,te,U))===null;)te=L(z,te+1);return J}e.matchesWords=m;function C(j,z,U,J,te){if(U===j.length)return[];if(J===z.length)return null;if(r(j.charCodeAt(U),z.charCodeAt(J))){let G=null,ae=J+1;if(G=C(j,z,U+1,J+1,te),!te)for(;!G&&(ae=L(z,ae))<z.length;)G=C(j,z,U+1,ae,te),ae++;return G?j.charCodeAt(U)!==z.charCodeAt(J)?G:h({start:J,end:J+1},G):null}else return null}function L(j,z){for(let U=z;U<j.length;U++)if(s(j.charCodeAt(U))||U>0&&s(j.charCodeAt(U-1)))return U;return j.length}const D=y(e.matchesPrefix,f,w),I=y(e.matchesPrefix,f,b),T=new _.LRUCache(1e4);function O(j,z,U=!1){if(typeof j!="string"||typeof z!="string")return null;let J=T.get(j);J||(J=new RegExp(k.convertSimple2RegExpPattern(j),"i"),T.set(j,J));const te=J.exec(z);return te?[{start:te.index,end:te.index+te[0].length}]:U?I(j,z):D(j,z)}e.matchesFuzzy=O;function R(j,z,U,J,te,G){const ae=Math.min(13,j.length);for(;U<ae;U++){const me=Y(j,z,U,J,te,G,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(me)return me}return[0,G]}e.anyScore=R;function A(j){if(typeof j>"u")return[];const z=[],U=j[1];for(let J=j.length-1;J>1;J--){const te=j[J]+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=A;const N=128;function P(){const j=[],z=[];for(let U=0;U<=N;U++)z[U]=0;for(let U=0;U<=N;U++)j.push(z.slice(0));return j}function x(j){const z=[];for(let U=0;U<=j;U++)z[U]=0;return z}const F=x(2*N),B=x(2*N),V=P(),$=P(),M=P(),Q=!1;function ie(j,z,U,J,te){function G(me,Ce,Se=" "){for(;me.length<Ce;)me=Se+me;return me}let ae=` | |${J.split("").map(me=>G(me,3)).join("|")}
- `;for(let me=0;me<=U;me++)me===0?ae+=" |":ae+=`${z[me-1]}|`,ae+=j[me].slice(0,te+1).map(Ce=>G(Ce.toString(),3)).join("|")+`
- `;return ae}function re(j,z,U,J){j=j.substr(z),U=U.substr(J),console.log(ie($,j,j.length,U,U.length)),console.log(ie(M,j,j.length,U,U.length)),console.log(ie(V,j,j.length,U,U.length))}function ne(j,z){if(z<0||z>=j.length)return!1;const U=j.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(j,z){if(z<0||z>=j.length)return!1;switch(j.charCodeAt(z)){case 32:case 9:return!0;default:return!1}}function H(j,z,U){return z[j]!==U[j]}function W(j,z,U,J,te,G,ae=!1){for(;z<U&&te<G;)j[z]===J[te]&&(ae&&(F[z]=te),z+=1),te+=1;return z===U}e.isPatternInWord=W;var q;(function(j){j.Default=[-100,0];function z(U){return!U||U.length===2&&U[0]===-100&&U[1]===0}j.isDefault=z})(q||(e.FuzzyScore=q={}));class Z{constructor(z,U){this.firstMatchCanBeWeak=z,this.boostFullMatch=U}}e.FuzzyScoreOptions=Z,Z.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};function Y(j,z,U,J,te,G,ae=Z.default){const me=j.length>N?N:j.length,Ce=J.length>N?N:J.length;if(U>=me||G>=Ce||me-U>Ce-G||!W(z,U,me,te,G,Ce,!0))return;oe(me,Ce,U,G,z,te);let Se=1,ye=1,Ee=U,De=G;const ke=[!1];for(Se=1,Ee=U;Ee<me;Se++,Ee++){const pe=F[Ee],Le=B[Ee],Ne=Ee+1<me?B[Ee+1]:Ce;for(ye=pe-G+1,De=pe;De<Ne;ye++,De++){let be=Number.MIN_SAFE_INTEGER,_e=!1;De<=Le&&(be=ce(j,z,Ee,U,J,te,De,Ce,G,V[Se-1][ye-1]===0,ke));let Te=0;be!==Number.MAX_SAFE_INTEGER&&(_e=!0,Te=be+$[Se-1][ye-1]);const Oe=De>pe,Pe=Oe?$[Se][ye-1]+(V[Se][ye-1]>0?-5:0):0,Be=De>pe+1&&V[Se][ye-1]>0,Fe=Be?$[Se][ye-2]+(V[Se][ye-2]>0?-5:0):0;if(Be&&(!Oe||Fe>=Pe)&&(!_e||Fe>=Te))$[Se][ye]=Fe,M[Se][ye]=3,V[Se][ye]=0;else if(Oe&&(!_e||Pe>=Te))$[Se][ye]=Pe,M[Se][ye]=2,V[Se][ye]=0;else if(_e)$[Se][ye]=Te,M[Se][ye]=1,V[Se][ye]=V[Se-1][ye-1]+1;else throw new Error("not possible")}}if(Q&&re(j,U,J,G),!ke[0]&&!ae.firstMatchCanBeWeak)return;Se--,ye--;const Ie=[$[Se][ye],G];let he=0,ve=0;for(;Se>=1;){let pe=ye;do{const Le=M[Se][pe];if(Le===3)pe=pe-2;else if(Le===2)pe=pe-1;else break}while(pe>=1);he>1&&z[U+Se-1]===te[G+ye-1]&&!H(pe+G-1,J,te)&&he+1>V[Se][pe]&&(pe=ye),pe===ye?he++:he=1,ve||(ve=pe),Se--,ye=pe-1,Ie.push(ye)}Ce===me&&ae.boostFullMatch&&(Ie[0]+=2);const de=ve-me;return Ie[0]-=de,Ie}e.fuzzyScore=Y;function oe(j,z,U,J,te,G){let ae=j-1,me=z-1;for(;ae>=U&&me>=J;)te[ae]===G[me]&&(B[ae]=me,ae--),me--}function ce(j,z,U,J,te,G,ae,me,Ce,Se,ye){if(z[U]!==G[ae])return Number.MIN_SAFE_INTEGER;let Ee=1,De=!1;return ae===U-J?Ee=j[U]===te[ae]?7:5:H(ae,te,G)&&(ae===0||!H(ae-1,te,G))?(Ee=j[U]===te[ae]?7:5,De=!0):ne(G,ae)&&(ae===0||!ne(G,ae-1))?Ee=5:(ne(G,ae-1)||se(G,ae-1))&&(Ee=5,De=!0),Ee>1&&U===J&&(ye[0]=!0),De||(De=H(ae,te,G)||ne(G,ae-1)||se(G,ae-1)),U===J?ae>Ce&&(Ee-=De?3:5):Se?Ee+=De?2:0:Ee+=De?0:1,ae+1===me&&(Ee-=De?3:5),Ee}function ge(j,z,U,J,te,G,ae){return le(j,z,U,J,te,G,!0,ae)}e.fuzzyScoreGracefulAggressive=ge;function le(j,z,U,J,te,G,ae,me){let Ce=Y(j,z,U,J,te,G,me);if(Ce&&!ae)return Ce;if(j.length>=3){const Se=Math.min(7,j.length-1);for(let ye=U+1;ye<Se;ye++){const Ee=ue(j,ye);if(Ee){const De=Y(Ee,Ee.toLowerCase(),U,J,te,G,me);De&&(De[0]-=3,(!Ce||De[0]>Ce[0])&&(Ce=De))}}}return Ce}function ue(j,z){if(z+1>=j.length)return;const U=j[z],J=j[z+1];if(U!==J)return j.slice(0,z)+J+U+j.slice(z+2)}}),define(X[136],ee([1,0,9]),function(K,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 y(r,0)}e.hash=k;function y(r,d){switch(typeof r){case"object":return r===null?E(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 E(r,d);case"undefined":return E(937,d);default:return E(617,d)}}e.doHash=y;function E(r,d){return(d<<5)-d+r|0}e.numberHash=E;function w(r,d){return E(r?433:863,d)}function b(r,d){d=E(149417,d);for(let h=0,o=r.length;h<o;h++)d=E(r.charCodeAt(h),d);return d}e.stringHash=b;function S(r,d){return d=E(104579,d),r.reduce((h,o)=>y(o,h),d)}function g(r,d){return d=E(181387,d),Object.keys(r).sort().reduce((h,o)=>(h=b(o,h),y(r[o],h)),d)}function p(r,d,h=32){const o=h-d,c=~((1<<o)-1);return(r<<d|(c&r)>>>o)>>>0}function n(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 s{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(d){const h=d.length;if(h===0)return;const o=this._buff;let c=this._buffLen,l=this._leftoverHighSurrogate,a,u;for(l!==0?(a=l,u=-1,l=0):(a=d.charCodeAt(0),u=0);;){let v=a;if(_.isHighSurrogate(a))if(u+1<h){const f=d.charCodeAt(u+1);_.isLowSurrogate(f)?(u++,v=_.computeCodePoint(a,f)):v=65533}else{l=a;break}else _.isLowSurrogate(a)&&(v=65533);if(c=this._push(o,c,v),u++,u<h)a=d.charCodeAt(u);else break}this._buffLen=c,this._leftoverHighSurrogate=l}_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,n(this._buff,this._buffLen),this._buffLen>56&&(this._step(),n(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=s._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,p(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,l=this._h2,a=this._h3,u=this._h4,v,f,m;for(let C=0;C<80;C++)C<20?(v=c&l|~c&a,f=1518500249):C<40?(v=c^l^a,f=1859775393):C<60?(v=c&l|c&a|l&a,f=2400959708):(v=c^l^a,f=3395469782),m=p(o,5)+v+u+f+d.getUint32(C*4,!1)&4294967295,u=a,a=l,l=p(c,30),c=o,o=m;this._h0=this._h0+o&4294967295,this._h1=this._h1+c&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+u&4294967295}}e.StringSHA1=s,s._bigBlock32=new DataView(new ArrayBuffer(320))}),define(X[161],ee([1,0,364,136]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class y{constructor(n){this.source=n}getElements(){const n=this.source,t=new Int32Array(n.length);for(let i=0,s=n.length;i<s;i++)t[i]=n.charCodeAt(i);return t}}e.StringDiffSequence=y;function E(p,n,t){return new g(new y(p),new y(n)).ComputeDiff(t).changes}e.stringDiff=E;class w{static Assert(n,t){if(!n)throw new Error(t)}}class b{static Copy(n,t,i,s,r){for(let d=0;d<r;d++)i[s+d]=n[t+d]}static Copy2(n,t,i,s,r){for(let d=0;d<r;d++)i[s+d]=n[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(n,t){this.m_originalStart=Math.min(this.m_originalStart,n),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(n,t){this.m_originalStart=Math.min(this.m_originalStart,n),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class g{constructor(n,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=n,this._modifiedSequence=t;const[s,r,d]=g._getElements(n),[h,o,c]=g._getElements(t);this._hasStrings=d&&c,this._originalStringElements=s,this._originalElementsOrHash=r,this._modifiedStringElements=h,this._modifiedElementsOrHash=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(n){return n.length>0&&typeof n[0]=="string"}static _getElements(n){const t=n.getElements();if(g._isStringArray(t)){const i=new Int32Array(t.length);for(let s=0,r=t.length;s<r;s++)i[s]=(0,k.stringHash)(t[s],0);return[t,i,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(n,t){return this._originalElementsOrHash[n]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[n]===this._modifiedStringElements[t]:!0}ElementsAreStrictEqual(n,t){if(!this.ElementsAreEqual(n,t))return!1;const i=g._getStrictElement(this._originalSequence,n),s=g._getStrictElement(this._modifiedSequence,t);return i===s}static _getStrictElement(n,t){return typeof n.getStrictElement=="function"?n.getStrictElement(t):null}OriginalElementsAreEqual(n,t){return this._originalElementsOrHash[n]!==this._originalElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[n]===this._originalStringElements[t]:!0}ModifiedElementsAreEqual(n,t){return this._modifiedElementsOrHash[n]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._modifiedStringElements[n]===this._modifiedStringElements[t]:!0}ComputeDiff(n){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,n)}_ComputeDiff(n,t,i,s,r){const d=[!1];let h=this.ComputeDiffRecursive(n,t,i,s,d);return r&&(h=this.PrettifyChanges(h)),{quitEarly:d[0],changes:h}}ComputeDiffRecursive(n,t,i,s,r){for(r[0]=!1;n<=t&&i<=s&&this.ElementsAreEqual(n,i);)n++,i++;for(;t>=n&&s>=i&&this.ElementsAreEqual(t,s);)t--,s--;if(n>t||i>s){let a;return i<=s?(w.Assert(n===t+1,"originalStart should only be one more than originalEnd"),a=[new _.DiffChange(n,0,i,s-i+1)]):n<=t?(w.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),a=[new _.DiffChange(n,t-n+1,i,0)]):(w.Assert(n===t+1,"originalStart should only be one more than originalEnd"),w.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}const d=[0],h=[0],o=this.ComputeRecursionPoint(n,t,i,s,d,h,r),c=d[0],l=h[0];if(o!==null)return o;if(!r[0]){const a=this.ComputeDiffRecursive(n,c,i,l,r);let u=[];return r[0]?u=[new _.DiffChange(c+1,t-(c+1)+1,l+1,s-(l+1)+1)]:u=this.ComputeDiffRecursive(c+1,t,l+1,s,r),this.ConcatenateChanges(a,u)}return[new _.DiffChange(n,t-n+1,i,s-i+1)]}WALKTRACE(n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D){let I=null,T=null,O=new S,R=t,A=i,N=v[0]-C[0]-s,P=-1073741824,x=this.m_forwardHistory.length-1;do{const F=N+n;F===R||F<A&&c[F-1]<c[F+1]?(a=c[F+1],f=a-N-s,a<P&&O.MarkNextChange(),P=a,O.AddModifiedElement(a+1,f),N=F+1-n):(a=c[F-1]+1,f=a-N-s,a<P&&O.MarkNextChange(),P=a-1,O.AddOriginalElement(a,f+1),N=F-1-n),x>=0&&(c=this.m_forwardHistory[x],n=c[0],R=1,A=c.length-1)}while(--x>=-1);if(I=O.getReverseChanges(),D[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,m-B+1)]}else{O=new S,R=d,A=h,N=v[0]-C[0]-o,P=1073741824,x=L?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const F=N+r;F===R||F<A&&l[F-1]>=l[F+1]?(a=l[F+1]-1,f=a-N-o,a>P&&O.MarkNextChange(),P=a+1,O.AddOriginalElement(a+1,f+1),N=F+1-r):(a=l[F-1],f=a-N-o,a>P&&O.MarkNextChange(),P=a,O.AddModifiedElement(a+1,f+1),N=F-1-r),x>=0&&(l=this.m_reverseHistory[x],r=l[0],R=1,A=l.length-1)}while(--x>=-1);T=O.getChanges()}return this.ConcatenateChanges(I,T)}ComputeRecursionPoint(n,t,i,s,r,d,h){let o=0,c=0,l=0,a=0,u=0,v=0;n--,i--,r[0]=0,d[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-n+(s-i),m=f+1,C=new Int32Array(m),L=new Int32Array(m),D=s-i,I=t-n,T=n-i,O=t-s,A=(I-D)%2===0;C[D]=n,L[I]=t,h[0]=!1;for(let N=1;N<=f/2+1;N++){let P=0,x=0;l=this.ClipDiagonalBound(D-N,N,D,m),a=this.ClipDiagonalBound(D+N,N,D,m);for(let B=l;B<=a;B+=2){B===l||B<a&&C[B-1]<C[B+1]?o=C[B+1]:o=C[B-1]+1,c=o-(B-D)-T;const V=o;for(;o<t&&c<s&&this.ElementsAreEqual(o+1,c+1);)o++,c++;if(C[B]=o,o+c>P+x&&(P=o,x=c),!A&&Math.abs(B-I)<=N-1&&o>=L[B])return r[0]=o,d[0]=c,V<=L[B]&&1447>0&&N<=1447+1?this.WALKTRACE(D,l,a,T,I,u,v,O,C,L,o,t,r,c,s,d,A,h):null}const F=(P-n+(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(D,l,a,T,I,u,v,O,C,L,o,t,r,c,s,d,A,h):(n++,i++,[new _.DiffChange(n,t-n+1,i,s-i+1)]);u=this.ClipDiagonalBound(I-N,N,I,m),v=this.ClipDiagonalBound(I+N,N,I,m);for(let B=u;B<=v;B+=2){B===u||B<v&&L[B-1]>=L[B+1]?o=L[B+1]-1:o=L[B-1],c=o-(B-I)-O;const V=o;for(;o>n&&c>i&&this.ElementsAreEqual(o,c);)o--,c--;if(L[B]=o,A&&Math.abs(B-D)<=N&&o<=C[B])return r[0]=o,d[0]=c,V>=C[B]&&1447>0&&N<=1447+1?this.WALKTRACE(D,l,a,T,I,u,v,O,C,L,o,t,r,c,s,d,A,h):null}if(N<=1447){let B=new Int32Array(a-l+2);B[0]=D-l+1,b.Copy2(C,l,B,1,a-l+1),this.m_forwardHistory.push(B),B=new Int32Array(v-u+2),B[0]=I-u+1,b.Copy2(L,u,B,1,v-u+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(D,l,a,T,I,u,v,O,C,L,o,t,r,c,s,d,A,h)}PrettifyChanges(n){for(let t=0;t<n.length;t++){const i=n[t],s=t<n.length-1?n[t+1].originalStart:this._originalElementsOrHash.length,r=t<n.length-1?n[t+1].modifiedStart:this._modifiedElementsOrHash.length,d=i.originalLength>0,h=i.modifiedLength>0;for(;i.originalStart+i.originalLength<s&&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<n.length-1&&this.ChangesOverlap(n[t],n[t+1],o)){n[t]=o[0],n.splice(t+1,1),t--;continue}}for(let t=n.length-1;t>=0;t--){const i=n[t];let s=0,r=0;if(t>0){const a=n[t-1];s=a.originalStart+a.originalLength,r=a.modifiedStart+a.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 a=1;;a++){const u=i.originalStart-a,v=i.modifiedStart-a;if(u<s||v<r||d&&!this.OriginalElementsAreEqual(u,u+i.originalLength)||h&&!this.ModifiedElementsAreEqual(v,v+i.modifiedLength))break;const m=(u===s&&v===r?5:0)+this._boundaryScore(u,i.originalLength,v,i.modifiedLength);m>c&&(c=m,o=a)}i.originalStart-=o,i.modifiedStart-=o;const l=[null];if(t>0&&this.ChangesOverlap(n[t-1],n[t],l)){n[t-1]=l[0],n.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=n.length;t<i;t++){const s=n[t-1],r=n[t],d=r.originalStart-s.originalStart-s.originalLength,h=s.originalStart,o=r.originalStart+r.originalLength,c=o-h,l=s.modifiedStart,a=r.modifiedStart+r.modifiedLength,u=a-l;if(d<5&&c<20&&u<20){const v=this._findBetterContiguousSequence(h,c,l,u,d);if(v){const[f,m]=v;(f!==s.originalStart+s.originalLength||m!==s.modifiedStart+s.modifiedLength)&&(s.originalLength=f-s.originalStart,s.modifiedLength=m-s.modifiedStart,r.originalStart=f+d,r.modifiedStart=m+d,r.originalLength=o-r.originalStart,r.modifiedLength=a-r.modifiedStart)}}}return n}_findBetterContiguousSequence(n,t,i,s,r){if(t<r||s<r)return null;const d=n+t-r+1,h=i+s-r+1;let o=0,c=0,l=0;for(let a=n;a<d;a++)for(let u=i;u<h;u++){const v=this._contiguousSequenceScore(a,u,r);v>0&&v>o&&(o=v,c=a,l=u)}return o>0?[c,l]:null}_contiguousSequenceScore(n,t,i){let s=0;for(let r=0;r<i;r++){if(!this.ElementsAreEqual(n+r,t+r))return 0;s+=this._originalStringElements[n+r].length}return s}_OriginalIsBoundary(n){return n<=0||n>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[n])}_OriginalRegionIsBoundary(n,t){if(this._OriginalIsBoundary(n)||this._OriginalIsBoundary(n-1))return!0;if(t>0){const i=n+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(n){return n<=0||n>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[n])}_ModifiedRegionIsBoundary(n,t){if(this._ModifiedIsBoundary(n)||this._ModifiedIsBoundary(n-1))return!0;if(t>0){const i=n+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(n,t,i,s){const r=this._OriginalRegionIsBoundary(n,t)?1:0,d=this._ModifiedRegionIsBoundary(i,s)?1:0;return r+d}ConcatenateChanges(n,t){const i=[];if(n.length===0||t.length===0)return t.length>0?t:n;if(this.ChangesOverlap(n[n.length-1],t[0],i)){const s=new Array(n.length+t.length-1);return b.Copy(n,0,s,0,n.length-1),s[n.length-1]=i[0],b.Copy(t,1,s,n.length,t.length-1),s}else{const s=new Array(n.length+t.length);return b.Copy(n,0,s,0,n.length),b.Copy(t,0,s,n.length,t.length),s}}ChangesOverlap(n,t,i){if(w.Assert(n.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),w.Assert(n.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),n.originalStart+n.originalLength>=t.originalStart||n.modifiedStart+n.modifiedLength>=t.modifiedStart){const s=n.originalStart;let r=n.originalLength;const d=n.modifiedStart;let h=n.modifiedLength;return n.originalStart+n.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-n.originalStart),n.modifiedStart+n.modifiedLength>=t.modifiedStart&&(h=t.modifiedStart+t.modifiedLength-n.modifiedStart),i[0]=new _.DiffChange(s,r,d,h),!0}else return i[0]=null,!1}ClipDiagonalBound(n,t,i,s){if(n>=0&&n<s)return n;const r=i,d=s-i-1,h=t%2===0;if(n<0){const o=r%2===0;return h===o?0:1}else{const o=d%2===0;return h===o?s-1:s-2}}}e.LcsDiff=g}),define(X[374],ee([1,0,9]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function k(w,b){if(w&&w[0]!==""){const S=y(w,b,"-"),g=y(w,b,"_");return S&&!g?E(w,b,"-"):!S&&g?E(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 y(w,b,S){return w[0].indexOf(S)!==-1&&b.indexOf(S)!==-1&&w[0].split(S).length===b.split(S).length}function E(w,b,S){const g=b.split(S),p=w[0].split(S);let n="";return g.forEach((t,i)=>{n+=k([p[i]],t)+S}),n.slice(0,-1)}}),define(X[103],ee([1,0,9]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var k;(function(y){y[y.Ignore=0]="Ignore",y[y.Info=1]="Info",y[y.Warning=2]="Warning",y[y.Error=3]="Error"})(k||(k={})),function(y){const E="error",w="warning",b="warn",S="info",g="ignore";function p(t){return t?_.equalsIgnoreCase(E,t)?y.Error:_.equalsIgnoreCase(w,t)||_.equalsIgnoreCase(b,t)?y.Warning:_.equalsIgnoreCase(S,t)?y.Info:y.Ignore:y.Ignore}y.fromValue=p;function n(t){switch(t){case y.Error:return E;case y.Warning:return w;case y.Info:return S;default:return g}}y.toString=n}(k||(k={})),e.default=k}),define(X[251],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(X[189],ee([1,0,9]),function(K,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(p){return this._value=p,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(p){const n=p.charCodeAt(0),t=this._value.charCodeAt(this._pos);return n-t}value(){return this._value[this._pos]}}e.StringIterator=k;class y{constructor(p=!0){this._caseSensitive=p}reset(p){return this._value=p,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let p=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(p)this._from++;else break;else p=!1;return this}cmp(p){return this._caseSensitive?(0,_.compareSubstring)(p,this._value,0,p.length,this._from,this._to):(0,_.compareSubstringIgnoreCase)(p,this._value,0,p.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=y;class E{constructor(p=!0,n=!0){this._splitOnBackslash=p,this._caseSensitive=n}reset(p){this._from=0,this._to=0,this._value=p,this._valueLen=p.length;for(let n=p.length-1;n>=0;n--,this._valueLen--){const t=this._value.charCodeAt(n);if(!(t===47||this._splitOnBackslash&&t===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let p=!0;for(;this._to<this._valueLen;this._to++){const n=this._value.charCodeAt(this._to);if(n===47||this._splitOnBackslash&&n===92)if(p)this._from++;else break;else p=!1}return this}cmp(p){return this._caseSensitive?(0,_.compareSubstring)(p,this._value,0,p.length,this._from,this._to):(0,_.compareSubstringIgnoreCase)(p,this._value,0,p.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=E;class w{constructor(p,n){this._ignorePathCasing=p,this._ignoreQueryAndFragment=n,this._states=[],this._stateIdx=0}reset(p){return this._value=p,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new E(!1,!this._ignorePathCasing(p)),this._pathIterator.reset(p.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(p)||(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(p){if(this._states[this._stateIdx]===1)return(0,_.compareIgnoreCase)(p,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,_.compareIgnoreCase)(p,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(p);if(this._states[this._stateIdx]===4)return(0,_.compare)(p,this._value.query);if(this._states[this._stateIdx]===5)return(0,_.compare)(p,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 p=this.right;return this.right=p.left,p.left=this,this.updateHeight(),p.updateHeight(),p}rotateRight(){const p=this.left;return this.left=p.right,p.right=this,this.updateHeight(),p.updateHeight(),p}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var p,n;return(n=(p=this.left)===null||p===void 0?void 0:p.height)!==null&&n!==void 0?n:0}get heightRight(){var p,n;return(n=(p=this.right)===null||p===void 0?void 0:p.height)!==null&&n!==void 0?n:0}}class S{static forUris(p=()=>!1,n=()=>!1){return new S(new w(p,n))}static forStrings(){return new S(new k)}static forConfigKeys(){return new S(new y)}constructor(p){this._iter=p}clear(){this._root=void 0}set(p,n){const t=this._iter.reset(p);let i;this._root||(this._root=new b,this._root.segment=t.value());const s=[];for(i=this._root;;){const d=t.cmp(i.segment);if(d>0)i.left||(i.left=new b,i.left.segment=t.value()),s.push([-1,i]),i=i.left;else if(d<0)i.right||(i.right=new b,i.right.segment=t.value()),s.push([1,i]),i=i.right;else if(t.hasNext())t.next(),i.mid||(i.mid=new b,i.mid.segment=t.value()),s.push([0,i]),i=i.mid;else break}const r=i.value;i.value=n,i.key=p;for(let d=s.length-1;d>=0;d--){const h=s[d][1];h.updateHeight();const o=h.balanceFactor();if(o<-1||o>1){const c=s[d][0],l=s[d+1][0];if(c===1&&l===1)s[d][1]=h.rotateLeft();else if(c===-1&&l===-1)s[d][1]=h.rotateRight();else if(c===1&&l===-1)h.right=s[d+1][1]=s[d+1][1].rotateRight(),s[d][1]=h.rotateLeft();else if(c===-1&&l===1)h.left=s[d+1][1]=s[d+1][1].rotateLeft(),s[d][1]=h.rotateRight();else throw new Error;if(d>0)switch(s[d-1][0]){case-1:s[d-1][1].left=s[d][1];break;case 1:s[d-1][1].right=s[d][1];break;case 0:s[d-1][1].mid=s[d][1];break}else this._root=s[0][1]}}return r}get(p){var n;return(n=this._getNode(p))===null||n===void 0?void 0:n.value}_getNode(p){const n=this._iter.reset(p);let t=this._root;for(;t;){const i=n.cmp(t.segment);if(i>0)t=t.left;else if(i<0)t=t.right;else if(n.hasNext())n.next(),t=t.mid;else break}return t}has(p){const n=this._getNode(p);return!(n?.value===void 0&&n?.mid===void 0)}delete(p){return this._delete(p,!1)}deleteSuperstr(p){return this._delete(p,!0)}_delete(p,n){var t;const i=this._iter.reset(p),s=[];let r=this._root;for(;r;){const d=i.cmp(r.segment);if(d>0)s.push([-1,r]),r=r.left;else if(d<0)s.push([1,r]),r=r.right;else if(i.hasNext())i.next(),s.push([0,r]),r=r.mid;else break}if(r){if(n?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const 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(s.length>0){const[h,o]=s[s.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=s.length-1;d>=0;d--){const h=s[d][1];h.updateHeight();const o=h.balanceFactor();if(o>1?(h.right.balanceFactor()>=0||(h.right=h.right.rotateRight()),s[d][1]=h.rotateLeft()):o<-1&&(h.left.balanceFactor()<=0||(h.left=h.left.rotateLeft()),s[d][1]=h.rotateRight()),d>0)switch(s[d-1][0]){case-1:s[d-1][1].left=s[d][1];break;case 1:s[d-1][1].right=s[d][1];break;case 0:s[d-1][1].mid=s[d][1];break}else this._root=s[0][1]}}}_min(p){for(;p.left;)p=p.left;return p}findSubstr(p){const n=this._iter.reset(p);let t=this._root,i;for(;t;){const s=n.cmp(t.segment);if(s>0)t=t.left;else if(s<0)t=t.right;else if(n.hasNext())n.next(),i=t.value||i,t=t.mid;else break}return t&&t.value||i}findSuperstr(p){return this._findSuperstrOrElement(p,!1)}_findSuperstrOrElement(p,n){const t=this._iter.reset(p);let i=this._root;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):n?i.value:void 0}}forEach(p){for(const[n,t]of this)p(t,n)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(p){const n=[];return this._dfsEntries(p,n),n[Symbol.iterator]()}_dfsEntries(p,n){p&&(p.left&&this._dfsEntries(p.left,n),p.value&&n.push([p.key,p.value]),p.mid&&this._dfsEntries(p.mid,n),p.right&&this._dfsEntries(p.right,n))}}e.TernarySearchTree=S}),define(X[18],ee([1,0]),function(K,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 y(o){const c=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof c}e.isTypedArray=y;function E(o){return typeof o=="number"&&!isNaN(o)}e.isNumber=E;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!p(o)}e.isDefined=g;function p(o){return S(o)||o===null}e.isUndefinedOrNull=p;function n(o,c){if(!o)throw new Error(c?`Unexpected type, expected '${c}'`:"Unexpected type")}e.assertType=n;function t(o){if(p(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 s(o,c){const l=Math.min(o.length,c.length);for(let a=0;a<l;a++)r(o[a],c[a])}e.validateConstraints=s;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(!p(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(X[27],ee([1,0,18]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getCodiconFontCharacters=void 0;const k=Object.create(null);function y(w,b){if((0,_.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 E(){return k}e.getCodiconFontCharacters=E,e.Codicon={add:y("add",6e4),plus:y("plus",6e4),gistNew:y("gist-new",6e4),repoCreate:y("repo-create",6e4),lightbulb:y("lightbulb",60001),lightBulb:y("light-bulb",60001),repo:y("repo",60002),repoDelete:y("repo-delete",60002),gistFork:y("gist-fork",60003),repoForked:y("repo-forked",60003),gitPullRequest:y("git-pull-request",60004),gitPullRequestAbandoned:y("git-pull-request-abandoned",60004),recordKeys:y("record-keys",60005),keyboard:y("keyboard",60005),tag:y("tag",60006),tagAdd:y("tag-add",60006),tagRemove:y("tag-remove",60006),person:y("person",60007),personFollow:y("person-follow",60007),personOutline:y("person-outline",60007),personFilled:y("person-filled",60007),gitBranch:y("git-branch",60008),gitBranchCreate:y("git-branch-create",60008),gitBranchDelete:y("git-branch-delete",60008),sourceControl:y("source-control",60008),mirror:y("mirror",60009),mirrorPublic:y("mirror-public",60009),star:y("star",60010),starAdd:y("star-add",60010),starDelete:y("star-delete",60010),starEmpty:y("star-empty",60010),comment:y("comment",60011),commentAdd:y("comment-add",60011),alert:y("alert",60012),warning:y("warning",60012),search:y("search",60013),searchSave:y("search-save",60013),logOut:y("log-out",60014),signOut:y("sign-out",60014),logIn:y("log-in",60015),signIn:y("sign-in",60015),eye:y("eye",60016),eyeUnwatch:y("eye-unwatch",60016),eyeWatch:y("eye-watch",60016),circleFilled:y("circle-filled",60017),primitiveDot:y("primitive-dot",60017),closeDirty:y("close-dirty",60017),debugBreakpoint:y("debug-breakpoint",60017),debugBreakpointDisabled:y("debug-breakpoint-disabled",60017),debugHint:y("debug-hint",60017),primitiveSquare:y("primitive-square",60018),edit:y("edit",60019),pencil:y("pencil",60019),info:y("info",60020),issueOpened:y("issue-opened",60020),gistPrivate:y("gist-private",60021),gitForkPrivate:y("git-fork-private",60021),lock:y("lock",60021),mirrorPrivate:y("mirror-private",60021),close:y("close",60022),removeClose:y("remove-close",60022),x:y("x",60022),repoSync:y("repo-sync",60023),sync:y("sync",60023),clone:y("clone",60024),desktopDownload:y("desktop-download",60024),beaker:y("beaker",60025),microscope:y("microscope",60025),vm:y("vm",60026),deviceDesktop:y("device-desktop",60026),file:y("file",60027),fileText:y("file-text",60027),more:y("more",60028),ellipsis:y("ellipsis",60028),kebabHorizontal:y("kebab-horizontal",60028),mailReply:y("mail-reply",60029),reply:y("reply",60029),organization:y("organization",60030),organizationFilled:y("organization-filled",60030),organizationOutline:y("organization-outline",60030),newFile:y("new-file",60031),fileAdd:y("file-add",60031),newFolder:y("new-folder",60032),fileDirectoryCreate:y("file-directory-create",60032),trash:y("trash",60033),trashcan:y("trashcan",60033),history:y("history",60034),clock:y("clock",60034),folder:y("folder",60035),fileDirectory:y("file-directory",60035),symbolFolder:y("symbol-folder",60035),logoGithub:y("logo-github",60036),markGithub:y("mark-github",60036),github:y("github",60036),terminal:y("terminal",60037),console:y("console",60037),repl:y("repl",60037),zap:y("zap",60038),symbolEvent:y("symbol-event",60038),error:y("error",60039),stop:y("stop",60039),variable:y("variable",60040),symbolVariable:y("symbol-variable",60040),array:y("array",60042),symbolArray:y("symbol-array",60042),symbolModule:y("symbol-module",60043),symbolPackage:y("symbol-package",60043),symbolNamespace:y("symbol-namespace",60043),symbolObject:y("symbol-object",60043),symbolMethod:y("symbol-method",60044),symbolFunction:y("symbol-function",60044),symbolConstructor:y("symbol-constructor",60044),symbolBoolean:y("symbol-boolean",60047),symbolNull:y("symbol-null",60047),symbolNumeric:y("symbol-numeric",60048),symbolNumber:y("symbol-number",60048),symbolStructure:y("symbol-structure",60049),symbolStruct:y("symbol-struct",60049),symbolParameter:y("symbol-parameter",60050),symbolTypeParameter:y("symbol-type-parameter",60050),symbolKey:y("symbol-key",60051),symbolText:y("symbol-text",60051),symbolReference:y("symbol-reference",60052),goToFile:y("go-to-file",60052),symbolEnum:y("symbol-enum",60053),symbolValue:y("symbol-value",60053),symbolRuler:y("symbol-ruler",60054),symbolUnit:y("symbol-unit",60054),activateBreakpoints:y("activate-breakpoints",60055),archive:y("archive",60056),arrowBoth:y("arrow-both",60057),arrowDown:y("arrow-down",60058),arrowLeft:y("arrow-left",60059),arrowRight:y("arrow-right",60060),arrowSmallDown:y("arrow-small-down",60061),arrowSmallLeft:y("arrow-small-left",60062),arrowSmallRight:y("arrow-small-right",60063),arrowSmallUp:y("arrow-small-up",60064),arrowUp:y("arrow-up",60065),bell:y("bell",60066),bold:y("bold",60067),book:y("book",60068),bookmark:y("bookmark",60069),debugBreakpointConditionalUnverified:y("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:y("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:y("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:y("debug-breakpoint-data-unverified",60072),debugBreakpointData:y("debug-breakpoint-data",60073),debugBreakpointDataDisabled:y("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:y("debug-breakpoint-log-unverified",60074),debugBreakpointLog:y("debug-breakpoint-log",60075),debugBreakpointLogDisabled:y("debug-breakpoint-log-disabled",60075),briefcase:y("briefcase",60076),broadcast:y("broadcast",60077),browser:y("browser",60078),bug:y("bug",60079),calendar:y("calendar",60080),caseSensitive:y("case-sensitive",60081),check:y("check",60082),checklist:y("checklist",60083),chevronDown:y("chevron-down",60084),dropDownButton:y("drop-down-button",60084),chevronLeft:y("chevron-left",60085),chevronRight:y("chevron-right",60086),chevronUp:y("chevron-up",60087),chromeClose:y("chrome-close",60088),chromeMaximize:y("chrome-maximize",60089),chromeMinimize:y("chrome-minimize",60090),chromeRestore:y("chrome-restore",60091),circle:y("circle",60092),circleOutline:y("circle-outline",60092),debugBreakpointUnverified:y("debug-breakpoint-unverified",60092),circleSlash:y("circle-slash",60093),circuitBoard:y("circuit-board",60094),clearAll:y("clear-all",60095),clippy:y("clippy",60096),closeAll:y("close-all",60097),cloudDownload:y("cloud-download",60098),cloudUpload:y("cloud-upload",60099),code:y("code",60100),collapseAll:y("collapse-all",60101),colorMode:y("color-mode",60102),commentDiscussion:y("comment-discussion",60103),compareChanges:y("compare-changes",60157),creditCard:y("credit-card",60105),dash:y("dash",60108),dashboard:y("dashboard",60109),database:y("database",60110),debugContinue:y("debug-continue",60111),debugDisconnect:y("debug-disconnect",60112),debugPause:y("debug-pause",60113),debugRestart:y("debug-restart",60114),debugStart:y("debug-start",60115),debugStepInto:y("debug-step-into",60116),debugStepOut:y("debug-step-out",60117),debugStepOver:y("debug-step-over",60118),debugStop:y("debug-stop",60119),debug:y("debug",60120),deviceCameraVideo:y("device-camera-video",60121),deviceCamera:y("device-camera",60122),deviceMobile:y("device-mobile",60123),diffAdded:y("diff-added",60124),diffIgnored:y("diff-ignored",60125),diffModified:y("diff-modified",60126),diffRemoved:y("diff-removed",60127),diffRenamed:y("diff-renamed",60128),diff:y("diff",60129),discard:y("discard",60130),editorLayout:y("editor-layout",60131),emptyWindow:y("empty-window",60132),exclude:y("exclude",60133),extensions:y("extensions",60134),eyeClosed:y("eye-closed",60135),fileBinary:y("file-binary",60136),fileCode:y("file-code",60137),fileMedia:y("file-media",60138),filePdf:y("file-pdf",60139),fileSubmodule:y("file-submodule",60140),fileSymlinkDirectory:y("file-symlink-directory",60141),fileSymlinkFile:y("file-symlink-file",60142),fileZip:y("file-zip",60143),files:y("files",60144),filter:y("filter",60145),flame:y("flame",60146),foldDown:y("fold-down",60147),foldUp:y("fold-up",60148),fold:y("fold",60149),folderActive:y("folder-active",60150),folderOpened:y("folder-opened",60151),gear:y("gear",60152),gift:y("gift",60153),gistSecret:y("gist-secret",60154),gist:y("gist",60155),gitCommit:y("git-commit",60156),gitCompare:y("git-compare",60157),gitMerge:y("git-merge",60158),githubAction:y("github-action",60159),githubAlt:y("github-alt",60160),globe:y("globe",60161),grabber:y("grabber",60162),graph:y("graph",60163),gripper:y("gripper",60164),heart:y("heart",60165),home:y("home",60166),horizontalRule:y("horizontal-rule",60167),hubot:y("hubot",60168),inbox:y("inbox",60169),issueClosed:y("issue-closed",60324),issueReopened:y("issue-reopened",60171),issues:y("issues",60172),italic:y("italic",60173),jersey:y("jersey",60174),json:y("json",60175),bracket:y("bracket",60175),kebabVertical:y("kebab-vertical",60176),key:y("key",60177),law:y("law",60178),lightbulbAutofix:y("lightbulb-autofix",60179),linkExternal:y("link-external",60180),link:y("link",60181),listOrdered:y("list-ordered",60182),listUnordered:y("list-unordered",60183),liveShare:y("live-share",60184),loading:y("loading",60185),location:y("location",60186),mailRead:y("mail-read",60187),mail:y("mail",60188),markdown:y("markdown",60189),megaphone:y("megaphone",60190),mention:y("mention",60191),milestone:y("milestone",60192),mortarBoard:y("mortar-board",60193),move:y("move",60194),multipleWindows:y("multiple-windows",60195),mute:y("mute",60196),noNewline:y("no-newline",60197),note:y("note",60198),octoface:y("octoface",60199),openPreview:y("open-preview",60200),package_:y("package",60201),paintcan:y("paintcan",60202),pin:y("pin",60203),play:y("play",60204),run:y("run",60204),plug:y("plug",60205),preserveCase:y("preserve-case",60206),preview:y("preview",60207),project:y("project",60208),pulse:y("pulse",60209),question:y("question",60210),quote:y("quote",60211),radioTower:y("radio-tower",60212),reactions:y("reactions",60213),references:y("references",60214),refresh:y("refresh",60215),regex:y("regex",60216),remoteExplorer:y("remote-explorer",60217),remote:y("remote",60218),remove:y("remove",60219),replaceAll:y("replace-all",60220),replace:y("replace",60221),repoClone:y("repo-clone",60222),repoForcePush:y("repo-force-push",60223),repoPull:y("repo-pull",60224),repoPush:y("repo-push",60225),report:y("report",60226),requestChanges:y("request-changes",60227),rocket:y("rocket",60228),rootFolderOpened:y("root-folder-opened",60229),rootFolder:y("root-folder",60230),rss:y("rss",60231),ruby:y("ruby",60232),saveAll:y("save-all",60233),saveAs:y("save-as",60234),save:y("save",60235),screenFull:y("screen-full",60236),screenNormal:y("screen-normal",60237),searchStop:y("search-stop",60238),server:y("server",60240),settingsGear:y("settings-gear",60241),settings:y("settings",60242),shield:y("shield",60243),smiley:y("smiley",60244),sortPrecedence:y("sort-precedence",60245),splitHorizontal:y("split-horizontal",60246),splitVertical:y("split-vertical",60247),squirrel:y("squirrel",60248),starFull:y("star-full",60249),starHalf:y("star-half",60250),symbolClass:y("symbol-class",60251),symbolColor:y("symbol-color",60252),symbolCustomColor:y("symbol-customcolor",60252),symbolConstant:y("symbol-constant",60253),symbolEnumMember:y("symbol-enum-member",60254),symbolField:y("symbol-field",60255),symbolFile:y("symbol-file",60256),symbolInterface:y("symbol-interface",60257),symbolKeyword:y("symbol-keyword",60258),symbolMisc:y("symbol-misc",60259),symbolOperator:y("symbol-operator",60260),symbolProperty:y("symbol-property",60261),wrench:y("wrench",60261),wrenchSubaction:y("wrench-subaction",60261),symbolSnippet:y("symbol-snippet",60262),tasklist:y("tasklist",60263),telescope:y("telescope",60264),textSize:y("text-size",60265),threeBars:y("three-bars",60266),thumbsdown:y("thumbsdown",60267),thumbsup:y("thumbsup",60268),tools:y("tools",60269),triangleDown:y("triangle-down",60270),triangleLeft:y("triangle-left",60271),triangleRight:y("triangle-right",60272),triangleUp:y("triangle-up",60273),twitter:y("twitter",60274),unfold:y("unfold",60275),unlock:y("unlock",60276),unmute:y("unmute",60277),unverified:y("unverified",60278),verified:y("verified",60279),versions:y("versions",60280),vmActive:y("vm-active",60281),vmOutline:y("vm-outline",60282),vmRunning:y("vm-running",60283),watch:y("watch",60284),whitespace:y("whitespace",60285),wholeWord:y("whole-word",60286),window:y("window",60287),wordWrap:y("word-wrap",60288),zoomIn:y("zoom-in",60289),zoomOut:y("zoom-out",60290),listFilter:y("list-filter",60291),listFlat:y("list-flat",60292),listSelection:y("list-selection",60293),selection:y("selection",60293),listTree:y("list-tree",60294),debugBreakpointFunctionUnverified:y("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:y("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:y("debug-breakpoint-function-disabled",60296),debugStackframeActive:y("debug-stackframe-active",60297),circleSmallFilled:y("circle-small-filled",60298),debugStackframeDot:y("debug-stackframe-dot",60298),debugStackframe:y("debug-stackframe",60299),debugStackframeFocused:y("debug-stackframe-focused",60299),debugBreakpointUnsupported:y("debug-breakpoint-unsupported",60300),symbolString:y("symbol-string",60301),debugReverseContinue:y("debug-reverse-continue",60302),debugStepBack:y("debug-step-back",60303),debugRestartFrame:y("debug-restart-frame",60304),callIncoming:y("call-incoming",60306),callOutgoing:y("call-outgoing",60307),menu:y("menu",60308),expandAll:y("expand-all",60309),feedback:y("feedback",60310),groupByRefType:y("group-by-ref-type",60311),ungroupByRefType:y("ungroup-by-ref-type",60312),account:y("account",60313),bellDot:y("bell-dot",60314),debugConsole:y("debug-console",60315),library:y("library",60316),output:y("output",60317),runAll:y("run-all",60318),syncIgnored:y("sync-ignored",60319),pinned:y("pinned",60320),githubInverted:y("github-inverted",60321),debugAlt:y("debug-alt",60305),serverProcess:y("server-process",60322),serverEnvironment:y("server-environment",60323),pass:y("pass",60324),stopCircle:y("stop-circle",60325),playCircle:y("play-circle",60326),record:y("record",60327),debugAltSmall:y("debug-alt-small",60328),vmConnect:y("vm-connect",60329),cloud:y("cloud",60330),merge:y("merge",60331),exportIcon:y("export",60332),graphLeft:y("graph-left",60333),magnet:y("magnet",60334),notebook:y("notebook",60335),redo:y("redo",60336),checkAll:y("check-all",60337),pinnedDirty:y("pinned-dirty",60338),passFilled:y("pass-filled",60339),circleLargeFilled:y("circle-large-filled",60340),circleLarge:y("circle-large",60341),circleLargeOutline:y("circle-large-outline",60341),combine:y("combine",60342),gather:y("gather",60342),table:y("table",60343),variableGroup:y("variable-group",60344),typeHierarchy:y("type-hierarchy",60345),typeHierarchySub:y("type-hierarchy-sub",60346),typeHierarchySuper:y("type-hierarchy-super",60347),gitPullRequestCreate:y("git-pull-request-create",60348),runAbove:y("run-above",60349),runBelow:y("run-below",60350),notebookTemplate:y("notebook-template",60351),debugRerun:y("debug-rerun",60352),workspaceTrusted:y("workspace-trusted",60353),workspaceUntrusted:y("workspace-untrusted",60354),workspaceUnspecified:y("workspace-unspecified",60355),terminalCmd:y("terminal-cmd",60356),terminalDebian:y("terminal-debian",60357),terminalLinux:y("terminal-linux",60358),terminalPowershell:y("terminal-powershell",60359),terminalTmux:y("terminal-tmux",60360),terminalUbuntu:y("terminal-ubuntu",60361),terminalBash:y("terminal-bash",60362),arrowSwap:y("arrow-swap",60363),copy:y("copy",60364),personAdd:y("person-add",60365),filterFilled:y("filter-filled",60366),wand:y("wand",60367),debugLineByLine:y("debug-line-by-line",60368),inspect:y("inspect",60369),layers:y("layers",60370),layersDot:y("layers-dot",60371),layersActive:y("layers-active",60372),compass:y("compass",60373),compassDot:y("compass-dot",60374),compassActive:y("compass-active",60375),azure:y("azure",60376),issueDraft:y("issue-draft",60377),gitPullRequestClosed:y("git-pull-request-closed",60378),gitPullRequestDraft:y("git-pull-request-draft",60379),debugAll:y("debug-all",60380),debugCoverage:y("debug-coverage",60381),runErrors:y("run-errors",60382),folderLibrary:y("folder-library",60383),debugContinueSmall:y("debug-continue-small",60384),beakerStop:y("beaker-stop",60385),graphLine:y("graph-line",60386),graphScatter:y("graph-scatter",60387),pieChart:y("pie-chart",60388),bracketDot:y("bracket-dot",60389),bracketError:y("bracket-error",60390),lockSmall:y("lock-small",60391),azureDevops:y("azure-devops",60392),verifiedFilled:y("verified-filled",60393),newLine:y("newline",60394),layout:y("layout",60395),layoutActivitybarLeft:y("layout-activitybar-left",60396),layoutActivitybarRight:y("layout-activitybar-right",60397),layoutPanelLeft:y("layout-panel-left",60398),layoutPanelCenter:y("layout-panel-center",60399),layoutPanelJustify:y("layout-panel-justify",60400),layoutPanelRight:y("layout-panel-right",60401),layoutPanel:y("layout-panel",60402),layoutSidebarLeft:y("layout-sidebar-left",60403),layoutSidebarRight:y("layout-sidebar-right",60404),layoutStatusbar:y("layout-statusbar",60405),layoutMenubar:y("layout-menubar",60406),layoutCentered:y("layout-centered",60407),layoutSidebarRightOff:y("layout-sidebar-right-off",60416),layoutPanelOff:y("layout-panel-off",60417),layoutSidebarLeftOff:y("layout-sidebar-left-off",60418),target:y("target",60408),indent:y("indent",60409),recordSmall:y("record-small",60410),errorSmall:y("error-small",60411),arrowCircleDown:y("arrow-circle-down",60412),arrowCircleLeft:y("arrow-circle-left",60413),arrowCircleRight:y("arrow-circle-right",60414),arrowCircleUp:y("arrow-circle-up",60415),heartFilled:y("heart-filled",60420),map:y("map",60421),mapFilled:y("map-filled",60422),circleSmall:y("circle-small",60423),bellSlash:y("bell-slash",60424),bellSlashDot:y("bell-slash-dot",60425),commentUnresolved:y("comment-unresolved",60426),gitPullRequestGoToChanges:y("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:y("git-pull-request-new-changes",60428),searchFuzzy:y("search-fuzzy",60429),commentDraft:y("comment-draft",60430),send:y("send",60431),sparkle:y("sparkle",60432),insert:y("insert",60433),dialogError:y("dialog-error","error"),dialogWarning:y("dialog-warning","warning"),dialogInfo:y("dialog-info","info"),dialogClose:y("dialog-close","close"),treeItemExpanded:y("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:y("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:y("tree-filter-on-type-off","list-selection"),treeFilterClear:y("tree-filter-clear","close"),treeItemLoading:y("tree-item-loading","loading"),menuSelection:y("menu-selection","check"),menuSubmenu:y("menu-submenu","chevron-right"),menuBarMore:y("menubar-more","more"),scrollbarButtonLeft:y("scrollbar-button-left","triangle-left"),scrollbarButtonRight:y("scrollbar-button-right","triangle-right"),scrollbarButtonUp:y("scrollbar-button-up","triangle-up"),scrollbarButtonDown:y("scrollbar-button-down","triangle-down"),toolBarMore:y("toolbar-more","more"),quickInputBack:y("quick-input-back","arrow-left")}}),define(X[45],ee([1,0,18]),function(K,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 s=Array.isArray(i)?[]:{};return Object.entries(i).forEach(([r,d])=>{s[r]=d&&typeof d=="object"?k(d):d}),s}e.deepClone=k;function y(i){if(!i||typeof i!="object")return i;const s=[i];for(;s.length>0;){const r=s.shift();Object.freeze(r);for(const d in r)if(E.call(r,d)){const h=r[d];typeof h=="object"&&!Object.isFrozen(h)&&!(0,_.isTypedArray)(h)&&s.push(h)}}return i}e.deepFreeze=y;const E=Object.prototype.hasOwnProperty;function w(i,s){return b(i,s,new Set)}e.cloneAndChange=w;function b(i,s,r){if((0,_.isUndefinedOrNull)(i))return i;const d=s(i);if(typeof d<"u")return d;if(Array.isArray(i)){const h=[];for(const o of i)h.push(b(o,s,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)E.call(i,o)&&(h[o]=b(i[o],s,r));return r.delete(i),h}return i}function S(i,s,r=!0){return(0,_.isObject)(i)?((0,_.isObject)(s)&&Object.keys(s).forEach(d=>{d in i?r&&((0,_.isObject)(i[d])&&(0,_.isObject)(s[d])?S(i[d],s[d],r):i[d]=s[d]):i[d]=s[d]}),i):s}e.mixin=S;function g(i,s){if(i===s)return!0;if(i==null||s===null||s===void 0||typeof i!=typeof s||typeof i!="object"||Array.isArray(i)!==Array.isArray(s))return!1;let r,d;if(Array.isArray(i)){if(i.length!==s.length)return!1;for(r=0;r<i.length;r++)if(!g(i[r],s[r]))return!1}else{const h=[];for(d in i)h.push(d);h.sort();const o=[];for(d in s)o.push(d);if(o.sort(),!g(h,o))return!1;for(r=0;r<h.length;r++)if(!g(i[h[r]],s[h[r]]))return!1}return!0}e.equals=g;function p(i){let s=[],r=Object.getPrototypeOf(i);for(;Object.prototype!==r;)s=s.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return s}e.getAllPropertyNames=p;function n(i){const s=[];for(const r of p(i))typeof i[r]=="function"&&s.push(r);return s}e.getAllMethodNames=n;function t(i,s){const r=h=>function(){const o=Array.prototype.slice.call(arguments,0);return s(h,o)},d={};for(const h of i)d[h]=r(h);return d}e.createProxyObject=t}),define(X[30],ee([1,0,27]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.ThemeColor=void 0;var k;(function(E){function w(b){return b&&typeof b=="object"&&typeof b.id=="string"}E.isThemeColor=w})(k||(e.ThemeColor=k={}));var y;(function(E){E.iconNameSegment="[A-Za-z0-9]+",E.iconNameExpression="[A-Za-z0-9-]+",E.iconModifierExpression="~[A-Za-z]+",E.iconNameCharacter="[A-Za-z0-9~-]";const w=new RegExp(`^(${E.iconNameExpression})(${E.iconModifierExpression})?$`);function b(h){const o=w.exec(h.id);if(!o)return b(_.Codicon.error);const[,c,l]=o,a=["codicon","codicon-"+c];return l&&a.push("codicon-modifier-"+l.substring(1)),a}E.asClassNameArray=b;function S(h){return b(h).join(" ")}E.asClassName=S;function g(h){return"."+b(h).join(".")}E.asCSSSelector=g;function p(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||k.isThemeColor(h.color))}E.isThemeIcon=p;const n=new RegExp(`^\\$\\((${E.iconNameExpression}(?:${E.iconModifierExpression})?)\\)$`);function t(h){const o=n.exec(h);if(!o)return;const[,c]=o;return{id:c}}E.fromString=t;function i(h){return{id:h}}E.fromId=i;function s(h,o){let c=h.id;const l=c.lastIndexOf("~");return l!==-1&&(c=c.substring(0,l)),o&&(c=`${c}~${o}`),{id:c}}E.modify=s;function r(h){const o=h.id.lastIndexOf("~");if(o!==-1)return h.id.substring(o+1)}E.getModifier=r;function d(h,o){var c,l;return h.id===o.id&&((c=h.color)===null||c===void 0?void 0:c.id)===((l=o.color)===null||l===void 0?void 0:l.id)}E.isEqual=d})(y||(e.ThemeIcon=y={}))}),define(X[114],ee([1,0,64,9,30]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.getCodiconAriaLabel=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=void 0;const E="$(",w=new RegExp(`\\$\\(${y.ThemeIcon.iconNameExpression}(?:${y.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 p(h){return h.replace(g,o=>`\\${o}`)}e.markdownEscapeEscapedIcons=p;const n=new RegExp(`(\\s)?(\\\\)?${w.source}(\\s)?`,"g");function t(h){return h.indexOf(E)===-1?h:h.replace(n,(o,c,l,a)=>l?o:c||a||"")}e.stripIcons=t;function i(h){return h?h.replace(/\$\((.*?)\)/g,(o,c)=>` ${c} `).trim():""}e.getCodiconAriaLabel=i;const s=new RegExp(`\\$\\(${y.ThemeIcon.iconNameCharacter}+\\)`,"g");function r(h){s.lastIndex=0;let o="";const c=[];let l=0;for(;;){const a=s.lastIndex,u=s.exec(h),v=h.substring(a,u?.index);if(v.length>0){o+=v;for(let f=0;f<v.length;f++)c.push(l)}if(!u)break;l+=u[0].length}return{text:o,iconOffsets:c}}e.parseLabelWithIcons=r;function d(h,o,c=!1){const{text:l,iconOffsets:a}=o;if(!a||a.length===0)return(0,_.matchesFuzzy)(h,l,c);const u=(0,k.ltrim)(l," "),v=l.length-u.length,f=(0,_.matchesFuzzy)(h,u,c);if(f)for(const m of f){const C=a[m.start+v]+v;m.start+=C,m.end+=C}return f}e.matchesFuzzyIconAware=d}),define(X[162],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function _(y){return y<0?0:y>255?255:y|0}e.toUint8=_;function k(y){return y<0?0:y>4294967295?4294967295:y|0}e.toUint32=k}),define(X[163],ee([1,0]),function(K,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(E){for(let w=0;w<E.length;w++)E[w]=Math.floor(Math.random()*256);return E};const k=new Uint8Array(16),y=[];for(let E=0;E<256;E++)y.push(E.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+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b}}()}),define(X[164],ee([1,0,16,53,163]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriList=e.VSDataTransfer=e.createFileDataTransferItem=e.createStringDataTransferItem=void 0;function E(S){return{id:(0,y.generateUuid)(),asString:()=>we(this,void 0,void 0,function*(){return S}),asFile:()=>{},value:typeof S=="string"?S:void 0}}e.createStringDataTransferItem=E;function w(S,g,p){return{id:(0,y.generateUuid)(),asString:()=>we(this,void 0,void 0,function*(){return""}),asFile:()=>({name:S,uri:g,data:p}),value:void 0}}e.createFileDataTransferItem=w;class b{constructor(){this._entries=new Map}get size(){let g=0;return this.forEach(()=>g++),g}has(g){return this._entries.has(this.toKey(g))}matches(g){if(this.has(g))return!0;if(g.toLowerCase()==="files")return k.Iterable.some(this.values(),s=>s.asFile());if(g==="*/*")return this._entries.size>0;const p=this.toKey(g).match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!p)return!1;const[n,t,i]=p;return i==="*"?k.Iterable.some(this._entries.keys(),s=>s.startsWith(t+"/")):!1}get(g){var p;return(p=this._entries.get(this.toKey(g)))===null||p===void 0?void 0:p[0]}append(g,p){const n=this._entries.get(g);n?n.push(p):this._entries.set(this.toKey(g),[p])}replace(g,p){this._entries.set(this.toKey(g),[p])}delete(g){this._entries.delete(this.toKey(g))}*entries(){for(const[g,p]of this._entries.entries())for(const n of p)yield[g,n]}values(){return Array.from(this._entries.values()).flat()}forEach(g){for(const[p,n]of this.entries())g(n,p)}toKey(g){return g.toLowerCase()}}e.VSDataTransfer=b,e.UriList=Object.freeze({create:S=>(0,_.distinct)(S.map(g=>g.toString())).join(`\r
- `),split:S=>S.split(`\r
- `),parse:S=>e.UriList.split(S).filter(g=>!g.startsWith("#"))})}),define(X[252],ee([10]),{}),define(X[375],ee([10]),{}),define(X[376],ee([10]),{}),define(X[377],ee([10]),{}),define(X[378],ee([10]),{}),define(X[165],ee([1,0,377,378]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(X[379],ee([10]),{}),define(X[380],ee([10]),{}),define(X[253],ee([10]),{}),define(X[254],ee([10]),{}),define(X[381],ee([10]),{}),define(X[382],ee([10]),{}),define(X[383],ee([10]),{}),define(X[384],ee([10]),{}),define(X[255],ee([10]),{}),define(X[385],ee([10]),{}),define(X[166],ee([1,0,385]),function(K,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(X[386],ee([10]),{}),define(X[387],ee([10]),{}),define(X[388],ee([10]),{}),define(X[389],ee([10]),{}),define(X[390],ee([10]),{}),define(X[391],ee([10]),{}),define(X[392],ee([10]),{}),define(X[393],ee([10]),{}),define(X[394],ee([10]),{}),define(X[395],ee([10]),{}),define(X[396],ee([10]),{}),define(X[397],ee([10]),{}),define(X[398],ee([10]),{}),define(X[399],ee([10]),{}),define(X[400],ee([10]),{}),define(X[401],ee([10]),{}),define(X[402],ee([10]),{}),define(X[403],ee([10]),{}),define(X[404],ee([10]),{}),define(X[405],ee([10]),{}),define(X[406],ee([10]),{}),define(X[407],ee([10]),{}),define(X[408],ee([10]),{}),define(X[409],ee([10]),{}),define(X[410],ee([10]),{}),define(X[411],ee([10]),{}),define(X[412],ee([10]),{}),define(X[413],ee([10]),{}),define(X[414],ee([10]),{}),define(X[415],ee([10]),{}),define(X[416],ee([10]),{}),define(X[417],ee([10]),{}),define(X[418],ee([10]),{}),define(X[419],ee([10]),{}),define(X[420],ee([10]),{}),define(X[190],ee([10]),{}),define(X[421],ee([10]),{}),define(X[422],ee([10]),{}),define(X[423],ee([10]),{}),define(X[424],ee([10]),{}),define(X[425],ee([10]),{}),define(X[426],ee([10]),{}),define(X[427],ee([10]),{}),define(X[428],ee([10]),{}),define(X[429],ee([10]),{}),define(X[430],ee([10]),{}),define(X[431],ee([10]),{}),define(X[432],ee([10]),{}),define(X[433],ee([10]),{}),define(X[434],ee([10]),{}),define(X[435],ee([10]),{}),define(X[436],ee([10]),{}),define(X[437],ee([10]),{}),define(X[438],ee([10]),{}),define(X[439],ee([10]),{}),define(X[440],ee([10]),{}),define(X[441],ee([10]),{}),define(X[442],ee([10]),{}),define(X[443],ee([10]),{}),define(X[444],ee([10]),{}),define(X[445],ee([10]),{}),define(X[446],ee([10]),{}),define(X[447],ee([10]),{}),define(X[448],ee([10]),{}),define(X[449],ee([10]),{}),define(X[450],ee([10]),{}),define(X[451],ee([10]),{}),define(X[452],ee([10]),{}),define(X[453],ee([10]),{}),define(X[256],ee([10]),{}),define(X[454],ee([10]),{}),define(X[455],ee([10]),{}),define(X[167],ee([10]),{}),define(X[456],ee([10]),{}),define(X[75],ee([1,0,36]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function k(y,E){y instanceof _.FastDomNode?(y.setFontFamily(E.getMassagedFontFamily()),y.setFontWeight(E.fontWeight),y.setFontSize(E.fontSize),y.setFontFeatureSettings(E.fontFeatureSettings),y.setFontVariationSettings(E.fontVariationSettings),y.setLineHeight(E.lineHeight),y.setLetterSpacing(E.letterSpacing)):(y.style.fontFamily=E.getMassagedFontFamily(),y.style.fontWeight=E.fontWeight,y.style.fontSize=E.fontSize+"px",y.style.fontFeatureSettings=E.fontFeatureSettings,y.style.fontVariationSettings=E.fontVariationSettings,y.style.lineHeight=E.lineHeight+"px",y.style.letterSpacing=E.letterSpacing+"px")}e.applyFontInfo=k}),define(X[457],ee([1,0,75]),function(K,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 y{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 p=document.createElement("div");(0,_.applyFontInfo)(p,this._bareFontInfo),p.style.fontStyle="italic",b.appendChild(p);const n=[];for(const t of this._requests){let i;t.type===0&&(i=S),t.type===2&&(i=g),t.type===1&&(i=p),i.appendChild(document.createElement("br"));const s=document.createElement("span");y._render(s,t),i.appendChild(s),n.push(s)}this._container=b,this._testElements=n}static _render(b,S){if(S.chr===" "){let g="\xA0";for(let p=0;p<8;p++)g+=g;b.innerText=g}else{let g=S.chr;for(let p=0;p<8;p++)g+=g;b.textContent=g}}_readFromDomElements(){for(let b=0,S=this._requests.length;b<S;b++){const g=this._requests[b],p=this._testElements[b];g.fulfill(p.offsetWidth/256)}}}function E(w,b){new y(w,b).read()}e.readCharWidths=E}),define(X[458],ee([1,0]),function(K,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),p=t=>_._read(S,t),n=(t,i)=>_._write(S,t,i);this.migrate(g,p,n)}static _read(S,g){if(typeof S>"u")return;const p=g.indexOf(".");if(p>=0){const n=g.substring(0,p);return this._read(S[n],g.substring(p+1))}return S[g]}static _write(S,g,p){const n=g.indexOf(".");if(n>=0){const t=g.substring(0,n);S[t]=S[t]||{},this._write(S[t],g.substring(n+1),p);return}S[g]=p}}e.EditorSettingMigration=_,_.items=[];function k(b,S){_.items.push(new _(b,S))}function y(b,S){k(b,(g,p,n)=>{if(typeof g<"u"){for(const[t,i]of S)if(g===t){n(b,i);return}}})}function E(b){_.items.forEach(S=>S.apply(b))}e.migrateOptions=E,y("wordWrap",[[!0,"on"],[!1,"off"]]),y("lineNumbers",[[!0,"on"],[!1,"off"]]),y("cursorBlinking",[["visible","solid"]]),y("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),y("renderLineHighlight",[[!0,"line"],[!1,"none"]]),y("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),y("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),y("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("autoIndent",[[!1,"advanced"],[!0,"full"]]),y("matchBrackets",[[!0,"always"],[!1,"never"]]),y("renderFinalNewline",[[!0,"on"],[!1,"off"]]),y("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),k("autoClosingBrackets",(b,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 p of Object.entries(w))b[p[0]]===!1&&typeof S(`suggest.${p[1]}`)>"u"&&g(`suggest.${p[1]}`,!1);g("suggest.filteredTypes",void 0)}}),k("quickSuggestions",(b,S,g)=>{if(typeof b=="boolean"){const p=b?"on":"off";g("quickSuggestions",{comments:p,strings:p,other:p})}}),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(X[115],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class _{static capture(y){if(y.getScrollTop()===0||y.hasPendingScrollAnimation())return new _(y.getScrollTop(),y.getContentHeight(),null,0,null);let E=null,w=0;const b=y.getVisibleRanges();if(b.length>0){E=b[0].getStartPosition();const S=y.getTopForPosition(E.lineNumber,E.column);w=y.getScrollTop()-S}return new _(y.getScrollTop(),y.getContentHeight(),E,w,y.getPosition())}constructor(y,E,w,b,S){this._initialScrollTop=y,this._initialContentHeight=E,this._visiblePosition=w,this._visiblePositionScrollDelta=b,this._cursorPosition=S}restore(y){if(!(this._initialContentHeight===y.getContentHeight()&&this._initialScrollTop===y.getScrollTop())&&this._visiblePosition){const E=y.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);y.setScrollTop(E+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(y){if(this._initialContentHeight===y.getContentHeight()&&this._initialScrollTop===y.getScrollTop())return;const E=y.getPosition();if(!this._cursorPosition||!E)return;const w=y.getTopForLineNumber(E.lineNumber)-y.getTopForLineNumber(this._cursorPosition.lineNumber);y.setScrollTop(y.getScrollTop()+w)}}e.StableEditorScrollState=_}),define(X[137],ee([1,0]),function(K,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(p,n){this._restrictedRenderingContextBrand=void 0,this._viewLayout=p,this.viewportData=n,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const t=this._viewLayout.getCurrentViewport();this.scrollTop=t.top,this.scrollLeft=t.left,this.viewportWidth=t.width,this.viewportHeight=t.height}getScrolledTopFromAbsoluteTop(p){return p-this.scrollTop}getVerticalOffsetForLineNumber(p,n){return this._viewLayout.getVerticalOffsetForLineNumber(p,n)}getVerticalOffsetAfterLineNumber(p,n){return this._viewLayout.getVerticalOffsetAfterLineNumber(p,n)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=_;class k extends _{constructor(p,n,t){super(p,n),this._renderingContextBrand=void 0,this._viewLines=t}linesVisibleRangesForRange(p,n){return this._viewLines.linesVisibleRangesForRange(p,n)}visibleRangeForPosition(p){return this._viewLines.visibleRangeForPosition(p)}}e.RenderingContext=k;class y{constructor(p,n,t){this.outsideRenderedLine=p,this.lineNumber=n,this.ranges=t}}e.LineVisibleRanges=y;class E{static from(p){const n=new Array(p.length);for(let t=0,i=p.length;t<i;t++){const s=p[t];n[t]=new E(s.left,s.width)}return n}constructor(p,n){this._horizontalRangeBrand=void 0,this.left=Math.round(p),this.width=Math.round(n)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=E;class w{constructor(p,n){this._floatHorizontalRangeBrand=void 0,this.left=p,this.width=n}toString(){return`[${this.left},${this.width}]`}static compare(p,n){return p.left-n.left}}e.FloatHorizontalRange=w;class b{constructor(p,n){this.outsideRenderedLine=p,this.originalLeft=n,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=b;class S{constructor(p,n){this.outsideRenderedLine=p,this.ranges=n}}e.VisibleRanges=S}),define(X[459],ee([1,0]),function(K,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 y=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=y.left,this._clientRectScale=y.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(y,E){this._domNode=y,this.endNode=E,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}e.DomReadingContext=_}),define(X[460],ee([1,0,137]),function(K,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(E,w){E.selectNodeContents(w)}static _readClientRects(E,w,b,S,g){const p=this._createRange();try{return p.setStart(E,w),p.setEnd(b,S),p.getClientRects()}catch{return null}finally{this._detachRange(p,g)}}static _mergeAdjacentRanges(E){if(E.length===1)return E;E.sort(_.FloatHorizontalRange.compare);const w=[];let b=0,S=E[0];for(let g=1,p=E.length;g<p;g++){const n=E[g];S.left+S.width+.9>=n.left?S.width=Math.max(S.width,n.left+n.width-S.left):(w[b++]=S,S=n)}return w[b++]=S,w}static _createHorizontalRangesFromClientRects(E,w,b){if(!E||E.length===0)return null;const S=[];for(let g=0,p=E.length;g<p;g++){const n=E[g];S[g]=new _.FloatHorizontalRange(Math.max(0,(n.left-w)/b),n.width/b)}return this._mergeAdjacentRanges(S)}static readHorizontalRanges(E,w,b,S,g,p){const t=E.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&&!E.children[w].firstChild){const d=E.children[w].getClientRects();return p.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,p.clientRectDeltaLeft,p.clientRectScale)}w!==S&&S>0&&g===0&&(S--,g=1073741824);let i=E.children[w].firstChild,s=E.children[S].firstChild;if((!i||!s)&&(!i&&b===0&&w>0&&(i=E.children[w-1].firstChild,b=1073741824),!s&&g===0&&S>0&&(s=E.children[S-1].firstChild,g=1073741824)),!i||!s)return null;b=Math.min(i.textContent.length,Math.max(0,b)),g=Math.min(s.textContent.length,Math.max(0,g));const r=this._readClientRects(i,b,s,g,p.endNode);return p.markDidDomLayout(),this._createHorizontalRangesFromClientRects(r,p.clientRectDeltaLeft,p.clientRectScale)}}e.RangeUtil=k}),define(X[257],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const k=[];for(let y=32;y<=126;y++)k.push(y);return k.push(65533),k})();const _=(k,y)=>(k-=32,k<0||k>96?y<=2?(k+96)%96:96-1:k);e.getCharIndex=_}),define(X[461],ee([1,0,257,162]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class y{constructor(w,b){this.scale=b,this._minimapCharRendererBrand=void 0,this.charDataNormal=y.soften(w,12/15),this.charDataLight=y.soften(w,50/60)}static soften(w,b){const S=new Uint8ClampedArray(w.length);for(let g=0,p=w.length;g<p;g++)S[g]=(0,k.toUint8)(w[g]*b);return S}renderChar(w,b,S,g,p,n,t,i,s,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 l=r?this.charDataLight:this.charDataNormal,a=(0,_.getCharIndex)(g,s),u=w.width*4,v=t.r,f=t.g,m=t.b,C=p.r-v,L=p.g-f,D=p.b-m,I=Math.max(n,i),T=w.data;let O=a*h*o,R=S*u+b*4;for(let A=0;A<c;A++){let N=R;for(let P=0;P<h;P++){const x=l[O++]/255*(n/255);T[N++]=v+C*x,T[N++]=f+L*x,T[N++]=m+D*x,T[N++]=I}R+=u}}blockRenderChar(w,b,S,g,p,n,t,i){const s=1*this.scale,r=2*this.scale,d=i?1:r;if(b+s>w.width||S+d>w.height){console.warn("bad render request outside image data");return}const h=w.width*4,o=.5*(p/255),c=n.r,l=n.g,a=n.b,u=g.r-c,v=g.g-l,f=g.b-a,m=c+u*o,C=l+v*o,L=a+f*o,D=Math.max(p,t),I=w.data;let T=S*h+b*4;for(let O=0;O<d;O++){let R=T;for(let A=0;A<s;A++)I[R++]=m,I[R++]=C,I[R++]=L,I[R++]=D;T+=h}}}e.MinimapCharRenderer=y}),define(X[462],ee([1,0,93]),function(K,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},y=E=>{const w=new Uint8ClampedArray(E.length/2);for(let b=0;b<E.length;b+=2)w[b>>1]=k[E[b]]<<4|k[E[b+1]]&15;return w};e.prebakedMiniMaps={1:(0,_.once)(()=>y("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,_.once)(()=>y("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(X[463],ee([1,0,461,257,462,162]),function(K,e,_,k,y,E){"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 p;return y.prebakedMiniMaps[S]?p=new _.MinimapCharRenderer(y.prebakedMiniMaps[S](),S):p=w.createFromSampleData(w.createSampleData(g).data,S),this.lastFontFamily=g,this.lastCreated=p,p}static createSampleData(S){const g=document.createElement("canvas"),p=g.getContext("2d");g.style.height="16px",g.height=16,g.width=96*10,g.style.width=96*10+"px",p.fillStyle="#ffffff",p.font=`bold 16px ${S}`,p.textBaseline="middle";let n=0;for(const t of k.allCharCodes)p.fillText(String.fromCharCode(t),n,16/2),n+=10;return p.getImageData(0,0,96*10,16)}static createFromSampleData(S,g){if(S.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=w._downsample(S,g);return new _.MinimapCharRenderer(n,g)}static _downsampleChar(S,g,p,n,t){const i=1*t,s=2*t;let r=n,d=0;for(let h=0;h<s;h++){const o=h/s*16,c=(h+1)/s*16;for(let l=0;l<i;l++){const a=l/i*10,u=(l+1)/i*10;let v=0,f=0;for(let C=o;C<c;C++){const L=g+Math.floor(C)*3840,D=1-(C-Math.floor(C));for(let I=a;I<u;I++){const T=1-(I-Math.floor(I)),O=L+Math.floor(I)*4,R=T*D;f+=R,v+=S[O]*S[O+3]/255*R}}const m=v/f;d=Math.max(d,m),p[r++]=(0,E.toUint8)(m)}}return d}static _downsample(S,g){const p=2*g*1*g,n=p*96,t=new Uint8ClampedArray(n);let i=0,s=0,r=0;for(let d=0;d<96;d++)r=Math.max(r,this._downsampleChar(S,s,t,i,g)),i+=p,s+=10*4;if(r>0){const d=255/r;for(let h=0;h<n;h++)t[h]*=d}return t}}e.MinimapCharRendererFactory=w}),define(X[116],ee([1,0,162]),function(K,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 y{constructor(){this._actual=new k(0)}add(w){this._actual.set(w,1)}has(w){return this._actual.get(w)===1}clear(){return this._actual.clear()}}e.CharacterSet=y}),define(X[76],ee([1,0,9]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class k{static _nextVisibleColumn(E,w,b){return E===9?k.nextRenderTabStop(w,b):_.isFullWidthCharacter(E)||_.isEmojiImprecise(E)?w+2:w+1}static visibleColumnFromColumn(E,w,b){const S=Math.min(w-1,E.length),g=E.substring(0,S),p=new _.GraphemeIterator(g);let n=0;for(;!p.eol();){const t=_.getNextCodePoint(g,S,p.offset);p.nextGraphemeLength(),n=this._nextVisibleColumn(t,n,b)}return n}static columnFromVisibleColumn(E,w,b){if(w<=0)return 1;const S=E.length,g=new _.GraphemeIterator(E);let p=0,n=1;for(;!g.eol();){const t=_.getNextCodePoint(E,S,g.offset);g.nextGraphemeLength();const i=this._nextVisibleColumn(t,p,b),s=g.offset+1;if(i>=w){const r=w-p;return i-w<r?s:n}p=i,n=s}return S+1}static nextRenderTabStop(E,w){return E+w-E%w}static nextIndentTabStop(E,w){return E+w-E%w}static prevRenderTabStop(E,w){return Math.max(0,E-1-(E-1)%w)}static prevIndentTabStop(E,w){return Math.max(0,E-1-(E-1)%w)}}e.CursorColumns=k}),define(X[117],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=void 0;function _(k){let y=0,E=0,w=0,b=0;for(let S=0,g=k.length;S<g;S++){const p=k.charCodeAt(S);p===13?(y===0&&(E=S),y++,S+1<g&&k.charCodeAt(S+1)===10?(b|=2,S++):b|=3,w=S+1):p===10&&(b|=1,y===0&&(E=S),y++,w=S+1)}return y===0&&(E=k.length),[y,E,k.length-w,b]}e.countEOL=_}),define(X[191],ee([1,0,9,76]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function y(w,b,S){let g=0;for(let n=0;n<w.length;n++)w.charAt(n)===" "?g=k.CursorColumns.nextIndentTabStop(g,b):g++;let p="";if(!S){const n=Math.floor(g/b);g=g%b;for(let t=0;t<n;t++)p+=" "}for(let n=0;n<g;n++)p+=" ";return p}function E(w,b,S){let g=_.firstNonWhitespaceIndex(w);return g===-1&&(g=w.length),y(w.substring(0,g),b,S)+w.substring(g)}e.normalizeIndentation=E}),define(X[104],ee([1,0,11]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;class k{static joinMany(E){if(E.length===0)return[];let w=E[0];for(let b=1;b<E.length;b++)w=this.join(w,E[b]);return w}static join(E,w){if(E.length===0)return w;if(w.length===0)return E;const b=[];let S=0,g=0,p=null;for(;S<E.length||g<w.length;){let n=null;if(S<E.length&&g<w.length){const t=E[S],i=w[g];t.startLineNumber<i.startLineNumber?(n=t,S++):(n=i,g++)}else S<E.length?(n=E[S],S++):(n=w[g],g++);p===null?p=n:p.endLineNumberExclusive>=n.startLineNumber?p=new k(p.startLineNumber,Math.max(p.endLineNumberExclusive,n.endLineNumberExclusive)):(b.push(p),p=n)}return p!==null&&b.push(p),b}constructor(E,w){if(E>w)throw new _.BugIndicatingError(`startLineNumber ${E} cannot be after endLineNumberExclusive ${w}`);this.startLineNumber=E,this.endLineNumberExclusive=w}contains(E){return this.startLineNumber<=E&&E<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(E){return new k(this.startLineNumber+E,this.endLineNumberExclusive+E)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(E){return new k(Math.min(this.startLineNumber,E.startLineNumber),Math.max(this.endLineNumberExclusive,E.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(E){const w=Math.max(this.startLineNumber,E.startLineNumber),b=Math.min(this.endLineNumberExclusive,E.endLineNumberExclusive);if(w<=b)return new k(w,b)}overlapOrTouch(E){return this.startLineNumber<=E.endLineNumberExclusive&&E.startLineNumber<=this.endLineNumberExclusive}equals(E){return this.startLineNumber===E.startLineNumber&&this.endLineNumberExclusive===E.endLineNumberExclusive}}e.LineRange=k}),define(X[118],ee([1,0,11]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OffsetRange=void 0;class k{static addRange(E,w){let b=0;for(;b<w.length&&w[b].endExclusive<E.start;)b++;let S=b;for(;S<w.length&&w[S].start<=E.endExclusive;)S++;if(b===S)w.splice(b,0,E);else{const g=Math.min(E.start,w[b].start),p=Math.max(E.endExclusive,w[S-1].endExclusive);w.splice(b,S-b,new k(g,p))}}static tryCreate(E,w){if(!(E>w))return new k(E,w)}constructor(E,w){if(this.start=E,this.endExclusive=w,E>w)throw new _.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(E){return new k(this.start+E,this.endExclusive+E)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(E){return this.start===E.start&&this.endExclusive===E.endExclusive}containsRange(E){return this.start<=E.start&&E.endExclusive<=this.endExclusive}join(E){return new k(Math.min(this.start,E.start),Math.max(this.endExclusive,E.endExclusive))}intersect(E){const w=Math.max(this.start,E.start),b=Math.min(this.endExclusive,E.endExclusive);if(w<=b)return new k(w,b)}}e.OffsetRange=k}),define(X[12],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class _{constructor(y,E){this.lineNumber=y,this.column=E}with(y=this.lineNumber,E=this.column){return y===this.lineNumber&&E===this.column?this:new _(y,E)}delta(y=0,E=0){return this.with(this.lineNumber+y,this.column+E)}equals(y){return _.equals(this,y)}static equals(y,E){return!y&&!E?!0:!!y&&!!E&&y.lineNumber===E.lineNumber&&y.column===E.column}isBefore(y){return _.isBefore(this,y)}static isBefore(y,E){return y.lineNumber<E.lineNumber?!0:E.lineNumber<y.lineNumber?!1:y.column<E.column}isBeforeOrEqual(y){return _.isBeforeOrEqual(this,y)}static isBeforeOrEqual(y,E){return y.lineNumber<E.lineNumber?!0:E.lineNumber<y.lineNumber?!1:y.column<=E.column}static compare(y,E){const w=y.lineNumber|0,b=E.lineNumber|0;if(w===b){const S=y.column|0,g=E.column|0;return S-g}return w-b}clone(){return new _(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(y){return new _(y.lineNumber,y.column)}static isIPosition(y){return y&&typeof y.lineNumber=="number"&&typeof y.column=="number"}}e.Position=_}),define(X[258],ee([1,0,12]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class k{constructor(E){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=E}emitKeyDown(E){var w;(w=this.onKeyDown)===null||w===void 0||w.call(this,E)}emitKeyUp(E){var w;(w=this.onKeyUp)===null||w===void 0||w.call(this,E)}emitContextMenu(E){var w;(w=this.onContextMenu)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseMove(E){var w;(w=this.onMouseMove)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseLeave(E){var w;(w=this.onMouseLeave)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDown(E){var w;(w=this.onMouseDown)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseUp(E){var w;(w=this.onMouseUp)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDrag(E){var w;(w=this.onMouseDrag)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDrop(E){var w;(w=this.onMouseDrop)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDropCanceled(){var E;(E=this.onMouseDropCanceled)===null||E===void 0||E.call(this)}emitMouseWheel(E){var w;(w=this.onMouseWheel)===null||w===void 0||w.call(this,E)}_convertViewToModelMouseEvent(E){return E.target?{event:E.event,target:this._convertViewToModelMouseTarget(E.target)}:E}_convertViewToModelMouseTarget(E){return k.convertViewToModelMouseTarget(E,this._coordinatesConverter)}static convertViewToModelMouseTarget(E,w){const b=Object.assign({},E);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(E,w){return{viewZoneId:E.viewZoneId,positionBefore:E.positionBefore?w.convertViewPositionToModelPosition(E.positionBefore):E.positionBefore,positionAfter:E.positionAfter?w.convertViewPositionToModelPosition(E.positionAfter):E.positionAfter,position:w.convertViewPositionToModelPosition(E.position),afterLineNumber:w.convertViewPositionToModelPosition(new _.Position(E.afterLineNumber,1)).lineNumber}}}e.ViewUserInputEvents=k}),define(X[5],ee([1,0,12]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class k{constructor(E,w,b,S){E>b||E===b&&w>S?(this.startLineNumber=b,this.startColumn=S,this.endLineNumber=E,this.endColumn=w):(this.startLineNumber=E,this.startColumn=w,this.endLineNumber=b,this.endColumn=S)}isEmpty(){return k.isEmpty(this)}static isEmpty(E){return E.startLineNumber===E.endLineNumber&&E.startColumn===E.endColumn}containsPosition(E){return k.containsPosition(this,E)}static containsPosition(E,w){return!(w.lineNumber<E.startLineNumber||w.lineNumber>E.endLineNumber||w.lineNumber===E.startLineNumber&&w.column<E.startColumn||w.lineNumber===E.endLineNumber&&w.column>E.endColumn)}static strictContainsPosition(E,w){return!(w.lineNumber<E.startLineNumber||w.lineNumber>E.endLineNumber||w.lineNumber===E.startLineNumber&&w.column<=E.startColumn||w.lineNumber===E.endLineNumber&&w.column>=E.endColumn)}containsRange(E){return k.containsRange(this,E)}static containsRange(E,w){return!(w.startLineNumber<E.startLineNumber||w.endLineNumber<E.startLineNumber||w.startLineNumber>E.endLineNumber||w.endLineNumber>E.endLineNumber||w.startLineNumber===E.startLineNumber&&w.startColumn<E.startColumn||w.endLineNumber===E.endLineNumber&&w.endColumn>E.endColumn)}strictContainsRange(E){return k.strictContainsRange(this,E)}static strictContainsRange(E,w){return!(w.startLineNumber<E.startLineNumber||w.endLineNumber<E.startLineNumber||w.startLineNumber>E.endLineNumber||w.endLineNumber>E.endLineNumber||w.startLineNumber===E.startLineNumber&&w.startColumn<=E.startColumn||w.endLineNumber===E.endLineNumber&&w.endColumn>=E.endColumn)}plusRange(E){return k.plusRange(this,E)}static plusRange(E,w){let b,S,g,p;return w.startLineNumber<E.startLineNumber?(b=w.startLineNumber,S=w.startColumn):w.startLineNumber===E.startLineNumber?(b=w.startLineNumber,S=Math.min(w.startColumn,E.startColumn)):(b=E.startLineNumber,S=E.startColumn),w.endLineNumber>E.endLineNumber?(g=w.endLineNumber,p=w.endColumn):w.endLineNumber===E.endLineNumber?(g=w.endLineNumber,p=Math.max(w.endColumn,E.endColumn)):(g=E.endLineNumber,p=E.endColumn),new k(b,S,g,p)}intersectRanges(E){return k.intersectRanges(this,E)}static intersectRanges(E,w){let b=E.startLineNumber,S=E.startColumn,g=E.endLineNumber,p=E.endColumn;const n=w.startLineNumber,t=w.startColumn,i=w.endLineNumber,s=w.endColumn;return b<n?(b=n,S=t):b===n&&(S=Math.max(S,t)),g>i?(g=i,p=s):g===i&&(p=Math.min(p,s)),b>g||b===g&&S>p?null:new k(b,S,g,p)}equalsRange(E){return k.equalsRange(this,E)}static equalsRange(E,w){return!E&&!w?!0:!!E&&!!w&&E.startLineNumber===w.startLineNumber&&E.startColumn===w.startColumn&&E.endLineNumber===w.endLineNumber&&E.endColumn===w.endColumn}getEndPosition(){return k.getEndPosition(this)}static getEndPosition(E){return new _.Position(E.endLineNumber,E.endColumn)}getStartPosition(){return k.getStartPosition(this)}static getStartPosition(E){return new _.Position(E.startLineNumber,E.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(E,w){return new k(this.startLineNumber,this.startColumn,E,w)}setStartPosition(E,w){return new k(E,w,this.endLineNumber,this.endColumn)}collapseToStart(){return k.collapseToStart(this)}static collapseToStart(E){return new k(E.startLineNumber,E.startColumn,E.startLineNumber,E.startColumn)}collapseToEnd(){return k.collapseToEnd(this)}static collapseToEnd(E){return new k(E.endLineNumber,E.endColumn,E.endLineNumber,E.endColumn)}delta(E){return new k(this.startLineNumber+E,this.startColumn,this.endLineNumber+E,this.endColumn)}static fromPositions(E,w=E){return new k(E.lineNumber,E.column,w.lineNumber,w.column)}static lift(E){return E?new k(E.startLineNumber,E.startColumn,E.endLineNumber,E.endColumn):null}static isIRange(E){return E&&typeof E.startLineNumber=="number"&&typeof E.startColumn=="number"&&typeof E.endLineNumber=="number"&&typeof E.endColumn=="number"}static areIntersectingOrTouching(E,w){return!(E.endLineNumber<w.startLineNumber||E.endLineNumber===w.startLineNumber&&E.endColumn<w.startColumn||w.endLineNumber<E.startLineNumber||w.endLineNumber===E.startLineNumber&&w.endColumn<E.startColumn)}static areIntersecting(E,w){return!(E.endLineNumber<w.startLineNumber||E.endLineNumber===w.startLineNumber&&E.endColumn<=w.startColumn||w.endLineNumber<E.startLineNumber||w.endLineNumber===E.startLineNumber&&w.endColumn<=E.startColumn)}static compareRangesUsingStarts(E,w){if(E&&w){const g=E.startLineNumber|0,p=w.startLineNumber|0;if(g===p){const n=E.startColumn|0,t=w.startColumn|0;if(n===t){const i=E.endLineNumber|0,s=w.endLineNumber|0;if(i===s){const r=E.endColumn|0,d=w.endColumn|0;return r-d}return i-s}return n-t}return g-p}return(E?1:0)-(w?1:0)}static compareRangesUsingEnds(E,w){return E.endLineNumber===w.endLineNumber?E.endColumn===w.endColumn?E.startLineNumber===w.startLineNumber?E.startColumn-w.startColumn:E.startLineNumber-w.startLineNumber:E.endColumn-w.endColumn:E.endLineNumber-w.endLineNumber}static spansMultipleLines(E){return E.endLineNumber>E.startLineNumber}toJSON(){return this}}e.Range=k}),define(X[259],ee([1,0,9,5]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class y{constructor(b,S,g,p,n){this.value=b,this.selectionStart=S,this.selectionEnd=g,this.selection=p,this.newlineCountBeforeSelection=n}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(b,S){const g=b.getValue(),p=b.getSelectionStart(),n=b.getSelectionEnd();let t;if(S){const i=g.substring(0,p),s=S.value.substring(0,S.selectionStart);i===s&&(t=S.newlineCountBeforeSelection)}return new y(g,p,n,null,t)}collapseSelection(){return this.selectionStart===this.value.length?this:new y(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(b,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,p,n,t,i,s,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((n=(p=this.selection)===null||p===void 0?void 0:p.getEndPosition())!==null&&n!==void 0?n: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=(s=this.selection)===null||s===void 0?void 0:s.getEndPosition())!==null&&r!==void 0?r:null,h,-1)}_finishDeduceEditorPosition(b,S,g){let p=0,n=-1;for(;(n=S.indexOf(`
- `,n+1))!==-1;)p++;return[b,g*S.length,p]}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 p=Math.min(_.commonPrefixLength(b.value,S.value),b.selectionStart,S.selectionStart),n=Math.min(_.commonSuffixLength(b.value,S.value),b.value.length-b.selectionEnd,S.value.length-S.selectionEnd),t=b.value.substring(p,b.value.length-n),i=S.value.substring(p,S.value.length-n),s=b.selectionStart-p,r=b.selectionEnd-p,d=S.selectionStart-p,h=S.selectionEnd-p;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${t}>, selectionStart: ${s}, selectionEnd: ${r}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${d}, selectionEnd: ${h}`)),d===h){const c=b.selectionStart-p;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${c} chars`),{text:i,replacePrevCharCnt:c,replaceNextCharCnt:0,positionDelta:0}}const o=r-s;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),p=Math.min(_.commonSuffixLength(b.value,S.value),b.value.length-b.selectionEnd),n=b.value.substring(g,b.value.length-p),t=S.value.substring(g,S.value.length-p),i=b.selectionStart-g,s=b.selectionEnd-g,r=S.selectionStart-g,d=S.selectionEnd-g;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${n}>, selectionStart: ${i}, selectionEnd: ${s}`),console.log(`AFTER DIFFING CURRENT STATE: <${t}>, selectionStart: ${r}, selectionEnd: ${d}`)),{text:t,replacePrevCharCnt:s,replaceNextCharCnt:n.length-s,positionDelta:d-t.length}}}e.TextAreaState=y,y.EMPTY=new y("",0,0,null,void 0);class E{static _getPageOfLine(b,S){return Math.floor((b-1)/S)}static _getRangeForPage(b,S){const g=b*S,p=g+1,n=g+S;return new k.Range(p,1,n+1,1)}static fromEditorSelection(b,S,g,p){const t=E._getPageOfLine(S.startLineNumber,g),i=E._getRangeForPage(t,g),s=E._getPageOfLine(S.endLineNumber,g),r=E._getRangeForPage(s,g);let d=i.intersectRanges(new k.Range(1,1,S.startLineNumber,S.startColumn));if(p&&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 l=r.intersectRanges(new k.Range(S.endLineNumber,S.endColumn,o,c));if(p&&b.getValueLengthInRange(l,1)>500){const v=b.modifyPosition(l.getStartPosition(),500);l=k.Range.fromPositions(l.getStartPosition(),v)}const a=b.getValueInRange(l,1);let u;if(t===s||t+1===s)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 p&&u.length>2*500&&(u=u.substring(0,500)+String.fromCharCode(8230)+u.substring(u.length-500,u.length)),new y(h+u+a,h.length,h.length+u.length,S,d.endLineNumber-d.startLineNumber)}}e.PagedScreenReaderStrategy=E}),define(X[65],ee([1,0,5]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class k{static insert(E,w){return{range:new _.Range(E.lineNumber,E.column,E.lineNumber,E.column),text:w,forceMoveMarkers:!0}}static delete(E){return{range:E,text:null}}static replace(E,w){return{range:E,text:w}}static replaceMove(E,w){return{range:E,text:w,forceMoveMarkers:!0}}}e.EditOperation=k}),define(X[464],ee([1,0,9,65,5]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class E{constructor(S,g){this._selection=S,this._cursors=g,this._selectionId=null}getEditOperations(S,g){const p=w(S,this._cursors);for(let n=0,t=p.length;n<t;n++){const i=p[n];g.addEditOperation(i.range,i.text)}this._selectionId=g.trackSelection(this._selection)}computeCursorState(S,g){return g.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=E;function w(b,S){S.sort((i,s)=>i.lineNumber===s.lineNumber?i.column-s.column:i.lineNumber-s.lineNumber);for(let i=S.length-2;i>=0;i--)S[i].lineNumber===S[i+1].lineNumber&&S.splice(i,1);const g=[];let p=0,n=0;const t=S.length;for(let i=1,s=b.getLineCount();i<=s;i++){const r=b.getLineContent(i),d=r.length+1;let h=0;if(n<t&&S[n].lineNumber===i&&(h=S[n].column,n++,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[p++]=k.EditOperation.delete(new y.Range(i,c,i,d))}return g}e.trimTrailingWhitespace=w}),define(X[260],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class _{constructor(y,E,w,b){this._rgba8Brand=void 0,this.r=_._clamp(y),this.g=_._clamp(E),this.b=_._clamp(w),this.a=_._clamp(b)}equals(y){return this.r===y.r&&this.g===y.g&&this.b===y.b&&this.a===y.a}static _clamp(y){return y<0?0:y>255?255:y|0}}e.RGBA8=_,_.Empty=new _(0,0,0,0)}),define(X[23],ee([1,0,12,5]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class y 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 y.selectionsEqual(this,w)}static selectionsEqual(w,b){return w.selectionStartLineNumber===b.selectionStartLineNumber&&w.selectionStartColumn===b.selectionStartColumn&&w.positionLineNumber===b.positionLineNumber&&w.positionColumn===b.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(w,b){return this.getDirection()===0?new y(this.startLineNumber,this.startColumn,w,b):new y(w,b,this.startLineNumber,this.startColumn)}getPosition(){return new _.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new _.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(w,b){return this.getDirection()===0?new y(w,b,this.endLineNumber,this.endColumn):new y(this.endLineNumber,this.endColumn,w,b)}static fromPositions(w,b=w){return new y(w.lineNumber,w.column,b.lineNumber,b.column)}static fromRange(w,b){return b===0?new y(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn):new y(w.endLineNumber,w.endColumn,w.startLineNumber,w.startColumn)}static liftSelection(w){return new y(w.selectionStartLineNumber,w.selectionStartColumn,w.positionLineNumber,w.positionColumn)}static selectionsArrEqual(w,b){if(w&&!b||!w&&b)return!1;if(!w&&!b)return!0;if(w.length!==b.length)return!1;for(let 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,p){return p===0?new y(w,b,S,g):new y(S,g,w,b)}}e.Selection=y}),define(X[119],ee([1,0,23]),function(K,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,p,n=!1){this._range=g,this._text=p,this.insertsAutoWhitespace=n}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){const t=p.getInverseEditOperations()[0].range;return _.Selection.fromPositions(t.getEndPosition())}}e.ReplaceCommand=k;class y{constructor(g,p){this._range=g,this._text=p}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){const t=p.getInverseEditOperations()[0].range;return _.Selection.fromRange(t,0)}}e.ReplaceCommandThatSelectsText=y;class E{constructor(g,p,n=!1){this._range=g,this._text=p,this.insertsAutoWhitespace=n}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){const t=p.getInverseEditOperations()[0].range;return _.Selection.fromPositions(t.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=E;class w{constructor(g,p,n,t,i=!1){this._range=g,this._text=p,this._columnDeltaOffset=t,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=i}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){const t=p.getInverseEditOperations()[0].range;return _.Selection.fromPositions(t.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=w;class b{constructor(g,p,n,t=!1){this._range=g,this._text=p,this._initialSelection=n,this._forceMoveMarkers=t,this._selectionId=null}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=p.trackSelection(this._initialSelection)}computeCursorState(g,p){return p.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=b}),define(X[465],ee([1,0,5,23]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class y{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(),p=g[0].range,n=g[1].range;return new k.Selection(p.endLineNumber,p.endColumn,n.endLineNumber,n.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=y;class E{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 p=S.getInverseEditOperations()[0].range;return new k.Selection(p.endLineNumber,p.startColumn,p.endLineNumber,p.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=E}),define(X[168],ee([1,0]),function(K,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(X[138],ee([1,0,116]),function(K,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 y(E){const w={};return b=>(w.hasOwnProperty(b)||(w[b]=E(b)),w[b])}e.getMapForWordSeparators=y(E=>new k(E))}),define(X[139],ee([1,0,53,60]),function(K,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 y(g=""){let p="(-?\\d*\\.\\d\\w*)|([^";for(const n of e.USUAL_WORD_SEPARATORS)g.indexOf(n)>=0||(p+="\\"+n);return p+="\\s]+)",new RegExp(p,"g")}e.DEFAULT_WORD_REGEXP=y();function E(g){let p=e.DEFAULT_WORD_REGEXP;if(g&&g instanceof RegExp)if(g.global)p=g;else{let n="g";g.ignoreCase&&(n+="i"),g.multiline&&(n+="m"),g.unicode&&(n+="u"),p=new RegExp(g.source,n)}return p.lastIndex=0,p}e.ensureValidWordDefinition=E;const w=new k.LinkedList;w.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function b(g,p,n,t,i){if(i||(i=_.Iterable.first(w)),n.length>i.maxLen){let o=g-i.maxLen/2;return o<0?o=0:t+=o,n=n.substring(o,g+i.maxLen/2),b(g,p,n,t,i)}const s=Date.now(),r=g-1-t;let d=-1,h=null;for(let o=1;!(Date.now()-s>=i.timeBudget);o++){const c=r-i.windowSize*o;p.lastIndex=Math.max(0,c);const l=S(p,n,r,d);if(!l&&h||(h=l,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 p.lastIndex=0,o}return null}e.getWordAtText=b;function S(g,p,n,t){let i;for(;i=g.exec(p);){const s=i.index||0;if(s<=n&&g.lastIndex>=n)return i;if(t>0&&s>t)return null}return null}}),define(X[261],ee([1,0,76]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class k{static whitespaceVisibleColumn(E,w,b){const S=E.length;let g=0,p=-1,n=-1;for(let t=0;t<S;t++){if(t===w)return[p,n,g];switch(g%b===0&&(p=t,n=g),E.charCodeAt(t)){case 32:g+=1;break;case 9:g=_.CursorColumns.nextRenderTabStop(g,b);break;default:return[-1,-1,-1]}}return w===S?[p,n,g]:[-1,-1,-1]}static atomicPosition(E,w,b,S){const g=E.length,[p,n,t]=k.whitespaceVisibleColumn(E,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(p===-1)return-1;let d=n;for(let h=p;h<g;++h){if(d===n+b)return p;switch(E.charCodeAt(h)){case 32:d+=1;break;case 9:d=_.CursorColumns.nextRenderTabStop(d,b);break;default:return-1}}return d===n+b?p:-1}const s=_.CursorColumns.nextRenderTabStop(t,b);let r=t;for(let d=w;d<g;d++){if(r===s)return d;switch(E.charCodeAt(d)){case 32:r+=1;break;case 9:r=_.CursorColumns.nextRenderTabStop(r,b);break;default:return-1}}return r===s?g:-1}}e.AtomicTabMoveOperations=k}),define(X[466],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class _{constructor(y,E,w,b){this._cursorContextBrand=void 0,this.model=y,this.viewModel=E,this.coordinatesConverter=w,this.cursorConfig=b}}e.CursorContext=_}),define(X[169],ee([1,0,11,118]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateTimeout=e.InfiniteTimeout=e.SequenceDiff=e.DiffAlgorithmResult=void 0;class y{static trivial(g,p){return new y([new E(new k.OffsetRange(0,g.length),new k.OffsetRange(0,p.length))],!1)}static trivialTimedOut(g,p){return new y([new E(new k.OffsetRange(0,g.length),new k.OffsetRange(0,p.length))],!0)}constructor(g,p){this.diffs=g,this.hitTimeout=p}}e.DiffAlgorithmResult=y;class E{constructor(g,p){this.seq1Range=g,this.seq2Range=p}reverse(){return new E(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(g){return new E(this.seq1Range.join(g.seq1Range),this.seq2Range.join(g.seq2Range))}}e.SequenceDiff=E;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(X[467],ee([1,0,118,169]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftSequenceDiffs=e.joinSequenceDiffs=e.smoothenSequenceDiffs=e.optimizeSequenceDiffs=void 0;function y(g,p,n){let t=n;return t=w(g,p,t),t=b(g,p,t),t}e.optimizeSequenceDiffs=y;function E(g,p,n){const t=[];for(const i of n){const s=t[t.length-1];if(!s){t.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?t[t.length-1]=new k.SequenceDiff(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):t.push(i)}return t}e.smoothenSequenceDiffs=E;function w(g,p,n){const t=[];n.length>0&&t.push(n[0]);for(let i=1;i<n.length;i++){const s=t[t.length-1],r=n[i];if(r.seq1Range.isEmpty){let d=!0;const h=r.seq1Range.start-s.seq1Range.endExclusive;for(let o=1;o<=h;o++)if(p.getElement(r.seq2Range.start-o)!==p.getElement(r.seq2Range.endExclusive-o)){d=!1;break}if(d){t[t.length-1]=new k.SequenceDiff(s.seq1Range,new _.OffsetRange(s.seq2Range.start,r.seq2Range.endExclusive-h));continue}}t.push(r)}return t}e.joinSequenceDiffs=w;function b(g,p,n){if(!g.getBoundaryScore||!p.getBoundaryScore)return n;for(let t=0;t<n.length;t++){const i=n[t];if(i.seq1Range.isEmpty){const s=t>0?n[t-1].seq2Range.endExclusive:-1,r=t+1<n.length?n[t+1].seq2Range.start:p.length;n[t]=S(i,g,p,r,s)}else if(i.seq2Range.isEmpty){const s=t>0?n[t-1].seq1Range.endExclusive:-1,r=t+1<n.length?n[t+1].seq1Range.start:g.length;n[t]=S(i.reverse(),p,g,r,s).reverse()}}return n}e.shiftSequenceDiffs=b;function S(g,p,n,t,i){let r=1;for(;g.seq2Range.start-r>i&&n.getElement(g.seq2Range.start-r)===n.getElement(g.seq2Range.endExclusive-r)&&r<20;)r++;r--;let d=0;for(;g.seq2Range.start+d<t&&n.getElement(g.seq2Range.start+d)===n.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 l=g.seq2Range.start+c,a=g.seq2Range.endExclusive+c,u=g.seq1Range.start+c,v=p.getBoundaryScore(u)+n.getBoundaryScore(l)+n.getBoundaryScore(a);v>o&&(o=v,h=c)}return h!==0?new k.SequenceDiff(g.seq1Range.delta(h),g.seq2Range.delta(h)):g}}),define(X[468],ee([1,0,118,169]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MyersDiffAlgorithm=void 0;class y{compute(g,p,n=k.InfiniteTimeout.instance){if(g.length===0||p.length===0)return k.DiffAlgorithmResult.trivial(g,p);function t(a,u){for(;a<g.length&&u<p.length&&g.getElement(a)===p.getElement(u);)a++,u++;return a}let i=0;const s=new w;s.set(0,t(0,0));const r=new b;r.set(0,s.get(0)===0?null:new E(null,0,0,s.get(0)));let d=0;e:for(;;)for(i++,d=-i;d<=i;d+=2){if(!n.isValid())return k.DiffAlgorithmResult.trivialTimedOut(g,p);const a=d===i?-1:s.get(d+1),u=d===-i?-1:s.get(d-1)+1,v=Math.min(Math.max(a,u),g.length),f=v-d,m=t(v,f);s.set(d,m);const C=v===a?r.get(d+1):r.get(d-1);if(r.set(d,m!==v?new E(C,v,f,m-v):C),s.get(d)===g.length&&s.get(d)-d===p.length)break e}let h=r.get(d);const o=[];let c=g.length,l=p.length;for(;;){const a=h?h.x+h.length:0,u=h?h.y+h.length:0;if((a!==c||u!==l)&&o.push(new k.SequenceDiff(new _.OffsetRange(a,c),new _.OffsetRange(u,l))),!h)break;c=h.x,l=h.y,h=h.prev}return o.reverse(),new k.DiffAlgorithmResult(o,!1)}}e.MyersDiffAlgorithm=y;class E{constructor(g,p,n,t){this.prev=g,this.x=p,this.y=n,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,p){if(g<0){if(g=-g-1,g>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[g]=p}else{if(g>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[g]=p}}}class b{constructor(){this.positiveArr=[],this.negativeArr=[]}get(g){return g<0?(g=-g-1,this.negativeArr[g]):this.positiveArr[g]}set(g,p){g<0?(g=-g-1,this.negativeArr[g]=p):this.positiveArr[g]=p}}}),define(X[469],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Array2D=void 0;class _{constructor(y,E){this.width=y,this.height=E,this.array=[],this.array=new Array(y*E)}get(y,E){return this.array[y+E*this.width]}set(y,E,w){this.array[y+E*this.width]=w}}e.Array2D=_}),define(X[470],ee([1,0,118,169,469]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicProgrammingDiffing=void 0;class E{compute(b,S,g=k.InfiniteTimeout.instance,p){if(b.length===0||S.length===0)return k.DiffAlgorithmResult.trivial(b,S);const n=new y.Array2D(b.length,S.length),t=new y.Array2D(b.length,S.length),i=new y.Array2D(b.length,S.length);for(let l=0;l<b.length;l++)for(let a=0;a<S.length;a++){if(!g.isValid())return k.DiffAlgorithmResult.trivialTimedOut(b,S);const u=l===0?0:n.get(l-1,a),v=a===0?0:n.get(l,a-1);let f;b.getElement(l)===S.getElement(a)?(l===0||a===0?f=0:f=n.get(l-1,a-1),l>0&&a>0&&t.get(l-1,a-1)===3&&(f+=i.get(l-1,a-1)),f+=p?p(l,a):1):f=-1;const m=Math.max(u,v,f);if(m===f){const C=l>0&&a>0?i.get(l-1,a-1):0;i.set(l,a,C+1),t.set(l,a,3)}else m===u?(i.set(l,a,0),t.set(l,a,1)):m===v&&(i.set(l,a,0),t.set(l,a,2));n.set(l,a,m)}const s=[];let r=b.length,d=S.length;function h(l,a){(l+1!==r||a+1!==d)&&s.push(new k.SequenceDiff(new _.OffsetRange(l+1,r),new _.OffsetRange(a+1,d))),r=l,d=a}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),s.reverse(),new k.DiffAlgorithmResult(s,!1)}}e.DynamicProgrammingDiffing=E}),define(X[170],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMapping=e.LineRangeMapping=e.LinesDiff=void 0;class _{constructor(w,b){this.changes=w,this.hitTimeout=b}}e.LinesDiff=_;class k{constructor(w,b,S){this.originalRange=w,this.modifiedRange=b,this.innerChanges=S}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}}e.LineRangeMapping=k;class y{constructor(w,b){this.originalRange=w,this.modifiedRange=b}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}e.RangeMapping=y}),define(X[471],ee([1,0,161,170,9,5,85,104]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.SmartLinesDiffComputer=void 0;const S=3;class g{computeDiff(a,u,v){var f;const C=new d(a,u,{maxComputationTime:v.maxComputationTimeMs,shouldIgnoreTrimWhitespace:v.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),L=[];let D=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(A=>new k.RangeMapping(new E.Range(A.originalStartLineNumber,A.originalStartColumn,A.originalEndLineNumber,A.originalEndColumn),new E.Range(A.modifiedStartLineNumber,A.modifiedStartColumn,A.modifiedEndLineNumber,A.modifiedEndColumn))));D&&(D.modifiedRange.endLineNumberExclusive===R.modifiedRange.startLineNumber||D.originalRange.endLineNumberExclusive===R.originalRange.startLineNumber)&&(R=new k.LineRangeMapping(D.originalRange.join(R.originalRange),D.modifiedRange.join(R.modifiedRange),D.innerChanges&&R.innerChanges?D.innerChanges.concat(R.innerChanges):void 0),L.pop()),L.push(R),D=R}return(0,w.assertFn)(()=>(0,w.checkAdjacentItems)(L,(I,T)=>T.originalRange.startLineNumber-I.originalRange.endLineNumberExclusive===T.modifiedRange.startLineNumber-I.modifiedRange.endLineNumberExclusive&&I.originalRange.endLineNumberExclusive<T.originalRange.startLineNumber&&I.modifiedRange.endLineNumberExclusive<T.modifiedRange.startLineNumber)),new k.LinesDiff(L,C.quitEarly)}}e.SmartLinesDiffComputer=g;function p(l,a,u,v){return new _.LcsDiff(l,a,u).ComputeDiff(v)}class n{constructor(a){const u=[],v=[];for(let f=0,m=a.length;f<m;f++)u[f]=h(a[f],1),v[f]=o(a[f],1);this.lines=a,this._startColumns=u,this._endColumns=v}getElements(){const a=[];for(let u=0,v=this.lines.length;u<v;u++)a[u]=this.lines[u].substring(this._startColumns[u]-1,this._endColumns[u]-1);return a}getStrictElement(a){return this.lines[a]}getStartLineNumber(a){return a+1}getEndLineNumber(a){return a+1}createCharSequence(a,u,v){const f=[],m=[],C=[];let L=0;for(let D=u;D<=v;D++){const I=this.lines[D],T=a?this._startColumns[D]:1,O=a?this._endColumns[D]:I.length+1;for(let R=T;R<O;R++)f[L]=I.charCodeAt(R-1),m[L]=D+1,C[L]=R,L++;!a&&D<v&&(f[L]=10,m[L]=D+1,C[L]=I.length+1,L++)}return new t(f,m,C)}}class t{constructor(a,u,v){this._charCodes=a,this._lineNumbers=u,this._columns=v}toString(){return"["+this._charCodes.map((a,u)=>(a===10?"\\n":String.fromCharCode(a))+`-(${this._lineNumbers[u]},${this._columns[u]})`).join(", ")+"]"}_assertIndex(a,u){if(a<0||a>=u.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(a){return a>0&&a===this._lineNumbers.length?this.getEndLineNumber(a-1):(this._assertIndex(a,this._lineNumbers),this._lineNumbers[a])}getEndLineNumber(a){return a===-1?this.getStartLineNumber(a+1):(this._assertIndex(a,this._lineNumbers),this._charCodes[a]===10?this._lineNumbers[a]+1:this._lineNumbers[a])}getStartColumn(a){return a>0&&a===this._columns.length?this.getEndColumn(a-1):(this._assertIndex(a,this._columns),this._columns[a])}getEndColumn(a){return a===-1?this.getStartColumn(a+1):(this._assertIndex(a,this._columns),this._charCodes[a]===10?1:this._columns[a]+1)}}class i{constructor(a,u,v,f,m,C,L,D){this.originalStartLineNumber=a,this.originalStartColumn=u,this.originalEndLineNumber=v,this.originalEndColumn=f,this.modifiedStartLineNumber=m,this.modifiedStartColumn=C,this.modifiedEndLineNumber=L,this.modifiedEndColumn=D}static createFromDiffChange(a,u,v){const f=u.getStartLineNumber(a.originalStart),m=u.getStartColumn(a.originalStart),C=u.getEndLineNumber(a.originalStart+a.originalLength-1),L=u.getEndColumn(a.originalStart+a.originalLength-1),D=v.getStartLineNumber(a.modifiedStart),I=v.getStartColumn(a.modifiedStart),T=v.getEndLineNumber(a.modifiedStart+a.modifiedLength-1),O=v.getEndColumn(a.modifiedStart+a.modifiedLength-1);return new i(f,m,C,L,D,I,T,O)}}function s(l){if(l.length<=1)return l;const a=[l[0]];let u=a[0];for(let v=1,f=l.length;v<f;v++){const m=l[v],C=m.originalStart-(u.originalStart+u.originalLength),L=m.modifiedStart-(u.modifiedStart+u.modifiedLength);Math.min(C,L)<S?(u.originalLength=m.originalStart+m.originalLength-u.originalStart,u.modifiedLength=m.modifiedStart+m.modifiedLength-u.modifiedStart):(a.push(m),u=m)}return a}class r{constructor(a,u,v,f,m){this.originalStartLineNumber=a,this.originalEndLineNumber=u,this.modifiedStartLineNumber=v,this.modifiedEndLineNumber=f,this.charChanges=m}static createFromDiffResult(a,u,v,f,m,C,L){let D,I,T,O,R;if(u.originalLength===0?(D=v.getStartLineNumber(u.originalStart)-1,I=0):(D=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&&m()){const A=v.createCharSequence(a,u.originalStart,u.originalStart+u.originalLength-1),N=f.createCharSequence(a,u.modifiedStart,u.modifiedStart+u.modifiedLength-1);if(A.getElements().length>0&&N.getElements().length>0){let P=p(A,N,m,!0).changes;L&&(P=s(P)),R=[];for(let x=0,F=P.length;x<F;x++)R.push(i.createFromDiffChange(P[x],A,N))}}return new r(D,I,T,O,R)}}class d{constructor(a,u,v){this.shouldComputeCharChanges=v.shouldComputeCharChanges,this.shouldPostProcessCharChanges=v.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=v.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=v.shouldMakePrettyDiff,this.originalLines=a,this.modifiedLines=u,this.original=new n(a),this.modified=new n(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 a=p(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),u=a.changes,v=a.quitEarly;if(this.shouldIgnoreTrimWhitespace){const L=[];for(let D=0,I=u.length;D<I;D++)L.push(r.createFromDiffResult(this.shouldIgnoreTrimWhitespace,u[D],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:v,changes:L}}const f=[];let m=0,C=0;for(let L=-1,D=u.length;L<D;L++){const I=L+1<D?u[L+1]:null,T=I?I.originalStart:this.originalLines.length,O=I?I.modifiedStart:this.modifiedLines.length;for(;m<T&&C<O;){const R=this.originalLines[m],A=this.modifiedLines[C];if(R!==A){{let N=h(R,1),P=h(A,1);for(;N>1&&P>1;){const x=R.charCodeAt(N-2),F=A.charCodeAt(P-2);if(x!==F)break;N--,P--}(N>1||P>1)&&this._pushTrimWhitespaceCharChange(f,m+1,1,N,C+1,1,P)}{let N=o(R,1),P=o(A,1);const x=R.length+1,F=A.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,m+1,N,x,C+1,P,F)}}m++,C++}I&&(f.push(r.createFromDiffResult(this.shouldIgnoreTrimWhitespace,I,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),m+=I.originalLength,C+=I.modifiedLength)}return{quitEarly:v,changes:f}}_pushTrimWhitespaceCharChange(a,u,v,f,m,C,L){if(this._mergeTrimWhitespaceCharChange(a,u,v,f,m,C,L))return;let D;this.shouldComputeCharChanges&&(D=[new i(u,v,u,f,m,C,m,L)]),a.push(new r(u,u,m,m,D))}_mergeTrimWhitespaceCharChange(a,u,v,f,m,C,L){const D=a.length;if(D===0)return!1;const I=a[D-1];return I.originalEndLineNumber===0||I.modifiedEndLineNumber===0?!1:I.originalEndLineNumber===u&&I.modifiedEndLineNumber===m?(this.shouldComputeCharChanges&&I.charChanges&&I.charChanges.push(new i(u,v,u,f,m,C,m,L)),!0):I.originalEndLineNumber+1===u&&I.modifiedEndLineNumber+1===m?(I.originalEndLineNumber=u,I.modifiedEndLineNumber=m,this.shouldComputeCharChanges&&I.charChanges&&I.charChanges.push(new i(u,v,u,f,m,C,m,L)),!0):!1}}e.DiffComputer=d;function h(l,a){const u=y.firstNonWhitespaceIndex(l);return u===-1?a:u+1}function o(l,a){const u=y.lastNonWhitespaceIndex(l);return u===-1?a:u+2}function c(l){if(l===0)return()=>!0;const a=Date.now();return()=>Date.now()-a<l}}),define(X[472],ee([1,0,85,104,118,12,5,169,470,467,468,170]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineSequence=e.getLineRangeMapping=e.lineRangeMappingFromRangeMappings=e.StandardLinesDiffComputer=void 0;class t{constructor(){this.dynamicProgrammingDiffing=new S.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new p.MyersDiffAlgorithm}computeDiff(L,D,I){const T=I.maxComputationTimeMs===0?b.InfiniteTimeout.instance:new b.DateTimeout(I.maxComputationTimeMs),O=!I.ignoreTrimWhitespace,R=new Map;function A(se){let H=R.get(se);return H===void 0&&(H=R.size,R.set(se,H)),H}const N=L.map(se=>A(se.trim())),P=D.map(se=>A(se.trim())),x=new o(N,L),F=new o(P,D),B=(()=>x.length+F.length<1500?this.dynamicProgrammingDiffing.compute(x,F,T,(se,H)=>L[se]===D[H]?D[H].length===0?.1:1+Math.log(1+D[H].length):.99):this.myersDiffingAlgorithm.compute(x,F))();let V=B.diffs,$=B.hitTimeout;V=(0,g.optimizeSequenceDiffs)(x,F,V);const M=[],Q=se=>{if(O)for(let H=0;H<se;H++){const W=ie+H,q=re+H;if(L[W]!==D[q]){const Z=this.refineDiff(L,D,new b.SequenceDiff(new y.OffsetRange(W,W+1),new y.OffsetRange(q,q+1)),T,O);for(const Y of Z.mappings)M.push(Y);Z.hitTimeout&&($=!0)}}};let ie=0,re=0;for(const se of V){(0,_.assertFn)(()=>se.seq1Range.start-ie===se.seq2Range.start-re);const H=se.seq1Range.start-ie;Q(H),ie=se.seq1Range.endExclusive,re=se.seq2Range.endExclusive;const W=this.refineDiff(L,D,se,T,O);W.hitTimeout&&($=!0);for(const q of W.mappings)M.push(q)}Q(L.length-ie);const ne=r(M,L,D);return new n.LinesDiff(ne,$)}refineDiff(L,D,I,T,O){const R=new l(L,I.seq1Range,O),A=new l(D,I.seq2Range,O),N=R.length+A.length<500?this.dynamicProgrammingDiffing.compute(R,A,T):this.myersDiffingAlgorithm.compute(R,A,T);let P=N.diffs;return P=(0,g.optimizeSequenceDiffs)(R,A,P),P=i(R,A,P),P=(0,g.smoothenSequenceDiffs)(R,A,P),{mappings:P.map(F=>new n.RangeMapping(R.translateRange(F.seq1Range),A.translateRange(F.seq2Range))),hitTimeout:N.hitTimeout}}}e.StandardLinesDiffComputer=t;function i(C,L,D){const I=[];let T;function O(){if(!T)return;const A=T.s1Range.length-T.deleted,N=T.s2Range.length-T.added;Math.max(T.deleted,T.added)+(T.count-1)>A&&I.push(new b.SequenceDiff(T.s1Range,T.s2Range)),T=void 0}for(const A of D){let N=function(V,$){var M,Q,ie,re;if(!T||!T.s1Range.containsRange(V)||!T.s2Range.containsRange($))if(T&&!(T.s1Range.endExclusive<V.start&&T.s2Range.endExclusive<$.start)){const H=y.OffsetRange.tryCreate(T.s1Range.endExclusive,V.start),W=y.OffsetRange.tryCreate(T.s2Range.endExclusive,$.start);T.deleted+=(M=H?.length)!==null&&M!==void 0?M:0,T.added+=(Q=W?.length)!==null&&Q!==void 0?Q:0,T.s1Range=T.s1Range.join(V),T.s2Range=T.s2Range.join($)}else O(),T={added:0,deleted:0,count:0,s1Range:V,s2Range:$};const ne=V.intersect(A.seq1Range),se=$.intersect(A.seq2Range);T.count++,T.deleted+=(ie=ne?.length)!==null&&ie!==void 0?ie:0,T.added+=(re=se?.length)!==null&&re!==void 0?re:0};const P=C.findWordContaining(A.seq1Range.start-1),x=L.findWordContaining(A.seq2Range.start-1),F=C.findWordContaining(A.seq1Range.endExclusive),B=L.findWordContaining(A.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(),s(D,I)}function s(C,L){const D=[];for(;C.length>0||L.length>0;){const I=C[0],T=L[0];let O;I&&(!T||I.seq1Range.start<T.seq1Range.start)?O=C.shift():O=L.shift(),D.length>0&&D[D.length-1].seq1Range.endExclusive>=O.seq1Range.start?D[D.length-1]=D[D.length-1].join(O):D.push(O)}return D}function r(C,L,D){const I=[];for(const T of h(C.map(O=>d(O,L,D)),(O,R)=>O.originalRange.overlapOrTouch(R.originalRange)||O.modifiedRange.overlapOrTouch(R.modifiedRange))){const O=T[0],R=T[T.length-1];I.push(new n.LineRangeMapping(O.originalRange.join(R.originalRange),O.modifiedRange.join(R.modifiedRange),T.map(A=>A.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,L,D){let I=0,T=0;C.modifiedRange.startColumn-1>=D[C.modifiedRange.startLineNumber-1].length&&C.originalRange.startColumn-1>=L[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 n.LineRangeMapping(O,R,[C])}e.getLineRangeMapping=d;function*h(C,L){let D,I;for(const T of C)I!==void 0&&L(I,T)?D.push(T):(D&&(yield D),D=[T]),I=T;D&&(yield D)}class o{constructor(L,D){this.trimmedHash=L,this.lines=D}getElement(L){return this.trimmedHash[L]}get length(){return this.trimmedHash.length}getBoundaryScore(L){const D=L===0?0:c(this.lines[L-1]),I=L===this.lines.length?0:c(this.lines[L]);return 1e3-(D+I)}}e.LineSequence=o;function c(C){let L=0;for(;L<C.length&&(C.charCodeAt(L)===32||C.charCodeAt(L)===9);)L++;return L}class l{constructor(L,D,I){this.lines=L,this.considerWhitespaceChanges=I,this.elements=[],this.firstCharOffsetByLineMinusOne=[],this.offsetByLine=[];let T=!1;D.start>0&&D.endExclusive>=L.length&&(D=new y.OffsetRange(D.start-1,D.endExclusive),T=!0),this.lineRange=D;for(let O=this.lineRange.start;O<this.lineRange.endExclusive;O++){let R=L[O],A=0;if(T)A=R.length,R="",T=!1;else if(!I){const N=R.trimStart();A=R.length-N.length,R=N.trimEnd()}this.offsetByLine.push(A);for(let N=0;N<R.length;N++)this.elements.push(R.charCodeAt(N));O<L.length-1&&(this.elements.push(`
- `.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(L=>String.fromCharCode(L)).join("")}getElement(L){return this.elements[L]}get length(){return this.elements.length}getBoundaryScore(L){const D=f(L>0?this.elements[L-1]:-1),I=f(L<this.elements.length?this.elements[L]:-1);if(D===6&&I===7)return 0;let T=0;return D!==I&&(T+=10,I===1&&(T+=1)),T+=v(D),T+=v(I),T}translateOffset(L){if(this.lineRange.isEmpty)return new E.Position(this.lineRange.start+1,1);let D=0,I=this.firstCharOffsetByLineMinusOne.length;for(;D<I;){const O=Math.floor((D+I)/2);this.firstCharOffsetByLineMinusOne[O]>L?I=O:D=O+1}const T=D===0?0:this.firstCharOffsetByLineMinusOne[D-1];return new E.Position(this.lineRange.start+D+1,L-T+1+this.offsetByLine[D])}translateRange(L){return w.Range.fromPositions(this.translateOffset(L.start),this.translateOffset(L.endExclusive))}findWordContaining(L){if(L<0||L>=this.elements.length||!a(this.elements[L]))return;let D=L;for(;D>0&&a(this.elements[D-1]);)D--;let I=L;for(;I<this.elements.length&&a(this.elements[I]);)I++;return new y.OffsetRange(D,I)}}function a(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:m(C)?5:C>=97&&C<=122?0:C>=65&&C<=90?1:C>=48&&C<=57?2:C===-1?3:4}function m(C){return C===32||C===9}}),define(X[473],ee([1,0,471,472]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linesDiffComputers=void 0,e.linesDiffComputers={legacy:new _.SmartLinesDiffComputer,advanced:new k.StandardLinesDiffComputer}}),define(X[262],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class _{constructor(y,E,w,b,S,g){this.id=y,this.label=E,this.alias=w,this._precondition=b,this._run=S,this._contextKeyService=g}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(y){return this.isSupported()?this._run(y):Promise.resolve(void 0)}}e.InternalEditorAction=_}),define(X[171],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=void 0,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(X[172],ee([1,0,171]),function(K,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 y(b){return b&&typeof b.getEditorType=="function"?b.getEditorType()===_.EditorType.IDiffEditor:!1}e.isDiffEditor=y;function E(b){return!!b&&typeof b=="object"&&typeof b.onDidChangeActiveEditor=="function"}e.isCompositeEditor=E;function w(b){return k(b)?b:y(b)?b.getModifiedEditor():E(b)&&k(b.activeCodeEditor)?b.activeCodeEditor:null}e.getCodeEditor=w}),define(X[192],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorFeatures=e.registerEditorFeature=void 0;const _=[];function k(E){_.push(E)}e.registerEditorFeature=k;function y(){return _.slice(0)}e.getEditorFeatures=y}),define(X[474],ee([1,0]),function(K,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(y){this._theme=y}update(y){this._theme=y}getColor(y){return this._theme.getColor(y)}}e.EditorTheme=_}),define(X[120],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=void 0;class _{static getLanguageId(y){return(y&255)>>>0}static getTokenType(y){return(y&768)>>>8}static containsBalancedBrackets(y){return(y&1024)!==0}static getFontStyle(y){return(y&30720)>>>11}static getForeground(y){return(y&16744448)>>>15}static getBackground(y){return(y&4278190080)>>>24}static getClassNameFromMetadata(y){let w="mtk"+this.getForeground(y);const b=this.getFontStyle(y);return b&1&&(w+=" mtki"),b&2&&(w+=" mtkb"),b&4&&(w+=" mtku"),b&8&&(w+=" mtks"),w}static getInlineStyleFromMetadata(y,E){const w=this.getForeground(y),b=this.getFontStyle(y);let S=`color: ${E[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(y){const E=this.getForeground(y),w=this.getFontStyle(y);return{foreground:E,italic:!!(w&1),bold:!!(w&2),underline:!!(w&4),strikethrough:!!(w&8)}}}e.TokenMetadata=_}),define(X[475],ee([1,0,37]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeDefaultDocumentColors=void 0;function k(t){const i=[];for(const s of t){const r=Number(s);(r||r===0&&s.replace(/\s/g,"")!=="")&&i.push(r)}return i}function y(t,i,s,r){return{red:t/255,blue:s/255,green:i/255,alpha:r}}function E(t,i){const s=i.index,r=i[0].length;if(!s)return;const d=t.positionAt(s);return{startLineNumber:d.lineNumber,startColumn:d.column,endLineNumber:d.lineNumber,endColumn:d.column+r}}function w(t,i){if(!t)return;const s=_.Color.Format.CSS.parseHex(i);if(s)return{range:t,color:y(s.rgba.r,s.rgba.g,s.rgba.b,s.rgba.a)}}function b(t,i,s){if(!t||i.length!==1)return;const d=i[0].values(),h=k(d);return{range:t,color:y(h[0],h[1],h[2],s?h[3]:1)}}function S(t,i,s){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,s?h[3]:1));return{range:t,color:y(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 p(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(a=>a!==void 0),o=h[1],c=h[2];if(!c)continue;let l;if(o==="rgb"){const a=/^\(\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;l=b(E(t,d),g(c,a),!1)}else if(o==="rgba"){const a=/^\(\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;l=b(E(t,d),g(c,a),!0)}else if(o==="hsl"){const a=/^\(\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;l=S(E(t,d),g(c,a),!1)}else if(o==="hsla"){const a=/^\(\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;l=S(E(t,d),g(c,a),!0)}else o==="#"&&(l=w(E(t,d),o+c));l&&i.push(l)}return i}function n(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:p(t)}e.computeDefaultDocumentColors=n}),define(X[105],ee([1,0]),function(K,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),p=b.getStandardTokenType(g);return this.isOK(p)}_findNeutralCharacterInRange(b,S){for(let g=b;g<=S;g++){const p=String.fromCharCode(g);if(!this.open.includes(p)&&!this.close.includes(p))return p}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=k;class y{constructor(b){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const S of b)E(this.autoClosingPairsOpenByStart,S.open.charAt(0),S),E(this.autoClosingPairsOpenByEnd,S.open.charAt(S.open.length-1),S),E(this.autoClosingPairsCloseByStart,S.close.charAt(0),S),E(this.autoClosingPairsCloseByEnd,S.close.charAt(S.close.length-1),S),S.close.length===1&&S.open.length===1&&E(this.autoClosingPairsCloseSingleChar,S.close,S)}}e.AutoClosingPairs=y;function E(w,b,S){w.has(b)?w.get(b).push(S):w.set(b,[S])}}),define(X[476],ee([1,0,116]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=void 0;class k{constructor(t,i,s){const r=new Uint8Array(t*i);for(let d=0,h=t*i;d<h;d++)r[d]=s;this._data=r,this.rows=t,this.cols=i}get(t,i){return this._data[t*this.cols+i]}set(t,i,s){this._data[t*this.cols+i]=s}}class y{constructor(t){let i=0,s=0;for(let d=0,h=t.length;d<h;d++){const[o,c,l]=t[d];c>i&&(i=c),o>s&&(s=o),l>s&&(s=l)}i++,s++;const r=new k(s,i,0);for(let d=0,h=t.length;d<h;d++){const[o,c,l]=t[d];r.set(o,c,l)}this._states=r,this._maxCharCode=i}nextState(t,i){return i<0||i>=this._maxCharCode?0:this._states.get(t,i)}}e.StateMachine=y;let E=null;function w(){return E===null&&(E=new y([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),E}let b=null;function S(){if(b===null){b=new _.CharacterClassifier(0);const n=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let i=0;i<n.length;i++)b.set(n.charCodeAt(i),1);const t=".,;:";for(let i=0;i<t.length;i++)b.set(t.charCodeAt(i),2)}return b}class g{static _createLink(t,i,s,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:s,startColumn:r+1,endLineNumber:s,endColumn:h+2},url:i.substring(r,h+1)}}static computeLinks(t,i=w()){const s=S(),r=[];for(let d=1,h=t.getLineCount();d<=h;d++){const o=t.getLineContent(d),c=o.length;let l=0,a=0,u=0,v=1,f=!1,m=!1,C=!1,L=!1;for(;l<c;){let D=!1;const I=o.charCodeAt(l);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,m=!0,T=0;break;case 93:C=!1,T=m?0:1;break;case 123:L=!0,T=0;break;case 125:T=L?0:1;break;case 39:case 34:case 96:u===I?T=1:u===39||u===34||u===96?T=0:T=1;break;case 42:T=u===42?1:0;break;case 124:T=u===124?1:0;break;case 32:T=C?0:1;break;default:T=s.get(I)}T===1&&(r.push(g._createLink(s,o,d,a,l)),D=!0)}else if(v===12){let T;I===91?(m=!0,T=0):T=s.get(I),T===1?D=!0:v=13}else v=i.nextState(v,I),v===0&&(D=!0);D&&(v=1,f=!1,m=!1,L=!1,a=l+1,u=I),l++}v===13&&r.push(g._createLink(s,o,d,a,c))}return r}}e.LinkComputer=g;function p(n){return!n||typeof n.getLineCount!="function"||typeof n.getLineContent!="function"?[]:g.computeLinks(n)}e.computeLinks=p}),define(X[121],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function _(E,w){const b=E.getCount(),S=E.findTokenIndexAtOffset(w),g=E.getLanguageId(S);let p=S;for(;p+1<b&&E.getLanguageId(p+1)===g;)p++;let n=S;for(;n>0&&E.getLanguageId(n-1)===g;)n--;return new k(E,g,n,p+1,E.getStartOffset(n),E.getEndOffset(p))}e.createScopedLineTokens=_;class k{constructor(w,b,S,g,p,n){this._scopedLineTokensBrand=void 0,this._actual=w,this.languageId=b,this._firstTokenIndex=S,this._lastTokenIndex=g,this.firstCharOffset=p,this._lastCharOffset=n}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(w){return this._actual.getLineContent().substring(0,this.firstCharOffset+w)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(w){return this._actual.findTokenIndexAtOffset(w+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(w){return this._actual.getStandardTokenType(w+this._firstTokenIndex)}}e.ScopedLineTokens=k;function y(E){return(E&3)!==0}e.ignoreBracketsInToken=y}),define(X[66],ee([1,0,12,5,23,121,76,191]),function(K,e,_,k,y,E,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,p=o=>o===" "||o===" ";class n{static shouldRecreate(c){return c.hasChanged(139)||c.hasChanged(125)||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(123)||c.hasChanged(48)||c.hasChanged(87)}constructor(c,l,a,u){this.languageConfigurationService=u,this._cursorMoveConfigurationBrand=void 0,this._languageId=c;const v=a.options,f=v.get(139),m=v.get(48);this.readOnly=v.get(87),this.tabSize=l.tabSize,this.indentSize=l.indentSize,this.insertSpaces=l.insertSpaces,this.stickyTabStops=v.get(111),this.lineHeight=m.lineHeight,this.typicalHalfwidthCharacterWidth=m.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(f.height/this.lineHeight)-2),this.useTabStops=v.get(123),this.wordSeparators=v.get(125),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 L of C)this.surroundingPairs[L.open]=L.close}get electricChars(){var c;if(!this._electricChars){this._electricChars={};const l=(c=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||c===void 0?void 0:c.getElectricCharacters();if(l)for(const a of l)this._electricChars[a]=!0}return this._electricChars}onElectricCharacter(c,l,a){const u=(0,E.createScopedLineTokens)(l,a-1),v=this.languageConfigurationService.getLanguageConfiguration(u.languageId).electricCharacter;return v?v.onElectricCharacter(c,u,a-u.firstCharOffset):null}normalizeIndentation(c){return(0,b.normalizeIndentation)(c,this.indentSize,this.insertSpaces)}_getShouldAutoClose(c,l,a){switch(l){case"beforeWhitespace":return p;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(c,a);case"always":return S;case"never":return g}}_getLanguageDefinedShouldAutoClose(c,l){const a=this.languageConfigurationService.getLanguageConfiguration(c).getAutoCloseBeforeSet(l);return u=>a.indexOf(u)!==-1}visibleColumnFromColumn(c,l){return w.CursorColumns.visibleColumnFromColumn(c.getLineContent(l.lineNumber),l.column,this.tabSize)}columnFromVisibleColumn(c,l,a){const u=w.CursorColumns.columnFromVisibleColumn(c.getLineContent(l),a,this.tabSize),v=c.getLineMinColumn(l);if(u<v)return v;const f=c.getLineMaxColumn(l);return u>f?f:u}}e.CursorConfiguration=n;class t{static fromModelState(c){return new i(c)}static fromViewState(c){return new s(c)}static fromModelSelection(c){const l=y.Selection.liftSelection(c),a=new r(k.Range.fromPositions(l.getSelectionStart()),0,0,l.getPosition(),0);return t.fromModelState(a)}static fromModelSelections(c){const l=[];for(let a=0,u=c.length;a<u;a++)l[a]=this.fromModelSelection(c[a]);return l}constructor(c,l){this._cursorStateBrand=void 0,this.modelState=c,this.viewState=l}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 s{constructor(c){this.modelState=null,this.viewState=c}}e.PartialViewCursorState=s;class r{constructor(c,l,a,u,v){this.selectionStart=c,this.selectionStartKind=l,this.selectionStartLeftoverVisibleColumns=a,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,l,a,u){return c?new r(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new _.Position(l,a),u):new r(new k.Range(l,a,l,a),0,u,new _.Position(l,a),u)}static _computeSelection(c,l){return c.isEmpty()||!l.isBeforeOrEqual(c.getStartPosition())?y.Selection.fromPositions(c.getStartPosition(),l):y.Selection.fromPositions(c.getEndPosition(),l)}}e.SingleCursorState=r;class d{constructor(c,l,a){this._editOperationResultBrand=void 0,this.type=c,this.commands=l,this.shouldPushStackElementBefore=a.shouldPushStackElementBefore,this.shouldPushStackElementAfter=a.shouldPushStackElementAfter}}e.EditOperationResult=d;function h(o){return o==="'"||o==='"'||o==="`"}e.isQuote=h}),define(X[477],ee([1,0,66,12,5]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class E{static columnSelect(b,S,g,p,n,t){const i=Math.abs(n-g)+1,s=g>n,r=p>t,d=p<t,h=[];for(let o=0;o<i;o++){const c=g+(s?-o:o),l=b.columnFromVisibleColumn(S,c,p),a=b.columnFromVisibleColumn(S,c,t),u=b.visibleColumnFromColumn(S,new k.Position(c,l)),v=b.visibleColumnFromColumn(S,new k.Position(c,a));d&&(u>t||v<p)||r&&(v>p||u<t)||h.push(new _.SingleCursorState(new y.Range(c,l,c,l),0,0,new k.Position(c,a),0))}if(h.length===0)for(let o=0;o<i;o++){const c=g+(s?-o:o),l=S.getLineMaxColumn(c);h.push(new _.SingleCursorState(new y.Range(c,l,c,l),0,0,new k.Position(c,l),0))}return{viewStates:h,reversed:s,fromLineNumber:g,fromVisualColumn:p,toLineNumber:n,toVisualColumn:t}}static columnSelectLeft(b,S,g){let p=g.toViewVisualColumn;return p>0&&p--,E.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,g.toViewLineNumber,p)}static columnSelectRight(b,S,g){let p=0;const n=Math.min(g.fromViewLineNumber,g.toViewLineNumber),t=Math.max(g.fromViewLineNumber,g.toViewLineNumber);for(let s=n;s<=t;s++){const r=S.getLineMaxColumn(s),d=b.visibleColumnFromColumn(S,new k.Position(s,r));p=Math.max(p,d)}let i=g.toViewVisualColumn;return i<p&&i++,this.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,g.toViewLineNumber,i)}static columnSelectUp(b,S,g,p){const n=p?b.pageSize:1,t=Math.max(1,g.toViewLineNumber-n);return this.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,t,g.toViewVisualColumn)}static columnSelectDown(b,S,g,p){const n=p?b.pageSize:1,t=Math.min(S.getLineCount(),g.toViewLineNumber+n);return this.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,t,g.toViewVisualColumn)}}e.ColumnSelection=E}),define(X[193],ee([1,0,66,76,12,5,9,261]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class S{constructor(n,t,i){this._cursorPositionBrand=void 0,this.lineNumber=n,this.column=t,this.leftoverVisibleColumns=i}}e.CursorPosition=S;class g{static leftPosition(n,t){if(t.column>n.getLineMinColumn(t.lineNumber))return t.delta(void 0,-w.prevCharLength(n.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new y.Position(i,n.getLineMaxColumn(i))}else return t}static leftPositionAtomicSoftTabs(n,t,i){if(t.column<=n.getLineIndentColumn(t.lineNumber)){const s=n.getLineMinColumn(t.lineNumber),r=n.getLineContent(t.lineNumber),d=b.AtomicTabMoveOperations.atomicPosition(r,t.column-1,i,0);if(d!==-1&&d+1>=s)return new y.Position(t.lineNumber,d+1)}return this.leftPosition(n,t)}static left(n,t,i){const s=n.stickyTabStops?g.leftPositionAtomicSoftTabs(t,i,n.tabSize):g.leftPosition(t,i);return new S(s.lineNumber,s.column,0)}static moveLeft(n,t,i,s,r){let d,h;if(i.hasSelection()&&!s)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),l=g.left(n,t,c);d=l.lineNumber,h=l.column}return i.move(s,d,h,0)}static clipPositionColumn(n,t){return new y.Position(n.lineNumber,g.clipRange(n.column,t.getLineMinColumn(n.lineNumber),t.getLineMaxColumn(n.lineNumber)))}static clipRange(n,t,i){return n<t?t:n>i?i:n}static rightPosition(n,t,i){return i<n.getLineMaxColumn(t)?i=i+w.nextCharLength(n.getLineContent(t),i-1):t<n.getLineCount()&&(t=t+1,i=n.getLineMinColumn(t)),new y.Position(t,i)}static rightPositionAtomicSoftTabs(n,t,i,s,r){if(i<n.getLineIndentColumn(t)){const d=n.getLineContent(t),h=b.AtomicTabMoveOperations.atomicPosition(d,i-1,s,1);if(h!==-1)return new y.Position(t,h+1)}return this.rightPosition(n,t,i)}static right(n,t,i){const s=n.stickyTabStops?g.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,n.tabSize,n.indentSize):g.rightPosition(t,i.lineNumber,i.column);return new S(s.lineNumber,s.column,0)}static moveRight(n,t,i,s,r){let d,h;if(i.hasSelection()&&!s)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),l=g.right(n,t,c);d=l.lineNumber,h=l.column}return i.move(s,d,h,0)}static vertical(n,t,i,s,r,d,h,o){const c=k.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),s,n.tabSize)+r,l=t.getLineCount(),a=i===1&&s===1,u=i===l&&s===t.getLineMaxColumn(i),v=d<i?a:u;if(i=d,i<1?(i=1,h?s=t.getLineMinColumn(i):s=Math.min(t.getLineMaxColumn(i),s)):i>l?(i=l,h?s=t.getLineMaxColumn(i):s=Math.min(t.getLineMaxColumn(i),s)):s=n.columnFromVisibleColumn(t,i,c),v?r=0:r=c-k.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),s,n.tabSize),o!==void 0){const f=new y.Position(i,s),m=t.normalizePosition(f,o);r=r+(s-m.column),i=m.lineNumber,s=m.column}return new S(i,s,r)}static down(n,t,i,s,r,d,h){return this.vertical(n,t,i,s,r,i+d,h,4)}static moveDown(n,t,i,s,r){let d,h;i.hasSelection()&&!s?(d=i.selection.endLineNumber,h=i.selection.endColumn):(d=i.position.lineNumber,h=i.position.column);const o=g.down(n,t,d,h,i.leftoverVisibleColumns,r,!0);return i.move(s,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateDown(n,t,i){const s=i.selection,r=g.down(n,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),d=g.down(n,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new _.SingleCursorState(new E.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new y.Position(d.lineNumber,d.column),d.leftoverVisibleColumns)}static up(n,t,i,s,r,d,h){return this.vertical(n,t,i,s,r,i-d,h,3)}static moveUp(n,t,i,s,r){let d,h;i.hasSelection()&&!s?(d=i.selection.startLineNumber,h=i.selection.startColumn):(d=i.position.lineNumber,h=i.position.column);const o=g.up(n,t,d,h,i.leftoverVisibleColumns,r,!0);return i.move(s,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateUp(n,t,i){const s=i.selection,r=g.up(n,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),d=g.up(n,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new _.SingleCursorState(new E.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new y.Position(d.lineNumber,d.column),d.leftoverVisibleColumns)}static _isBlankLine(n,t){return n.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(n,t,i,s){let r=i.position.lineNumber;for(;r>1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return i.move(s,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(n,t,i,s){const r=t.getLineCount();let d=i.position.lineNumber;for(;d<r&&this._isBlankLine(t,d);)d++;for(;d<r&&!this._isBlankLine(t,d);)d++;return i.move(s,d,t.getLineMinColumn(d),0)}static moveToBeginningOfLine(n,t,i,s){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(s,r,o,0)}static moveToEndOfLine(n,t,i,s,r){const d=i.position.lineNumber,h=t.getLineMaxColumn(d);return i.move(s,d,h,r?1073741824-h:0)}static moveToBeginningOfBuffer(n,t,i,s){return i.move(s,1,1,0)}static moveToEndOfBuffer(n,t,i,s){const r=t.getLineCount(),d=t.getLineMaxColumn(r);return i.move(s,r,d,0)}}e.MoveOperations=g}),define(X[194],ee([1,0,9,119,66,76,193,5,12]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class g{static deleteRight(n,t,i,s){const r=[];let d=n!==3;for(let h=0,o=s.length;h<o;h++){const c=s[h];let l=c;if(l.isEmpty()){const a=c.getPosition(),u=w.MoveOperations.right(t,i,a);l=new b.Range(u.lineNumber,u.column,a.lineNumber,a.column)}if(l.isEmpty()){r[h]=null;continue}l.startLineNumber!==l.endLineNumber&&(d=!0),r[h]=new k.ReplaceCommand(l,"")}return[d,r]}static isAutoClosingPairDelete(n,t,i,s,r,d,h){if(t==="never"&&i==="never"||n==="never")return!1;for(let o=0,c=d.length;o<c;o++){const l=d[o],a=l.getPosition();if(!l.isEmpty())return!1;const u=r.getLineContent(a.lineNumber);if(a.column<2||a.column>=u.length+1)return!1;const v=u.charAt(a.column-2),f=s.get(v);if(!f)return!1;if((0,y.isQuote)(v)){if(i==="never")return!1}else if(t==="never")return!1;const m=u.charAt(a.column-1);let C=!1;for(const L of f)L.open===v&&L.close===m&&(C=!0);if(!C)return!1;if(n==="auto"){let L=!1;for(let D=0,I=h.length;D<I;D++){const T=h[D];if(a.lineNumber===T.startLineNumber&&a.column===T.startColumn){L=!0;break}}if(!L)return!1}}return!0}static _runAutoClosingPairDelete(n,t,i){const s=[];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);s[r]=new k.ReplaceCommand(o,"")}return[!0,s]}static deleteLeft(n,t,i,s,r){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,s,r))return this._runAutoClosingPairDelete(t,i,s);const d=[];let h=n!==2;for(let o=0,c=s.length;o<c;o++){const l=g.getDeleteRange(s[o],i,t);if(l.isEmpty()){d[o]=null;continue}l.startLineNumber!==l.endLineNumber&&(h=!0),d[o]=new k.ReplaceCommand(l,"")}return[h,d]}static getDeleteRange(n,t,i){if(!n.isEmpty())return n;const s=n.getPosition();if(i.useTabStops&&s.column>1){const r=t.getLineContent(s.lineNumber),d=_.firstNonWhitespaceIndex(r),h=d===-1?r.length+1:d+1;if(s.column<=h){const o=i.visibleColumnFromColumn(t,s),c=E.CursorColumns.prevIndentTabStop(o,i.indentSize),l=i.columnFromVisibleColumn(t,s.lineNumber,c);return new b.Range(s.lineNumber,l,s.lineNumber,s.column)}}return b.Range.fromPositions(g.getPositionAfterDeleteLeft(s,t),s)}static getPositionAfterDeleteLeft(n,t){if(n.column>1){const i=_.getLeftDeleteOffset(n.column-1,t.getLineContent(n.lineNumber));return n.with(void 0,i+1)}else if(n.lineNumber>1){const i=n.lineNumber-1;return new S.Position(i,t.getLineMaxColumn(i))}else return n}static cut(n,t,i){const s=[];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(n.emptySelectionClipboard){const c=o.getPosition();let l,a,u,v;c.lineNumber<t.getLineCount()?(l=c.lineNumber,a=1,u=c.lineNumber+1,v=1):c.lineNumber>1&&r?.endLineNumber!==c.lineNumber?(l=c.lineNumber-1,a=t.getLineMaxColumn(c.lineNumber-1),u=c.lineNumber,v=t.getLineMaxColumn(c.lineNumber)):(l=c.lineNumber,a=1,u=c.lineNumber,v=t.getLineMaxColumn(c.lineNumber));const f=new b.Range(l,a,u,v);r=f,f.isEmpty()?s[d]=null:s[d]=new k.ReplaceCommand(f,"")}else s[d]=null;else s[d]=new k.ReplaceCommand(o,"")}return new y.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=g}),define(X[173],ee([1,0,9,66,194,138,12,5]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class S{static _createWord(t,i,s,r,d){return{start:r,end:d,wordType:i,nextCharClass:s}}static _findPreviousWordOnLine(t,i,s){const r=i.getLineContent(s.lineNumber);return this._doFindPreviousWordOnLine(r,t,s)}static _doFindPreviousWordOnLine(t,i,s){let r=0;for(let d=s.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,s,r){const d=t.length;for(let h=r;h<d;h++){const o=t.charCodeAt(h),c=i.get(o);if(c===1||s===1&&c===2||s===2&&c===0)return h}return d}static _findNextWordOnLine(t,i,s){const r=i.getLineContent(s.lineNumber);return this._doFindNextWordOnLine(r,t,s)}static _doFindNextWordOnLine(t,i,s){let r=0;const d=t.length;for(let h=s.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,s,r){for(let d=r;d>=0;d--){const h=t.charCodeAt(d),o=i.get(h);if(o===1||s===1&&o===2||s===2&&o===0)return d+1}return 0}static moveWordLeft(t,i,s,r){let d=s.lineNumber,h=s.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 s=i.lineNumber,r=t.getLineMaxColumn(s);if(i.column===1)return s>1?new w.Position(s-1,t.getLineMaxColumn(s-1)):i;const d=t.getLineContent(s);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(s,h);if(o===45&&c!==45)return new w.Position(s,h);if((_.isLowerAsciiLetter(o)||_.isAsciiDigit(o))&&_.isUpperAsciiLetter(c))return new w.Position(s,h);if(_.isUpperAsciiLetter(o)&&_.isUpperAsciiLetter(c)&&h+1<r){const l=d.charCodeAt(h);if(_.isLowerAsciiLetter(l)||_.isAsciiDigit(l))return new w.Position(s,h)}}return new w.Position(s,1)}static moveWordRight(t,i,s,r){let d=s.lineNumber,h=s.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 s=i.lineNumber,r=t.getLineMaxColumn(s);if(i.column===r)return s<t.getLineCount()?new w.Position(s+1,1):i;const d=t.getLineContent(s);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(s,h);if(o!==45&&c===45)return new w.Position(s,h);if((_.isLowerAsciiLetter(o)||_.isAsciiDigit(o))&&_.isUpperAsciiLetter(c))return new w.Position(s,h);if(_.isUpperAsciiLetter(o)&&_.isUpperAsciiLetter(c)&&h+1<r){const l=d.charCodeAt(h);if(_.isLowerAsciiLetter(l)||_.isAsciiDigit(l))return new w.Position(s,h)}}return new w.Position(s,r)}static _deleteWordLeftWhitespace(t,i){const s=t.getLineContent(i.lineNumber),r=i.column-2,d=_.lastNonWhitespaceIndex(s,r);return d+1<r?new b.Range(i.lineNumber,d+2,i.lineNumber,i.column):null}static deleteWordLeft(t,i){const s=t.wordSeparators,r=t.model,d=t.selection,h=t.whitespaceHeuristics;if(!d.isEmpty())return d;if(y.DeleteOperations.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,t.model,[t.selection],t.autoClosedCharacters)){const u=t.selection.getPosition();return new b.Range(u.lineNumber,u.column-1,u.lineNumber,u.column+1)}const o=new w.Position(d.positionLineNumber,d.positionColumn);let c=o.lineNumber,l=o.column;if(c===1&&l===1)return null;if(h){const u=this._deleteWordLeftWhitespace(r,o);if(u)return u}let a=S._findPreviousWordOnLine(s,r,o);return i===0?a?l=a.start+1:l>1?l=1:(c--,l=r.getLineMaxColumn(c)):(a&&l<=a.end+1&&(a=S._findPreviousWordOnLine(s,r,new w.Position(c,a.start+1))),a?l=a.end+1:l>1?l=1:(c--,l=r.getLineMaxColumn(c))),new b.Range(c,l,o.lineNumber,o.column)}static deleteInsideWord(t,i,s){if(!s.isEmpty())return s;const r=new w.Position(s.positionLineNumber,s.positionColumn),d=this._deleteInsideWordWhitespace(i,r);return d||this._deleteInsideWordDetermineDeleteRange(t,i,r)}static _charAtIsWhitespace(t,i){const s=t.charCodeAt(i);return s===32||s===9}static _deleteInsideWordWhitespace(t,i){const s=t.getLineContent(i.lineNumber),r=s.length;if(r===0)return null;let d=Math.max(i.column-2,0);if(!this._charAtIsWhitespace(s,d))return null;let h=Math.min(i.column-1,r-1);if(!this._charAtIsWhitespace(s,h))return null;for(;d>0&&this._charAtIsWhitespace(s,d-1);)d--;for(;h+1<r&&this._charAtIsWhitespace(s,h+1);)h++;return new b.Range(i.lineNumber,d+1,i.lineNumber,h+2)}static _deleteInsideWordDetermineDeleteRange(t,i,s){const r=i.getLineContent(s.lineNumber),d=r.length;if(d===0)return s.lineNumber>1?new b.Range(s.lineNumber-1,i.getLineMaxColumn(s.lineNumber-1),s.lineNumber,1):s.lineNumber<i.getLineCount()?new b.Range(s.lineNumber,1,s.lineNumber+1,1):new b.Range(s.lineNumber,1,s.lineNumber,1);const h=u=>u.start+1<=s.column&&s.column<=u.end+1,o=(u,v)=>(u=Math.min(u,s.column),v=Math.max(v,s.column),new b.Range(s.lineNumber,u,s.lineNumber,v)),c=u=>{let v=u.start+1,f=u.end+1,m=!1;for(;f-1<d&&this._charAtIsWhitespace(r,f-1);)m=!0,f++;if(!m)for(;v>1&&this._charAtIsWhitespace(r,v-2);)v--;return o(v,f)},l=S._findPreviousWordOnLine(t,i,s);if(l&&h(l))return c(l);const a=S._findNextWordOnLine(t,i,s);return a&&h(a)?c(a):l&&a?o(l.end+1,a.start+1):l?o(l.start+1,l.end+1):a?o(a.start+1,a.end+1):o(1,d+1)}static _deleteWordPartLeft(t,i){if(!i.isEmpty())return i;const s=i.getPosition(),r=S._moveWordPartLeft(t,s);return new b.Range(s.lineNumber,s.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(t,i){const s=t.length;for(let r=i;r<s;r++){const d=t.charAt(r);if(d!==" "&&d!==" ")return r}return s}static _deleteWordRightWhitespace(t,i){const s=t.getLineContent(i.lineNumber),r=i.column-1,d=this._findFirstNonWhitespaceChar(s,r);return r+1<d?new b.Range(i.lineNumber,i.column,i.lineNumber,d+1):null}static deleteWordRight(t,i){const s=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,l=o.column;const a=r.getLineCount(),u=r.getLineMaxColumn(c);if(c===a&&l===u)return null;if(h){const f=this._deleteWordRightWhitespace(r,o);if(f)return f}let v=S._findNextWordOnLine(s,r,o);return i===2?v?l=v.end+1:l<u||c===a?l=u:(c++,v=S._findNextWordOnLine(s,r,new w.Position(c,1)),v?l=v.start+1:l=r.getLineMaxColumn(c)):(v&&l>=v.start+1&&(v=S._findNextWordOnLine(s,r,new w.Position(c,v.end+1))),v?l=v.start+1:l<u||c===a?l=u:(c++,v=S._findNextWordOnLine(s,r,new w.Position(c,1)),v?l=v.start+1:l=r.getLineMaxColumn(c))),new b.Range(c,l,o.lineNumber,o.column)}static _deleteWordPartRight(t,i){if(!i.isEmpty())return i;const s=i.getPosition(),r=S._moveWordPartRight(t,s);return new b.Range(s.lineNumber,s.column,r.lineNumber,r.column)}static _createWordAtPosition(t,i,s){const r=new b.Range(i,s.start+1,i,s.end+1);return{word:t.getValueInRange(r),startColumn:r.startColumn,endColumn:r.endColumn}}static getWordAtPosition(t,i,s){const r=(0,E.getMapForWordSeparators)(i),d=S._findPreviousWordOnLine(r,t,s);if(d&&d.wordType===1&&d.start<=s.column-1&&s.column-1<=d.end)return S._createWordAtPosition(t,s.lineNumber,d);const h=S._findNextWordOnLine(r,t,s);return h&&h.wordType===1&&h.start<=s.column-1&&s.column-1<=h.end?S._createWordAtPosition(t,s.lineNumber,h):null}static word(t,i,s,r,d){const h=(0,E.getMapForWordSeparators)(t.wordSeparators),o=S._findPreviousWordOnLine(h,i,d),c=S._findNextWordOnLine(h,i,d);if(!r){let f,m;return o&&o.wordType===1&&o.start<=d.column-1&&d.column-1<=o.end?(f=o.start+1,m=o.end+1):c&&c.wordType===1&&c.start<=d.column-1&&d.column-1<=c.end?(f=c.start+1,m=c.end+1):(o?f=o.end+1:f=1,c?m=c.start+1:m=i.getLineMaxColumn(d.lineNumber)),new k.SingleCursorState(new b.Range(d.lineNumber,f,d.lineNumber,m),1,0,new w.Position(d.lineNumber,m),0)}let l,a;o&&o.wordType===1&&o.start<d.column-1&&d.column-1<o.end?(l=o.start+1,a=o.end+1):c&&c.wordType===1&&c.start<d.column-1&&d.column-1<c.end?(l=c.start+1,a=c.end+1):(l=d.column,a=d.column);const u=d.lineNumber;let v;if(s.selectionStart.containsPosition(d))v=s.selectionStart.endColumn;else if(d.isBeforeOrEqual(s.selectionStart.getStartPosition())){v=l;const f=new w.Position(u,v);s.selectionStart.containsPosition(f)&&(v=s.selectionStart.endColumn)}else{v=a;const f=new w.Position(u,v);s.selectionStart.containsPosition(f)&&(v=s.selectionStart.startColumn)}return s.move(!0,u,v,0)}}e.WordOperations=S;class g extends S{static deleteWordPartLeft(t){const i=p([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=p([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,s){const r=p([S.moveWordLeft(t,i,s,0),S.moveWordLeft(t,i,s,2),S._moveWordPartLeft(i,s)]);return r.sort(w.Position.compare),r[2]}static moveWordPartRight(t,i,s){const r=p([S.moveWordRight(t,i,s,0),S.moveWordRight(t,i,s,2),S._moveWordPartRight(i,s)]);return r.sort(w.Position.compare),r[0]}}e.WordPartOperations=g;function p(n){return n.filter(t=>!!t)}}),define(X[195],ee([1,0,18,66,193,173,12,5]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class S{static addCursorDown(n,t,i){const s=[];let r=0;for(let d=0,h=t.length;d<h;d++){const o=t[d];s[r++]=new k.CursorState(o.modelState,o.viewState),i?s[r++]=k.CursorState.fromModelState(y.MoveOperations.translateDown(n.cursorConfig,n.model,o.modelState)):s[r++]=k.CursorState.fromViewState(y.MoveOperations.translateDown(n.cursorConfig,n,o.viewState))}return s}static addCursorUp(n,t,i){const s=[];let r=0;for(let d=0,h=t.length;d<h;d++){const o=t[d];s[r++]=new k.CursorState(o.modelState,o.viewState),i?s[r++]=k.CursorState.fromModelState(y.MoveOperations.translateUp(n.cursorConfig,n.model,o.modelState)):s[r++]=k.CursorState.fromViewState(y.MoveOperations.translateUp(n.cursorConfig,n,o.viewState))}return s}static moveToBeginningOfLine(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r];s[r]=this._moveToLineStart(n,h,i)}return s}static _moveToLineStart(n,t,i){const s=t.viewState.position.column,r=t.modelState.position.column,d=s===r,h=t.viewState.position.lineNumber,o=n.getLineFirstNonWhitespaceColumn(h);return!d&&!(s===o)?this._moveToLineStartByView(n,t,i):this._moveToLineStartByModel(n,t,i)}static _moveToLineStartByView(n,t,i){return k.CursorState.fromViewState(y.MoveOperations.moveToBeginningOfLine(n.cursorConfig,n,t.viewState,i))}static _moveToLineStartByModel(n,t,i){return k.CursorState.fromModelState(y.MoveOperations.moveToBeginningOfLine(n.cursorConfig,n.model,t.modelState,i))}static moveToEndOfLine(n,t,i,s){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=this._moveToLineEnd(n,o,i,s)}return r}static _moveToLineEnd(n,t,i,s){const r=t.viewState.position,d=n.getLineMaxColumn(r.lineNumber),h=r.column===d,o=t.modelState.position,c=n.model.getLineMaxColumn(o.lineNumber),l=d-r.column===c-o.column;return h||l?this._moveToLineEndByModel(n,t,i,s):this._moveToLineEndByView(n,t,i,s)}static _moveToLineEndByView(n,t,i,s){return k.CursorState.fromViewState(y.MoveOperations.moveToEndOfLine(n.cursorConfig,n,t.viewState,i,s))}static _moveToLineEndByModel(n,t,i,s){return k.CursorState.fromModelState(y.MoveOperations.moveToEndOfLine(n.cursorConfig,n.model,t.modelState,i,s))}static expandLineSelection(n,t){const i=[];for(let s=0,r=t.length;s<r;s++){const d=t[s],h=d.modelState.selection.startLineNumber,o=n.model.getLineCount();let c=d.modelState.selection.endLineNumber,l;c===o?l=n.model.getLineMaxColumn(o):(c++,l=1),i[s]=k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(h,1,h,1),0,0,new w.Position(c,l),0))}return i}static moveToBeginningOfBuffer(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r];s[r]=k.CursorState.fromModelState(y.MoveOperations.moveToBeginningOfBuffer(n.cursorConfig,n.model,h.modelState,i))}return s}static moveToEndOfBuffer(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r];s[r]=k.CursorState.fromModelState(y.MoveOperations.moveToEndOfBuffer(n.cursorConfig,n.model,h.modelState,i))}return s}static selectAll(n,t){const i=n.model.getLineCount(),s=n.model.getLineMaxColumn(i);return k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(1,1,1,1),0,0,new w.Position(i,s),0))}static line(n,t,i,s,r){const d=n.model.validatePosition(s),h=r?n.coordinatesConverter.validateViewPosition(new w.Position(r.lineNumber,r.column),d):n.coordinatesConverter.convertModelPositionToViewPosition(d);if(!i){const c=n.model.getLineCount();let l=d.lineNumber+1,a=1;return l>c&&(l=c,a=n.model.getLineMaxColumn(l)),k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(d.lineNumber,1,l,a),2,0,new w.Position(l,a),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=n.getLineCount();let l=h.lineNumber+1,a=1;return l>c&&(l=c,a=n.getLineMaxColumn(l)),k.CursorState.fromViewState(t.viewState.move(!0,l,a,0))}else{const c=t.modelState.selectionStart.getEndPosition();return k.CursorState.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(n,t,i,s){const r=n.model.validatePosition(s);return k.CursorState.fromModelState(E.WordOperations.word(n.cursorConfig,n.model,t.modelState,i,r))}static cancelSelection(n,t){if(!t.modelState.hasSelection())return new k.CursorState(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,s=t.viewState.position.column;return k.CursorState.fromViewState(new k.SingleCursorState(new b.Range(i,s,i,s),0,0,new w.Position(i,s),0))}static moveTo(n,t,i,s,r){if(i){if(t.modelState.selectionStartKind===1)return this.word(n,t,i,s);if(t.modelState.selectionStartKind===2)return this.line(n,t,i,s,r)}const d=n.model.validatePosition(s),h=r?n.coordinatesConverter.validateViewPosition(new w.Position(r.lineNumber,r.column),d):n.coordinatesConverter.convertModelPositionToViewPosition(d);return k.CursorState.fromViewState(t.viewState.move(i,h.lineNumber,h.column,0))}static simpleMove(n,t,i,s,r,d){switch(i){case 0:return d===4?this._moveHalfLineLeft(n,t,s):this._moveLeft(n,t,s,r);case 1:return d===4?this._moveHalfLineRight(n,t,s):this._moveRight(n,t,s,r);case 2:return d===2?this._moveUpByViewLines(n,t,s,r):this._moveUpByModelLines(n,t,s,r);case 3:return d===2?this._moveDownByViewLines(n,t,s,r):this._moveDownByModelLines(n,t,s,r);case 4:return d===2?t.map(h=>k.CursorState.fromViewState(y.MoveOperations.moveToPrevBlankLine(n.cursorConfig,n,h.viewState,s))):t.map(h=>k.CursorState.fromModelState(y.MoveOperations.moveToPrevBlankLine(n.cursorConfig,n.model,h.modelState,s)));case 5:return d===2?t.map(h=>k.CursorState.fromViewState(y.MoveOperations.moveToNextBlankLine(n.cursorConfig,n,h.viewState,s))):t.map(h=>k.CursorState.fromModelState(y.MoveOperations.moveToNextBlankLine(n.cursorConfig,n.model,h.modelState,s)));case 6:return this._moveToViewMinColumn(n,t,s);case 7:return this._moveToViewFirstNonWhitespaceColumn(n,t,s);case 8:return this._moveToViewCenterColumn(n,t,s);case 9:return this._moveToViewMaxColumn(n,t,s);case 10:return this._moveToViewLastNonWhitespaceColumn(n,t,s);default:return null}}static viewportMove(n,t,i,s,r){const d=n.getCompletelyVisibleViewRange(),h=n.coordinatesConverter.convertViewRangeToModelRange(d);switch(i){case 11:{const o=this._firstLineNumberInRange(n.model,h,r),c=n.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(n,t[0],s,o,c)]}case 13:{const o=this._lastLineNumberInRange(n.model,h,r),c=n.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(n,t[0],s,o,c)]}case 12:{const o=Math.round((h.startLineNumber+h.endLineNumber)/2),c=n.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(n,t[0],s,o,c)]}case 14:{const o=[];for(let c=0,l=t.length;c<l;c++){const a=t[c];o[c]=this.findPositionInViewportIfOutside(n,a,d,s)}return o}default:return null}}static findPositionInViewportIfOutside(n,t,i,s){const r=t.viewState.position.lineNumber;if(i.startLineNumber<=r&&r<=i.endLineNumber-1)return new k.CursorState(t.modelState,t.viewState);{let d;r>i.endLineNumber-1?d=i.endLineNumber-1:r<i.startLineNumber?d=i.startLineNumber:d=r;const h=y.MoveOperations.vertical(n.cursorConfig,n,r,t.viewState.position.column,t.viewState.leftoverVisibleColumns,d,!1);return k.CursorState.fromViewState(t.viewState.move(s,h.lineNumber,h.column,h.leftoverVisibleColumns))}}static _firstLineNumberInRange(n,t,i){let s=t.startLineNumber;return t.startColumn!==n.getLineMinColumn(s)&&s++,Math.min(t.endLineNumber,s+i-1)}static _lastLineNumberInRange(n,t,i){let s=t.startLineNumber;return t.startColumn!==n.getLineMinColumn(s)&&s++,Math.max(s,t.endLineNumber-i+1)}static _moveLeft(n,t,i,s){return t.map(r=>k.CursorState.fromViewState(y.MoveOperations.moveLeft(n.cursorConfig,n,r.viewState,i,s)))}static _moveHalfLineLeft(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=Math.round(n.getLineContent(o).length/2);s[r]=k.CursorState.fromViewState(y.MoveOperations.moveLeft(n.cursorConfig,n,h.viewState,i,c))}return s}static _moveRight(n,t,i,s){return t.map(r=>k.CursorState.fromViewState(y.MoveOperations.moveRight(n.cursorConfig,n,r.viewState,i,s)))}static _moveHalfLineRight(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=Math.round(n.getLineContent(o).length/2);s[r]=k.CursorState.fromViewState(y.MoveOperations.moveRight(n.cursorConfig,n,h.viewState,i,c))}return s}static _moveDownByViewLines(n,t,i,s){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromViewState(y.MoveOperations.moveDown(n.cursorConfig,n,o.viewState,i,s))}return r}static _moveDownByModelLines(n,t,i,s){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromModelState(y.MoveOperations.moveDown(n.cursorConfig,n.model,o.modelState,i,s))}return r}static _moveUpByViewLines(n,t,i,s){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromViewState(y.MoveOperations.moveUp(n.cursorConfig,n,o.viewState,i,s))}return r}static _moveUpByModelLines(n,t,i,s){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromModelState(y.MoveOperations.moveUp(n.cursorConfig,n.model,o.modelState,i,s))}return r}static _moveToViewPosition(n,t,i,s,r){return k.CursorState.fromViewState(t.viewState.move(i,s,r,0))}static _moveToModelPosition(n,t,i,s,r){return k.CursorState.fromModelState(t.modelState.move(i,s,r,0))}static _moveToViewMinColumn(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=n.getLineMinColumn(o);s[r]=this._moveToViewPosition(n,h,i,o,c)}return s}static _moveToViewFirstNonWhitespaceColumn(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=n.getLineFirstNonWhitespaceColumn(o);s[r]=this._moveToViewPosition(n,h,i,o,c)}return s}static _moveToViewCenterColumn(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=Math.round((n.getLineMaxColumn(o)+n.getLineMinColumn(o))/2);s[r]=this._moveToViewPosition(n,h,i,o,c)}return s}static _moveToViewMaxColumn(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=n.getLineMaxColumn(o);s[r]=this._moveToViewPosition(n,h,i,o,c)}return s}static _moveToViewLastNonWhitespaceColumn(n,t,i){const s=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=n.getLineLastNonWhitespaceColumn(o);s[r]=this._moveToViewPosition(n,h,i,o,c)}return s}}e.CursorMoveCommands=S;var g;(function(p){const n=function(i){if(!_.isObject(i))return!1;const s=i;return!(!_.isString(s.to)||!_.isUndefined(s.select)&&!_.isBoolean(s.select)||!_.isUndefined(s.by)&&!_.isString(s.by)||!_.isUndefined(s.value)&&!_.isNumber(s.value))};p.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
- * 'to': A mandatory logical position value providing where to move the cursor.
- \`\`\`
- 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
- 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
- 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
- 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
- \`\`\`
- * 'by': Unit to move. Default is computed based on 'to' value.
- \`\`\`
- 'line', 'wrappedLine', 'character', 'halfLine'
- \`\`\`
- * 'value': Number of units to move. Default is '1'.
- * 'select': If 'true' makes the selection. Default is 'false'.
- `,constraint:n,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},p.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},p.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let s;switch(i.to){case p.RawDirection.Left:s=0;break;case p.RawDirection.Right:s=1;break;case p.RawDirection.Up:s=2;break;case p.RawDirection.Down:s=3;break;case p.RawDirection.PrevBlankLine:s=4;break;case p.RawDirection.NextBlankLine:s=5;break;case p.RawDirection.WrappedLineStart:s=6;break;case p.RawDirection.WrappedLineFirstNonWhitespaceCharacter:s=7;break;case p.RawDirection.WrappedLineColumnCenter:s=8;break;case p.RawDirection.WrappedLineEnd:s=9;break;case p.RawDirection.WrappedLineLastNonWhitespaceCharacter:s=10;break;case p.RawDirection.ViewPortTop:s=11;break;case p.RawDirection.ViewPortBottom:s=13;break;case p.RawDirection.ViewPortCenter:s=12;break;case p.RawDirection.ViewPortIfOutside:s=14;break;default:return null}let r=0;switch(i.by){case p.RawUnit.Line:r=1;break;case p.RawUnit.WrappedLine:r=2;break;case p.RawUnit.Character:r=3;break;case p.RawUnit.HalfLine:r=4;break}return{direction:s,unit:r,select:!!i.select,value:i.value||1}}p.parse=t})(g||(e.CursorMove=g={}))}),define(X[478],ee([1,0,66,12,5,23]),function(K,e,_,k,y,E){"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 y.Range(1,1,1,1),0,0,new k.Position(1,1),0),new _.SingleCursorState(new y.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()?E.Selection.fromRange(g.collapseToEnd(),this.modelState.selection.getDirection()):E.Selection.fromRange(g,this.modelState.selection.getDirection())}ensureValidState(S){this._setState(S,this.modelState,this.viewState)}setState(S,g,p){this._setState(S,g,p)}static _validatePositionWithCache(S,g,p,n){return g.equals(p)?n:S.normalizePosition(g,2)}static _validateViewState(S,g){const p=g.position,n=g.selectionStart.getStartPosition(),t=g.selectionStart.getEndPosition(),i=S.normalizePosition(p,2),s=this._validatePositionWithCache(S,n,p,i),r=this._validatePositionWithCache(S,t,n,s);return p.equals(i)&&n.equals(s)&&t.equals(r)?g:new _.SingleCursorState(y.Range.fromPositions(s,r),g.selectionStartKind,g.selectionStartLeftoverVisibleColumns+n.column-s.column,i,g.leftoverVisibleColumns+p.column-i.column)}_setState(S,g,p){if(p&&(p=w._validateViewState(S.viewModel,p)),g){const n=S.model.validateRange(g.selectionStart),t=g.selectionStart.equalsRange(n)?g.selectionStartLeftoverVisibleColumns:0,i=S.model.validatePosition(g.position),s=g.position.equals(i)?g.leftoverVisibleColumns:0;g=new _.SingleCursorState(n,g.selectionStartKind,t,i,s)}else{if(!p)return;const n=S.model.validateRange(S.coordinatesConverter.convertViewRangeToModelRange(p.selectionStart)),t=S.model.validatePosition(S.coordinatesConverter.convertViewPositionToModelPosition(p.position));g=new _.SingleCursorState(n,p.selectionStartKind,p.selectionStartLeftoverVisibleColumns,t,p.leftoverVisibleColumns)}if(p){const n=S.coordinatesConverter.validateViewRange(p.selectionStart,g.selectionStart),t=S.coordinatesConverter.validateViewPosition(p.position,g.position);p=new _.SingleCursorState(n,g.selectionStartKind,g.selectionStartLeftoverVisibleColumns,t,g.leftoverVisibleColumns)}else{const n=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 y.Range(n.lineNumber,n.column,t.lineNumber,t.column),s=S.coordinatesConverter.convertModelPositionToViewPosition(g.position);p=new _.SingleCursorState(i,g.selectionStartKind,g.selectionStartLeftoverVisibleColumns,s,g.leftoverVisibleColumns)}this.modelState=g,this.viewState=p,this._updateTrackedRange(S)}}e.Cursor=w}),define(X[479],ee([1,0,16,66,478,12,5,23]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class S{constructor(p){this.context=p,this.cursors=[new y.Cursor(p)],this.lastAddedCursorIndex=0}dispose(){for(const p of this.cursors)p.dispose(this.context)}startTrackingSelections(){for(const p of this.cursors)p.startTrackingSelection(this.context)}stopTrackingSelections(){for(const p of this.cursors)p.stopTrackingSelection(this.context)}updateContext(p){this.context=p}ensureValidState(){for(const p of this.cursors)p.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(p=>p.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(p=>p.asCursorState())}getViewPositions(){return this.cursors.map(p=>p.viewState.position)}getTopMostViewPosition(){return(0,_.findMinBy)(this.cursors,(0,_.compareBy)(p=>p.viewState.position,E.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,_.findLastMaxBy)(this.cursors,(0,_.compareBy)(p=>p.viewState.position,E.Position.compare)).viewState.position}getSelections(){return this.cursors.map(p=>p.modelState.selection)}getViewSelections(){return this.cursors.map(p=>p.viewState.selection)}setSelections(p){this.setStates(k.CursorState.fromModelSelections(p))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(p){p!==null&&(this.cursors[0].setState(this.context,p[0].modelState,p[0].viewState),this._setSecondaryStates(p.slice(1)))}_setSecondaryStates(p){const n=this.cursors.length-1,t=p.length;if(n<t){const i=t-n;for(let s=0;s<i;s++)this._addSecondaryCursor()}else if(n>t){const i=n-t;for(let s=0;s<i;s++)this._removeSecondaryCursor(this.cursors.length-2)}for(let i=0;i<t;i++)this.cursors[i+1].setState(this.context,p[i].modelState,p[i].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new y.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(p){this.lastAddedCursorIndex>=p+1&&this.lastAddedCursorIndex--,this.cursors[p+1].dispose(this.context),this.cursors.splice(p+1,1)}normalize(){if(this.cursors.length===1)return;const p=this.cursors.slice(0),n=[];for(let t=0,i=p.length;t<i;t++)n.push({index:t,selection:p[t].modelState.selection});n.sort((0,_.compareBy)(t=>t.selection,w.Range.compareRangesUsingStarts));for(let t=0;t<n.length-1;t++){const i=n[t],s=n[t+1],r=i.selection,d=s.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<s.index?t:t+1,c=i.index<s.index?t+1:t,l=n[c].index,a=n[o].index,u=n[c].selection,v=n[o].selection;if(!u.equalsSelection(v)){const f=u.plusRange(v),m=u.selectionStartLineNumber===u.startLineNumber&&u.selectionStartColumn===u.startColumn,C=v.selectionStartLineNumber===v.startLineNumber&&v.selectionStartColumn===v.startColumn;let L;l===this.lastAddedCursorIndex?(L=m,this.lastAddedCursorIndex=a):L=C;let D;L?D=new b.Selection(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn):D=new b.Selection(f.endLineNumber,f.endColumn,f.startLineNumber,f.startColumn),n[o].selection=D;const I=k.CursorState.fromModelSelection(D);p[a].setState(this.context,I.modelState,I.viewState)}for(const f of n)f.index>l&&f.index--;p.splice(l,1),n.splice(c,1),this._removeSecondaryCursor(l-1),t--}}}}e.CursorCollection=S}),define(X[480],ee([1,0,105]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class k{constructor(E){if(E.autoClosingPairs?this._autoClosingPairs=E.autoClosingPairs.map(w=>new _.StandardAutoClosingPairConditional(w)):E.brackets?this._autoClosingPairs=E.brackets.map(w=>new _.StandardAutoClosingPairConditional({open:w[0],close:w[1]})):this._autoClosingPairs=[],E.__electricCharacterSupport&&E.__electricCharacterSupport.docComment){const w=E.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new _.StandardAutoClosingPairConditional({open:w.open,close:w.close||""}))}this._autoCloseBeforeForQuotes=typeof E.autoCloseBefore=="string"?E.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof E.autoCloseBefore=="string"?E.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=E.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(E){return E?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}e.CharacterPairSupport=k,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])>
- `,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])>
- `}),define(X[481],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function _(y){return y.global&&(y.lastIndex=0),!0}class k{constructor(E){this._indentationRules=E}shouldIncrease(E){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&_(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(E))}shouldDecrease(E){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&_(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(E))}shouldIndentNextLine(E){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&_(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(E))}shouldIgnore(E){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&_(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(E))}getIndentMetadata(E){let w=0;return this.shouldIncrease(E)&&(w+=1),this.shouldDecrease(E)&&(w+=2),this.shouldIndentNextLine(E)&&(w+=4),this.shouldIgnore(E)&&(w+=8),w}}e.IndentRulesSupport=k}),define(X[482],ee([1,0]),function(K,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(y,E,w,b,S){if(y&&E){const g=this.doNavigateValueSet(E,S);if(g)return{range:y,value:g}}if(w&&b){const g=this.doNavigateValueSet(b,S);if(g)return{range:w,value:g}}return null}doNavigateValueSet(y,E){const w=this.numberReplace(y,E);return w!==null?w:this.textReplace(y,E)}numberReplace(y,E){const w=Math.pow(10,y.length-(y.lastIndexOf(".")+1));let b=Number(y);const S=parseFloat(y);return!isNaN(b)&&!isNaN(S)&&b===S?b===0&&!E?null:(b=Math.floor(b*w),b+=E?w:-w,String(b/w)):null}textReplace(y,E){return this.valueSetsReplace(this._defaultValueSet,y,E)}valueSetsReplace(y,E,w){let b=null;for(let S=0,g=y.length;b===null&&S<g;S++)b=this.valueSetReplace(y[S],E,w);return b}valueSetReplace(y,E,w){let b=y.indexOf(E);return b>=0?(b+=w?1:-1,b<0?b=y.length-1:b%=y.length,y[b]):null}}e.BasicInplaceReplace=_,_.INSTANCE=new _}),define(X[483],ee([1,0,250]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class k{constructor(g,p){this.languageId=g;const n=p.brackets?y(p.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 n){const h=t.get(r),o=i.get(d);h.closing.add(o.info),o.opening.add(h.info)}const s=p.colorizedBracketPairs?y(p.colorizedBracketPairs):n.filter(r=>!(r[0]==="<"&&r[1]===">"));for(const[r,d]of s){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 y(S){return S.filter(([g,p])=>g!==""&&p!=="")}class E{constructor(g,p){this.config=g,this.bracketText=p}get languageId(){return this.config.languageId}}e.BracketKindBase=E;class w extends E{constructor(g,p,n){super(g,p),this.openedBrackets=n,this.isOpeningBracket=!0}}e.OpeningBracketKind=w;class b extends E{constructor(g,p,n,t){super(g,p),this.openingBrackets=n,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(X[484],ee([1,0,11,9,105]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class E{constructor(b){b=b||{},b.brackets=b.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],b.brackets.forEach(S=>{const g=E._createOpenBracketRegExp(S[0]),p=E._createCloseBracketRegExp(S[1]);g&&p&&this._brackets.push({open:S[0],openRegExp:g,close:S[1],closeRegExp:p})}),this._regExpRules=b.onEnterRules||[]}onEnter(b,S,g,p){if(b>=3)for(let n=0,t=this._regExpRules.length;n<t;n++){const i=this._regExpRules[n];if([{reg:i.beforeText,text:g},{reg:i.afterText,text:p},{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&&p.length>0)for(let n=0,t=this._brackets.length;n<t;n++){const i=this._brackets[n];if(i.openRegExp.test(g)&&i.closeRegExp.test(p))return{indentAction:y.IndentAction.IndentOutdent}}if(b>=2&&g.length>0){for(let n=0,t=this._brackets.length;n<t;n++)if(this._brackets[n].openRegExp.test(g))return{indentAction:y.IndentAction.Indent}}return null}static _createOpenBracketRegExp(b){let S=k.escapeRegExpCharacters(b);return/\B/.test(S.charAt(0))||(S="\\b"+S),S+="\\s*$",E._safeRegExp(S)}static _createCloseBracketRegExp(b){let S=k.escapeRegExpCharacters(b);return/\B/.test(S.charAt(S.length-1))||(S=S+"\\b"),S="^\\s*"+S,E._safeRegExp(S)}static _safeRegExp(b){try{return new RegExp(b)}catch(S){return(0,_.onUnexpectedError)(S),null}}}e.OnEnterSupport=E}),define(X[485],ee([1,0,37]),function(K,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,l){this._parsedThemeRuleBrand=void 0,this.token=d,this.index=h,this.fontStyle=o,this.foreground=c,this.background=l}}e.ParsedTokenThemeRule=k;function y(r){if(!r||!Array.isArray(r))return[];const d=[];let h=0;for(let o=0,c=r.length;o<c;o++){const l=r[o];let a=-1;if(typeof l.fontStyle=="string"){a=0;const f=l.fontStyle.split(" ");for(let m=0,C=f.length;m<C;m++)switch(f[m]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof l.foreground=="string"&&(u=l.foreground);let v=null;typeof l.background=="string"&&(v=l.background),d[h++]=new k(l.token||"",o,a,u,v)}return d}e.parseTokenTheme=y;function E(r,d){r.sort((m,C)=>{const L=n(m.token,C.token);return L!==0?L:m.index-C.index});let h=0,o="000000",c="ffffff";for(;r.length>=1&&r[0].token==="";){const m=r.shift();m.fontStyle!==-1&&(h=m.fontStyle),m.foreground!==null&&(o=m.foreground),m.background!==null&&(c=m.background)}const l=new b;for(const m of d)l.getId(m);const a=l.getId(o),u=l.getId(c),v=new t(h,a,u),f=new i(v);for(let m=0,C=r.length;m<C;m++){const L=r[m];f.insert(L.token,L.fontStyle,l.getId(L.foreground),l.getId(L.background))}return new S(l,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(y(d),h)}static createFromParsedTokenTheme(d,h){return E(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),l=p(h);o=(c.metadata|l<<8)>>>0,this._cache.set(h,o)}return(o|d<<0)>>>0}}e.TokenTheme=S;const g=/\b(comment|string|regex|regexp)\b/;function p(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=p;function n(r,d){return r<d?-1:r>d?1:0}e.strcmp=n;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 l=this._children.get(o);return typeof l<"u"?l.match(c):this._mainRule}insert(d,h,o,c){if(d===""){this._mainRule.acceptOverwrite(h,o,c);return}const l=d.indexOf(".");let a,u;l===-1?(a=d,u=""):(a=d.substring(0,l),u=d.substring(l+1));let v=this._children.get(a);typeof v>"u"&&(v=new i(this._mainRule.clone()),this._children.set(a,v)),v.insert(u,h,o,c)}}e.ThemeTrieElement=i;function s(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(`
- `)}e.generateTokensCSSForColorMap=s}),define(X[46],ee([1,0,45]),function(K,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(s){s[s.Left=1]="Left",s[s.Center=2]="Center",s[s.Right=4]="Right",s[s.Full=7]="Full"})(k||(e.OverviewRulerLane=k={}));var y;(function(s){s[s.Left=1]="Left",s[s.Right=2]="Right"})(y||(e.GlyphMarginLane=y={}));var E;(function(s){s[s.Inline=1]="Inline",s[s.Gutter=2]="Gutter"})(E||(e.MinimapPosition=E={}));var w;(function(s){s[s.Both=0]="Both",s[s.Right=1]="Right",s[s.Left=2]="Left",s[s.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(s){return s&&typeof s.read=="function"}e.isITextSnapshot=g;class p{constructor(r,d,h,o,c,l){this.identifier=r,this.range=d,this.text=h,this.forceMoveMarkers=o,this.isAutoWhitespaceEdit=c,this._isTracked=l}}e.ValidAnnotatedEditOperation=p;class n{constructor(r,d,h){this.regex=r,this.wordSeparators=d,this.simpleSearch=h}}e.SearchData=n;class t{constructor(r,d,h){this.reverseEdits=r,this.changes=d,this.trimAutoWhitespaceLineNumbers=h}}e.ApplyEditsResult=t;function i(s){return!s.isTooLargeForSyncing()&&!s.isForSimpleWidget}e.shouldSynchronizeModel=i}),define(X[86],ee([1,0,9,5]),function(K,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 y{constructor(v,f){this.lineCount=v,this.columnCount=f}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=y,y.zero=new y(0,0);function E(u,v,f,m){return u!==f?S(f-u,m):S(0,m-v)}e.lengthDiff=E,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),m=v-f*b;return new y(f,m)}e.lengthToObj=g;function p(u){return Math.floor(u/b)}e.lengthGetLineCount=p;function n(u){return u}e.lengthGetColumnCountIfZeroLineCount=n;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,m)=>t(f,v(m)),e.lengthZero)}e.sumLengths=i;function s(u,v){return u===v}e.lengthEquals=s;function r(u,v){const f=u,m=v;if(m-f<=0)return e.lengthZero;const L=Math.floor(f/b),D=Math.floor(m/b),I=m-D*b;if(L===D){const T=f-L*b;return S(0,I-T)}else return S(D-L,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 l(u,v){const f=u,m=Math.floor(f/b),C=f-m*b,L=v,D=Math.floor(L/b),I=L-D*b;return new k.Range(m+1,C+1,D+1,I+1)}e.lengthsToRange=l;function a(u){const v=(0,_.splitLines)(u);return S(v.length-1,v[v.length-1].length)}e.lengthOfString=a}),define(X[196],ee([1,0,86]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class k{constructor(b,S,g){this.startOffset=b,this.endOffset=S,this.newLength=g}toString(){return`[${(0,_.lengthToObj)(this.startOffset)}...${(0,_.lengthToObj)(this.endOffset)}) -> ${(0,_.lengthToObj)(this.newLength)}`}}e.TextEditInfo=k;class y{constructor(b){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=b.map(S=>E.from(S))}getOffsetBeforeChange(b){return this.adjustNextEdit(b),this.translateCurToOld(b)}getDistanceToNextChange(b){this.adjustNextEdit(b);const S=this.edits[this.nextEditIdx],g=S?this.translateOldToCur(S.offsetObj):null;return g===null?null:(0,_.lengthDiffNonNegative)(b,g)}translateOldToCur(b){return b.lineCount===this.deltaLineIdxInOld?(0,_.toLength)(b.lineCount+this.deltaOldToNewLineCount,b.columnCount+this.deltaOldToNewColumnCount):(0,_.toLength)(b.lineCount+this.deltaOldToNewLineCount,b.columnCount)}translateCurToOld(b){const S=(0,_.lengthToObj)(b);return S.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,_.toLength)(S.lineCount-this.deltaOldToNewLineCount,S.columnCount-this.deltaOldToNewColumnCount):(0,_.toLength)(S.lineCount-this.deltaOldToNewLineCount,S.columnCount)}adjustNextEdit(b){for(;this.nextEditIdx<this.edits.length;){const S=this.edits[this.nextEditIdx],g=this.translateOldToCur(S.endOffsetAfterObj);if((0,_.lengthLessThanEqual)(g,b)){this.nextEditIdx++;const p=(0,_.lengthToObj)(g),n=(0,_.lengthToObj)(this.translateOldToCur(S.endOffsetBeforeObj)),t=p.lineCount-n.lineCount;this.deltaOldToNewLineCount+=t;const i=this.deltaLineIdxInOld===S.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,s=p.columnCount-n.columnCount;this.deltaOldToNewColumnCount=i+s,this.deltaLineIdxInOld=S.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=y;class E{static from(b){return new E(b.startOffset,b.endOffset,b.newLength)}constructor(b,S,g){this.endOffsetBeforeObj=(0,_.lengthToObj)(S),this.endOffsetAfterObj=(0,_.lengthToObj)((0,_.lengthAdd)(b,g)),this.offsetObj=(0,_.lengthToObj)(b)}}}),define(X[486],ee([1,0,16,196,86]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineTextEditInfos=void 0;function E(S,g){if(S.length===0)return g;if(g.length===0)return S;const p=new _.ArrayQueue(b(S)),n=b(g);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let t=p.dequeue();function i(h){if(h===void 0){const c=p.takeWhile(l=>!0)||[];return t&&c.unshift(t),c}const o=[];for(;t&&!(0,y.lengthIsZero)(h);){const[c,l]=t.splitAt(h);o.push(c),h=(0,y.lengthDiffNonNegative)(c.lengthAfter,h),t=l??p.dequeue()}return(0,y.lengthIsZero)(h)||o.push(new w(!1,h,h)),o}const s=[];function r(h,o,c){if(s.length>0&&(0,y.lengthEquals)(s[s.length-1].endOffset,h)){const l=s[s.length-1];s[s.length-1]=new k.TextEditInfo(l.startOffset,o,(0,y.lengthAdd)(l.newLength,c))}else s.push({startOffset:h,endOffset:o,newLength:c})}let d=y.lengthZero;for(const h of n){const o=i(h.lengthBefore);if(h.modified){const c=(0,y.sumLengths)(o,a=>a.lengthBefore),l=(0,y.lengthAdd)(d,c);r(d,l,h.lengthAfter),d=l}else for(const c of o){const l=d;d=(0,y.lengthAdd)(d,c.lengthBefore),c.modified&&r(l,d,c.lengthAfter)}}return s}e.combineTextEditInfos=E;class w{constructor(g,p,n){this.modified=g,this.lengthBefore=p,this.lengthAfter=n}splitAt(g){const p=(0,y.lengthDiffNonNegative)(g,this.lengthAfter);return(0,y.lengthEquals)(p,y.lengthZero)?[this,void 0]:this.modified?[new w(this.modified,this.lengthBefore,g),new w(this.modified,y.lengthZero,p)]:[new w(this.modified,g,g),new w(this.modified,p,p)]}toString(){return`${this.modified?"M":"U"}:${(0,y.lengthToObj)(this.lengthBefore)} -> ${(0,y.lengthToObj)(this.lengthAfter)}`}}function b(S){const g=[];let p=y.lengthZero;for(const n of S){const t=(0,y.lengthDiffNonNegative)(p,n.startOffset);(0,y.lengthIsZero)(t)||g.push(new w(!1,t,t));const i=(0,y.lengthDiffNonNegative)(n.startOffset,n.endOffset);g.push(new w(!0,i,n.newLength)),p=n.endOffset}return g}}),define(X[487],ee([1,0,86]),function(K,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=E(this.nextNodes);if(!g)return;const p=E(this.offsets);if((0,_.lengthLessThan)(b,p))return;if((0,_.lengthLessThan)(p,b))if((0,_.lengthAdd)(p,g.length)<=b)this.nextNodeAfterCurrent();else{const n=y(g);n!==-1?(this.nextNodes.push(g.getChild(n)),this.offsets.push(p),this.idxs.push(n)):this.nextNodeAfterCurrent()}else{if(S(g))return this.nextNodeAfterCurrent(),g;{const n=y(g);if(n===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(g.getChild(n)),this.offsets.push(p),this.idxs.push(n)}}}}nextNodeAfterCurrent(){for(;;){const b=E(this.offsets),S=E(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const g=E(this.nextNodes),p=y(g,this.idxs[this.idxs.length-1]);if(p!==-1){this.nextNodes.push(g.getChild(p)),this.offsets.push((0,_.lengthAdd)(b,S.length)),this.idxs[this.idxs.length-1]=p;break}else this.idxs.pop()}}}e.NodeReader=k;function y(w,b=-1){for(;;){if(b++,b>=w.childrenLength)return-1;if(w.getChild(b))return b}}function E(w){return w.length>0?w[w.length-1]:void 0}}),define(X[122],ee([1,0]),function(K,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 n=1<<S|this.items;return n===this.items?this:k.create(n,this.additionalItems)}g--;const p=this.additionalItems.slice(0);for(;p.length<g;)p.push(0);return p[g]|=1<<(S&31),k.create(this.items,p)}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 p=this.additionalItems[g]||0,n=w.additionalItems[g]||0;S.push(p|n)}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(E){return E}};class y{constructor(){this.items=new Map}getKey(w){let b=this.items.get(w);return b===void 0&&(b=this.items.size,this.items.set(w,b)),b}}e.DenseKeyProvider=y}),define(X[174],ee([1,0,11,76,86,122]),function(K,e,_,k,y,E){"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,l,a){let u=c.length;return l&&(u=(0,y.lengthAdd)(u,l.length)),a&&(u=(0,y.lengthAdd)(u,a.length)),new b(u,c,l,a,l?l.missingOpeningBracketIds:E.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,l,a,u,v){super(c),this.openingBracket=l,this.child=a,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,l){return this.child?this.child.computeMinIndentation((0,y.lengthAdd)(c,this.openingBracket.length),l):Number.MAX_SAFE_INTEGER}}e.PairAstNode=b;class S extends w{static create23(c,l,a,u=!1){let v=c.length,f=c.missingOpeningBracketIds;if(c.listHeight!==l.listHeight)throw new Error("Invalid list heights");if(v=(0,y.lengthAdd)(v,l.length),f=f.merge(l.missingOpeningBracketIds),a){if(c.listHeight!==a.listHeight)throw new Error("Invalid list heights");v=(0,y.lengthAdd)(v,a.length),f=f.merge(a.missingOpeningBracketIds)}return u?new p(v,c.listHeight+1,c,l,a,f):new g(v,c.listHeight+1,c,l,a,f)}static getEmpty(){return new t(y.lengthZero,0,[],E.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(c,l,a){super(c),this.listHeight=l,this._missingOpeningBracketIds=a,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const c=this.childrenLength;if(c===0)return;const l=this.getChild(c-1),a=l.kind===4?l.toMutable():l;return l!==a&&this.setChild(c-1,a),a}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const l=this.getChild(0),a=l.kind===4?l.toMutable():l;return l!==a&&this.setChild(0,a),a}canBeReused(c){if(c.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let l=this;for(;l.kind===4;){const a=l.childrenLength;if(a===0)throw new _.BugIndicatingError;l=l.getChild(a-1)}return l.canBeReused(c)}handleChildrenChanged(){this.throwIfImmutable();const c=this.childrenLength;let l=this.getChild(0).length,a=this.getChild(0).missingOpeningBracketIds;for(let u=1;u<c;u++){const v=this.getChild(u);l=(0,y.lengthAdd)(l,v.length),a=a.merge(v.missingOpeningBracketIds)}this._length=l,this._missingOpeningBracketIds=a,this.cachedMinIndentation=-1}computeMinIndentation(c,l){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let a=Number.MAX_SAFE_INTEGER,u=c;for(let v=0;v<this.childrenLength;v++){const f=this.getChild(v);f&&(a=Math.min(a,f.computeMinIndentation(u,l)),u=(0,y.lengthAdd)(u,f.length))}return this.cachedMinIndentation=a,a}}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,l){switch(c){case 0:this._item1=l;return;case 1:this._item2=l;return;case 2:this._item3=l;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,l,a,u,v,f){super(c,l,f),this._item1=a,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 p 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 n extends S{get childrenLength(){return this._children.length}getChild(c){return this._children[c]}setChild(c,l){this._children[c]=l}get children(){return this._children}constructor(c,l,a,u){super(c,l,u),this._children=a}deepClone(){const c=new Array(this._children.length);for(let l=0;l<this._children.length;l++)c[l]=this._children[l].deepClone();return new n(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 n{toMutable(){return new n(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const i=[];class s extends w{get listHeight(){return 0}get childrenLength(){return 0}getChild(c){return null}get children(){return i}deepClone(){return this}}class r extends s{get kind(){return 0}get missingOpeningBracketIds(){return E.SmallImmutableSet.getEmpty()}canBeReused(c){return!0}computeMinIndentation(c,l){const a=(0,y.lengthToObj)(c),u=(a.columnCount===0?a.lineCount:a.lineCount+1)+1,v=(0,y.lengthGetLineCount)((0,y.lengthAdd)(c,this.length))+1;let f=Number.MAX_SAFE_INTEGER;for(let m=u;m<=v;m++){const C=l.getLineFirstNonWhitespaceColumn(m),L=l.getLineContent(m);if(C===0)continue;const D=k.CursorColumns.visibleColumnFromColumn(L,C,l.getOptions().tabSize);f=Math.min(f,D)}return f}}e.TextAstNode=r;class d extends s{static create(c,l,a){return new d(c,l,a)}get kind(){return 1}get missingOpeningBracketIds(){return E.SmallImmutableSet.getEmpty()}constructor(c,l,a){super(c),this.bracketInfo=l,this.bracketIds=a}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(c){return!1}computeMinIndentation(c,l){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=d;class h extends s{get kind(){return 3}constructor(c,l){super(l),this.missingOpeningBracketIds=c}canBeReused(c){return!c.intersects(this.missingOpeningBracketIds)}computeMinIndentation(c,l){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=h}),define(X[488],ee([1,0,174]),function(K,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 p=0;function n(){if(p>=g.length)return null;const r=p,d=g[r].listHeight;for(p++;p<g.length&&g[p].listHeight===d;)p++;return p-r>=2?y(r===0&&p===g.length?g:g.slice(r,p),!1):g[r]}let t=n(),i=n();if(!i)return t;for(let r=n();r;r=n())E(t,i)<=E(i,r)?(t=w(t,i),i=r):i=w(i,r);return w(t,i)}e.concat23Trees=k;function y(g,p=!1){if(g.length===0)return null;if(g.length===1)return g[0];let n=g.length;for(;n>3;){const t=n>>1;for(let i=0;i<t;i++){const s=i<<1;g[i]=_.ListAstNode.create23(g[s],g[s+1],s+3===n?g[s+2]:null,p)}n=t}return _.ListAstNode.create23(g[0],g[1],n>=3?g[2]:null,p)}e.concat23TreesOfSameHeight=y;function E(g,p){return Math.abs(g.listHeight-p.listHeight)}function w(g,p){return g.listHeight===p.listHeight?_.ListAstNode.create23(g,p,null,!1):g.listHeight>p.listHeight?b(g,p):S(p,g)}function b(g,p){g=g.toMutable();let n=g;const t=[];let i;for(;;){if(p.listHeight===n.listHeight){i=p;break}if(n.kind!==4)throw new Error("unexpected");t.push(n),n=n.makeLastElementMutable()}for(let s=t.length-1;s>=0;s--){const r=t[s];i?r.childrenLength>=3?i=_.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,p){g=g.toMutable();let n=g;const t=[];for(;p.listHeight!==n.listHeight;){if(n.kind!==4)throw new Error("unexpected");t.push(n),n=n.makeFirstElementMutable()}let i=p;for(let s=t.length-1;s>=0;s--){const r=t[s];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(X[263],ee([1,0,174,196,122,86,488,487]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function S(p,n,t,i){return new g(p,n,t,i).parseDocument()}e.parseDocument=S;class g{constructor(n,t,i,s){if(this.tokenizer=n,this.createImmutableLists=s,this._itemsConstructed=0,this._itemsFromCache=0,i&&s)throw new Error("Not supported");this.oldNodeReader=i?new b.NodeReader(i):void 0,this.positionMapper=new k.BeforeEditPositionMapper(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let n=this.parseList(y.SmallImmutableSet.getEmpty());return n||(n=_.ListAstNode.getEmpty()),n}parseList(n){const t=[];for(;;){let s=this.tryReadChildFromCache(n);if(!s){const r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(n))break;s=this.parseChild(n)}s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?(0,w.concat23Trees)(t):(0,w.concat23TreesOfSameHeight)(t,this.createImmutableLists)}tryReadChildFromCache(n){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!(0,E.lengthIsZero)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>t!==null&&!(0,E.lengthLessThan)(s.length,t)?!1:s.canBeReused(n));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(n){this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new _.InvalidBracketAstNode(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=n.merge(t.bracketIds),s=this.parseList(i),r=this.tokenizer.peek();return r&&r.kind===2&&(r.bracketId===t.bracketId||r.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),_.PairAstNode.create(t.astNode,s,r.astNode)):_.PairAstNode.create(t.astNode,s,null)}default:throw new Error("unexpected")}}}}),define(X[197],ee([1,0,11,120,174,86,122]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class b{constructor(t,i,s,r,d){this.length=t,this.kind=i,this.bracketId=s,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=E.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,E.toLength)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(t){this.didPeek=!1,this._offset=(0,E.lengthAdd)(this._offset,t);const i=(0,E.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,E.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,E.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 s=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 l=k.TokenMetadata.getTokenType(c)===0,a=k.TokenMetadata.containsBalancedBrackets(c),u=d.getEndOffset(this.lineTokenOffset);if(a&&l&&this.lineCharOffset<u){const v=d.getLanguageId(this.lineTokenOffset),f=this.line.substring(this.lineCharOffset,u),m=this.bracketTokens.getSingleLanguageBracketTokens(v),C=m.regExpGlobal;if(C){C.lastIndex=0;const L=C.exec(f);L&&(o=m.getToken(L[0]),o&&(this.lineCharOffset+=L.index))}}if(s+=u-this.lineCharOffset,o)if(t!==this.lineIdx||i!==this.lineCharOffset){this.peekedToken=o;break}else return this.lineCharOffset+=(0,E.lengthGetColumnCountIfZeroLineCount)(o.length),o;else this.lineTokenOffset++,this.lineCharOffset=u}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,s+=33,s>1e3))break;if(s>1500)break}const r=(0,E.lengthDiff)(t,i,this.lineIdx,this.lineCharOffset);return new b(r,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(r))}}class p{constructor(t,i){this.text=t,this._offset=E.lengthZero,this.idx=0;const s=i.getRegExpStr(),r=s?new RegExp(s+`|
- `,"gi"):null,d=[];let h,o=0,c=0,l=0,a=0;const u=[];for(let m=0;m<60;m++)u.push(new b((0,E.toLength)(0,m),0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,E.toLength)(0,m))));const v=[];for(let m=0;m<60;m++)v.push(new b((0,E.toLength)(1,m),0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,E.toLength)(1,m))));if(r)for(r.lastIndex=0;(h=r.exec(t))!==null;){const m=h.index,C=h[0];if(C===`
- `)o++,c=m+1;else{if(l!==m){let L;if(a===o){const D=m-l;if(D<u.length)L=u[D];else{const I=(0,E.toLength)(0,D);L=new b(I,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(I))}}else{const D=o-a,I=m-c;if(D===1&&I<v.length)L=v[I];else{const T=(0,E.toLength)(D,I);L=new b(T,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(T))}}d.push(L)}d.push(i.getToken(C)),l=m+C.length,a=o}}const f=t.length;if(l!==f){const m=a===o?(0,E.toLength)(0,f-l):(0,E.toLength)(o-a,f-c);d.push(new b(m,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(m)))}this.length=(0,E.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=p}),define(X[264],ee([1,0,9,174,86,122,197]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class b{static createFromLanguage(n,t){function i(r){return t.getKey(`${r.languageId}:::${r.bracketText}`)}const s=new Map;for(const r of n.bracketsNew.openingBrackets){const d=(0,y.toLength)(0,r.bracketText.length),h=i(r),o=E.SmallImmutableSet.getEmpty().add(h,E.identityKeyProvider);s.set(r.bracketText,new w.Token(d,1,h,o,k.BracketAstNode.create(d,r,o)))}for(const r of n.bracketsNew.closingBrackets){const d=(0,y.toLength)(0,r.bracketText.length);let h=E.SmallImmutableSet.getEmpty();const o=r.getOpeningBrackets();for(const c of o)h=h.add(i(c),E.identityKeyProvider);s.set(r.bracketText,new w.Token(d,2,i(o[0]),h,k.BracketAstNode.create(d,r,h)))}return new b(s)}constructor(n){this.map=n,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const n=[...this.map.keys()];return n.sort(),n.reverse(),n.map(t=>S(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const n=this.getRegExpStr();this._regExpGlobal=n?new RegExp(n,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(n){return this.map.get(n.toLowerCase())}findClosingTokenText(n){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(n))return t}get isEmpty(){return this.map.size===0}}e.BracketTokens=b;function S(p){let n=(0,_.escapeRegExpCharacters)(p);return/^[\w ]+/.test(p)&&(n=`\\b${n}`),/[\w ]+$/.test(p)&&(n=`${n}\\b`),n}class g{constructor(n,t){this.denseKeyProvider=n,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(n){return this.languageIdToBracketTokens.has(n)}getSingleLanguageBracketTokens(n){let t=this.languageIdToBracketTokens.get(n);return t||(t=b.createFromLanguage(this.getLanguageConfiguration(n),this.denseKeyProvider),this.languageIdToBracketTokens.set(n,t)),t}}e.LanguageAgnosticBracketTokens=g}),define(X[489],ee([1,0,264,86,263,122,197]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function b(g,p){const n=new E.DenseKeyProvider,t=new _.LanguageAgnosticBracketTokens(n,o=>p.getLanguageConfiguration(o)),i=new w.TextBufferTokenizer(new S([g]),t),s=(0,y.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 a=t.getSingleLanguageBracketTokens(o.openingBracket.languageId).findClosingTokenText(o.openingBracket.bracketIds);r+=a}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 l of o.children)h(l,c),c=(0,k.lengthAdd)(c,l.length)}}return h(s,k.lengthZero),r}e.fixBracketsInLine=b;class S{constructor(p){this.lines=p,this.tokenization={getLineTokens:n=>this.lines[n-1]}}getLineCount(){return this.lines.length}getLineLength(p){return this.lines[p-1].getLineContent().length}}}),define(X[490],ee([1,0,16]),function(K,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),p=this._store.slice(w+b),n=y(S,this._default);this._store=g.concat(n,p)}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 y(E,w){const b=[];for(let S=0;S<E;S++)b[S]=w;return b}}),define(X[491],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class _{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function k(E,w,b,S,g){g.spacesDiff=0,g.looksLikeAlignment=!1;let p;for(p=0;p<w&&p<S;p++){const h=E.charCodeAt(p),o=b.charCodeAt(p);if(h!==o)break}let n=0,t=0;for(let h=p;h<w;h++)E.charCodeAt(h)===32?n++:t++;let i=0,s=0;for(let h=p;h<S;h++)b.charCodeAt(h)===32?i++:s++;if(n>0&&t>0||i>0&&s>0)return;const r=Math.abs(t-s),d=Math.abs(n-i);if(r===0){g.spacesDiff=d,d>0&&0<=i-1&&i-1<E.length&&i<b.length&&b.charCodeAt(i)!==32&&E.charCodeAt(i-1)===32&&E.charCodeAt(E.length-1)===44&&(g.looksLikeAlignment=!0);return}if(d%r===0){g.spacesDiff=d/r;return}}function y(E,w,b){const S=Math.min(E.getLineCount(),1e4);let g=0,p=0,n="",t=0;const i=[2,4,6,8,3,5,7],s=8,r=[0,0,0,0,0,0,0,0,0],d=new _;for(let c=1;c<=S;c++){const l=E.getLineLength(c),a=E.getLineContent(c),u=l<=65536;let v=!1,f=0,m=0,C=0;for(let D=0,I=l;D<I;D++){const T=u?a.charCodeAt(D):E.getLineCharCode(c,D);if(T===9)C++;else if(T===32)m++;else{v=!0,f=D;break}}if(!v||(C>0?g++:m>1&&p++,k(n,t,a,f,d),d.looksLikeAlignment&&!(b&&w===d.spacesDiff)))continue;const L=d.spacesDiff;L<=s&&r[L]++,n=a,t=f}let h=b;g!==p&&(h=g<p);let o=w;if(h){let c=h?0:.1*S;i.forEach(l=>{const a=r[l];a>c&&(c=a,o=l)}),o===4&&r[4]>0&&r[2]>0&&r[2]>=r[4]/2&&(o=2)}return{insertSpaces:h,tabSize:o}}e.guessIndentation=y}),define(X[492],ee([1,0]),function(K,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 y(x){return(x.metadata&2)>>>1===1}function E(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 p(x){return(x.metadata&24)>>>3}function n(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 s{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),n(this,1),i(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=V,this.range=null,E(this,!1)}reset(F,B,V,$){this.start=B,this.end=V,this.maxEnd=V,this.cachedVersionId=F,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=V,this.range=$}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),n(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=s,e.SENTINEL=new s(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,$,M,Q){return this.root===e.SENTINEL?[]:f(this,F,B,V,$,M,Q)}search(F,B,V,$){return this.root===e.SENTINEL?[]:v(this,F,B,V,$)}collectNodesFromOwner(F){return a(this,F)}collectNodesPostOrder(){return u(this)}insert(F){m(this,F),this._normalizeDeltaIfNecessary()}delete(F){L(this,F),this._normalizeDeltaIfNecessary()}resolveNode(F,B){const V=F;let $=0;for(;F!==this.root;)F===F.parent.right&&($+=F.parent.delta),F=F.parent;const M=V.start+$,Q=V.end+$;V.setCachedOffsets(M,Q,B)}acceptReplace(F,B,V,$){const M=c(this,F,F+B);for(let Q=0,ie=M.length;Q<ie;Q++){const re=M[Q];L(this,re)}this._normalizeDeltaIfNecessary(),l(this,F,F+B,V),this._normalizeDeltaIfNecessary();for(let Q=0,ie=M.length;Q<ie;Q++){const re=M[Q];re.start=re.cachedAbsoluteStart,re.end=re.cachedAbsoluteEnd,o(re,F,F+B,V,$),re.maxEnd=re.end,m(this,re)}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&&!y(F.left)){F=F.left;continue}if(F.right!==e.SENTINEL&&!y(F.right)){B+=F.delta,F=F.right;continue}F.start=B+F.start,F.end=B+F.end,F.delta=0,A(F),E(F,!0),E(F.left,!1),E(F.right,!1),F===F.parent.right&&(B-=F.parent.delta),F=F.parent}E(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,$){const M=p(x),Q=M===0||M===2,ie=M===1||M===2,re=B-F,ne=V,se=Math.min(re,ne),H=x.start;let W=!1;const q=x.end;let Z=!1;F<=H&&q<=B&&t(x)&&(x.start=F,W=!0,x.end=F,Z=!0);{const oe=$?1:re>0?2:0;!W&&h(H,Q,F,oe)&&(W=!0),!Z&&h(q,ie,F,oe)&&(Z=!0)}if(se>0&&!$){const oe=re>ne?2:0;!W&&h(H,Q,F+se,oe)&&(W=!0),!Z&&h(q,ie,F+se,oe)&&(Z=!0)}{const oe=$?1:0;!W&&h(H,Q,B,oe)&&(x.start=F+ne,W=!0),!Z&&h(q,ie,B,oe)&&(x.end=F+ne,Z=!0)}const Y=ne-re;W||(x.start=Math.max(0,H+Y)),Z||(x.end=Math.max(0,q+Y)),x.start>x.end&&(x.end=x.start)}e.nodeAcceptEdit=o;function c(x,F,B){let V=x.root,$=0,M=0,Q=0,ie=0;const re=[];let ne=0;for(;V!==e.SENTINEL;){if(y(V)){E(V.left,!1),E(V.right,!1),V===V.parent.right&&($-=V.parent.delta),V=V.parent;continue}if(!y(V.left)){if(M=$+V.maxEnd,M<F){E(V,!0);continue}if(V.left!==e.SENTINEL){V=V.left;continue}}if(Q=$+V.start,Q>B){E(V,!0);continue}if(ie=$+V.end,ie>=F&&(V.setCachedOffsets(Q,ie,0),re[ne++]=V),E(V,!0),V.right!==e.SENTINEL&&!y(V.right)){$+=V.delta,V=V.right;continue}}return E(x.root,!1),re}function l(x,F,B,V){let $=x.root,M=0,Q=0,ie=0;const re=V-(B-F);for(;$!==e.SENTINEL;){if(y($)){E($.left,!1),E($.right,!1),$===$.parent.right&&(M-=$.parent.delta),A($),$=$.parent;continue}if(!y($.left)){if(Q=M+$.maxEnd,Q<F){E($,!0);continue}if($.left!==e.SENTINEL){$=$.left;continue}}if(ie=M+$.start,ie>B){$.start+=re,$.end+=re,$.delta+=re,($.delta<-1073741824||$.delta>1073741824)&&(x.requestNormalizeDelta=!0),E($,!0);continue}if(E($,!0),$.right!==e.SENTINEL&&!y($.right)){M+=$.delta,$=$.right;continue}}E(x.root,!1)}function a(x,F){let B=x.root;const V=[];let $=0;for(;B!==e.SENTINEL;){if(y(B)){E(B.left,!1),E(B.right,!1),B=B.parent;continue}if(B.left!==e.SENTINEL&&!y(B.left)){B=B.left;continue}if(B.ownerId===F&&(V[$++]=B),E(B,!0),B.right!==e.SENTINEL&&!y(B.right)){B=B.right;continue}}return E(x.root,!1),V}function u(x){let F=x.root;const B=[];let V=0;for(;F!==e.SENTINEL;){if(y(F)){E(F.left,!1),E(F.right,!1),F=F.parent;continue}if(F.left!==e.SENTINEL&&!y(F.left)){F=F.left;continue}if(F.right!==e.SENTINEL&&!y(F.right)){F=F.right;continue}B[V++]=F,E(F,!0)}return E(x.root,!1),B}function v(x,F,B,V,$){let M=x.root,Q=0,ie=0,re=0;const ne=[];let se=0;for(;M!==e.SENTINEL;){if(y(M)){E(M.left,!1),E(M.right,!1),M===M.parent.right&&(Q-=M.parent.delta),M=M.parent;continue}if(M.left!==e.SENTINEL&&!y(M.left)){M=M.left;continue}ie=Q+M.start,re=Q+M.end,M.setCachedOffsets(ie,re,V);let H=!0;if(F&&M.ownerId&&M.ownerId!==F&&(H=!1),B&&w(M)&&(H=!1),$&&!S(M)&&(H=!1),H&&(ne[se++]=M),E(M,!0),M.right!==e.SENTINEL&&!y(M.right)){Q+=M.delta,M=M.right;continue}}return E(x.root,!1),ne}function f(x,F,B,V,$,M,Q){let ie=x.root,re=0,ne=0,se=0,H=0;const W=[];let q=0;for(;ie!==e.SENTINEL;){if(y(ie)){E(ie.left,!1),E(ie.right,!1),ie===ie.parent.right&&(re-=ie.parent.delta),ie=ie.parent;continue}if(!y(ie.left)){if(ne=re+ie.maxEnd,ne<F){E(ie,!0);continue}if(ie.left!==e.SENTINEL){ie=ie.left;continue}}if(se=re+ie.start,se>B){E(ie,!0);continue}if(H=re+ie.end,H>=F){ie.setCachedOffsets(se,H,M);let Z=!0;V&&ie.ownerId&&ie.ownerId!==V&&(Z=!1),$&&w(ie)&&(Z=!1),Q&&!S(ie)&&(Z=!1),Z&&(W[q++]=ie)}if(E(ie,!0),ie.right!==e.SENTINEL&&!y(ie.right)){re+=ie.delta,ie=ie.right;continue}}return E(x.root,!1),W}function m(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 $=F.start,M=F.end;for(;;)if(P($,M,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 L(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=D(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(),A(B),x.root.parent=e.SENTINEL;return}const $=_(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(),$){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 M;for(;B!==x.root&&_(B)===0;)B===B.parent.left?(M=B.parent.right,_(M)===1&&(k(M,0),k(B.parent,1),T(x,B.parent),M=B.parent.right),_(M.left)===0&&_(M.right)===0?(k(M,1),B=B.parent):(_(M.right)===0&&(k(M.left,0),k(M,1),O(x,M),M=B.parent.right),k(M,_(B.parent)),k(B.parent,0),k(M.right,0),T(x,B.parent),B=x.root)):(M=B.parent.left,_(M)===1&&(k(M,0),k(B.parent,1),O(x,B.parent),M=B.parent.left),_(M.left)===0&&_(M.right)===0?(k(M,1),B=B.parent):(_(M.left)===0&&(k(M.right,0),k(M,1),T(x,M),M=B.parent.left),k(M,_(B.parent)),k(B.parent,0),k(M.left,0),O(x,B.parent),B=x.root));k(B,0),I()}function D(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,A(F),A(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,A(F),A(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 A(x){x.maxEnd=R(x)}e.recomputeMaxEnd=A;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(X[493],ee([1,0]),function(K,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 y(this.left);let r=this;for(;r.parent!==e.SENTINEL&&r.parent.right!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=_,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(s){for(;s.left!==e.SENTINEL;)s=s.left;return s}e.leftest=k;function y(s){for(;s.right!==e.SENTINEL;)s=s.right;return s}e.righttest=y;function E(s){return s===e.SENTINEL?0:s.size_left+s.piece.length+E(s.right)}function w(s){return s===e.SENTINEL?0:s.lf_left+s.piece.lineFeedCnt+w(s.right)}function b(){e.SENTINEL.parent=e.SENTINEL}function S(s,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?s.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(s,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?s.root=d:r===r.parent.right?r.parent.right=d:r.parent.left=d,d.right=r,r.parent=d}e.rightRotate=g;function p(s,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===s.root){s.root=d,d.color=0,r.detach(),b(),s.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(s,d)):(h.parent===r?d.parent=h:d.parent=h.parent,i(s,d),h.left=r.left,h.right=r.right,h.parent=r.parent,h.color=r.color,r===s.root?s.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(s,h)),r.detach(),d.parent.left===d){const l=E(d),a=w(d);if(l!==d.parent.size_left||a!==d.parent.lf_left){const u=l-d.parent.size_left,v=a-d.parent.lf_left;d.parent.size_left=l,d.parent.lf_left=a,t(s,d.parent,u,v)}}if(i(s,d.parent),o){b();return}let c;for(;d!==s.root&&d.color===0;)d===d.parent.left?(c=d.parent.right,c.color===1&&(c.color=0,d.parent.color=1,S(s,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(s,c),c=d.parent.right),c.color=d.parent.color,d.parent.color=0,c.right.color=0,S(s,d.parent),d=s.root)):(c=d.parent.left,c.color===1&&(c.color=0,d.parent.color=1,g(s,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(s,c),c=d.parent.left),c.color=d.parent.color,d.parent.color=0,c.left.color=0,g(s,d.parent),d=s.root));d.color=0,b()}e.rbDelete=p;function n(s,r){for(i(s,r);r!==s.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(s,r)),r.parent.color=0,r.parent.parent.color=1,g(s,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(s,r)),r.parent.color=0,r.parent.parent.color=1,S(s,r.parent.parent))}s.root.color=0}e.fixInsert=n;function t(s,r,d,h){for(;r!==s.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(s,r){let d=0,h=0;if(r!==s.root){for(;r!==s.root&&r===r.parent.right;)r=r.parent;if(r!==s.root)for(r=r.parent,d=E(r.left)-r.size_left,h=w(r.left)-r.lf_left,r.size_left+=d,r.lf_left+=h;r!==s.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(X[265],ee([1,0,16,162]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class y{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 p=this.values,n=this.prefixSum,t=g.length;return t===0?!1:(this.values=new Uint32Array(p.length+t),this.values.set(p.subarray(0,S),0),this.values.set(p.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(n.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 p=this.values,n=this.prefixSum;if(S>=p.length)return!1;const t=p.length-S;return g>=t&&(g=t),g===0?!1:(this.values=new Uint32Array(p.length-g),this.values.set(p.subarray(0,S),0),this.values.set(p.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(n.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 p=g;p<=S;p++)this.prefixSum[p]=this.prefixSum[p-1]+this.values[p];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],S),this.prefixSum[S]}getIndexOf(S){S=Math.floor(S),this.getTotalSum();let g=0,p=this.values.length-1,n=0,t=0,i=0;for(;g<=p;)if(n=g+(p-g)/2|0,t=this.prefixSum[n],i=t-this.values[n],S<i)p=n-1;else if(S>=t)g=n+1;else break;return new w(n,S-i)}}e.PrefixSumComputer=y;class E{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],p=g>0?this._prefixSum[g-1]:0;return new w(g,S-p)}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 p=this._values[S],n=S>0?this._prefixSum[S-1]:0;this._prefixSum[S]=n+p;for(let t=0;t<p;t++)this._indexBySum[n+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=E;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(X[494],ee([1,0,9,12,265]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class E{constructor(b,S,g,p){this._uri=b,this._lines=S,this._eol=g,this._versionId=p,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 p=0;p<S;p++)g[p]=this._lines[p].length+b;this._lineStarts=new y.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 p=new Uint32Array(g.length-1);for(let n=1;n<g.length;n++)this._lines.splice(b.lineNumber+n-1,0,g[n]),p[n-1]=g[n].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(b.lineNumber,p)}}e.MirrorTextModel=E}),define(X[266],ee([1,0,2]),function(K,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(X[175],ee([1,0,9,138,12,5,46]),function(K,e,_,k,y,E,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,l,a){this.searchString=o,this.isRegex=c,this.matchCase=l,this.wordSeparators=a}parseSearchRequest(){if(this.searchString==="")return null;let o;this.isRegex?o=g(this.searchString):o=this.searchString.indexOf(`
- `)>=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 l=!this.isRegex&&!o;return l&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(l=this.matchCase),new w.SearchData(c,this.wordSeparators?(0,k.getMapForWordSeparators)(this.wordSeparators):null,l?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 l=h.charCodeAt(o);if(l===10)return!0;if(l===92){if(o++,o>=c)break;const a=h.charCodeAt(o);if(a===110||a===114||a===87)return!0}}return!1}e.isMultilineRegexSource=g;function p(h,o,c){if(!c)return new w.FindMatch(h,null);const l=[];for(let a=0,u=o.length;a<u;a++)l[a]=o[a];return new w.FindMatch(h,l)}e.createFindMatch=p;class n{constructor(o){const c=[];let l=0;for(let a=0,u=o.length;a<u;a++)o.charCodeAt(a)===10&&(c[l++]=a);this._lineFeedsOffsets=c}findLineFeedCountBeforeOffset(o){const c=this._lineFeedsOffsets;let l=0,a=c.length-1;if(a===-1||o<=c[0])return 0;for(;l<a;){const u=l+((a-l)/2>>0);c[u]>=o?a=u-1:c[u+1]>=o?(l=u,a=u):l=u+1}return l+1}}class t{static findMatches(o,c,l,a,u){const v=c.parseSearchRequest();return v?v.regex.multiline?this._doFindMatchesMultiline(o,l,new d(v.wordSeparators,v.regex),a,u):this._doFindMatchesLineByLine(o,l,v,a,u):[]}static _getMultilineMatchRange(o,c,l,a,u,v){let f,m=0;a?(m=a.findLineFeedCountBeforeOffset(u),f=c+u+m):f=c+u;let C;if(a){const T=a.findLineFeedCountBeforeOffset(u+v.length)-m;C=f+v.length+T}else C=f+v.length;const L=o.getPositionAt(f),D=o.getPositionAt(C);return new E.Range(L.lineNumber,L.column,D.lineNumber,D.column)}static _doFindMatchesMultiline(o,c,l,a,u){const v=o.getOffsetAt(c.getStartPosition()),f=o.getValueInRange(c,1),m=o.getEOL()===`\r
- `?new n(f):null,C=[];let L=0,D;for(l.reset(0);D=l.next(f);)if(C[L++]=p(this._getMultilineMatchRange(o,v,f,m,D.index,D[0]),D,a),L>=u)return C;return C}static _doFindMatchesLineByLine(o,c,l,a,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(l,C,c.startLineNumber,c.startColumn-1,f,v,a,u),v}const m=o.getLineContent(c.startLineNumber).substring(c.startColumn-1);f=this._findMatchesInLine(l,m,c.startLineNumber,c.startColumn-1,f,v,a,u);for(let C=c.startLineNumber+1;C<c.endLineNumber&&f<u;C++)f=this._findMatchesInLine(l,o.getLineContent(C),C,0,f,v,a,u);if(f<u){const C=o.getLineContent(c.endLineNumber).substring(0,c.endColumn-1);f=this._findMatchesInLine(l,C,c.endLineNumber,0,f,v,a,u)}return v}static _findMatchesInLine(o,c,l,a,u,v,f,m){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 E.Range(l,R+1+a,l,R+1+T+a),null),u>=m))return u;return u}const L=new d(o.wordSeparators,o.regex);let D;L.reset(0);do if(D=L.next(c),D&&(v[u++]=p(new E.Range(l,D.index+1+a,l,D.index+1+D[0].length+a),D,f),u>=m))return u;while(D);return u}static findNextMatch(o,c,l,a){const u=c.parseSearchRequest();if(!u)return null;const v=new d(u.wordSeparators,u.regex);return u.regex.multiline?this._doFindNextMatchMultiline(o,l,v,a):this._doFindNextMatchLineByLine(o,l,v,a)}static _doFindNextMatchMultiline(o,c,l,a){const u=new y.Position(c.lineNumber,1),v=o.getOffsetAt(u),f=o.getLineCount(),m=o.getValueInRange(new E.Range(u.lineNumber,u.column,f,o.getLineMaxColumn(f)),1),C=o.getEOL()===`\r
- `?new n(m):null;l.reset(c.column-1);const L=l.next(m);return L?p(this._getMultilineMatchRange(o,v,m,C,L.index,L[0]),L,a):c.lineNumber!==1||c.column!==1?this._doFindNextMatchMultiline(o,new y.Position(1,1),l,a):null}static _doFindNextMatchLineByLine(o,c,l,a){const u=o.getLineCount(),v=c.lineNumber,f=o.getLineContent(v),m=this._findFirstMatchInLine(l,f,v,c.column,a);if(m)return m;for(let C=1;C<=u;C++){const L=(v+C-1)%u,D=o.getLineContent(L+1),I=this._findFirstMatchInLine(l,D,L+1,1,a);if(I)return I}return null}static _findFirstMatchInLine(o,c,l,a,u){o.reset(a-1);const v=o.next(c);return v?p(new E.Range(l,v.index+1,l,v.index+1+v[0].length),v,u):null}static findPreviousMatch(o,c,l,a){const u=c.parseSearchRequest();if(!u)return null;const v=new d(u.wordSeparators,u.regex);return u.regex.multiline?this._doFindPreviousMatchMultiline(o,l,v,a):this._doFindPreviousMatchLineByLine(o,l,v,a)}static _doFindPreviousMatchMultiline(o,c,l,a){const u=this._doFindMatchesMultiline(o,new E.Range(1,1,c.lineNumber,c.column),l,a,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 y.Position(v,o.getLineMaxColumn(v)),l,a):null}static _doFindPreviousMatchLineByLine(o,c,l,a){const u=o.getLineCount(),v=c.lineNumber,f=o.getLineContent(v).substring(0,c.column-1),m=this._findLastMatchInLine(l,f,v,a);if(m)return m;for(let C=1;C<=u;C++){const L=(u+v-C-1)%u,D=o.getLineContent(L+1),I=this._findLastMatchInLine(l,D,L+1,a);if(I)return I}return null}static _findLastMatchInLine(o,c,l,a){let u=null,v;for(o.reset(0);v=o.next(c);)u=p(new E.Range(l,v.index+1,l,v.index+1+v[0].length),v,a);return u}}e.TextModelSearch=t;function i(h,o,c,l,a){if(l===0)return!0;const u=o.charCodeAt(l-1);if(h.get(u)!==0||u===13||u===10)return!0;if(a>0){const v=o.charCodeAt(l);if(h.get(v)!==0)return!0}return!1}function s(h,o,c,l,a){if(l+a===c)return!0;const u=o.charCodeAt(l+a);if(h.get(u)!==0||u===13||u===10)return!0;if(a>0){const v=o.charCodeAt(l+a-1);if(h.get(v)!==0)return!0}return!1}function r(h,o,c,l,a){return i(h,o,c,l,a)&&s(h,o,c,l,a)}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 l;do{if(this._prevMatchStartIndex+this._prevMatchLength===c||(l=this._searchRegex.exec(o),!l))return null;const a=l.index,u=l[0].length;if(a===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=a,this._prevMatchLength=u,!this._wordSeparators||r(this._wordSeparators,o,c,a,u))return l}while(l);return null}}e.Searcher=d}),define(X[267],ee([1,0,12,5,46,493,175]),function(K,e,_,k,y,E,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,l,a,u){this.lineStarts=o,this.cr=c,this.lf=l,this.crlf=a,this.isBasicASCII=u}}function p(h,o=!0){const c=[0];let l=1;for(let a=0,u=h.length;a<u;a++){const v=h.charCodeAt(a);v===13?a+1<u&&h.charCodeAt(a+1)===10?(c[l++]=a+2,a++):c[l++]=a+1:v===10&&(c[l++]=a+1)}return o?S(c):c}e.createLineStartsFast=p;function n(h,o){h.length=0,h[0]=0;let c=1,l=0,a=0,u=0,v=!0;for(let m=0,C=o.length;m<C;m++){const L=o.charCodeAt(m);L===13?m+1<C&&o.charCodeAt(m+1)===10?(u++,h[c++]=m+2,m++):(l++,h[c++]=m+1):L===10?(a++,h[c++]=m+1):v&&L!==9&&(L<32||L>126)&&(v=!1)}const f=new g(S(h),l,a,u,v);return h.length=0,f}e.createLineStarts=n;class t{constructor(o,c,l,a,u){this.bufferIndex=o,this.start=c,this.end=l,this.lineFeedCnt=a,this.length=u}}e.Piece=t;class i{constructor(o,c){this.buffer=o,this.lineStarts=c}}e.StringBuffer=i;class s{constructor(o,c){this._pieces=[],this._tree=o,this._BOM=c,this._index=0,o.root!==E.SENTINEL&&o.iterate(o.root,l=>(l!==E.SENTINEL&&this._pieces.push(l.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 l=this._cache[c];if(l.nodeStartOffset<=o&&l.nodeStartOffset+l.node.piece.length>=o)return l}return null}get2(o){for(let c=this._cache.length-1;c>=0;c--){const l=this._cache[c];if(l.nodeStartLineNumber&&l.nodeStartLineNumber<o&&l.nodeStartLineNumber+l.node.piece.lineFeedCnt>=o)return l}return null}set(o){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(o)}validate(o){let c=!1;const l=this._cache;for(let a=0;a<l.length;a++){const u=l[a];if(u.node.parent===null||u.nodeStartOffset>=o){l[a]=null,c=!0;continue}}if(c){const a=[];for(const u of l)u!==null&&a.push(u);this._cache=a}}}class d{constructor(o,c,l){this.create(o,c,l)}create(o,c,l){this._buffers=[new i("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=E.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=c,this._EOLLength=c.length,this._EOLNormalized=l;let a=null;for(let u=0,v=o.length;u<v;u++)if(o[u].buffer.length>0){o[u].lineStarts||(o[u].lineStarts=p(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]),a=this.rbInsertRight(a,f)}this._searchCache=new r(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(o){const c=b,l=c-Math.floor(c/3),a=l*2;let u="",v=0;const f=[];if(this.iterate(this.root,m=>{const C=this.getNodeContent(m),L=C.length;if(v<=l||v+L<a)return u+=C,v+=L,!0;const D=u.replace(/\r\n|\r|\n/g,o);return f.push(new i(D,p(D))),u=C,v=L,!0}),v>0){const m=u.replace(/\r\n|\r|\n/g,o);f.push(new i(m,p(m)))}this.create(f,o,!0)}getEOL(){return this._EOL}setEOL(o){this._EOL=o,this._EOLLength=this._EOL.length,this.normalizeEOL(o)}createSnapshot(o){return new s(this,o)}getOffsetAt(o,c){let l=0,a=this.root;for(;a!==E.SENTINEL;)if(a.left!==E.SENTINEL&&a.lf_left+1>=o)a=a.left;else if(a.lf_left+a.piece.lineFeedCnt+1>=o){l+=a.size_left;const u=this.getAccumulatedValue(a,o-a.lf_left-2);return l+=u+c-1}else o-=a.lf_left+a.piece.lineFeedCnt,l+=a.size_left+a.piece.length,a=a.right;return l}getPositionAt(o){o=Math.floor(o),o=Math.max(0,o);let c=this.root,l=0;const a=o;for(;c!==E.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(l+=c.lf_left+u.index,u.index===0){const v=this.getOffsetAt(l+1,1),f=a-v;return new _.Position(l+1,f+1)}return new _.Position(l+1,u.remainder+1)}else if(o-=c.size_left+c.piece.length,l+=c.lf_left+c.piece.lineFeedCnt,c.right===E.SENTINEL){const u=this.getOffsetAt(l+1,1),v=a-o-u;return new _.Position(l+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 l=this.nodeAt2(o.startLineNumber,o.startColumn),a=this.nodeAt2(o.endLineNumber,o.endColumn),u=this.getValueInRange2(l,a);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,m=this._buffers[f.piece.bufferIndex].buffer,C=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start);return m.substring(C+o.remainder,C+c.remainder)}let l=o.node;const a=this._buffers[l.piece.bufferIndex].buffer,u=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);let v=a.substring(u+o.remainder,u+l.piece.length);for(l=l.next();l!==E.SENTINEL;){const f=this._buffers[l.piece.bufferIndex].buffer,m=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);if(l===c.node){v+=f.substring(m,m+c.remainder);break}else v+=f.substr(m,l.piece.length);l=l.next()}return v}getLinesContent(){const o=[];let c=0,l="",a=!1;return this.iterate(this.root,u=>{if(u===E.SENTINEL)return!0;const v=u.piece;let f=v.length;if(f===0)return!0;const m=this._buffers[v.bufferIndex].buffer,C=this._buffers[v.bufferIndex].lineStarts,L=v.start.line,D=v.end.line;let I=C[L]+v.start.column;if(a&&(m.charCodeAt(I)===10&&(I++,f--),o[c++]=l,l="",a=!1,f===0))return!0;if(L===D)return!this._EOLNormalized&&m.charCodeAt(I+f-1)===13?(a=!0,l+=m.substr(I,f-1)):l+=m.substr(I,f),!0;l+=this._EOLNormalized?m.substring(I,Math.max(I,C[L+1]-this._EOLLength)):m.substring(I,C[L+1]).replace(/(\r\n|\r|\n)$/,""),o[c++]=l;for(let T=L+1;T<D;T++)l=this._EOLNormalized?m.substring(C[T],C[T+1]-this._EOLLength):m.substring(C[T],C[T+1]).replace(/(\r\n|\r|\n)$/,""),o[c++]=l;return!this._EOLNormalized&&m.charCodeAt(C[D]+v.end.column-1)===13?(a=!0,v.end.column===0?c--:l=m.substr(C[D],v.end.column-1)):l=m.substr(C[D],v.end.column),!0}),a&&(o[c++]=l,l=""),o[c++]=l,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 l=this._buffers[c.piece.bufferIndex],a=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);return l.buffer.charCodeAt(a)}else{const c=this._buffers[o.node.piece.bufferIndex],a=this.offsetInBuffer(o.node.piece.bufferIndex,o.node.piece.start)+o.remainder;return c.buffer.charCodeAt(a)}}getLineCharCode(o,c){const l=this.nodeAt2(o,c+1);return this._getCharCode(l)}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,l,a,u,v,f,m,C,L,D){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 A;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(A=c.next(P),A){if(x(A.index)>=R)return L;this.positionInBuffer(o,x(A.index)-T,N);const F=this.getLineFeedCnt(o.piece.bufferIndex,u,N),B=N.line===u.line?N.column-u.column+a:N.column+1,V=B+A[0].length;if(D[L++]=(0,w.createFindMatch)(new k.Range(l+F,B,l+F,V),A,m),x(A.index)+A[0].length>=R||L>=C)return L}while(A);return L}findMatchesLineByLine(o,c,l,a){const u=[];let v=0;const f=new w.Searcher(c.wordSeparators,c.regex);let m=this.nodeAt2(o.startLineNumber,o.startColumn);if(m===null)return[];const C=this.nodeAt2(o.endLineNumber,o.endColumn);if(C===null)return[];let L=this.positionInBuffer(m.node,m.remainder);const D=this.positionInBuffer(C.node,C.remainder);if(m.node===C.node)return this.findMatchesInNode(m.node,f,o.startLineNumber,o.startColumn,L,D,c,l,a,v,u),u;let I=o.startLineNumber,T=m.node;for(;T!==C.node;){const R=this.getLineFeedCnt(T.piece.bufferIndex,L,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[L.line+R],F=I===o.startLineNumber?o.startColumn:1;if(v=this.findMatchesInNode(T,f,I,F,L,this.positionInBuffer(T,x-P),c,l,a,v,u),v>=a)return u;I+=R}const A=I===o.startLineNumber?o.startColumn-1:0;if(I===o.endLineNumber){const N=this.getLineContent(I).substring(A,o.endColumn-1);return v=this._findMatchesInLine(c,f,N,o.endLineNumber,A,v,u,l,a),u}if(v=this._findMatchesInLine(c,f,this.getLineContent(I).substr(A),I,A,v,u,l,a),v>=a)return u;I++,m=this.nodeAt2(I,1),T=m.node,L=this.positionInBuffer(m.node,m.remainder)}if(I===o.endLineNumber){const R=I===o.startLineNumber?o.startColumn-1:0,A=this.getLineContent(I).substring(R,o.endColumn-1);return v=this._findMatchesInLine(c,f,A,o.endLineNumber,R,v,u,l,a),u}const O=I===o.startLineNumber?o.startColumn:1;return v=this.findMatchesInNode(C.node,f,I,O,L,D,c,l,a,v,u),u}_findMatchesInLine(o,c,l,a,u,v,f,m,C){const L=o.wordSeparators;if(!m&&o.simpleSearch){const I=o.simpleSearch,T=I.length,O=l.length;let R=-T;for(;(R=l.indexOf(I,R+T))!==-1;)if((!L||(0,w.isValidMatch)(L,l,O,R,T))&&(f[v++]=new y.FindMatch(new k.Range(a,R+1+u,a,R+1+T+u),null),v>=C))return v;return v}let D;c.reset(0);do if(D=c.next(l),D&&(f[v++]=(0,w.createFindMatch)(new k.Range(a,D.index+1+u,a,D.index+1+D[0].length+u),D,m),v>=C))return v;while(D);return v}insert(o,c,l=!1){if(this._EOLNormalized=this._EOLNormalized&&l,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==E.SENTINEL){const{node:a,remainder:u,nodeStartOffset:v}=this.nodeAt(o),f=a.piece,m=f.bufferIndex,C=this.positionInBuffer(a,u);if(a.piece.bufferIndex===0&&f.end.line===this._lastChangeBufferPos.line&&f.end.column===this._lastChangeBufferPos.column&&v+f.length===o&&c.length<b){this.appendToNode(a,c),this.computeBufferMetadata();return}if(v===o)this.insertContentToNodeLeft(c,a),this._searchCache.validate(o);else if(v+a.piece.length>o){const L=[];let D=new t(f.bufferIndex,C,f.end,this.getLineFeedCnt(f.bufferIndex,C,f.end),this.offsetInBuffer(m,f.end)-this.offsetInBuffer(m,C));if(this.shouldCheckCRLF()&&this.endWithCR(c)&&this.nodeCharCodeAt(a,u)===10){const R={line:D.start.line+1,column:0};D=new t(D.bufferIndex,R,D.end,this.getLineFeedCnt(D.bufferIndex,R,D.end),D.length-1),c+=`
- `}if(this.shouldCheckCRLF()&&this.startWithLF(c))if(this.nodeCharCodeAt(a,u-1)===13){const R=this.positionInBuffer(a,u-1);this.deleteNodeTail(a,R),c="\r"+c,a.piece.length===0&&L.push(a)}else this.deleteNodeTail(a,C);else this.deleteNodeTail(a,C);const I=this.createNewPieces(c);D.length>0&&this.rbInsertRight(a,D);let T=a;for(let O=0;O<I.length;O++)T=this.rbInsertRight(T,I[O]);this.deleteNodes(L)}else this.insertContentToNodeRight(c,a)}else{const a=this.createNewPieces(c);let u=this.rbInsertLeft(null,a[0]);for(let v=1;v<a.length;v++)u=this.rbInsertRight(u,a[v])}this.computeBufferMetadata()}delete(o,c){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",c<=0||this.root===E.SENTINEL)return;const l=this.nodeAt(o),a=this.nodeAt(o+c),u=l.node,v=a.node;if(u===v){const I=this.positionInBuffer(u,l.remainder),T=this.positionInBuffer(u,a.remainder);if(l.nodeStartOffset===o){if(c===u.piece.length){const O=u.next();(0,E.rbDelete)(this,u),this.validateCRLFWithPrevNode(O),this.computeBufferMetadata();return}this.deleteNodeHead(u,T),this._searchCache.validate(o),this.validateCRLFWithPrevNode(u),this.computeBufferMetadata();return}if(l.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=[],m=this.positionInBuffer(u,l.remainder);this.deleteNodeTail(u,m),this._searchCache.validate(o),u.piece.length===0&&f.push(u);const C=this.positionInBuffer(v,a.remainder);this.deleteNodeHead(v,C),v.piece.length===0&&f.push(v);const L=u.next();for(let I=L;I!==E.SENTINEL&&I!==v;I=I.next())f.push(I);const D=u.piece.length===0?u.prev():u;this.deleteNodes(f),this.validateCRLFWithNextNode(D),this.computeBufferMetadata()}insertContentToNodeLeft(o,c){const l=[];if(this.shouldCheckCRLF()&&this.endWithCR(o)&&this.startWithLF(c)){const v=c.piece,f={line:v.start.line+1,column:0},m=new t(v.bufferIndex,f,v.end,this.getLineFeedCnt(v.bufferIndex,f,v.end),v.length-1);c.piece=m,o+=`
- `,(0,E.updateTreeMetadata)(this,c,-1,-1),c.piece.length===0&&l.push(c)}const a=this.createNewPieces(o);let u=this.rbInsertLeft(c,a[a.length-1]);for(let v=a.length-2;v>=0;v--)u=this.rbInsertLeft(u,a[v]);this.validateCRLFWithPrevNode(u),this.deleteNodes(l)}insertContentToNodeRight(o,c){this.adjustCarriageReturnFromNext(o,c)&&(o+=`
- `);const l=this.createNewPieces(o),a=this.rbInsertRight(c,l[0]);let u=a;for(let v=1;v<l.length;v++)u=this.rbInsertRight(u,l[v]);this.validateCRLFWithPrevNode(a)}positionInBuffer(o,c,l){const a=o.piece,u=o.piece.bufferIndex,v=this._buffers[u].lineStarts,m=v[a.start.line]+a.start.column+c;let C=a.start.line,L=a.end.line,D=0,I=0,T=0;for(;C<=L&&(D=C+(L-C)/2|0,T=v[D],D!==L);)if(I=v[D+1],m<T)L=D-1;else if(m>=I)C=D+1;else break;return l?(l.line=D,l.column=m-T,null):{line:D,column:m-T}}getLineFeedCnt(o,c,l){if(l.column===0)return l.line-c.line;const a=this._buffers[o].lineStarts;if(l.line===a.length-1)return l.line-c.line;const u=a[l.line+1],v=a[l.line]+l.column;if(u>v+1)return l.line-c.line;const f=v-1;return this._buffers[o].buffer.charCodeAt(f)===13?l.line-c.line+1:l.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,E.rbDelete)(this,o[c])}createNewPieces(o){if(o.length>b){const L=[];for(;o.length>b;){const I=o.charCodeAt(b-1);let T;I===13||I>=55296&&I<=56319?(T=o.substring(0,b-1),o=o.substring(b-1)):(T=o.substring(0,b),o=o.substring(b));const O=p(T);L.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 D=p(o);return L.push(new t(this._buffers.length,{line:0,column:0},{line:D.length-1,column:o.length-D[D.length-1]},D.length-1,o.length)),this._buffers.push(new i(o,D)),L}let c=this._buffers[0].buffer.length;const l=p(o,!1);let a=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},a=this._lastChangeBufferPos;for(let L=0;L<l.length;L++)l[L]+=c+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(l.slice(1)),this._buffers[0].buffer+="_"+o,c+=1}else{if(c!==0)for(let L=0;L<l.length;L++)l[L]+=c;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(l.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],m={line:v,column:f},C=new t(0,a,m,this.getLineFeedCnt(0,a,m),u-c);return this._lastChangeBufferPos=m,[C]}getLineRawContent(o,c=0){let l=this.root,a="";const u=this._searchCache.get2(o);if(u){l=u.node;const v=this.getAccumulatedValue(l,o-u.nodeStartLineNumber-1),f=this._buffers[l.piece.bufferIndex].buffer,m=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);if(u.nodeStartLineNumber+l.piece.lineFeedCnt===o)a=f.substring(m+v,m+l.piece.length);else{const C=this.getAccumulatedValue(l,o-u.nodeStartLineNumber);return f.substring(m+v,m+C-c)}}else{let v=0;const f=o;for(;l!==E.SENTINEL;)if(l.left!==E.SENTINEL&&l.lf_left>=o-1)l=l.left;else if(l.lf_left+l.piece.lineFeedCnt>o-1){const m=this.getAccumulatedValue(l,o-l.lf_left-2),C=this.getAccumulatedValue(l,o-l.lf_left-1),L=this._buffers[l.piece.bufferIndex].buffer,D=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);return v+=l.size_left,this._searchCache.set({node:l,nodeStartOffset:v,nodeStartLineNumber:f-(o-1-l.lf_left)}),L.substring(D+m,D+C-c)}else if(l.lf_left+l.piece.lineFeedCnt===o-1){const m=this.getAccumulatedValue(l,o-l.lf_left-2),C=this._buffers[l.piece.bufferIndex].buffer,L=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);a=C.substring(L+m,L+l.piece.length);break}else o-=l.lf_left+l.piece.lineFeedCnt,v+=l.size_left+l.piece.length,l=l.right}for(l=l.next();l!==E.SENTINEL;){const v=this._buffers[l.piece.bufferIndex].buffer;if(l.piece.lineFeedCnt>0){const f=this.getAccumulatedValue(l,0),m=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);return a+=v.substring(m,m+f-c),a}else{const f=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);a+=v.substr(f,l.piece.length)}l=l.next()}return a}computeBufferMetadata(){let o=this.root,c=1,l=0;for(;o!==E.SENTINEL;)c+=o.lf_left+o.piece.lineFeedCnt,l+=o.size_left+o.piece.length,o=o.right;this._lineCnt=c,this._length=l,this._searchCache.validate(this._length)}getIndexOf(o,c){const l=o.piece,a=this.positionInBuffer(o,c),u=a.line-l.start.line;if(this.offsetInBuffer(l.bufferIndex,l.end)-this.offsetInBuffer(l.bufferIndex,l.start)===c){const v=this.getLineFeedCnt(o.piece.bufferIndex,l.start,a);if(v!==u)return{index:v,remainder:0}}return{index:u,remainder:a.column}}getAccumulatedValue(o,c){if(c<0)return 0;const l=o.piece,a=this._buffers[l.bufferIndex].lineStarts,u=l.start.line+c+1;return u>l.end.line?a[l.end.line]+l.end.column-a[l.start.line]-l.start.column:a[u]-a[l.start.line]-l.start.column}deleteNodeTail(o,c){const l=o.piece,a=l.lineFeedCnt,u=this.offsetInBuffer(l.bufferIndex,l.end),v=c,f=this.offsetInBuffer(l.bufferIndex,v),m=this.getLineFeedCnt(l.bufferIndex,l.start,v),C=m-a,L=f-u,D=l.length+L;o.piece=new t(l.bufferIndex,l.start,v,m,D),(0,E.updateTreeMetadata)(this,o,L,C)}deleteNodeHead(o,c){const l=o.piece,a=l.lineFeedCnt,u=this.offsetInBuffer(l.bufferIndex,l.start),v=c,f=this.getLineFeedCnt(l.bufferIndex,v,l.end),m=this.offsetInBuffer(l.bufferIndex,v),C=f-a,L=u-m,D=l.length+L;o.piece=new t(l.bufferIndex,v,l.end,f,D),(0,E.updateTreeMetadata)(this,o,L,C)}shrinkNode(o,c,l){const a=o.piece,u=a.start,v=a.end,f=a.length,m=a.lineFeedCnt,C=c,L=this.getLineFeedCnt(a.bufferIndex,a.start,C),D=this.offsetInBuffer(a.bufferIndex,c)-this.offsetInBuffer(a.bufferIndex,u);o.piece=new t(a.bufferIndex,a.start,C,L,D),(0,E.updateTreeMetadata)(this,o,D-f,L-m);const I=new t(a.bufferIndex,l,v,this.getLineFeedCnt(a.bufferIndex,l,v),this.offsetInBuffer(a.bufferIndex,v)-this.offsetInBuffer(a.bufferIndex,l)),T=this.rbInsertRight(o,I);this.validateCRLFWithPrevNode(T)}appendToNode(o,c){this.adjustCarriageReturnFromNext(c,o)&&(c+=`
- `);const l=this.shouldCheckCRLF()&&this.startWithLF(c)&&this.endWithCR(o),a=this._buffers[0].buffer.length;this._buffers[0].buffer+=c;const u=p(c,!1);for(let T=0;T<u.length;T++)u[T]+=a;if(l){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:a-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],m={line:v,column:f},C=o.piece.length+c.length,L=o.piece.lineFeedCnt,D=this.getLineFeedCnt(0,o.piece.start,m),I=D-L;o.piece=new t(o.piece.bufferIndex,o.piece.start,m,D,C),this._lastChangeBufferPos=m,(0,E.updateTreeMetadata)(this,o,c.length,I)}nodeAt(o){let c=this.root;const l=this._searchCache.get(o);if(l)return{node:l.node,nodeStartOffset:l.nodeStartOffset,remainder:o-l.nodeStartOffset};let a=0;for(;c!==E.SENTINEL;)if(c.size_left>o)c=c.left;else if(c.size_left+c.piece.length>=o){a+=c.size_left;const u={node:c,remainder:o-c.size_left,nodeStartOffset:a};return this._searchCache.set(u),u}else o-=c.size_left+c.piece.length,a+=c.size_left+c.piece.length,c=c.right;return null}nodeAt2(o,c){let l=this.root,a=0;for(;l!==E.SENTINEL;)if(l.left!==E.SENTINEL&&l.lf_left>=o-1)l=l.left;else if(l.lf_left+l.piece.lineFeedCnt>o-1){const u=this.getAccumulatedValue(l,o-l.lf_left-2),v=this.getAccumulatedValue(l,o-l.lf_left-1);return a+=l.size_left,{node:l,remainder:Math.min(u+c-1,v),nodeStartOffset:a}}else if(l.lf_left+l.piece.lineFeedCnt===o-1){const u=this.getAccumulatedValue(l,o-l.lf_left-2);if(u+c-1<=l.piece.length)return{node:l,remainder:u+c-1,nodeStartOffset:a};c-=l.piece.length-u;break}else o-=l.lf_left+l.piece.lineFeedCnt,a+=l.size_left+l.piece.length,l=l.right;for(l=l.next();l!==E.SENTINEL;){if(l.piece.lineFeedCnt>0){const u=this.getAccumulatedValue(l,0),v=this.offsetOfNode(l);return{node:l,remainder:Math.min(c-1,u),nodeStartOffset:v}}else if(l.piece.length>=c-1){const u=this.offsetOfNode(l);return{node:l,remainder:c-1,nodeStartOffset:u}}else c-=l.piece.length;l=l.next()}return null}nodeCharCodeAt(o,c){if(o.piece.lineFeedCnt<1)return-1;const l=this._buffers[o.piece.bufferIndex],a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start)+c;return l.buffer.charCodeAt(a)}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===`
- `)}startWithLF(o){if(typeof o=="string")return o.charCodeAt(0)===10;if(o===E.SENTINEL||o.piece.lineFeedCnt===0)return!1;const c=o.piece,l=this._buffers[c.bufferIndex].lineStarts,a=c.start.line,u=l[a]+c.start.column;return a===l.length-1||l[a+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===E.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 l=[],a=this._buffers[o.piece.bufferIndex].lineStarts;let u;o.piece.end.column===0?u={line:o.piece.end.line-1,column:a[o.piece.end.line]-a[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,E.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&l.push(o);const m={line:c.piece.start.line+1,column:0},C=c.piece.length-1,L=this.getLineFeedCnt(c.piece.bufferIndex,m,c.piece.end);c.piece=new t(c.piece.bufferIndex,m,c.piece.end,L,C),(0,E.updateTreeMetadata)(this,c,-1,-1),c.piece.length===0&&l.push(c);const D=this.createNewPieces(`\r
- `);this.rbInsertRight(o,D[0]);for(let I=0;I<l.length;I++)(0,E.rbDelete)(this,l[I])}adjustCarriageReturnFromNext(o,c){if(this.shouldCheckCRLF()&&this.endWithCR(o)){const l=c.next();if(this.startWithLF(l)){if(o+=`
- `,l.piece.length===1)(0,E.rbDelete)(this,l);else{const a=l.piece,u={line:a.start.line+1,column:0},v=a.length-1,f=this.getLineFeedCnt(a.bufferIndex,u,a.end);l.piece=new t(a.bufferIndex,u,a.end,f,v),(0,E.updateTreeMetadata)(this,l,-1,-1)}return!0}}return!1}iterate(o,c){if(o===E.SENTINEL)return c(E.SENTINEL);const l=this.iterate(o.left,c);return l&&c(o)&&this.iterate(o.right,c)}getNodeContent(o){if(o===E.SENTINEL)return"";const c=this._buffers[o.piece.bufferIndex],l=o.piece,a=this.offsetInBuffer(l.bufferIndex,l.start),u=this.offsetInBuffer(l.bufferIndex,l.end);return c.buffer.substring(a,u)}getPieceContent(o){const c=this._buffers[o.bufferIndex],l=this.offsetInBuffer(o.bufferIndex,o.start),a=this.offsetInBuffer(o.bufferIndex,o.end);return c.buffer.substring(l,a)}rbInsertRight(o,c){const l=new E.TreeNode(c,1);if(l.left=E.SENTINEL,l.right=E.SENTINEL,l.parent=E.SENTINEL,l.size_left=0,l.lf_left=0,this.root===E.SENTINEL)this.root=l,l.color=0;else if(o.right===E.SENTINEL)o.right=l,l.parent=o;else{const u=(0,E.leftest)(o.right);u.left=l,l.parent=u}return(0,E.fixInsert)(this,l),l}rbInsertLeft(o,c){const l=new E.TreeNode(c,1);if(l.left=E.SENTINEL,l.right=E.SENTINEL,l.parent=E.SENTINEL,l.size_left=0,l.lf_left=0,this.root===E.SENTINEL)this.root=l,l.color=0;else if(o.left===E.SENTINEL)o.left=l,l.parent=o;else{const a=(0,E.righttest)(o.left);a.right=l,l.parent=a}return(0,E.fixInsert)(this,l),l}}e.PieceTreeBase=d}),define(X[198],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function _(k,y){let E=0,w=0;const b=k.length;for(;w<b;){const S=k.charCodeAt(w);if(S===32)E++;else if(S===9)E=E-E%y+y;else break;w++}return w===b?-1:E}e.computeIndentLevel=_}),define(X[268],ee([1,0,85,12,46]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class E{constructor(n,t,i,s,r){this.injectionOffsets=n,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=s,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(n){return n>0?this.wrappedTextIndentLength:0}getLineLength(n){const t=n>0?this.breakOffsets[n-1]:0;let s=this.breakOffsets[n]-t;return n>0&&(s+=this.wrappedTextIndentLength),s}getMaxOutputOffset(n){return this.getLineLength(n)}translateToInputOffset(n,t){n>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let s=n===0?t:this.breakOffsets[n-1]+t;if(this.injectionOffsets!==null)for(let r=0;r<this.injectionOffsets.length&&s>this.injectionOffsets[r];r++)s<this.injectionOffsets[r]+this.injectionOptions[r].content.length?s=this.injectionOffsets[r]:s-=this.injectionOptions[r].content.length;return s}translateToOutputPosition(n,t=2){let i=n;if(this.injectionOffsets!==null)for(let s=0;s<this.injectionOffsets.length&&!(n<this.injectionOffsets[s]||t!==1&&n===this.injectionOffsets[s]);s++)i+=this.injectionOptions[s].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(n,t=2){let i=0,s=this.breakOffsets.length-1,r=0,d=0;for(;i<=s;){r=i+(s-i)/2|0;const o=this.breakOffsets[r];if(d=r>0?this.breakOffsets[r-1]:0,t===0)if(n<=d)s=r-1;else if(n>o)i=r+1;else break;else if(n<d)s=r-1;else if(n>=o)i=r+1;else break}let h=n-d;return r>0&&(h+=this.wrappedTextIndentLength),new g(r,h)}normalizeOutputPosition(n,t,i){if(this.injectionOffsets!==null){const s=this.outputPositionToOffsetInInputWithInjections(n,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(s,i);if(r!==s)return this.offsetInInputWithInjectionsToOutputPosition(r,i)}if(i===0){if(n>0&&t===this.getMinOutputOffset(n))return new g(n-1,this.getMaxOutputOffset(n-1))}else if(i===1){const s=this.getOutputLineCount()-1;if(n<s&&t===this.getMaxOutputOffset(n))return new g(n+1,this.getMinOutputOffset(n+1))}return new g(n,t)}outputPositionToOffsetInInputWithInjections(n,t){return n>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(n>0?this.breakOffsets[n-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(n,t){const i=this.getInjectedTextAtOffset(n);if(!i)return n;if(t===2){if(n===i.offsetInInputWithInjections+i.length&&w(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let s=i.offsetInInputWithInjections;if(b(this.injectionOptions[i.injectedTextIndex].cursorStops))return s;let r=i.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[i.injectedTextIndex]&&!(w(this.injectionOptions[r].cursorStops)||(s-=this.injectionOptions[r].content.length,b(this.injectionOptions[r].cursorStops)));)r--;return s}}else if(t===1||t===4){let s=i.offsetInInputWithInjections+i.length,r=i.injectedTextIndex;for(;r+1<this.injectionOffsets.length&&this.injectionOffsets[r+1]===this.injectionOffsets[r];)s+=this.injectionOptions[r+1].content.length,r++;return s}else if(t===0||t===3){let s=i.offsetInInputWithInjections,r=i.injectedTextIndex;for(;r-1>=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)s-=this.injectionOptions[r-1].content.length,r--;return s}(0,_.assertNever)(t)}getInjectedText(n,t){const i=this.outputPositionToOffsetInInputWithInjections(n,t),s=this.getInjectedTextAtOffset(i);return s?{options:this.injectionOptions[s.injectedTextIndex]}:null}getInjectedTextAtOffset(n){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let s=0;for(let r=0;r<t.length;r++){const d=i[r].content.length,h=t[r]+s,o=t[r]+s+d;if(h>n)break;if(n<=o)return{injectedTextIndex:r,offsetInInputWithInjections:h,length:d};s+=d}}}}e.ModelLineProjectionData=E;function w(p){return p==null?!0:p===y.InjectedTextCursorStops.Right||p===y.InjectedTextCursorStops.Both}function b(p){return p==null?!0:p===y.InjectedTextCursorStops.Left||p===y.InjectedTextCursorStops.Both}class S{constructor(n){this.options=n}}e.InjectedText=S;class g{constructor(n,t){this.outputLineIndex=n,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(n){return new k.Position(n+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=g}),define(X[269],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DraggedTreeItemsIdentifier=e.TreeViewsDnDService=void 0;class _{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(E){if(E&&this._dragOperations.has(E)){const w=this._dragOperations.get(E);return this._dragOperations.delete(E),w}}}e.TreeViewsDnDService=_;class k{constructor(E){this.identifier=E}}e.DraggedTreeItemsIdentifier=k}),define(X[270],ee([1,0,5,175,9,85,139]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class b{static computeUnicodeHighlights(t,i,s){const r=s?s.startLineNumber:1,d=s?s.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 l=new k.Searcher(null,c),a=[];let u=!1,v,f=0,m=0,C=0;e:for(let L=r,D=d;L<=D;L++){const I=t.getLineContent(L),T=I.length;l.reset(0);do if(v=l.next(I),v){let O=v.index,R=v.index+v[0].length;if(O>0){const x=I.charCodeAt(O-1);y.isHighSurrogate(x)&&O--}if(R+1<T){const x=I.charCodeAt(R-1);y.isHighSurrogate(x)&&R++}const A=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(A,N?N.word:null);if(P!==0){P===3?f++:P===2?m++:P===1?C++:(0,E.assertNever)(P);const x=1e3;if(a.length>=x){u=!0;break e}a.push(new _.Range(L,O+1,L,R+1))}}while(v)}return{ranges:a,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(t,i){const s=new g(i);switch(s.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const d=t.codePointAt(0),h=s.ambiguousCharacters.getPrimaryConfusable(d),o=y.AmbiguousCharacters.getLocales().filter(c=>!y.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(n,t){return`[${y.escapeRegExpCharacters(n.map(s=>String.fromCodePoint(s)).join(""))}]`}class g{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=y.AmbiguousCharacters.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const i of y.InvisibleCharacters.codePoints)p(String.fromCodePoint(i))||t.add(i);if(this.options.ambiguousCharacters)for(const i of this.ambiguousCharacters.getConfusableCodePoints())t.add(i);for(const i of this.allowedCodePoints)t.delete(i);return t}shouldHighlightNonBasicASCII(t,i){const s=t.codePointAt(0);if(this.allowedCodePoints.has(s))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,d=!1;if(i)for(const h of i){const o=h.codePointAt(0),c=y.isBasicASCII(h);r=r||c,!c&&!this.ambiguousCharacters.isAmbiguous(o)&&!y.InvisibleCharacters.isInvisibleCharacter(o)&&(d=!0)}return!r&&d?0:this.options.invisibleCharacters&&!p(t)&&y.InvisibleCharacters.isInvisibleCharacter(s)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(s)?3:0}}function p(n){return n===" "||n===`
- `||n===" "}}),define(X[199],ee([1,0]),function(K,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(M){M[M.Unknown=0]="Unknown",M[M.Disabled=1]="Disabled",M[M.Enabled=2]="Enabled"})(_||(e.AccessibilitySupport=_={}));var k;(function(M){M[M.Invoke=1]="Invoke",M[M.Auto=2]="Auto"})(k||(e.CodeActionTriggerType=k={}));var y;(function(M){M[M.None=0]="None",M[M.KeepWhitespace=1]="KeepWhitespace",M[M.InsertAsSnippet=4]="InsertAsSnippet"})(y||(e.CompletionItemInsertTextRule=y={}));var E;(function(M){M[M.Method=0]="Method",M[M.Function=1]="Function",M[M.Constructor=2]="Constructor",M[M.Field=3]="Field",M[M.Variable=4]="Variable",M[M.Class=5]="Class",M[M.Struct=6]="Struct",M[M.Interface=7]="Interface",M[M.Module=8]="Module",M[M.Property=9]="Property",M[M.Event=10]="Event",M[M.Operator=11]="Operator",M[M.Unit=12]="Unit",M[M.Value=13]="Value",M[M.Constant=14]="Constant",M[M.Enum=15]="Enum",M[M.EnumMember=16]="EnumMember",M[M.Keyword=17]="Keyword",M[M.Text=18]="Text",M[M.Color=19]="Color",M[M.File=20]="File",M[M.Reference=21]="Reference",M[M.Customcolor=22]="Customcolor",M[M.Folder=23]="Folder",M[M.TypeParameter=24]="TypeParameter",M[M.User=25]="User",M[M.Issue=26]="Issue",M[M.Snippet=27]="Snippet"})(E||(e.CompletionItemKind=E={}));var w;(function(M){M[M.Deprecated=1]="Deprecated"})(w||(e.CompletionItemTag=w={}));var b;(function(M){M[M.Invoke=0]="Invoke",M[M.TriggerCharacter=1]="TriggerCharacter",M[M.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(b||(e.CompletionTriggerKind=b={}));var S;(function(M){M[M.EXACT=0]="EXACT",M[M.ABOVE=1]="ABOVE",M[M.BELOW=2]="BELOW"})(S||(e.ContentWidgetPositionPreference=S={}));var g;(function(M){M[M.NotSet=0]="NotSet",M[M.ContentFlush=1]="ContentFlush",M[M.RecoverFromMarkers=2]="RecoverFromMarkers",M[M.Explicit=3]="Explicit",M[M.Paste=4]="Paste",M[M.Undo=5]="Undo",M[M.Redo=6]="Redo"})(g||(e.CursorChangeReason=g={}));var p;(function(M){M[M.LF=1]="LF",M[M.CRLF=2]="CRLF"})(p||(e.DefaultEndOfLine=p={}));var n;(function(M){M[M.Text=0]="Text",M[M.Read=1]="Read",M[M.Write=2]="Write"})(n||(e.DocumentHighlightKind=n={}));var t;(function(M){M[M.None=0]="None",M[M.Keep=1]="Keep",M[M.Brackets=2]="Brackets",M[M.Advanced=3]="Advanced",M[M.Full=4]="Full"})(t||(e.EditorAutoIndentStrategy=t={}));var i;(function(M){M[M.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",M[M.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",M[M.accessibilitySupport=2]="accessibilitySupport",M[M.accessibilityPageSize=3]="accessibilityPageSize",M[M.ariaLabel=4]="ariaLabel",M[M.autoClosingBrackets=5]="autoClosingBrackets",M[M.screenReaderAnnounceInlineSuggestion=6]="screenReaderAnnounceInlineSuggestion",M[M.autoClosingDelete=7]="autoClosingDelete",M[M.autoClosingOvertype=8]="autoClosingOvertype",M[M.autoClosingQuotes=9]="autoClosingQuotes",M[M.autoIndent=10]="autoIndent",M[M.automaticLayout=11]="automaticLayout",M[M.autoSurround=12]="autoSurround",M[M.bracketPairColorization=13]="bracketPairColorization",M[M.guides=14]="guides",M[M.codeLens=15]="codeLens",M[M.codeLensFontFamily=16]="codeLensFontFamily",M[M.codeLensFontSize=17]="codeLensFontSize",M[M.colorDecorators=18]="colorDecorators",M[M.colorDecoratorsLimit=19]="colorDecoratorsLimit",M[M.columnSelection=20]="columnSelection",M[M.comments=21]="comments",M[M.contextmenu=22]="contextmenu",M[M.copyWithSyntaxHighlighting=23]="copyWithSyntaxHighlighting",M[M.cursorBlinking=24]="cursorBlinking",M[M.cursorSmoothCaretAnimation=25]="cursorSmoothCaretAnimation",M[M.cursorStyle=26]="cursorStyle",M[M.cursorSurroundingLines=27]="cursorSurroundingLines",M[M.cursorSurroundingLinesStyle=28]="cursorSurroundingLinesStyle",M[M.cursorWidth=29]="cursorWidth",M[M.disableLayerHinting=30]="disableLayerHinting",M[M.disableMonospaceOptimizations=31]="disableMonospaceOptimizations",M[M.domReadOnly=32]="domReadOnly",M[M.dragAndDrop=33]="dragAndDrop",M[M.dropIntoEditor=34]="dropIntoEditor",M[M.emptySelectionClipboard=35]="emptySelectionClipboard",M[M.experimentalWhitespaceRendering=36]="experimentalWhitespaceRendering",M[M.extraEditorClassName=37]="extraEditorClassName",M[M.fastScrollSensitivity=38]="fastScrollSensitivity",M[M.find=39]="find",M[M.fixedOverflowWidgets=40]="fixedOverflowWidgets",M[M.folding=41]="folding",M[M.foldingStrategy=42]="foldingStrategy",M[M.foldingHighlight=43]="foldingHighlight",M[M.foldingImportsByDefault=44]="foldingImportsByDefault",M[M.foldingMaximumRegions=45]="foldingMaximumRegions",M[M.unfoldOnClickAfterEndOfLine=46]="unfoldOnClickAfterEndOfLine",M[M.fontFamily=47]="fontFamily",M[M.fontInfo=48]="fontInfo",M[M.fontLigatures=49]="fontLigatures",M[M.fontSize=50]="fontSize",M[M.fontWeight=51]="fontWeight",M[M.fontVariations=52]="fontVariations",M[M.formatOnPaste=53]="formatOnPaste",M[M.formatOnType=54]="formatOnType",M[M.glyphMargin=55]="glyphMargin",M[M.gotoLocation=56]="gotoLocation",M[M.hideCursorInOverviewRuler=57]="hideCursorInOverviewRuler",M[M.hover=58]="hover",M[M.inDiffEditor=59]="inDiffEditor",M[M.inlineSuggest=60]="inlineSuggest",M[M.letterSpacing=61]="letterSpacing",M[M.lightbulb=62]="lightbulb",M[M.lineDecorationsWidth=63]="lineDecorationsWidth",M[M.lineHeight=64]="lineHeight",M[M.lineNumbers=65]="lineNumbers",M[M.lineNumbersMinChars=66]="lineNumbersMinChars",M[M.linkedEditing=67]="linkedEditing",M[M.links=68]="links",M[M.matchBrackets=69]="matchBrackets",M[M.minimap=70]="minimap",M[M.mouseStyle=71]="mouseStyle",M[M.mouseWheelScrollSensitivity=72]="mouseWheelScrollSensitivity",M[M.mouseWheelZoom=73]="mouseWheelZoom",M[M.multiCursorMergeOverlapping=74]="multiCursorMergeOverlapping",M[M.multiCursorModifier=75]="multiCursorModifier",M[M.multiCursorPaste=76]="multiCursorPaste",M[M.multiCursorLimit=77]="multiCursorLimit",M[M.occurrencesHighlight=78]="occurrencesHighlight",M[M.overviewRulerBorder=79]="overviewRulerBorder",M[M.overviewRulerLanes=80]="overviewRulerLanes",M[M.padding=81]="padding",M[M.parameterHints=82]="parameterHints",M[M.peekWidgetDefaultFocus=83]="peekWidgetDefaultFocus",M[M.definitionLinkOpensInPeek=84]="definitionLinkOpensInPeek",M[M.quickSuggestions=85]="quickSuggestions",M[M.quickSuggestionsDelay=86]="quickSuggestionsDelay",M[M.readOnly=87]="readOnly",M[M.renameOnType=88]="renameOnType",M[M.renderControlCharacters=89]="renderControlCharacters",M[M.renderFinalNewline=90]="renderFinalNewline",M[M.renderLineHighlight=91]="renderLineHighlight",M[M.renderLineHighlightOnlyWhenFocus=92]="renderLineHighlightOnlyWhenFocus",M[M.renderValidationDecorations=93]="renderValidationDecorations",M[M.renderWhitespace=94]="renderWhitespace",M[M.revealHorizontalRightPadding=95]="revealHorizontalRightPadding",M[M.roundedSelection=96]="roundedSelection",M[M.rulers=97]="rulers",M[M.scrollbar=98]="scrollbar",M[M.scrollBeyondLastColumn=99]="scrollBeyondLastColumn",M[M.scrollBeyondLastLine=100]="scrollBeyondLastLine",M[M.scrollPredominantAxis=101]="scrollPredominantAxis",M[M.selectionClipboard=102]="selectionClipboard",M[M.selectionHighlight=103]="selectionHighlight",M[M.selectOnLineNumbers=104]="selectOnLineNumbers",M[M.showFoldingControls=105]="showFoldingControls",M[M.showUnused=106]="showUnused",M[M.snippetSuggestions=107]="snippetSuggestions",M[M.smartSelect=108]="smartSelect",M[M.smoothScrolling=109]="smoothScrolling",M[M.stickyScroll=110]="stickyScroll",M[M.stickyTabStops=111]="stickyTabStops",M[M.stopRenderingLineAfter=112]="stopRenderingLineAfter",M[M.suggest=113]="suggest",M[M.suggestFontSize=114]="suggestFontSize",M[M.suggestLineHeight=115]="suggestLineHeight",M[M.suggestOnTriggerCharacters=116]="suggestOnTriggerCharacters",M[M.suggestSelection=117]="suggestSelection",M[M.tabCompletion=118]="tabCompletion",M[M.tabIndex=119]="tabIndex",M[M.unicodeHighlighting=120]="unicodeHighlighting",M[M.unusualLineTerminators=121]="unusualLineTerminators",M[M.useShadowDOM=122]="useShadowDOM",M[M.useTabStops=123]="useTabStops",M[M.wordBreak=124]="wordBreak",M[M.wordSeparators=125]="wordSeparators",M[M.wordWrap=126]="wordWrap",M[M.wordWrapBreakAfterCharacters=127]="wordWrapBreakAfterCharacters",M[M.wordWrapBreakBeforeCharacters=128]="wordWrapBreakBeforeCharacters",M[M.wordWrapColumn=129]="wordWrapColumn",M[M.wordWrapOverride1=130]="wordWrapOverride1",M[M.wordWrapOverride2=131]="wordWrapOverride2",M[M.wrappingIndent=132]="wrappingIndent",M[M.wrappingStrategy=133]="wrappingStrategy",M[M.showDeprecated=134]="showDeprecated",M[M.inlayHints=135]="inlayHints",M[M.editorClassName=136]="editorClassName",M[M.pixelRatio=137]="pixelRatio",M[M.tabFocusMode=138]="tabFocusMode",M[M.layoutInfo=139]="layoutInfo",M[M.wrappingInfo=140]="wrappingInfo",M[M.defaultColorDecorators=141]="defaultColorDecorators"})(i||(e.EditorOption=i={}));var s;(function(M){M[M.TextDefined=0]="TextDefined",M[M.LF=1]="LF",M[M.CRLF=2]="CRLF"})(s||(e.EndOfLinePreference=s={}));var r;(function(M){M[M.LF=0]="LF",M[M.CRLF=1]="CRLF"})(r||(e.EndOfLineSequence=r={}));var d;(function(M){M[M.Left=1]="Left",M[M.Right=2]="Right"})(d||(e.GlyphMarginLane=d={}));var h;(function(M){M[M.None=0]="None",M[M.Indent=1]="Indent",M[M.IndentOutdent=2]="IndentOutdent",M[M.Outdent=3]="Outdent"})(h||(e.IndentAction=h={}));var o;(function(M){M[M.Both=0]="Both",M[M.Right=1]="Right",M[M.Left=2]="Left",M[M.None=3]="None"})(o||(e.InjectedTextCursorStops=o={}));var c;(function(M){M[M.Type=1]="Type",M[M.Parameter=2]="Parameter"})(c||(e.InlayHintKind=c={}));var l;(function(M){M[M.Automatic=0]="Automatic",M[M.Explicit=1]="Explicit"})(l||(e.InlineCompletionTriggerKind=l={}));var a;(function(M){M[M.DependsOnKbLayout=-1]="DependsOnKbLayout",M[M.Unknown=0]="Unknown",M[M.Backspace=1]="Backspace",M[M.Tab=2]="Tab",M[M.Enter=3]="Enter",M[M.Shift=4]="Shift",M[M.Ctrl=5]="Ctrl",M[M.Alt=6]="Alt",M[M.PauseBreak=7]="PauseBreak",M[M.CapsLock=8]="CapsLock",M[M.Escape=9]="Escape",M[M.Space=10]="Space",M[M.PageUp=11]="PageUp",M[M.PageDown=12]="PageDown",M[M.End=13]="End",M[M.Home=14]="Home",M[M.LeftArrow=15]="LeftArrow",M[M.UpArrow=16]="UpArrow",M[M.RightArrow=17]="RightArrow",M[M.DownArrow=18]="DownArrow",M[M.Insert=19]="Insert",M[M.Delete=20]="Delete",M[M.Digit0=21]="Digit0",M[M.Digit1=22]="Digit1",M[M.Digit2=23]="Digit2",M[M.Digit3=24]="Digit3",M[M.Digit4=25]="Digit4",M[M.Digit5=26]="Digit5",M[M.Digit6=27]="Digit6",M[M.Digit7=28]="Digit7",M[M.Digit8=29]="Digit8",M[M.Digit9=30]="Digit9",M[M.KeyA=31]="KeyA",M[M.KeyB=32]="KeyB",M[M.KeyC=33]="KeyC",M[M.KeyD=34]="KeyD",M[M.KeyE=35]="KeyE",M[M.KeyF=36]="KeyF",M[M.KeyG=37]="KeyG",M[M.KeyH=38]="KeyH",M[M.KeyI=39]="KeyI",M[M.KeyJ=40]="KeyJ",M[M.KeyK=41]="KeyK",M[M.KeyL=42]="KeyL",M[M.KeyM=43]="KeyM",M[M.KeyN=44]="KeyN",M[M.KeyO=45]="KeyO",M[M.KeyP=46]="KeyP",M[M.KeyQ=47]="KeyQ",M[M.KeyR=48]="KeyR",M[M.KeyS=49]="KeyS",M[M.KeyT=50]="KeyT",M[M.KeyU=51]="KeyU",M[M.KeyV=52]="KeyV",M[M.KeyW=53]="KeyW",M[M.KeyX=54]="KeyX",M[M.KeyY=55]="KeyY",M[M.KeyZ=56]="KeyZ",M[M.Meta=57]="Meta",M[M.ContextMenu=58]="ContextMenu",M[M.F1=59]="F1",M[M.F2=60]="F2",M[M.F3=61]="F3",M[M.F4=62]="F4",M[M.F5=63]="F5",M[M.F6=64]="F6",M[M.F7=65]="F7",M[M.F8=66]="F8",M[M.F9=67]="F9",M[M.F10=68]="F10",M[M.F11=69]="F11",M[M.F12=70]="F12",M[M.F13=71]="F13",M[M.F14=72]="F14",M[M.F15=73]="F15",M[M.F16=74]="F16",M[M.F17=75]="F17",M[M.F18=76]="F18",M[M.F19=77]="F19",M[M.F20=78]="F20",M[M.F21=79]="F21",M[M.F22=80]="F22",M[M.F23=81]="F23",M[M.F24=82]="F24",M[M.NumLock=83]="NumLock",M[M.ScrollLock=84]="ScrollLock",M[M.Semicolon=85]="Semicolon",M[M.Equal=86]="Equal",M[M.Comma=87]="Comma",M[M.Minus=88]="Minus",M[M.Period=89]="Period",M[M.Slash=90]="Slash",M[M.Backquote=91]="Backquote",M[M.BracketLeft=92]="BracketLeft",M[M.Backslash=93]="Backslash",M[M.BracketRight=94]="BracketRight",M[M.Quote=95]="Quote",M[M.OEM_8=96]="OEM_8",M[M.IntlBackslash=97]="IntlBackslash",M[M.Numpad0=98]="Numpad0",M[M.Numpad1=99]="Numpad1",M[M.Numpad2=100]="Numpad2",M[M.Numpad3=101]="Numpad3",M[M.Numpad4=102]="Numpad4",M[M.Numpad5=103]="Numpad5",M[M.Numpad6=104]="Numpad6",M[M.Numpad7=105]="Numpad7",M[M.Numpad8=106]="Numpad8",M[M.Numpad9=107]="Numpad9",M[M.NumpadMultiply=108]="NumpadMultiply",M[M.NumpadAdd=109]="NumpadAdd",M[M.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",M[M.NumpadSubtract=111]="NumpadSubtract",M[M.NumpadDecimal=112]="NumpadDecimal",M[M.NumpadDivide=113]="NumpadDivide",M[M.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",M[M.ABNT_C1=115]="ABNT_C1",M[M.ABNT_C2=116]="ABNT_C2",M[M.AudioVolumeMute=117]="AudioVolumeMute",M[M.AudioVolumeUp=118]="AudioVolumeUp",M[M.AudioVolumeDown=119]="AudioVolumeDown",M[M.BrowserSearch=120]="BrowserSearch",M[M.BrowserHome=121]="BrowserHome",M[M.BrowserBack=122]="BrowserBack",M[M.BrowserForward=123]="BrowserForward",M[M.MediaTrackNext=124]="MediaTrackNext",M[M.MediaTrackPrevious=125]="MediaTrackPrevious",M[M.MediaStop=126]="MediaStop",M[M.MediaPlayPause=127]="MediaPlayPause",M[M.LaunchMediaPlayer=128]="LaunchMediaPlayer",M[M.LaunchMail=129]="LaunchMail",M[M.LaunchApp2=130]="LaunchApp2",M[M.Clear=131]="Clear",M[M.MAX_VALUE=132]="MAX_VALUE"})(a||(e.KeyCode=a={}));var u;(function(M){M[M.Hint=1]="Hint",M[M.Info=2]="Info",M[M.Warning=4]="Warning",M[M.Error=8]="Error"})(u||(e.MarkerSeverity=u={}));var v;(function(M){M[M.Unnecessary=1]="Unnecessary",M[M.Deprecated=2]="Deprecated"})(v||(e.MarkerTag=v={}));var f;(function(M){M[M.Inline=1]="Inline",M[M.Gutter=2]="Gutter"})(f||(e.MinimapPosition=f={}));var m;(function(M){M[M.UNKNOWN=0]="UNKNOWN",M[M.TEXTAREA=1]="TEXTAREA",M[M.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",M[M.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",M[M.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",M[M.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",M[M.CONTENT_TEXT=6]="CONTENT_TEXT",M[M.CONTENT_EMPTY=7]="CONTENT_EMPTY",M[M.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",M[M.CONTENT_WIDGET=9]="CONTENT_WIDGET",M[M.OVERVIEW_RULER=10]="OVERVIEW_RULER",M[M.SCROLLBAR=11]="SCROLLBAR",M[M.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",M[M.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(m||(e.MouseTargetType=m={}));var C;(function(M){M[M.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",M[M.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",M[M.TOP_CENTER=2]="TOP_CENTER"})(C||(e.OverlayWidgetPositionPreference=C={}));var L;(function(M){M[M.Left=1]="Left",M[M.Center=2]="Center",M[M.Right=4]="Right",M[M.Full=7]="Full"})(L||(e.OverviewRulerLane=L={}));var D;(function(M){M[M.Left=0]="Left",M[M.Right=1]="Right",M[M.None=2]="None",M[M.LeftOfInjectedText=3]="LeftOfInjectedText",M[M.RightOfInjectedText=4]="RightOfInjectedText"})(D||(e.PositionAffinity=D={}));var I;(function(M){M[M.Off=0]="Off",M[M.On=1]="On",M[M.Relative=2]="Relative",M[M.Interval=3]="Interval",M[M.Custom=4]="Custom"})(I||(e.RenderLineNumbersType=I={}));var T;(function(M){M[M.None=0]="None",M[M.Text=1]="Text",M[M.Blocks=2]="Blocks"})(T||(e.RenderMinimap=T={}));var O;(function(M){M[M.Smooth=0]="Smooth",M[M.Immediate=1]="Immediate"})(O||(e.ScrollType=O={}));var R;(function(M){M[M.Auto=1]="Auto",M[M.Hidden=2]="Hidden",M[M.Visible=3]="Visible"})(R||(e.ScrollbarVisibility=R={}));var A;(function(M){M[M.LTR=0]="LTR",M[M.RTL=1]="RTL"})(A||(e.SelectionDirection=A={}));var N;(function(M){M[M.Invoke=1]="Invoke",M[M.TriggerCharacter=2]="TriggerCharacter",M[M.ContentChange=3]="ContentChange"})(N||(e.SignatureHelpTriggerKind=N={}));var P;(function(M){M[M.File=0]="File",M[M.Module=1]="Module",M[M.Namespace=2]="Namespace",M[M.Package=3]="Package",M[M.Class=4]="Class",M[M.Method=5]="Method",M[M.Property=6]="Property",M[M.Field=7]="Field",M[M.Constructor=8]="Constructor",M[M.Enum=9]="Enum",M[M.Interface=10]="Interface",M[M.Function=11]="Function",M[M.Variable=12]="Variable",M[M.Constant=13]="Constant",M[M.String=14]="String",M[M.Number=15]="Number",M[M.Boolean=16]="Boolean",M[M.Array=17]="Array",M[M.Object=18]="Object",M[M.Key=19]="Key",M[M.Null=20]="Null",M[M.EnumMember=21]="EnumMember",M[M.Struct=22]="Struct",M[M.Event=23]="Event",M[M.Operator=24]="Operator",M[M.TypeParameter=25]="TypeParameter"})(P||(e.SymbolKind=P={}));var x;(function(M){M[M.Deprecated=1]="Deprecated"})(x||(e.SymbolTag=x={}));var F;(function(M){M[M.Hidden=0]="Hidden",M[M.Blink=1]="Blink",M[M.Smooth=2]="Smooth",M[M.Phase=3]="Phase",M[M.Expand=4]="Expand",M[M.Solid=5]="Solid"})(F||(e.TextEditorCursorBlinkingStyle=F={}));var B;(function(M){M[M.Line=1]="Line",M[M.Block=2]="Block",M[M.Underline=3]="Underline",M[M.LineThin=4]="LineThin",M[M.BlockOutline=5]="BlockOutline",M[M.UnderlineThin=6]="UnderlineThin"})(B||(e.TextEditorCursorStyle=B={}));var V;(function(M){M[M.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",M[M.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",M[M.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",M[M.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(V||(e.TrackedRangeStickiness=V={}));var $;(function(M){M[M.None=0]="None",M[M.Same=1]="Same",M[M.Indent=2]="Indent",M[M.DeepIndent=3]="DeepIndent"})($||(e.WrappingIndent=$={}))}),define(X[495],ee([1,0]),function(K,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,p,n){this.range=w,this.openingBracketRange=b,this.closingBracketRange=S,this.nestingLevel=g,this.nestingLevelOfEqualBracketType=p,this.bracketPairNode=n}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}e.BracketPairInfo=k;class y extends k{constructor(w,b,S,g,p,n,t){super(w,b,S,g,p,n),this.minVisibleColumnIndentation=t}}e.BracketPairWithMinIndentationInfo=y}),define(X[106],ee([1,0]),function(K,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 s="",r=0;for(const d of i)s+=t.substring(r,d.column-1),r=d.column-1,s+=d.options.content;return s+=t.substring(r),s}static fromDecorations(t){const i=[];for(const s of t)s.options.before&&s.options.before.content.length>0&&i.push(new k(s.ownerId,s.range.startLineNumber,s.range.startColumn,s.options.before,0)),s.options.after&&s.options.after.content.length>0&&i.push(new k(s.ownerId,s.range.endLineNumber,s.range.endColumn,s.options.after,1));return i.sort((s,r)=>s.lineNumber===r.lineNumber?s.column===r.column?s.order-r.order:s.column-r.column:s.lineNumber-r.lineNumber),i}constructor(t,i,s,r,d){this.ownerId=t,this.lineNumber=i,this.column=s,this.options=r,this.order=d}}e.LineInjectedText=k;class y{constructor(t,i,s){this.changeType=2,this.lineNumber=t,this.detail=i,this.injectedText=s}}e.ModelRawLineChanged=y;class E{constructor(t,i){this.changeType=3,this.fromLineNumber=t,this.toLineNumber=i}}e.ModelRawLinesDeleted=E;class w{constructor(t,i,s,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=t,this.toLineNumber=i,this.detail=s}}e.ModelRawLinesInserted=w;class b{constructor(){this.changeType=5}}e.ModelRawEOLChanged=b;class S{constructor(t,i,s,r){this.changes=t,this.versionId=i,this.isUndoing=s,this.isRedoing=r,this.resultingSelection=null}containsEvent(t){for(let i=0,s=this.changes.length;i<s;i++)if(this.changes[i].changeType===t)return!0;return!1}static merge(t,i){const s=[].concat(t.changes).concat(i.changes),r=i.versionId,d=t.isUndoing||i.isUndoing,h=t.isRedoing||i.isRedoing;return new S(s,r,d,h)}}e.ModelRawContentChangedEvent=S;class g{constructor(t){this.changes=t}}e.ModelInjectedTextChangedEvent=g;class p{constructor(t,i){this.rawContentChangedEvent=t,this.contentChangedEvent=i}merge(t){const i=S.merge(this.rawContentChangedEvent,t.rawContentChangedEvent),s=p._mergeChangeEvents(this.contentChangedEvent,t.contentChangedEvent);return new p(i,s)}static _mergeChangeEvents(t,i){const s=[].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,l=t.isEolChange&&i.isEolChange;return{changes:s,eol:r,isEolChange:l,versionId:d,isUndoing:h,isRedoing:o,isFlush:c}}}e.InternalModelContentChangeEvent=p}),define(X[200],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var _;(function(E){E[E.Disabled=0]="Disabled",E[E.EnabledForActive=1]="EnabledForActive",E[E.Enabled=2]="Enabled"})(_||(e.HorizontalGuidesState=_={}));class k{constructor(w,b,S,g,p,n){if(this.visibleColumn=w,this.column=b,this.className=S,this.horizontalLine=g,this.forWrappedLinesAfterColumn=p,this.forWrappedLinesBeforeOrAtColumn=n,w!==-1==(b!==-1))throw new Error}}e.IndentGuide=k;class y{constructor(w,b){this.top=w,this.endColumn=b}}e.IndentGuideHorizontalLine=y}),define(X[271],ee([1,0,16,9,76,5,266,198,200]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class g extends w.TextModelPart{constructor(t,i){super(),this.textModel=t,this.languageConfigurationService=i}getLanguageConfiguration(t){return this.languageConfigurationService.getLanguageConfiguration(t)}_computeIndentLevel(t){return(0,b.computeIndentLevel)(this.textModel.getLineContent(t+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(t,i,s){this.assertNotDisposed();const r=this.textModel.getLineCount();if(t<1||t>r)throw new Error("Illegal value for lineNumber");const d=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,h=!!(d&&d.offSide);let o=-2,c=-1,l=-2,a=-1;const u=N=>{if(o!==-1&&(o===-2||o>N-1)){o=-1,c=-1;for(let P=N-2;P>=0;P--){const x=this._computeIndentLevel(P);if(x>=0){o=P,c=x;break}}}if(l===-2){l=-1,a=-1;for(let P=N;P<r;P++){const x=this._computeIndentLevel(P);if(x>=0){l=P,a=x;break}}}};let v=-2,f=-1,m=-2,C=-1;const L=N=>{if(v===-2){v=-1,f=-1;for(let P=N-2;P>=0;P--){const x=this._computeIndentLevel(P);if(x>=0){v=P,f=x;break}}}if(m!==-1&&(m===-2||m<N-1)){m=-1,C=-1;for(let P=N;P<r;P++){const x=this._computeIndentLevel(P);if(x>=0){m=P,C=x;break}}}};let D=0,I=!0,T=0,O=!0,R=0,A=0;for(let N=0;I||O;N++){const P=t-N,x=t+N;N>1&&(P<1||P<i)&&(I=!1),N>1&&(x>r||x>s)&&(O=!1),N>5e4&&(I=!1,O=!1);let F=-1;if(I&&P>=1){const V=this._computeIndentLevel(P-1);V>=0?(l=P-1,a=V,F=Math.ceil(V/this.textModel.getOptions().indentSize)):(u(P),F=this._getIndentLevelForWhitespaceLine(h,c,a))}let B=-1;if(O&&x<=r){const V=this._computeIndentLevel(x-1);V>=0?(v=x-1,f=V,B=Math.ceil(V/this.textModel.getOptions().indentSize)):(L(x),B=this._getIndentLevelForWhitespaceLine(h,f,C))}if(N===0){A=F;continue}if(N===1){if(x<=r&&B>=0&&A+1===B){I=!1,D=x,T=x,R=B;continue}if(P>=1&&F>=0&&F-1===A){O=!1,D=P,T=P,R=F;continue}if(D=t,T=t,R=A,R===0)return{startLineNumber:D,endLineNumber:T,indent:R}}I&&(F>=R?D=P:I=!1),O&&(B>=R?T=x:O=!1)}return{startLineNumber:D,endLineNumber:T,indent:R}}getLinesBracketGuides(t,i,s,r){var d;const h=[];for(let v=t;v<=i;v++)h.push([]);const o=!0,c=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new E.Range(t,1,i,this.textModel.getLineMaxColumn(i))).toArray();let l;if(s&&c.length>0){const v=(t<=s.lineNumber&&s.lineNumber<=i?c:this.textModel.bracketPairs.getBracketPairsInRange(E.Range.fromPositions(s)).toArray()).filter(f=>E.Range.strictContainsPosition(f.range,s));l=(d=(0,_.findLast)(v,f=>o||f.range.startLineNumber!==f.range.endLineNumber))===null||d===void 0?void 0:d.range}const a=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new p;for(const v of c){if(!v.closingBracketRange)continue;const f=l&&v.range.equalsRange(l);if(!f&&!r.includeInactive)continue;const m=u.getInlineClassName(v.nestingLevel,v.nestingLevelOfEqualBracketType,a)+(r.highlightActive&&f?" "+u.activeClassName:""),C=v.openingBracketRange.getStartPosition(),L=v.closingBracketRange.getStartPosition(),D=r.horizontalGuides===S.HorizontalGuidesState.Enabled||r.horizontalGuides===S.HorizontalGuidesState.EnabledForActive&&f;if(v.range.startLineNumber===v.range.endLineNumber){o&&D&&h[v.range.startLineNumber-t].push(new S.IndentGuide(-1,v.openingBracketRange.getEndPosition().column,m,new S.IndentGuideHorizontalLine(!1,L.column),-1,-1));continue}const I=this.getVisibleColumnFromPosition(L),T=this.getVisibleColumnFromPosition(v.openingBracketRange.getStartPosition()),O=Math.min(T,I,v.minVisibleColumnIndentation+1);let R=!1;k.firstNonWhitespaceIndex(this.textModel.getLineContent(v.closingBracketRange.startLineNumber))<v.closingBracketRange.startColumn-1&&(R=!0);const P=Math.max(C.lineNumber,t),x=Math.min(L.lineNumber,i),F=R?1:0;for(let B=P;B<x+F;B++)h[B-t].push(new S.IndentGuide(O,-1,m,null,B===C.lineNumber?C.column:-1,B===L.lineNumber?L.column:-1));D&&(C.lineNumber>=t&&T>O&&h[C.lineNumber-t].push(new S.IndentGuide(O,-1,m,new S.IndentGuideHorizontalLine(!1,C.column),-1,-1)),L.lineNumber<=i&&I>O&&h[L.lineNumber-t].push(new S.IndentGuide(O,-1,m,new S.IndentGuideHorizontalLine(!R,L.column),-1,-1)))}for(const v of h)v.sort((f,m)=>f.visibleColumn-m.visibleColumn);return h}getVisibleColumnFromPosition(t){return y.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(t.lineNumber),t.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(t,i){this.assertNotDisposed();const s=this.textModel.getLineCount();if(t<1||t>s)throw new Error("Illegal value for startLineNumber");if(i<1||i>s)throw new Error("Illegal value for endLineNumber");const r=this.textModel.getOptions(),d=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,h=!!(d&&d.offSide),o=new Array(i-t+1);let c=-2,l=-1,a=-2,u=-1;for(let v=t;v<=i;v++){const f=v-t,m=this._computeIndentLevel(v-1);if(m>=0){c=v-1,l=m,o[f]=Math.ceil(m/r.indentSize);continue}if(c===-2){c=-1,l=-1;for(let C=v-2;C>=0;C--){const L=this._computeIndentLevel(C);if(L>=0){c=C,l=L;break}}}if(a!==-1&&(a===-2||a<v-1)){a=-1,u=-1;for(let C=v;C<s;C++){const L=this._computeIndentLevel(C);if(L>=0){a=C,u=L;break}}}o[f]=this._getIndentLevelForWhitespaceLine(h,l,u)}return o}_getIndentLevelForWhitespaceLine(t,i,s){const r=this.textModel.getOptions();return i===-1||s===-1?0:i<s?1+Math.floor(i/r.indentSize):i===s||t?Math.ceil(s/r.indentSize):1+Math.floor(s/r.indentSize)}}e.GuidesTextModelPart=g;class p{constructor(){this.activeClassName="indent-active"}getInlineClassName(t,i,s){return this.getInlineClassNameOfLevel(s?i:t)}getInlineClassNameOfLevel(t){return`bracket-indent-guide lvl-${t%30}`}}e.BracketPairGuidesClassNames=p}),define(X[496],ee([1,0]),function(K,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(y,E){this._startLineNumber=y,this._tokens=E}getLineTokens(y){return this._tokens[y-this._startLineNumber]}appendLineTokens(y){this._tokens.push(y)}}e.ContiguousMultilineTokens=_}),define(X[272],ee([1,0,496]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class k{constructor(){this._tokens=[]}add(E,w){if(this._tokens.length>0){const b=this._tokens[this._tokens.length-1];if(b.endLineNumber+1===E){b.appendLineTokens(w);return}}this._tokens.push(new _.ContiguousMultilineTokens(E,[w]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=k}),define(X[87],ee([1,0,120]),function(K,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,p=g+(S<<1);for(let n=g;n<p;n++)if(this._tokens[n]!==w._tokens[n])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(w){return w>0?this._tokens[w-1<<1]:0}getMetadata(w){return this._tokens[(w<<1)+1]}getLanguageId(w){const b=this._tokens[(w<<1)+1],S=_.TokenMetadata.getLanguageId(b);return this._languageIdCodec.decodeLanguageId(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 y(this,w,b,S)}static convertToEndOffset(w,b){const g=(w.length>>>1)-1;for(let p=0;p<g;p++)w[p<<1]=w[p+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 p=S+Math.floor((g-S)/2),n=w[p<<1];if(n===b)return p+1;n<b?S=p+1:n>b&&(g=p)}return S}withInserted(w){if(w.length===0)return this;let b=0,S=0,g="";const p=new Array;let n=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(n,t);const s=this._tokens[(b<<1)+1];p.push(g.length,s),b++,n=t}else if(i){if(i.offset>n){g+=this._text.substring(n,i.offset);const s=this._tokens[(b<<1)+1];p.push(g.length,s),n=i.offset}g+=i.text,p.push(g.length,i.tokenMetadata),S++}else break}return new k(new Uint32Array(p),g,this._languageIdCodec)}}e.LineTokens=k,k.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;class y{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 p=this._firstTokenIndex,n=w.getCount();p<n&&!(w.getStartOffset(p)>=S);p++)this._tokensCount++}getMetadata(w){return this._source.getMetadata(this._firstTokenIndex+w)}getLanguageId(w){return this._source.getLanguageId(this._firstTokenIndex+w)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(w){return w instanceof y?this._startOffset===w._startOffset&&this._endOffset===w._endOffset&&this._deltaOffset===w._deltaOffset&&this._source.slicedEquals(w._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(w){return this._source.getForeground(this._firstTokenIndex+w)}getEndOffset(w){const b=this._source.getEndOffset(this._firstTokenIndex+w);return Math.min(this._endOffset,b)-this._startOffset+this._deltaOffset}getClassName(w){return this._source.getClassName(this._firstTokenIndex+w)}getInlineStyle(w,b){return this._source.getInlineStyle(this._firstTokenIndex+w,b)}getPresentation(w){return this._source.getPresentation(this._firstTokenIndex+w)}findTokenIndexAtOffset(w){return this._source.findTokenIndexAtOffset(w+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(X[497],ee([1,0,87]),function(K,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=y(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=y(w),p=g.length>>>1;if(b===0&&g[g.length-2]===S)return e.EMPTY_LINE_TOKENS;const n=_.LineTokens.findIndexInTokensArray(g,b),t=n>0?g[n-1<<1]:0,i=g[n<<1];if(S<i){const o=S-b;for(let c=n;c<p;c++)g[c<<1]-=o;return w}let s,r;t!==b?(g[n<<1]=b,s=n+1<<1,r=b):(s=n<<1,r=t);const d=S-b;for(let o=n+1;o<p;o++){const c=g[o<<1]-d;c>r&&(g[s++]=c,g[s++]=g[(o<<1)+1],r=c)}if(s===g.length)return w;const h=new Uint32Array(s);return h.set(g.subarray(0,s),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=y(w),g=y(b),p=g.length>>>1,n=new Uint32Array(S.length+g.length);n.set(S,0);let t=S.length;const i=S[S.length-2];for(let s=0;s<p;s++)n[t++]=g[s<<1]+i,n[t++]=g[(s<<1)+1];return n.buffer}static insert(w,b,S){if(w===null||w===e.EMPTY_LINE_TOKENS)return w;const g=y(w),p=g.length>>>1;let n=_.LineTokens.findIndexInTokensArray(g,b);n>0&&g[n-1<<1]===b&&n--;for(let t=n;t<p;t++)g[t<<1]+=S;return w}}e.ContiguousTokensEditing=k;function y(E){return E instanceof Uint32Array?E:new Uint32Array(E)}e.toUint32Array=y}),define(X[498],ee([1,0,16,12,497,87,120]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class b{constructor(p){this._lineTokens=[],this._len=0,this._languageIdCodec=p}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(p,n,t){let i=null;if(n<this._len&&(i=this._lineTokens[n]),i!==null&&i!==y.EMPTY_LINE_TOKENS)return new E.LineTokens((0,y.toUint32Array)(i),t,this._languageIdCodec);const s=new Uint32Array(2);return s[0]=t.length,s[1]=S(this._languageIdCodec.encodeLanguageId(p)),new E.LineTokens(s,t,this._languageIdCodec)}static _massageTokens(p,n,t){const i=t?(0,y.toUint32Array)(t):null;if(n===0){let s=!1;if(i&&i.length>1&&(s=w.TokenMetadata.getLanguageId(i[1])!==p),!s)return y.EMPTY_LINE_TOKENS}if(!i||i.length===0){const s=new Uint32Array(2);return s[0]=n,s[1]=S(p),s.buffer}return i[i.length-2]=n,i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(p){for(;p>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(p,n){n!==0&&(p+n>this._len&&(n=this._len-p),this._lineTokens.splice(p,n),this._len-=n)}_insertLines(p,n){if(n===0)return;const t=[];for(let i=0;i<n;i++)t[i]=null;this._lineTokens=_.arrayInsert(this._lineTokens,p,t),this._len+=n}setTokens(p,n,t,i,s){const r=b._massageTokens(this._languageIdCodec.encodeLanguageId(p),t,i);this._ensureLine(n);const d=this._lineTokens[n];return this._lineTokens[n]=r,s?!b._equals(d,r):!1}static _equals(p,n){if(!p||!n)return!p&&!n;const t=(0,y.toUint32Array)(p),i=(0,y.toUint32Array)(n);if(t.length!==i.length)return!1;for(let s=0,r=t.length;s<r;s++)if(t[s]!==i[s])return!1;return!0}acceptEdit(p,n,t){this._acceptDeleteRange(p),this._acceptInsertText(new k.Position(p.startLineNumber,p.startColumn),n,t)}_acceptDeleteRange(p){const n=p.startLineNumber-1;if(n>=this._len)return;if(p.startLineNumber===p.endLineNumber){if(p.startColumn===p.endColumn)return;this._lineTokens[n]=y.ContiguousTokensEditing.delete(this._lineTokens[n],p.startColumn-1,p.endColumn-1);return}this._lineTokens[n]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[n],p.startColumn-1);const t=p.endLineNumber-1;let i=null;t<this._len&&(i=y.ContiguousTokensEditing.deleteBeginning(this._lineTokens[t],p.endColumn-1)),this._lineTokens[n]=y.ContiguousTokensEditing.append(this._lineTokens[n],i),this._deleteLines(p.startLineNumber,p.endLineNumber-p.startLineNumber)}_acceptInsertText(p,n,t){if(n===0&&t===0)return;const i=p.lineNumber-1;if(!(i>=this._len)){if(n===0){this._lineTokens[i]=y.ContiguousTokensEditing.insert(this._lineTokens[i],p.column-1,t);return}this._lineTokens[i]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[i],p.column-1),this._lineTokens[i]=y.ContiguousTokensEditing.insert(this._lineTokens[i],p.column-1,t),this._insertLines(p.lineNumber,n)}}setMultilineTokens(p,n){if(p.length===0)return{changes:[]};const t=[];for(let i=0,s=p.length;i<s;i++){const r=p[i];let d=0,h=0,o=!1;for(let c=r.startLineNumber;c<=r.endLineNumber;c++)o?(this.setTokens(n.getLanguageId(),c-1,n.getLineLength(c),r.getLineTokens(c),!1),h=c):this.setTokens(n.getLanguageId(),c-1,n.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(X[499],ee([1,0,12,5,117]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class E{static create(g,p){return new E(g,new w(p))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(g,p){this._startLineNumber=g,this._tokens=p,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 p=g.startLineNumber-this._startLineNumber,n=g.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(p,g.startColumn-1,n,g.endColumn-1),this._updateEndLineNumber()}split(g){const p=g.startLineNumber-this._startLineNumber,n=g.endLineNumber-this._startLineNumber,[t,i,s]=this._tokens.split(p,g.startColumn-1,n,g.endColumn-1);return[new E(this._startLineNumber,t),new E(this._startLineNumber+s,i)]}applyEdit(g,p){const[n,t,i]=(0,y.countEOL)(p);this.acceptEdit(g,n,t,i,p.length>0?p.charCodeAt(0):0)}acceptEdit(g,p,n,t,i){this._acceptDeleteRange(g),this._acceptInsertText(new _.Position(g.startLineNumber,g.startColumn),p,n,t,i),this._updateEndLineNumber()}_acceptDeleteRange(g){if(g.startLineNumber===g.endLineNumber&&g.startColumn===g.endColumn)return;const p=g.startLineNumber-this._startLineNumber,n=g.endLineNumber-this._startLineNumber;if(n<0){const i=n-p;this._startLineNumber-=i;return}const t=this._tokens.getMaxDeltaLine();if(!(p>=t+1)){if(p<0&&n>=t+1){this._startLineNumber=0,this._tokens.clear();return}if(p<0){const i=-p;this._startLineNumber-=i,this._tokens.acceptDeleteRange(g.startColumn-1,0,0,n,g.endColumn-1)}else this._tokens.acceptDeleteRange(0,p,g.startColumn-1,n,g.endColumn-1)}}_acceptInsertText(g,p,n,t,i){if(p===0&&n===0)return;const s=g.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=p;return}const r=this._tokens.getMaxDeltaLine();s>=r+1||this._tokens.acceptInsertText(s,g.column-1,p,n,t,i)}}e.SparseMultilineTokens=E;class w{constructor(g){this._tokens=g,this._tokenCount=g.length/4}toString(g){const p=[];for(let n=0;n<this._tokenCount;n++)p.push(`(${this._getDeltaLine(n)+g},${this._getStartCharacter(n)}-${this._getEndCharacter(n)})`);return`[${p.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 p=this._getStartCharacter(0),n=this._getDeltaLine(g-1),t=this._getEndCharacter(g-1);return new k.Range(0,p+1,n,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 p=0,n=this._getTokenCount()-1;for(;p<n;){const t=p+Math.floor((n-p)/2),i=this._getDeltaLine(t);if(i<g)p=t+1;else if(i>g)n=t-1;else{let s=t;for(;s>p&&this._getDeltaLine(s-1)===g;)s--;let r=t;for(;r<n&&this._getDeltaLine(r+1)===g;)r++;return new b(this._tokens.subarray(4*s,4*r+4))}}return this._getDeltaLine(p)===g?new b(this._tokens.subarray(4*p,4*p+4)):null}clear(){this._tokenCount=0}removeTokens(g,p,n,t){const i=this._tokens,s=this._tokenCount;let r=0,d=!1,h=0;for(let o=0;o<s;o++){const c=4*o,l=i[c],a=i[c+1],u=i[c+2],v=i[c+3];if((l>g||l===g&&u>=p)&&(l<n||l===n&&a<=t))d=!0;else{if(r===0&&(h=l),d){const f=4*r;i[f]=l-h,i[f+1]=a,i[f+2]=u,i[f+3]=v}r++}}return this._tokenCount=r,h}split(g,p,n,t){const i=this._tokens,s=this._tokenCount,r=[],d=[];let h=r,o=0,c=0;for(let l=0;l<s;l++){const a=4*l,u=i[a],v=i[a+1],f=i[a+2],m=i[a+3];if(u>g||u===g&&f>=p){if(u<n||u===n&&v<=t)continue;h!==d&&(h=d,o=0,c=u)}h[o++]=u-c,h[o++]=v,h[o++]=f,h[o++]=m}return[new w(new Uint32Array(r)),new w(new Uint32Array(d)),c]}acceptDeleteRange(g,p,n,t,i){const s=this._tokens,r=this._tokenCount,d=t-p;let h=0,o=!1;for(let c=0;c<r;c++){const l=4*c;let a=s[l],u=s[l+1],v=s[l+2];const f=s[l+3];if(a<p||a===p&&v<=n){h++;continue}else if(a===p&&u<n)a===t&&v>i?v-=i-n:v=n;else if(a===p&&u===n)if(a===t&&v>i)v-=i-n;else{o=!0;continue}else if(a<t||a===t&&u<i)if(a===t&&v>i)a=p,u=n,v=u+(v-i);else{o=!0;continue}else if(a>t){if(d===0&&!o){h=r;break}a-=d}else if(a===t&&u>=i)g&&a===0&&(u+=g,v+=g),a-=d,u-=i-n,v-=i-n;else throw new Error("Not possible!");const m=4*h;s[m]=a,s[m+1]=u,s[m+2]=v,s[m+3]=f,h++}this._tokenCount=h}acceptInsertText(g,p,n,t,i,s){const r=n===0&&t===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),d=this._tokens,h=this._tokenCount;for(let o=0;o<h;o++){const c=4*o;let l=d[c],a=d[c+1],u=d[c+2];if(!(l<g||l===g&&u<p)){if(l===g&&u===p)if(r)u+=1;else continue;else if(l===g&&a<p&&p<u)n===0?u+=t:u=p;else{if(l===g&&a===p&&r)continue;if(l===g)if(l+=n,n===0)a+=t,u+=t;else{const v=u-a;a=i+(a-p),u=a+v}else l+=n}d[c]=l,d[c+1]=a,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(X[500],ee([1,0,16,87]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class y{constructor(w){this._pieces=[],this._isComplete=!1,this._languageIdCodec=w}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(w,b){this._pieces=w||[],this._isComplete=b}setPartial(w,b){let S=w;if(b.length>0){const p=b[0].getRange(),n=b[b.length-1].getRange();if(!p||!n)return w;S=w.plusRange(p).plusRange(n)}let g=null;for(let p=0,n=this._pieces.length;p<n;p++){const t=this._pieces[p];if(t.endLineNumber<S.startLineNumber)continue;if(t.startLineNumber>S.endLineNumber){g=g||{index:p};break}if(t.removeTokens(S),t.isEmpty()){this._pieces.splice(p,1),p--,n--;continue}if(t.endLineNumber<S.startLineNumber)continue;if(t.startLineNumber>S.endLineNumber){g=g||{index:p};continue}const[i,s]=t.split(S);if(i.isEmpty()){g=g||{index:p};continue}s.isEmpty()||(this._pieces.splice(p,1,i,s),p++,n++,g=g||{index:p})}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=y._findFirstPieceWithLine(S,w),p=S[g].getLineTokens(w);if(!p)return b;const n=b.getCount(),t=p.getCount();let i=0;const s=[];let r=0,d=0;const h=(o,c)=>{o!==d&&(d=o,s[r++]=o,s[r++]=c)};for(let o=0;o<t;o++){const c=p.getStartCharacter(o),l=p.getEndCharacter(o),a=p.getMetadata(o),u=((a&1?2048:0)|(a&2?4096:0)|(a&4?8192:0)|(a&8?16384:0)|(a&16?16744448:0)|(a&32?4278190080:0))>>>0,v=~u>>>0;for(;i<n&&b.getEndOffset(i)<=c;)h(b.getEndOffset(i),b.getMetadata(i)),i++;for(i<n&&b.getStartOffset(i)<c&&h(c,b.getMetadata(i));i<n&&b.getEndOffset(i)<l;)h(b.getEndOffset(i),b.getMetadata(i)&v|a&u),i++;if(i<n)h(l,b.getMetadata(i)&v|a&u),b.getEndOffset(i)===l&&i++;else{const f=Math.min(Math.max(0,i-1),n-1);h(l,b.getMetadata(f)&v|a&u)}}for(;i<n;)h(b.getEndOffset(i),b.getMetadata(i)),i++;return new k.LineTokens(new Uint32Array(s),b.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(w,b){let S=0,g=w.length-1;for(;S<g;){let p=S+Math.floor((g-S)/2);if(w[p].endLineNumber<b)S=p+1;else if(w[p].startLineNumber>b)g=p-1;else{for(;p>S&&w[p-1].startLineNumber<=b&&b<=w[p-1].endLineNumber;)p--;return p}}return S}acceptEdit(w,b,S,g,p){for(const n of this._pieces)n.acceptEdit(w,b,S,g,p)}}e.SparseTokensStore=y}),define(X[140],ee([1,0,2]),function(K,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(E){return!1}onCompositionEnd(E){return!1}onConfigurationChanged(E){return!1}onCursorStateChanged(E){return!1}onDecorationsChanged(E){return!1}onFlushed(E){return!1}onFocusChanged(E){return!1}onLanguageConfigurationChanged(E){return!1}onLineMappingChanged(E){return!1}onLinesChanged(E){return!1}onLinesDeleted(E){return!1}onLinesInserted(E){return!1}onRevealRangeRequest(E){return!1}onScrollChanged(E){return!1}onThemeChanged(E){return!1}onTokensChanged(E){return!1}onTokensColorsChanged(E){return!1}onZonesChanged(E){return!1}handleEvents(E){let w=!1;for(let b=0,S=E.length;b<S;b++){const g=E[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(X[107],ee([1,0,140]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class k extends _.ViewEventHandler{}e.DynamicViewOverlay=k}),define(X[54],ee([1,0,140]),function(K,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 y{static write(w,b){w.setAttribute("data-mprt",String(b))}static read(w){const b=w.getAttribute("data-mprt");return b===null?0:parseInt(b,10)}static collect(w,b){const 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 p=new Uint8Array(g);for(let n=0;n<g;n++)p[n]=S[g-n-1];return p}}e.PartFingerprints=y}),define(X[501],ee([1,0,36,54,397]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockDecorations=void 0;class y extends k.ViewPart{constructor(w){super(w),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,_.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(139),g=S.contentWidth-S.verticalScrollbarWidth;this.contentWidth!==g&&(this.contentWidth=g,w=!0);const p=S.contentLeft;return this.contentLeft!==p&&(this.contentLeft=p,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 p of g){if(!p.options.blockClassName)continue;let n=this.blocks[S];n||(n=this.blocks[S]=(0,_.createFastDomNode)(document.createElement("div")),this.domNode.appendChild(n));let t,i;p.options.blockIsAfterEnd?(t=w.getVerticalOffsetAfterLineNumber(p.range.endLineNumber,!1),i=w.getVerticalOffsetAfterLineNumber(p.range.endLineNumber,!0)):(t=w.getVerticalOffsetForLineNumber(p.range.startLineNumber,!0),i=p.range.isEmpty()&&!p.options.blockDoesNotCollapse?w.getVerticalOffsetForLineNumber(p.range.startLineNumber,!1):w.getVerticalOffsetAfterLineNumber(p.range.endLineNumber,!0));const[s,r,d,h]=(b=p.options.blockPadding)!==null&&b!==void 0?b:[0,0,0,0];n.setClassName("blockDecorations-block "+p.options.blockClassName),n.setLeft(this.contentLeft-h),n.setWidth(this.contentWidth+h+r),n.setTop(t-w.scrollTop-s),n.setHeight(i-t+s+d),S++}for(let p=S;p<this.blocks.length;p++)this.blocks[p].domNode.remove();this.blocks.length=S}}e.BlockDecorations=y}),define(X[502],ee([1,0,107,5,137,399]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class E 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=[],p=0;for(let s=0,r=S.length;s<r;s++){const d=S[s];d.options.className&&(g[p++]=d)}g=g.sort((s,r)=>{if(s.options.zIndex<r.options.zIndex)return-1;if(s.options.zIndex>r.options.zIndex)return 1;const d=s.options.className,h=r.options.className;return d<h?-1:d>h?1:k.Range.compareRangesUsingStarts(s.range,r.range)});const n=b.visibleRange.startLineNumber,t=b.visibleRange.endLineNumber,i=[];for(let s=n;s<=t;s++){const r=s-n;i[r]=""}this._renderWholeLineDecorations(b,g,i),this._renderNormalDecorations(b,g,i),this._renderResult=i}_renderWholeLineDecorations(b,S,g){const p=String(this._lineHeight),n=b.visibleRange.startLineNumber,t=b.visibleRange.endLineNumber;for(let i=0,s=S.length;i<s;i++){const r=S[i];if(!r.options.isWholeLine)continue;const d='<div class="cdr '+r.options.className+'" style="left:0;width:100%;height:'+p+'px;"></div>',h=Math.max(r.range.startLineNumber,n),o=Math.min(r.range.endLineNumber,t);for(let c=h;c<=o;c++){const l=c-n;g[l]+=d}}}_renderNormalDecorations(b,S,g){const p=String(this._lineHeight),n=b.visibleRange.startLineNumber;let t=null,i=!1,s=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 l=h.range;if(c&&l.endColumn===1&&l.endLineNumber!==l.startLineNumber&&(l=new k.Range(l.startLineNumber,l.startColumn,l.endLineNumber-1,this._context.viewModel.getLineMaxColumn(l.endLineNumber-1))),t===o&&i===c&&k.Range.areIntersectingOrTouching(s,l)){s=k.Range.plusRange(s,l);continue}t!==null&&this._renderNormalDecoration(b,s,t,i,p,n,g),t=o,i=c,s=l}t!==null&&this._renderNormalDecoration(b,s,t,i,p,n,g)}_renderNormalDecoration(b,S,g,p,n,t,i){const s=b.linesVisibleRangesForRange(S,g==="findMatch");if(s)for(let r=0,d=s.length;r<d;r++){const h=s[r];if(h.outsideRenderedLine)continue;const o=h.lineNumber-t;if(p&&h.ranges.length===1){const c=h.ranges[0];if(c.width<this._typicalHalfwidthCharacterWidth){const l=Math.round(c.left+c.width/2),a=Math.max(0,Math.round(l-this._typicalHalfwidthCharacterWidth/2));h.ranges[0]=new y.HorizontalRange(a,this._typicalHalfwidthCharacterWidth)}}for(let c=0,l=h.ranges.length;c<l;c++){const a=h.ranges[c],u='<div class="cdr '+g+'" style="left:'+String(a.left)+"px;width:"+String(a.width)+"px;height:"+n+'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=E}),define(X[201],ee([1,0,107,400]),function(K,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,p,n,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+g,this.endLineNumber=+p,this.className=String(n),this.zIndex=t??0,this.decorationLane=i??1}}e.DecorationToRender=k;class y{constructor(g,p){this.className=g,this.zIndex=p}}e.RenderedDecoration=y;class E{constructor(){this.lanes=[]}add(g,p){for(;g>=this.lanes.length;)this.lanes.push([]);this.lanes[g].push(p)}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=E;class w extends _.DynamicViewOverlay{_render(g,p,n,t){const i=[];for(let d=g;d<=p;d++){const h=d-g;i[h]=new E}if(n.length===0)return i;n.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 s=null,r=0;for(let d=0,h=n.length;d<h;d++){const o=n[d],c=o.className,l=o.zIndex;let a=Math.max(o.startLineNumber,g)-g;const u=Math.min(o.endLineNumber,p)-g,v=Math.min(o.decorationLane,t);s===c?(a=Math.max(r+1,a),r=Math.max(r,u)):(s=c,r=u);for(let f=a;f<=r;f++)i[f].add(v,new y(c,l))}return i}}e.DedupOverlay=w;class b extends w{constructor(g){super(),this._context=g;const p=this._context.configuration.options,n=p.get(139);this._lineHeight=p.get(64),this._glyphMargin=p.get(55),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._glyphMarginDecorationLaneCount=n.glyphMarginDecorationLaneCount,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(g){const p=this._context.configuration.options,n=p.get(139);return this._lineHeight=p.get(64),this._glyphMargin=p.get(55),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._glyphMarginDecorationLaneCount=n.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 p;const n=g.getDecorationsInViewport(),t=[];let i=0;for(let s=0,r=n.length;s<r;s++){const d=n[s],h=d.options.glyphMarginClassName,o=d.options.zIndex,c=(p=d.options.glyphMargin)===null||p===void 0?void 0:p.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 p=g.visibleRange.startLineNumber,n=g.visibleRange.endLineNumber,t=this._getDecorations(g),i=this._render(p,n,t,this._glyphMarginDecorationLaneCount),s=this._lineHeight.toString(),d='" style="width:'+Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount).toString()+"px;height:"+s+"px;",h=[];for(let o=p;o<=n;o++){const c=o-p,l=i[c];if(l.isEmpty())h[c]="";else{let a="";for(let u=1;u<=this._glyphMarginDecorationLaneCount;u+=1){const v=l.getLaneDecorations(u);if(v.length===0)continue;v.sort((L,D)=>D.zIndex-L.zIndex);const f=v[0],m=[f.className];for(let L=1;L<v.length;L+=1){const D=v[L];if(D.zIndex!==f.zIndex)break;m.push(D.className)}const C=(this._glyphMarginLeft+(u-1)*this._lineHeight).toString();a+='<div class="cgmr codicon '+m.join(" ")+d+"left:"+C+'px;"></div>'}h[c]=a}}this._renderResult=h}render(g,p){if(!this._renderResult)return"";const n=p-g;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}e.GlyphMarginOverlay=b}),define(X[503],ee([1,0,201,404]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class k extends _.DedupOverlay{constructor(E){super(),this._context=E;const b=this._context.configuration.options.get(139);this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(E){const b=this._context.configuration.options.get(139);return this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,!0}onDecorationsChanged(E){return!0}onFlushed(E){return!0}onLinesChanged(E){return!0}onLinesDeleted(E){return!0}onLinesInserted(E){return!0}onScrollChanged(E){return E.scrollTopChanged}onZonesChanged(E){return!0}_getDecorations(E){const w=E.getDecorationsInViewport(),b=[];let S=0;for(let g=0,p=w.length;g<p;g++){const n=w[g],t=n.options.linesDecorationsClassName,i=n.options.zIndex;t&&(b[S++]=new _.DecorationToRender(n.range.startLineNumber,n.range.endLineNumber,t,i));const s=n.options.firstLineDecorationClassName;s&&(b[S++]=new _.DecorationToRender(n.range.startLineNumber,n.range.startLineNumber,s,i))}return b}prepareRender(E){const w=E.visibleRange.startLineNumber,b=E.visibleRange.endLineNumber,S=this._render(w,b,this._getDecorations(E),1),g=this._decorationsLeft.toString(),p=this._decorationsWidth.toString(),n='" style="left:'+g+"px;width:"+p+'px;"></div>',t=[];for(let i=w;i<=b;i++){const s=i-w,r=S[s].getLaneDecorations(1);let d="";for(const h of r)d+='<div class="cldr '+h.className+n;t[s]=d}this._renderResult=t}render(E,w){return this._renderResult?this._renderResult[w-E]:""}}e.LinesDecorationsOverlay=k}),define(X[273],ee([1,0,36,54,405]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class y extends k.ViewPart{constructor(w){super(w);const b=this._context.configuration.options,S=b.get(139);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(y.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(y.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(139);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=y,y.CLASS_NAME="glyph-margin",y.OUTER_CLASS_NAME="margin"}),define(X[504],ee([1,0,201,406]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class k extends _.DedupOverlay{constructor(E){super(),this._context=E,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(E){return!0}onDecorationsChanged(E){return!0}onFlushed(E){return!0}onLinesChanged(E){return!0}onLinesDeleted(E){return!0}onLinesInserted(E){return!0}onScrollChanged(E){return E.scrollTopChanged}onZonesChanged(E){return!0}_getDecorations(E){const w=E.getDecorationsInViewport(),b=[];let S=0;for(let g=0,p=w.length;g<p;g++){const n=w[g],t=n.options.marginClassName,i=n.options.zIndex;t&&(b[S++]=new _.DecorationToRender(n.range.startLineNumber,n.range.endLineNumber,t,i))}return b}prepareRender(E){const w=E.visibleRange.startLineNumber,b=E.visibleRange.endLineNumber,S=this._render(w,b,this._getDecorations(E),1),g=[];for(let p=w;p<=b;p++){const n=p-w,t=S[n].getLaneDecorations(1);let i="";for(const s of t)i+='<div class="cmdr '+s.className+'" style=""></div>';g[n]=i}this._renderResult=g}render(E,w){return this._renderResult?this._renderResult[w-E]:""}}e.MarginViewLineDecorationsOverlay=k}),define(X[505],ee([1,0,36,54,408]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class y extends k.ViewPart{constructor(w){super(w);const S=this._context.configuration.options.get(139);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(139);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 p=b[S];this._renderWidget(this._widgets[p])}}}e.ViewOverlayWidgets=y}),define(X[506],ee([1,0,36,54,409]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class y extends k.ViewPart{constructor(w){super(w),this.domNode=(0,_.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const b=this._context.configuration.options;this._rulers=b.get(97),this._typicalHalfwidthCharacterWidth=b.get(48).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(w){const b=this._context.configuration.options;return this._rulers=b.get(97),this._typicalHalfwidthCharacterWidth=b.get(48).typicalHalfwidthCharacterWidth,!0}onScrollChanged(w){return w.scrollHeightChanged}prepareRender(w){}_ensureRulersCount(){const w=this._renderedRulers.length,b=this._rulers.length;if(w===b)return;if(w<b){const{tabSize:g}=this._context.viewModel.model.getOptions(),p=g;let n=b-w;for(;n>0;){const t=(0,_.createFastDomNode)(document.createElement("div"));t.setClassName("view-ruler"),t.setWidth(p),this.domNode.appendChild(t),this._renderedRulers.push(t),n--}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],p=this._rulers[b];g.setBoxShadow(p.color?`1px 0 0 0 ${p.color} inset`:""),g.setHeight(Math.min(w.scrollHeight,1e6)),g.setLeft(p.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=y}),define(X[507],ee([1,0,36,54,410]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class y extends k.ViewPart{constructor(w){super(w),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const S=this._context.configuration.options.get(98);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(139);b.minimap.renderMinimap===0||b.minimap.minimapWidth>0&&b.minimap.minimapLeft===0?this._width=b.width:this._width=b.width-b.verticalScrollbarWidth}onConfigurationChanged(w){const S=this._context.configuration.options.get(98);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=y}),define(X[508],ee([1,0,36,11,54,12]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const w=()=>{throw new Error("Invalid change accessor")};class b extends y.ViewPart{constructor(p){super(p);const n=this._context.configuration.options,t=n.get(139);this._lineHeight=n.get(64),this._contentWidth=t.contentWidth,this._contentLeft=t.contentLeft,this.domNode=(0,_.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 p=this._context.viewLayout.getWhitespaces(),n=new Map;for(const i of p)n.set(i.id,i);let t=!1;return this._context.viewModel.changeWhitespace(i=>{const s=Object.keys(this._zones);for(let r=0,d=s.length;r<d;r++){const h=s[r],o=this._zones[h],c=this._computeWhitespaceProps(o.delegate);o.isInHiddenArea=c.isInHiddenArea;const l=n.get(h);l&&(l.afterLineNumber!==c.afterViewLineNumber||l.height!==c.heightInPx)&&(i.changeOneWhitespace(h,c.afterViewLineNumber,c.heightInPx),this._safeCallOnComputedHeight(o.delegate,c.heightInPx),t=!0)}}),t}onConfigurationChanged(p){const n=this._context.configuration.options,t=n.get(139);return this._lineHeight=n.get(64),this._contentWidth=t.contentWidth,this._contentLeft=t.contentLeft,p.hasChanged(64)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(p){return this._recomputeWhitespacesProps()}onLinesDeleted(p){return!0}onScrollChanged(p){return p.scrollTopChanged||p.scrollWidthChanged}onZonesChanged(p){return!0}onLinesInserted(p){return!0}_getZoneOrdinal(p){var n,t;return(t=(n=p.ordinal)!==null&&n!==void 0?n:p.afterColumn)!==null&&t!==void 0?t:1e4}_computeWhitespaceProps(p){if(p.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(p),minWidthInPx:this._minWidthInPixels(p)};let n;if(typeof p.afterColumn<"u")n=this._context.viewModel.model.validatePosition({lineNumber:p.afterLineNumber,column:p.afterColumn});else{const r=this._context.viewModel.model.validatePosition({lineNumber:p.afterLineNumber,column:1}).lineNumber;n=new E.Position(r,this._context.viewModel.model.getLineMaxColumn(r))}let t;n.column===this._context.viewModel.model.getLineMaxColumn(n.lineNumber)?t=this._context.viewModel.model.validatePosition({lineNumber:n.lineNumber+1,column:1}):t=this._context.viewModel.model.validatePosition({lineNumber:n.lineNumber,column:n.column+1});const i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n,p.afterColumnAffinity),s=p.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(t);return{isInHiddenArea:!s,afterViewLineNumber:i.lineNumber,heightInPx:s?this._heightInPixels(p):0,minWidthInPx:this._minWidthInPixels(p)}}changeViewZones(p){let n=!1;return this._context.viewModel.changeWhitespace(t=>{const i={addZone:s=>(n=!0,this._addZone(t,s)),removeZone:s=>{s&&(n=this._removeZone(t,s)||n)},layoutZone:s=>{s&&(n=this._layoutZone(t,s)||n)}};S(p,i),i.addZone=w,i.removeZone=w,i.layoutZone=w}),n}_addZone(p,n){const t=this._computeWhitespaceProps(n),s={whitespaceId:p.insertWhitespace(t.afterViewLineNumber,this._getZoneOrdinal(n),t.heightInPx,t.minWidthInPx),delegate:n,isInHiddenArea:t.isInHiddenArea,isVisible:!1,domNode:(0,_.createFastDomNode)(n.domNode),marginDomNode:n.marginDomNode?(0,_.createFastDomNode)(n.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,t.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(p,n){if(this._zones.hasOwnProperty(n)){const t=this._zones[n];return delete this._zones[n],p.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(p,n){if(this._zones.hasOwnProperty(n)){const t=this._zones[n],i=this._computeWhitespaceProps(t.delegate);return t.isInHiddenArea=i.isInHiddenArea,p.changeOneWhitespace(t.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(t.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(p){return this._zones.hasOwnProperty(p)?!!this._zones[p].delegate.suppressMouseDown:!1}_heightInPixels(p){return typeof p.heightInPx=="number"?p.heightInPx:typeof p.heightInLines=="number"?this._lineHeight*p.heightInLines:this._lineHeight}_minWidthInPixels(p){return typeof p.minWidthInPx=="number"?p.minWidthInPx:0}_safeCallOnComputedHeight(p,n){if(typeof p.onComputedHeight=="function")try{p.onComputedHeight(n)}catch(t){(0,k.onUnexpectedError)(t)}}_safeCallOnDomNodeTop(p,n){if(typeof p.onDomNodeTop=="function")try{p.onDomNodeTop(n)}catch(t){(0,k.onUnexpectedError)(t)}}prepareRender(p){}render(p){const n=p.viewportData.whitespaceViewportData,t={};let i=!1;for(const r of n)this._zones[r.id].isInHiddenArea||(t[r.id]=r,i=!0);const s=Object.keys(this._zones);for(let r=0,d=s.length;r<d;r++){const h=s[r],o=this._zones[h];let c=0,l=0,a="none";t.hasOwnProperty(h)?(c=t[h].verticalOffset-p.bigNumbersDelta,l=t[h].height,a="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,p.getScrolledTopFromAbsoluteTop(t[h].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,p.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(c),o.domNode.setHeight(l),o.domNode.setDisplay(a),o.marginDomNode&&(o.marginDomNode.setTop(c),o.marginDomNode.setHeight(l),o.marginDomNode.setDisplay(a))}i&&(this.domNode.setWidth(Math.max(p.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=b;function S(g,p){try{return g(p)}catch(n){(0,k.onUnexpectedError)(n)}}}),define(X[202],ee([1,0]),function(K,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 y{constructor(a){this.type=2,this._source=a}hasChanged(a){return this._source.hasChanged(a)}}e.ViewConfigurationChangedEvent=y;class E{constructor(a,u,v){this.selections=a,this.modelSelections=u,this.reason=v,this.type=3}}e.ViewCursorStateChangedEvent=E;class w{constructor(a){this.type=4,a?(this.affectsMinimap=a.affectsMinimap,this.affectsOverviewRuler=a.affectsOverviewRuler,this.affectsGlyphMargin=a.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(a){this.type=6,this.isFocused=a}}e.ViewFocusChangedEvent=S;class g{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=g;class p{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=p;class n{constructor(a,u){this.fromLineNumber=a,this.count=u,this.type=9}}e.ViewLinesChangedEvent=n;class t{constructor(a,u){this.type=10,this.fromLineNumber=a,this.toLineNumber=u}}e.ViewLinesDeletedEvent=t;class i{constructor(a,u){this.type=11,this.fromLineNumber=a,this.toLineNumber=u}}e.ViewLinesInsertedEvent=i;class s{constructor(a,u,v,f,m,C,L){this.source=a,this.minimalReveal=u,this.range=v,this.selections=f,this.verticalType=m,this.revealHorizontal=C,this.scrollType=L,this.type=12}}e.ViewRevealRangeRequestEvent=s;class r{constructor(a){this.type=13,this.scrollWidth=a.scrollWidth,this.scrollLeft=a.scrollLeft,this.scrollHeight=a.scrollHeight,this.scrollTop=a.scrollTop,this.scrollWidthChanged=a.scrollWidthChanged,this.scrollLeftChanged=a.scrollLeftChanged,this.scrollHeightChanged=a.scrollHeightChanged,this.scrollTopChanged=a.scrollTopChanged}}e.ViewScrollChangedEvent=r;class d{constructor(a){this.theme=a,this.type=14}}e.ViewThemeChangedEvent=d;class h{constructor(a){this.type=15,this.ranges=a}}e.ViewTokensChangedEvent=h;class o{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=o;class c{constructor(){this.type=17}}e.ViewZonesChangedEvent=c}),define(X[141],ee([1,0,9]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class k{constructor(S,g,p,n){this.startColumn=S,this.endColumn=g,this.className=p,this.type=n,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 p=S.length,n=g.length;if(p!==n)return!1;for(let t=0;t<p;t++)if(!k._equals(S[t],g[t]))return!1;return!0}static extractWrapped(S,g,p){if(S.length===0)return S;const n=g+1,t=p+1,i=p-g,s=[];let r=0;for(const d of S)d.endColumn<=n||d.startColumn>=t||(s[r++]=new k(Math.max(1,d.startColumn-n+1),Math.min(i+1,d.endColumn-n+1),d.className,d.type));return s}static filter(S,g,p,n){if(S.length===0)return[];const t=[];let i=0;for(let s=0,r=S.length;s<r;s++){const d=S[s],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:p,c=h.endLineNumber===g?h.endColumn:n;t[i++]=new k(o,c,d.inlineClassName,d.type)}return t}static _typeCompare(S,g){const p=[2,0,1,3];return p[S]-p[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 p=k._typeCompare(S.type,g.type);return p!==0?p:S.className!==g.className?S.className<g.className?-1:1:0}}e.LineDecoration=k;class y{constructor(S,g,p,n){this.startOffset=S,this.endOffset=g,this.className=p,this.metadata=n}}e.DecorationSegment=y;class E{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(S){let g=0;for(let p=0,n=S.length;p<n;p++)g|=S[p];return g}consumeLowerThan(S,g,p){for(;this.count>0&&this.stopOffsets[0]<S;){let n=0;for(;n+1<this.count&&this.stopOffsets[n]===this.stopOffsets[n+1];)n++;p.push(new y(g,this.stopOffsets[n],this.classNames.join(" "),E._metadata(this.metadata))),g=this.stopOffsets[n]+1,this.stopOffsets.splice(0,n+1),this.classNames.splice(0,n+1),this.metadata.splice(0,n+1),this.count-=n+1}return this.count>0&&g<S&&(p.push(new y(g,S-1,this.classNames.join(" "),E._metadata(this.metadata))),g=S),g}insert(S,g,p){if(this.count===0||this.stopOffsets[this.count-1]<=S)this.stopOffsets.push(S),this.classNames.push(g),this.metadata.push(p);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=S){this.stopOffsets.splice(n,0,S),this.classNames.splice(n,0,g),this.metadata.splice(n,0,p);break}this.count++}}class w{static normalize(S,g){if(g.length===0)return[];const p=[],n=new E;let t=0;for(let i=0,s=g.length;i<s;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 l=d-1,a=h-2;t=n.consumeLowerThan(l,t,p),n.count===0&&(t=l),n.insert(a,o,c)}return n.consumeLowerThan(1073741824,t,p),p}}e.LineDecorationsNormalizer=w}),define(X[509],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=void 0;class _{constructor(y,E,w,b){this.endIndex=y,this.type=E,this.metadata=w,this.containsRTL=b,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=_}),define(X[510],ee([1,0,9]),function(K,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,p=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],b._commitPendingChanges(S,g,p)}}class y{constructor(b,S,g,p,n){this.id=b,this.afterLineNumber=S,this.ordinal=g,this.height=p,this.minWidth=n,this.prefixSum=0}}e.EditorWhitespace=y;class E{constructor(b,S,g,p){this._instanceId=_.singleLetterHash(++E.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=p}static findInsertionIndex(b,S,g){let p=0,n=b.length;for(;p<n;){const t=p+n>>>1;S===b[t].afterLineNumber?g<b[t].ordinal?n=t:p=t+1:S<b[t].afterLineNumber?n=t:p=t+1}return p}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:(p,n,t,i)=>{S=!0,p=p|0,n=n|0,t=t|0,i=i|0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new y(s,p,n,t,i)),s},changeOneWhitespace:(p,n,t)=>{S=!0,n=n|0,t=t|0,this._pendingChanges.change({id:p,newAfterLineNumber:n,newHeight:t})},removeWhitespace:p=>{S=!0,this._pendingChanges.remove({id:p})}})}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 s of b)this._insertWhitespace(s);for(const s of S)this._changeOneWhitespace(s.id,s.newAfterLineNumber,s.newHeight);for(const s of g){const r=this._findWhitespaceIndex(s.id);r!==-1&&this._removeWhitespace(r)}return}const p=new Set;for(const s of g)p.add(s.id);const n=new Map;for(const s of S)n.set(s.id,s);const t=s=>{const r=[];for(const d of s)if(!p.has(d.id)){if(n.has(d.id)){const h=n.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((s,r)=>s.afterLineNumber===r.afterLineNumber?s.ordinal-r.ordinal:s.afterLineNumber-r.afterLineNumber),this._arr=i,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(b){const S=E.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,p=S.length;g<p;g++)if(S[g].id===b)return g;return-1}_changeOneWhitespace(b,S,g){const p=this._findWhitespaceIndex(b);if(p!==-1&&(this._arr[p].height!==g&&(this._arr[p].height=g,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,p-1)),this._arr[p].afterLineNumber!==S)){const n=this._arr[p];this._removeWhitespace(p),n.afterLineNumber=S,this._insertWhitespace(n)}}_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,p=this._arr.length;g<p;g++){const n=this._arr[g].afterLineNumber;b<=n&&n<=S?this._arr[g].afterLineNumber=b-1:n>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,p=this._arr.length;g<p;g++){const n=this._arr[g].afterLineNumber;b<=n&&(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,p=S.length-1;for(;g<=p;){const t=(p-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 p=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 p=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b-(S?1:0));return g+p+this._paddingTop}getVerticalOffsetAfterLineNumber(b,S=!1){this._checkPendingChanges(),b=b|0;const g=this._lineHeight*b,p=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b+(S?1:0));return g+p+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 p=1,n=S;for(;p<n;){const t=(p+n)/2|0,i=this.getVerticalOffsetForLineNumber(t)|0;if(b>=i+g)p=t+1;else{if(b>=i)return t;n=t}}return p>S?S:p}getLinesViewportData(b,S){this._checkPendingChanges(),b=b|0,S=S|0;const g=this._lineHeight,p=this.getLineNumberAtOrAfterVerticalOffset(b)|0,n=this.getVerticalOffsetForLineNumber(p)|0;let t=this._lineCount|0,i=this.getFirstWhitespaceIndexAfterLineNumber(p)|0;const s=this.getWhitespacesCount()|0;let r,d;i===-1?(i=s,d=t+1,r=0):(d=this.getAfterLineNumberForWhitespaceIndex(i)|0,r=this.getHeightForWhitespaceIndex(i)|0);let h=n,o=h;const c=5e5;let l=0;n>=c&&(l=Math.floor(n/c)*c,l=Math.floor(l/g)*g,o-=l);const a=[],u=b+(S-b)/2;let v=-1;for(let L=p;L<=t;L++){if(v===-1){const D=h,I=h+g;(D<=u&&u<I||D>u)&&(v=L)}for(h+=g,a[L-p]=o,o+=g;d===L;)o+=r,h+=r,i++,i>=s?d=t+1:(d=this.getAfterLineNumberForWhitespaceIndex(i)|0,r=this.getHeightForWhitespaceIndex(i)|0);if(h>=S){t=L;break}}v===-1&&(v=t);const f=this.getVerticalOffsetForLineNumber(t)|0;let m=p,C=t;return m<C&&n<b&&m++,m<C&&f+g>S&&C--,{bigNumbersDelta:l,startLineNumber:p,endLineNumber:t,relativeVerticalOffset:a,centeredLineNumber:v,completelyVisibleStartLineNumber:m,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 p;return b>0?p=this.getWhitespacesAccumulatedHeight(b-1):p=0,g+p+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(b){this._checkPendingChanges(),b=b|0;let S=0,g=this.getWhitespacesCount()-1;if(g<0)return-1;const p=this.getVerticalOffsetForWhitespaceIndex(g),n=this.getHeightForWhitespaceIndex(g);if(b>=p+n)return-1;for(;S<g;){const t=Math.floor((S+g)/2),i=this.getVerticalOffsetForWhitespaceIndex(t),s=this.getHeightForWhitespaceIndex(t);if(b>=i+s)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 p=this.getHeightForWhitespaceIndex(S),n=this.getIdForWhitespaceIndex(S),t=this.getAfterLineNumberForWhitespaceIndex(S);return{id:n,afterLineNumber:t,verticalOffset:g,height:p}}getWhitespaceViewportData(b,S){this._checkPendingChanges(),b=b|0,S=S|0;const g=this.getWhitespaceIndexAtOrAfterVerticallOffset(b),p=this.getWhitespacesCount()-1;if(g<0)return[];const n=[];for(let t=g;t<=p;t++){const i=this.getVerticalOffsetForWhitespaceIndex(t),s=this.getHeightForWhitespaceIndex(t);if(i>=S)break;n.push({id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:s})}return n}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].id}getAfterLineNumberForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].afterLineNumber}getHeightForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].height}}e.LinesLayout=E,E.INSTANCE_COUNT=0}),define(X[511],ee([1,0,5]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class k{constructor(E,w,b,S){this.selections=E,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(E){return this._model.getViewportViewLineRenderingData(this.visibleRange,E)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=k}),define(X[81],ee([1,0,9,5]),function(K,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 y{constructor(i,s,r,d){this._viewportBrand=void 0,this.top=i|0,this.left=s|0,this.width=r|0,this.height=d|0}}e.Viewport=y;class E{constructor(i,s){this.tabSize=i,this.data=s}}e.MinimapLinesRenderingData=E;class w{constructor(i,s,r,d,h,o,c){this._viewLineDataBrand=void 0,this.content=i,this.continuesWithWrappedLine=s,this.minColumn=r,this.maxColumn=d,this.startVisibleColumn=h,this.tokens=o,this.inlineDecorations=c}}e.ViewLineData=w;class b{constructor(i,s,r,d,h,o,c,l,a,u){this.minColumn=i,this.maxColumn=s,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=l,this.tabSize=a,this.startVisibleColumn=u}static isBasicASCII(i,s){return s?_.isBasicASCII(i):!0}static containsRTL(i,s,r){return!s&&r?_.containsRTL(i):!1}}e.ViewLineRenderingData=b;class S{constructor(i,s,r){this.range=i,this.inlineClassName=s,this.type=r}}e.InlineDecoration=S;class g{constructor(i,s,r,d){this.startOffset=i,this.endOffset=s,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 p{constructor(i,s){this._viewModelDecorationBrand=void 0,this.range=i,this.options=s}}e.ViewModelDecoration=p;class n{constructor(i,s,r){this.color=i,this.zIndex=s,this.data=r}static cmp(i,s){return i.zIndex===s.zIndex?i.color<s.color?-1:i.color>s.color?1:0:i.zIndex-s.zIndex}}e.OverviewRulerDecorationsGroup=n}),define(X[512],ee([1,0,87,12,106,81]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function w(i,s){return i===null?s?S.INSTANCE:g.INSTANCE:new b(i,s)}e.createModelLineProjection=w;class b{constructor(s,r){this._projectionData=s,this._isVisible=r}isVisible(){return this._isVisible}setVisible(s){return this._isVisible=s,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(s,r,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 l=this._projectionData.injectionOffsets.map((u,v)=>new y.LineInjectedText(0,0,u+1,this._projectionData.injectionOptions[v],0));c=y.LineInjectedText.applyInjectedText(s.getLineContent(r),l).substring(h,o)}else c=s.getValueInRange({startLineNumber:r,startColumn:h+1,endLineNumber:r,endColumn:o+1});return d>0&&(c=n(this._projectionData.wrappedTextIndentLength)+c),c}getViewLineLength(s,r,d){return this._assertVisible(),this._projectionData.getLineLength(d)}getViewLineMinColumn(s,r,d){return this._assertVisible(),this._projectionData.getMinOutputOffset(d)+1}getViewLineMaxColumn(s,r,d){return this._assertVisible(),this._projectionData.getMaxOutputOffset(d)+1}getViewLineData(s,r,d){const h=new Array;return this.getViewLinesData(s,r,d,1,0,[!0],h),h[0]}getViewLinesData(s,r,d,h,o,c,l){this._assertVisible();const a=this._projectionData,u=a.injectionOffsets,v=a.injectionOptions;let f=null;if(u){f=[];let C=0,L=0;for(let D=0;D<a.getOutputLineCount();D++){const I=new Array;f[D]=I;const T=D>0?a.breakOffsets[D-1]:0,O=a.breakOffsets[D];for(;L<u.length;){const R=v[L].content.length,A=u[L]+C,N=A+R;if(A>O)break;if(T<N){const P=v[L];if(P.inlineClassName){const x=D>0?a.wrappedTextIndentLength:0,F=x+Math.max(A-T,0),B=x+Math.min(N-T,O);F!==B&&I.push(new E.SingleLineInlineDecoration(F,B,P.inlineClassName,P.inlineClassNameAffectsLetterSpacing))}}if(N<=O)C+=R,L++;else break}}}let m;u?m=s.tokenization.getLineTokens(r).withInserted(u.map((C,L)=>({offset:C,text:v[L].content,tokenMetadata:_.LineTokens.defaultTokenMetadata}))):m=s.tokenization.getLineTokens(r);for(let C=d;C<d+h;C++){const L=o+C-d;if(!c[L]){l[L]=null;continue}l[L]=this._getViewLineData(m,f?f[C]:null,C)}}_getViewLineData(s,r,d){this._assertVisible();const h=this._projectionData,o=d>0?h.wrappedTextIndentLength:0,c=d>0?h.breakOffsets[d-1]:0,l=h.breakOffsets[d],a=s.sliceAndInflate(c,l,o);let u=a.getLineContent();d>0&&(u=n(h.wrappedTextIndentLength)+u);const v=this._projectionData.getMinOutputOffset(d)+1,f=u.length+1,m=d+1<this.getViewLineCount(),C=d===0?0:h.breakOffsetsVisibleColumn[d-1];return new E.ViewLineData(u,m,v,f,C,a,r)}getModelColumnOfViewPosition(s,r){return this._assertVisible(),this._projectionData.translateToInputOffset(s,r-1)+1}getViewPositionOfModelPosition(s,r,d=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(r-1,d).toPosition(s)}getViewLineNumberOfModelPosition(s,r){this._assertVisible();const d=this._projectionData.translateToOutputPosition(r-1);return s+d.outputLineIndex}normalizePosition(s,r,d){const h=r.lineNumber-s;return this._projectionData.normalizeOutputPosition(s,r.column-1,d).toPosition(h)}getInjectedTextAt(s,r){return this._projectionData.getInjectedText(s,r-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class S{constructor(){}isVisible(){return!0}setVisible(s){return s?this:g.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(s,r,d){return s.getLineContent(r)}getViewLineLength(s,r,d){return s.getLineLength(r)}getViewLineMinColumn(s,r,d){return s.getLineMinColumn(r)}getViewLineMaxColumn(s,r,d){return s.getLineMaxColumn(r)}getViewLineData(s,r,d){const h=s.tokenization.getLineTokens(r),o=h.getLineContent();return new E.ViewLineData(o,!1,1,o.length+1,0,h.inflate(),null)}getViewLinesData(s,r,d,h,o,c,l){if(!c[o]){l[o]=null;return}l[o]=this.getViewLineData(s,r,0)}getModelColumnOfViewPosition(s,r){return r}getViewPositionOfModelPosition(s,r){return new k.Position(s,r)}getViewLineNumberOfModelPosition(s,r){return s}normalizePosition(s,r,d){return r}getInjectedTextAt(s,r){return null}}S.INSTANCE=new S;class g{constructor(){}isVisible(){return!1}setVisible(s){return s?S.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(s,r,d){throw new Error("Not supported")}getViewLineLength(s,r,d){throw new Error("Not supported")}getViewLineMinColumn(s,r,d){throw new Error("Not supported")}getViewLineMaxColumn(s,r,d){throw new Error("Not supported")}getViewLineData(s,r,d){throw new Error("Not supported")}getViewLinesData(s,r,d,h,o,c,l){throw new Error("Not supported")}getModelColumnOfViewPosition(s,r){throw new Error("Not supported")}getViewPositionOfModelPosition(s,r){throw new Error("Not supported")}getViewLineNumberOfModelPosition(s,r){throw new Error("Not supported")}normalizePosition(s,r,d){throw new Error("Not supported")}getInjectedTextAt(s,r){throw new Error("Not supported")}}g.INSTANCE=new g;const p=[""];function n(i){if(i>=p.length)for(let s=1;s<=i;s++)p[s]=t(s);return p[i]}function t(i){return new Array(i+1).join(" ")}}),define(X[513],ee([1,0,9,116,106,268]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class w{static create(h){return new w(h.get(128),h.get(127))}constructor(h,o){this.classifier=new b(h,o)}createLineBreaksComputer(h,o,c,l,a){const u=[],v=[],f=[];return{addRequest:(m,C,L)=>{u.push(m),v.push(C),f.push(L)},finalize:()=>{const m=h.typicalFullwidthCharacterWidth/h.typicalHalfwidthCharacterWidth,C=[];for(let L=0,D=u.length;L<D;L++){const I=v[L],T=f[L];T&&!T.injectionOptions&&!I?C[L]=p(this.classifier,T,u[L],o,c,m,l,a):C[L]=n(this.classifier,u[L],I,o,c,m,l,a)}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 p(d,h,o,c,l,a,u,v){if(l===-1)return null;const f=o.length;if(f<=1)return null;const m=v==="keepAll",C=h.breakOffsets,L=h.breakOffsetsVisibleColumn,D=r(o,c,l,a,u),I=l-D,T=S,O=g;let R=0,A=0,N=0,P=l;const x=C.length;let F=0;if(F>=0){let B=Math.abs(L[F]-P);for(;F+1<x;){const V=Math.abs(L[F+1]-P);if(V>=B)break;B=V,F++}}for(;F<x;){let B=F<0?0:C[F],V=F<0?0:L[F];A>B&&(B=A,V=N);let $=0,M=0,Q=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 q=B;q<f;q++){const Z=q,Y=o.charCodeAt(q);let oe,ce;if(_.isHighSurrogate(Y)?(q++,oe=0,ce=2):(oe=d.get(Y),ce=t(Y,ne,c,a)),Z>A&&s(se,H,Y,oe,m)&&($=Z,M=ne),ne+=ce,ne>P){Z>A?(Q=Z,ie=ne-ce):(Q=q+1,ie=ne),ne-M>I&&($=0),W=!1;break}se=Y,H=oe}if(W){R>0&&(T[R]=C[C.length-1],O[R]=L[C.length-1],R++);break}}if($===0){let ne=V,se=o.charCodeAt(B),H=d.get(se),W=!1;for(let q=B-1;q>=A;q--){const Z=q+1,Y=o.charCodeAt(q);if(Y===9){W=!0;break}let oe,ce;if(_.isLowSurrogate(Y)?(q--,oe=0,ce=2):(oe=d.get(Y),ce=_.isFullWidthCharacter(Y)?a:1),ne<=P){if(Q===0&&(Q=Z,ie=ne),ne<=P-I)break;if(s(Y,oe,se,H,m)){$=Z,M=ne;break}}ne-=ce,se=Y,H=oe}if($!==0){const q=I-(ie-M);if(q<=c){const Z=o.charCodeAt(Q);let Y;_.isHighSurrogate(Z)?Y=2:Y=t(Z,ie,c,a),q-Y<0&&($=0)}}if(W){F--;continue}}if($===0&&($=Q,M=ie),$<=A){const ne=o.charCodeAt(A);_.isHighSurrogate(ne)?($=A+2,M=N+2):($=A+1,M=N+t(ne,N,c,a))}for(A=$,T[R]=$,N=M,O[R]=M,R++,P=M+I;F<0||F<x&&L[F]<M;)F++;let re=Math.abs(L[F]-P);for(;F+1<x;){const ne=Math.abs(L[F+1]-P);if(ne>=re)break;re=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=D,h)}function n(d,h,o,c,l,a,u,v){const f=y.LineInjectedText.applyInjectedText(h,o);let m,C;if(o&&o.length>0?(m=o.map(M=>M.options),C=o.map(M=>M.column-1)):(m=null,C=null),l===-1)return m?new E.ModelLineProjectionData(C,m,[f.length],[],0):null;const L=f.length;if(L<=1)return m?new E.ModelLineProjectionData(C,m,[f.length],[],0):null;const D=v==="keepAll",I=r(f,c,l,a,u),T=l-I,O=[],R=[];let A=0,N=0,P=0,x=l,F=f.charCodeAt(0),B=d.get(F),V=t(F,0,c,a),$=1;_.isHighSurrogate(F)&&(V+=1,F=f.charCodeAt(1),B=d.get(F),$++);for(let M=$;M<L;M++){const Q=M,ie=f.charCodeAt(M);let re,ne;_.isHighSurrogate(ie)?(M++,re=0,ne=2):(re=d.get(ie),ne=t(ie,V,c,a)),s(F,B,ie,re,D)&&(N=Q,P=V),V+=ne,V>x&&((N===0||V-P>T)&&(N=Q,P=V-ne),O[A]=N,R[A]=P,A++,x=P+T,N=0),F=ie,B=re}return A===0&&(!o||o.length===0)?null:(O[A]=L,R[A]=V,new E.ModelLineProjectionData(C,m,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 s(d,h,o,c,l){return o!==32&&(h===2&&c!==2||h!==1&&c===1||!l&&h===3&&c!==2||!l&&c===3&&h!==1)}function r(d,h,o,c,l){let a=0;if(l!==0){const u=_.firstNonWhitespaceIndex(d);if(u!==-1){for(let f=0;f<u;f++){const m=d.charCodeAt(f)===9?i(a,h):1;a+=m}const v=l===3?2:l===2?1:0;for(let f=0;f<v;f++){const m=i(a,h);a+=m}a+c>o&&(a=0)}}return a}}),define(X[274],ee([1,0]),function(K,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 y{constructor(w){this._getVerticalOffsetForLine=w,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(w){this._zones=w,this._zones.sort(k.compare)}setLineHeight(w){return this._lineHeight===w?!1:(this._lineHeight=w,this._colorZonesInvalid=!0,!0)}setPixelRatio(w){this._pixelRatio=w,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(w){return this._domWidth===w?!1:(this._domWidth=w,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(w){return this._domHeight===w?!1:(this._domHeight=w,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(w){return this._outerHeight===w?!1:(this._outerHeight=w,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const w=this._colorZonesInvalid,b=Math.floor(this._lineHeight),S=Math.floor(this.getCanvasHeight()),g=Math.floor(this._outerHeight),p=S/g,n=Math.floor(4*this._pixelRatio/2),t=[];for(let i=0,s=this._zones.length;i<s;i++){const r=this._zones[i];if(!w){const m=r.getColorZones();if(m){t.push(m);continue}}const d=this._getVerticalOffsetForLine(r.startLineNumber),h=r.heightInLines===0?this._getVerticalOffsetForLine(r.endLineNumber)+b:d+r.heightInLines*b,o=Math.floor(p*d),c=Math.floor(p*h);let l=Math.floor((o+c)/2),a=c-l;a<n&&(a=n),l-a<0&&(l=a),l+a>S&&(l=S-a);const u=r.color;let v=this._color2Id[u];v||(v=++this._lastAssignedId,this._color2Id[u]=v,this._id2Color[v]=u);const f=new _(l-a,l+a,v);r.setColorZone(f),t.push(f)}return this._colorZonesInvalid=!1,t.sort(_.compare),t}}e.OverviewZoneManager=y}),define(X[514],ee([1,0,36,274,140]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class E extends y.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(p=>this._context.viewLayout.getVerticalOffsetForLineNumber(p)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(g.get(64)),this._zoneManager.setPixelRatio(g.get(137)),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(137)&&(this._zoneManager.setPixelRatio(S.get(137)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(b){return this._render(),!0}onScrollChanged(b){return b.scrollHeightChanged&&(this._zoneManager.setOuterHeight(b.scrollHeight),this._render()),!0}onZonesChanged(b){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(b){this._domNode.setTop(b.top),this._domNode.setRight(b.right);let 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(),p=this._zoneManager.getId2Color(),n=this._domNode.domNode.getContext("2d");return n.clearRect(0,0,b,S),g.length>0&&this._renderOneLane(n,g,p,b),!0}_renderOneLane(b,S,g,p){let n=0,t=0,i=0;for(const s of S){const r=s.colorId,d=s.from,h=s.to;r!==n?(b.fillRect(0,t,p,i-t),n=r,b.fillStyle=g[n],t=d,i=h):i>=d?i=Math.max(i,h):(b.fillRect(0,t,p,i-t),t=d,i=h)}b.fillRect(0,t,p,i-t)}}e.OverviewRuler=E}),define(X[515],ee([1,0,474]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class k{constructor(E,w,b){this.configuration=E,this.theme=new _.EditorTheme(w),this.viewModel=b,this.viewLayout=b.viewLayout}addEventHandler(E){this.viewModel.addViewEventHandler(E)}removeEventHandler(E){this.viewModel.removeViewEventHandler(E)}}e.ViewContext=k}),define(X[516],ee([1,0,5,23]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class y{constructor(w,b){this._selection=w,this._isMovingLeft=b}getEditOperations(w,b){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const S=this._selection.startLineNumber,g=this._selection.startColumn,p=this._selection.endColumn;if(!(this._isMovingLeft&&g===1)&&!(!this._isMovingLeft&&p===w.getLineMaxColumn(S)))if(this._isMovingLeft){const n=new _.Range(S,g-1,S,g),t=w.getValueInRange(n);b.addEditOperation(n,null),b.addEditOperation(new _.Range(S,p,S,p),t)}else{const n=new _.Range(S,p,S,p+1),t=w.getValueInRange(n);b.addEditOperation(n,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=y}),define(X[108],ee([1,0,11]),function(K,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(n){this.value=n}equals(n){return this.value===n.value}contains(n){return this.equals(n)||this.value===""||n.value.startsWith(this.value+k.sep)}intersects(n){return this.contains(n)||n.contains(this)}append(n){return new k(this.value+k.sep+n)}}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 y;(function(p){p.Refactor="refactor",p.RefactorPreview="refactor preview",p.Lightbulb="lightbulb",p.Default="other (default)",p.SourceAction="source action",p.QuickFix="quick fix action",p.FixAll="fix all",p.OrganizeImports="organize imports",p.AutoFix="auto fix",p.QuickFixHover="quick fix hover window",p.OnSave="save participants",p.ProblemsView="problems view"})(y||(e.CodeActionTriggerSource=y={}));function E(p,n){return!(p.include&&!p.include.intersects(n)||p.excludes&&p.excludes.some(t=>b(n,t,p.include))||!p.includeSourceActions&&k.Source.contains(n))}e.mayIncludeActionsOfKind=E;function w(p,n){const t=n.kind?new k(n.kind):void 0;return!(p.include&&(!t||!p.include.contains(t))||p.excludes&&t&&p.excludes.some(i=>b(t,i,p.include))||!p.includeSourceActions&&t&&k.Source.contains(t)||p.onlyIncludePreferredActions&&!n.isPreferred)}e.filtersAction=w;function b(p,n,t){return!(!n.contains(p)||t&&n.contains(t))}class S{static fromUser(n,t){return!n||typeof n!="object"?new S(t.kind,t.apply,!1):new S(S.getKindFromUser(n,t.kind),S.getApplyFromUser(n,t.apply),S.getPreferredUser(n))}static getApplyFromUser(n,t){switch(typeof n.apply=="string"?n.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(n,t){return typeof n.kind=="string"?new k(n.kind):t}static getPreferredUser(n){return typeof n.preferred=="boolean"?n.preferred:!1}constructor(n,t,i){this.kind=n,this.apply=t,this.preferred=i}}e.CodeActionCommandArgs=S;class g{constructor(n,t){this.action=n,this.provider=t}resolve(n){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,n)}catch(s){(0,_.onUnexpectedExternalError)(s)}i&&(this.action.edit=i.edit)}return this})}}e.CodeActionItem=g}),define(X[275],ee([1,0,65,12,5,23]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class w{constructor(S,g,p){this.languageConfigurationService=p,this._selection=S,this._insertSpace=g,this._usedEndToken=null}static _haystackHasNeedleAtOffset(S,g,p){if(p<0)return!1;const n=g.length,t=S.length;if(p+n>t)return!1;for(let i=0;i<n;i++){const s=S.charCodeAt(p+i),r=g.charCodeAt(i);if(s!==r&&!(s>=65&&s<=90&&s+32===r)&&!(r>=65&&r<=90&&r+32===s))return!1}return!0}_createOperationsForBlockComment(S,g,p,n,t,i){const s=S.startLineNumber,r=S.startColumn,d=S.endLineNumber,h=S.endColumn,o=t.getLineContent(s),c=t.getLineContent(d);let l=o.lastIndexOf(g,r-1+g.length),a=c.indexOf(p,h-1-p.length);if(l!==-1&&a!==-1)if(s===d)o.substring(l+g.length,a).indexOf(p)>=0&&(l=-1,a=-1);else{const v=o.substring(l+g.length),f=c.substring(0,a);(v.indexOf(p)>=0||f.indexOf(p)>=0)&&(l=-1,a=-1)}let u;l!==-1&&a!==-1?(n&&l+g.length<o.length&&o.charCodeAt(l+g.length)===32&&(g=g+" "),n&&a>0&&c.charCodeAt(a-1)===32&&(p=" "+p,a-=1),u=w._createRemoveBlockCommentOperations(new y.Range(s,l+g.length+1,d,a+1),g,p)):(u=w._createAddBlockCommentOperations(S,g,p,this._insertSpace),this._usedEndToken=u.length===1?p:null);for(const v of u)i.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(S,g,p){const n=[];return y.Range.isEmpty(S)?n.push(_.EditOperation.delete(new y.Range(S.startLineNumber,S.startColumn-g.length,S.endLineNumber,S.endColumn+p.length))):(n.push(_.EditOperation.delete(new y.Range(S.startLineNumber,S.startColumn-g.length,S.startLineNumber,S.startColumn))),n.push(_.EditOperation.delete(new y.Range(S.endLineNumber,S.endColumn,S.endLineNumber,S.endColumn+p.length)))),n}static _createAddBlockCommentOperations(S,g,p,n){const t=[];return y.Range.isEmpty(S)?t.push(_.EditOperation.replace(new y.Range(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn),g+" "+p)):(t.push(_.EditOperation.insert(new k.Position(S.startLineNumber,S.startColumn),g+(n?" ":""))),t.push(_.EditOperation.insert(new k.Position(S.endLineNumber,S.endColumn),(n?" ":"")+p))),t}getEditOperations(S,g){const p=this._selection.startLineNumber,n=this._selection.startColumn;S.tokenization.tokenizeIfCheap(p);const t=S.getLanguageIdAtPosition(p,n),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 p=g.getInverseEditOperations();if(p.length===2){const n=p[0],t=p[1];return new E.Selection(n.range.endLineNumber,n.range.endColumn,t.range.startLineNumber,t.range.startColumn)}else{const n=p[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new E.Selection(n.endLineNumber,n.endColumn+t,n.endLineNumber,n.endColumn+t)}}}e.BlockCommentCommand=w}),define(X[517],ee([1,0,9,65,12,5,23,275]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class S{constructor(p,n,t,i,s,r,d){this.languageConfigurationService=p,this._selection=n,this._tabSize=t,this._type=i,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=d||!1}static _gatherPreflightCommentStrings(p,n,t,i){p.tokenization.tokenizeIfCheap(n);const s=p.getLanguageIdAtPosition(n,1),r=i.getLanguageConfiguration(s).comments,d=r?r.lineCommentToken:null;if(!d)return null;const h=[];for(let o=0,c=t-n+1;o<c;o++)h[o]={ignore:!1,commentStr:d,commentStrOffset:0,commentStrLength:d.length};return h}static _analyzeLines(p,n,t,i,s,r,d,h){let o=!0,c;p===0?c=!0:p===1?c=!1:c=!0;for(let l=0,a=i.length;l<a;l++){const u=i[l],v=s+l;if(v===s&&d){u.ignore=!0;continue}const f=t.getLineContent(v),m=_.firstNonWhitespaceIndex(f);if(m===-1){u.ignore=r,u.commentStrOffset=f.length;continue}if(o=!1,u.ignore=!1,u.commentStrOffset=m,c&&!b.BlockCommentCommand._haystackHasNeedleAtOffset(f,u.commentStr,m)&&(p===0?c=!1:p===1||(u.ignore=!0)),c&&n){const C=m+u.commentStrLength;C<f.length&&f.charCodeAt(C)===32&&(u.commentStrLength+=1)}}if(p===0&&o){c=!1;for(let l=0,a=i.length;l<a;l++)i[l].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:i}}static _gatherPreflightData(p,n,t,i,s,r,d,h){const o=S._gatherPreflightCommentStrings(t,i,s,h);return o===null?{supported:!1}:S._analyzeLines(p,n,t,o,i,r,d,h)}_executeLineComments(p,n,t,i){let s;t.shouldRemoveComments?s=S._createRemoveLineCommentsOperations(t.lines,i.startLineNumber):(S._normalizeInsertionPoint(p,t.lines,i.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(t.lines,i.startLineNumber));const r=new y.Position(i.positionLineNumber,i.positionColumn);for(let d=0,h=s.length;d<h;d++)n.addEditOperation(s[d].range,s[d].text),E.Range.isEmpty(s[d].range)&&E.Range.getStartPosition(s[d].range).equals(r)&&p.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(s[d].text||"").length);this._selectionId=n.trackSelection(i)}_attemptRemoveBlockComment(p,n,t,i){let s=n.startLineNumber,r=n.endLineNumber;const d=i.length+Math.max(p.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.startColumn);let h=p.getLineContent(s).lastIndexOf(t,d-1),o=p.getLineContent(r).indexOf(i,n.endColumn-1-t.length);return h!==-1&&o===-1&&(o=p.getLineContent(s).indexOf(i,h+t.length),r=s),h===-1&&o!==-1&&(h=p.getLineContent(r).lastIndexOf(t,o),s=r),n.isEmpty()&&(h===-1||o===-1)&&(h=p.getLineContent(s).indexOf(t),h!==-1&&(o=p.getLineContent(s).indexOf(i,h+t.length))),h!==-1&&p.getLineContent(s).charCodeAt(h+t.length)===32&&(t+=" "),o!==-1&&p.getLineContent(r).charCodeAt(o-1)===32&&(i=" "+i,o-=1),h!==-1&&o!==-1?b.BlockCommentCommand._createRemoveBlockCommentOperations(new E.Range(s,h+t.length+1,r,o+1),t,i):null}_executeBlockComment(p,n,t){p.tokenization.tokenizeIfCheap(t.startLineNumber);const i=p.getLanguageIdAtPosition(t.startLineNumber,1),s=this.languageConfigurationService.getLanguageConfiguration(i).comments;if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const r=s.blockCommentStartToken,d=s.blockCommentEndToken;let h=this._attemptRemoveBlockComment(p,t,r,d);if(!h){if(t.isEmpty()){const o=p.getLineContent(t.startLineNumber);let c=_.firstNonWhitespaceIndex(o);c===-1&&(c=o.length),h=b.BlockCommentCommand._createAddBlockCommentOperations(new E.Range(t.startLineNumber,c+1,t.startLineNumber,o.length+1),r,d,this._insertSpace)}else h=b.BlockCommentCommand._createAddBlockCommentOperations(new E.Range(t.startLineNumber,p.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.endLineNumber,p.getLineMaxColumn(t.endLineNumber)),r,d,this._insertSpace);h.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=n.trackSelection(t);for(const o of h)n.addEditOperation(o.range,o.text)}getEditOperations(p,n){let t=this._selection;if(this._moveEndPositionDown=!1,t.startLineNumber===t.endLineNumber&&this._ignoreFirstLine){n.addEditOperation(new E.Range(t.startLineNumber,p.getLineMaxColumn(t.startLineNumber),t.startLineNumber+1,1),t.startLineNumber===p.getLineCount()?"":`
- `),this._selectionId=n.trackSelection(t);return}t.startLineNumber<t.endLineNumber&&t.endColumn===1&&(this._moveEndPositionDown=!0,t=t.setEndPosition(t.endLineNumber-1,p.getLineMaxColumn(t.endLineNumber-1)));const i=S._gatherPreflightData(this._type,this._insertSpace,p,t.startLineNumber,t.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return i.supported?this._executeLineComments(p,n,i,t):this._executeBlockComment(p,n,t)}computeCursorState(p,n){let t=n.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(t=t.setEndPosition(t.endLineNumber+1,1)),new w.Selection(t.selectionStartLineNumber,t.selectionStartColumn+this._deltaColumn,t.positionLineNumber,t.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(p,n){const t=[];for(let i=0,s=p.length;i<s;i++){const r=p[i];r.ignore||t.push(k.EditOperation.delete(new E.Range(n+i,r.commentStrOffset+1,n+i,r.commentStrOffset+r.commentStrLength+1)))}return t}_createAddLineCommentsOperations(p,n){const t=[],i=this._insertSpace?" ":"";for(let s=0,r=p.length;s<r;s++){const d=p[s];d.ignore||t.push(k.EditOperation.insert(new y.Position(n+s,d.commentStrOffset+1),d.commentStr+i))}return t}static nextVisibleColumn(p,n,t,i){return t?p+(n-p%n):p+i}static _normalizeInsertionPoint(p,n,t,i){let s=1073741824,r,d;for(let h=0,o=n.length;h<o;h++){if(n[h].ignore)continue;const c=p.getLineContent(t+h);let l=0;for(let a=0,u=n[h].commentStrOffset;l<s&&a<u;a++)l=S.nextVisibleColumn(l,i,c.charCodeAt(a)===9,1);l<s&&(s=l)}s=Math.floor(s/i)*i;for(let h=0,o=n.length;h<o;h++){if(n[h].ignore)continue;const c=p.getLineContent(t+h);let l=0;for(r=0,d=n[h].commentStrOffset;l<s&&r<d;r++)l=S.nextVisibleColumn(l,i,c.charCodeAt(r)===9,1);l>s?n[h].commentStrOffset=r-1:n[h].commentStrOffset=r}}}e.LineCommentCommand=S}),define(X[518],ee([1,0,5,23]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class y{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=y}),define(X[519],ee([1,0,5]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class k{constructor(E,w,b){this._editorSelection=E,this._ranges=w,this._replaceStrings=b,this._trackedEditorSelectionId=null}getEditOperations(E,w){if(this._ranges.length>0){const b=[];for(let p=0;p<this._ranges.length;p++)b.push({range:this._ranges[p],text:this._replaceStrings[p]});b.sort((p,n)=>_.Range.compareRangesUsingStarts(p.range,n.range));const S=[];let g=b[0];for(let p=1;p<b.length;p++)g.range.endLineNumber===b[p].range.startLineNumber&&g.range.endColumn===b[p].range.startColumn?(g.range=g.range.plusRange(b[p].range),g.text=g.text+b[p].text):(S.push(g),g=b[p]);S.push(g);for(const p of S)w.addEditOperation(p.range,p.text)}this._trackedEditorSelectionId=w.trackSelection(this._editorSelection)}computeCursorState(E,w){return w.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=k}),define(X[520],ee([1,0,374]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;class k{constructor(p){this.staticValue=p,this.kind=0}}class y{constructor(p){this.pieces=p,this.kind=1}}class E{static fromStaticValue(p){return new E([w.staticValue(p)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(p){!p||p.length===0?this._state=new k(""):p.length===1&&p[0].staticValue!==null?this._state=new k(p[0].staticValue):this._state=new y(p)}buildReplaceString(p,n){if(this._state.kind===0)return n?(0,_.buildReplaceStringWithCasePreserved)(p,this._state.staticValue):this._state.staticValue;let t="";for(let i=0,s=this._state.pieces.length;i<s;i++){const r=this._state.pieces[i];if(r.staticValue!==null){t+=r.staticValue;continue}let d=E._substitute(r.matchIndex,p);if(r.caseOps!==null&&r.caseOps.length>0){const h=[],o=r.caseOps.length;let c=0;for(let l=0,a=d.length;l<a;l++){if(c>=o){h.push(d.slice(l));break}switch(r.caseOps[c]){case"U":h.push(d[l].toUpperCase());break;case"u":h.push(d[l].toUpperCase()),c++;break;case"L":h.push(d[l].toLowerCase());break;case"l":h.push(d[l].toLowerCase()),c++;break;default:h.push(d[l])}}d=h.join("")}t+=d}return t}static _substitute(p,n){if(n===null)return"";if(p===0)return n[0];let t="";for(;p>0;){if(p<n.length)return(n[p]||"")+t;t=String(p%10)+t,p=Math.floor(p/10)}return"$"+t}}e.ReplacePattern=E;class w{static staticValue(p){return new w(p,-1,null)}static caseOps(p,n){return new w(null,p,n)}constructor(p,n,t){this.staticValue=p,this.matchIndex=n,!t||t.length===0?this.caseOps=null:this.caseOps=t.slice(0)}}e.ReplacePiece=w;class b{constructor(p){this._source=p,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(p){this._emitStatic(this._source.substring(this._lastCharIndex,p)),this._lastCharIndex=p}emitStatic(p,n){this._emitStatic(p),this._lastCharIndex=n}_emitStatic(p){p.length!==0&&(this._currentStaticPiece+=p)}emitMatchIndex(p,n,t){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=w.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=w.caseOps(p,t),this._lastCharIndex=n}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=w.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new E(this._result)}}function S(g){if(!g||g.length===0)return new E(null);const p=[],n=new b(g);for(let t=0,i=g.length;t<i;t++){const s=g.charCodeAt(t);if(s===92){if(t++,t>=i)break;const r=g.charCodeAt(t);switch(r){case 92:n.emitUnchanged(t-1),n.emitStatic("\\",t+1);break;case 110:n.emitUnchanged(t-1),n.emitStatic(`
- `,t+1);break;case 116:n.emitUnchanged(t-1),n.emitStatic(" ",t+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(t-1),n.emitStatic("",t+1),p.push(String.fromCharCode(r));break}continue}if(s===36){if(t++,t>=i)break;const r=g.charCodeAt(t);if(r===36){n.emitUnchanged(t-1),n.emitStatic("$",t+1);continue}if(r===48||r===38){n.emitUnchanged(t-1),n.emitMatchIndex(0,t+1,p),p.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),n.emitUnchanged(t-2),n.emitMatchIndex(d,t+1,p),p.length=0;continue}}n.emitUnchanged(t-1),n.emitMatchIndex(d,t+1,p),p.length=0;continue}}}return n.finalize()}e.parseReplaceString=S}),define(X[176],ee([1,0]),function(K,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,p=b%32,n=this._states[g];S?this._states[g]=n|1<<p:this._states[g]=n&~(1<<p)}}class y{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,p)=>{const n=b[b.length-1];return this.getStartLineNumber(n)<=g&&this.getEndLineNumber(n)>=p};for(let g=0,p=this._startIndexes.length;g<p;g++){const n=this._startIndexes[g],t=this._endIndexes[g];if(n>e.MAX_LINE_NUMBER||t>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;b.length>0&&!S(n,t);)b.pop();const i=b.length>0?b[b.length-1]:-1;b.push(g),this._startIndexes[g]=n+((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 p=0;p<this._types.length;p++)this._types[p]===b&&(this.setCollapsed(p,S),g=!0);return g}toRegion(b){return new E(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 p=Math.floor((S+g)/2);b<this.getStartLineNumber(p)?g=p:S=p+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),p=new Uint32Array(S);let n=[],t=!1;for(let s=0;s<S;s++){const r=b[s];g[s]=r.startLineNumber,p[s]=r.endLineNumber,n.push(r.type),r.type&&(t=!0)}t||(n=void 0);const i=new y(g,p,n);for(let s=0;s<S;s++)b[s].isCollapsed&&i.setCollapsed(s,!0),i.setSource(s,b[s].source);return i}static sanitizeAndMerge(b,S,g){g=g??Number.MAX_VALUE;const p=(a,u)=>Array.isArray(a)?v=>v<u?a[v]:void 0:v=>v<u?a.toFoldRange(v):void 0,n=p(b,b.length),t=p(S,S.length);let i=0,s=0,r=n(0),d=t(0);const h=[];let o,c=0;const l=[];for(;r||d;){let a;if(d&&(!r||r.startLineNumber>=d.startLineNumber))r&&r.startLineNumber===d.startLineNumber?(d.source===1?a=d:(a=r,a.isCollapsed=d.isCollapsed&&r.endLineNumber===d.endLineNumber,a.source=0),r=n(++i)):(a=d,d.isCollapsed&&d.source===0&&(a.source=2)),d=t(++s);else{let u=s,v=d;for(;;){if(!v||v.startLineNumber>r.endLineNumber){a=r;break}if(v.source===1&&v.endLineNumber>r.endLineNumber)break;v=t(++u)}r=n(++i)}if(a){for(;o&&o.endLineNumber<a.startLineNumber;)o=h.pop();a.endLineNumber>a.startLineNumber&&a.startLineNumber>c&&a.endLineNumber<=g&&(!o||o.endLineNumber>=a.endLineNumber)&&(l.push(a),c=a.startLineNumber,o&&h.push(o),o=a)}}return l}}e.FoldingRegions=y;class E{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=E}),define(X[276],ee([1,0,198,176]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=void 0;const y=5e3,E="indent";class w{constructor(n,t,i){this.editorModel=n,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=E}dispose(){}compute(n){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,s=t&&t.markers;return Promise.resolve(g(this.editorModel,i,s,this.foldingRangesLimit))}}e.IndentRangeProvider=w;class b{constructor(n){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=n}insertFirst(n,t,i){if(n>k.MAX_LINE_NUMBER||t>k.MAX_LINE_NUMBER)return;const s=this._length;this._startIndexes[s]=n,this._endIndexes[s]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(n){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let r=this._length-1,d=0;r>=0;r--,d++)i[d]=this._startIndexes[r],s[d]=this._endIndexes[r];return new k.FoldingRegions(i,s)}else{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._indentOccurrences.length;for(let o=0;o<this._indentOccurrences.length;o++){const c=this._indentOccurrences[o];if(c){if(c+i>t){s=o;break}i+=c}}const r=n.getOptions().tabSize,d=new Uint32Array(t),h=new Uint32Array(t);for(let o=this._length-1,c=0;o>=0;o--){const l=this._startIndexes[o],a=n.getLineContent(l),u=(0,_.computeIndentLevel)(a,r);(u<s||u===s&&i++<t)&&(d[c]=l,h[c]=this._endIndexes[o],c++)}return new k.FoldingRegions(d,h)}}}e.RangesCollector=b;const S={limit:y,update:()=>{}};function g(p,n,t,i=S){const s=p.getOptions().tabSize,r=new b(i);let d;t&&(d=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const h=[],o=p.getLineCount()+1;h.push({indent:-1,endAbove:o,line:o});for(let c=p.getLineCount();c>0;c--){const l=p.getLineContent(c),a=(0,_.computeIndentLevel)(l,s);let u=h[h.length-1];if(a===-1){n&&(u.endAbove=c);continue}let v;if(d&&(v=l.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,a),u.line=c,u.indent=a,u.endAbove=c;continue}}else{h.push({indent:-2,endAbove:c,line:c});continue}if(u.indent>a){do h.pop(),u=h[h.length-1];while(u.indent>a);const f=u.endAbove-1;f-c>=1&&r.insertFirst(c,f,a)}u.indent===a?u.endAbove=c:h.push({indent:a,endAbove:c,line:c})}return r.toIndentRanges(p)}e.computeRanges=g}),define(X[277],ee([1,0,11,2,176]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const E={},w="syntax";class b{constructor(t,i,s,r,d){this.editorModel=t,this.providers=i,this.handleFoldingRangesChange=s,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(s))}compute(t){return S(this.providers,this.editorModel,t).then(i=>{var s,r;return i?p(i,this.foldingRangesLimit):(r=(s=this.fallbackRangeProvider)===null||s===void 0?void 0:s.compute(t))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=b;function S(n,t,i){let s=null;const r=n.map((d,h)=>Promise.resolve(d.provideFoldingRanges(t,E,i)).then(o=>{if(!i.isCancellationRequested&&Array.isArray(o)){Array.isArray(s)||(s=[]);const c=t.getLineCount();for(const l of o)l.start>0&&l.end>l.start&&l.end<=c&&s.push({start:l.start,end:l.end,rank:h,kind:l.kind})}},_.onUnexpectedExternalError));return Promise.all(r).then(d=>s)}class g{constructor(t){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=t}add(t,i,s,r){if(t>y.MAX_LINE_NUMBER||i>y.MAX_LINE_NUMBER)return;const d=this._length;this._startIndexes[d]=t,this._endIndexes[d]=i,this._nestingLevels[d]=r,this._types[d]=s,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let r=0;r<this._length;r++)i[r]=this._startIndexes[r],s[r]=this._endIndexes[r];return new y.FoldingRegions(i,s,this._types)}else{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._nestingLevelCounts.length;for(let o=0;o<this._nestingLevelCounts.length;o++){const c=this._nestingLevelCounts[o];if(c){if(c+i>t){s=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 l=this._nestingLevels[o];(l<s||l===s&&i++<t)&&(r[c]=this._startIndexes[o],d[c]=this._endIndexes[o],h[c]=this._types[o],c++)}return new y.FoldingRegions(r,d,h)}}}function p(n,t){const i=n.sort((h,o)=>{let c=h.start-o.start;return c===0&&(c=h.rank-o.rank),c}),s=new g(t);let r;const d=[];for(const h of i)if(!r)r=h,s.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,s.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}s.add(h.start,h.end,h.kind&&h.kind.value,d.length)}return s.toIndentRanges()}e.sanitizeRanges=p}),define(X[278],ee([1,0,65,5,115]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class E{static _handleEolEdits(b,S){let g;const p=[];for(const n of S)typeof n.eol=="number"&&(g=n.eol),n.range&&typeof n.text=="string"&&p.push(n);return typeof g=="number"&&b.hasModel()&&b.getModel().pushEOL(g),p}static _isFullModelReplaceEdit(b,S){if(!b.hasModel())return!1;const g=b.getModel(),p=g.validateRange(S.range);return g.getFullModelRange().equalsRange(p)}static execute(b,S,g){g&&b.pushUndoStop();const p=y.StableEditorScrollState.capture(b),n=E._handleEolEdits(b,S);n.length===1&&E._isFullModelReplaceEdit(b,n[0])?b.executeEdits("formatEditsCommand",n.map(t=>_.EditOperation.replace(k.Range.lift(t.range),t.text))):b.executeEdits("formatEditsCommand",n.map(t=>_.EditOperation.replaceMove(k.Range.lift(t.range),t.text))),g&&b.pushUndoStop(),p.restoreRelativeVerticalPositionOfCursor(b)}}e.FormattingEdit=E}),define(X[94],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class _{constructor(E,w,b,S){this.priority=E,this.range=w,this.initialMousePosX=b,this.initialMousePosY=S,this.type=1}equals(E){return E.type===1&&this.range.equalsRange(E.range)}canAdoptVisibleHover(E,w){return E.type===1&&w.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=_;class k{constructor(E,w,b,S,g,p){this.priority=E,this.owner=w,this.range=b,this.initialMousePosX=S,this.initialMousePosY=g,this.supportsMarkerHover=p,this.type=2}equals(E){return E.type===2&&this.owner===E.owner}canAdoptVisibleHover(E,w){return E.type===2&&this.owner===E.owner}}e.HoverForeignElementAnchor=k,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(E){this._participants.push(E)}getAll(){return this._participants}}}),define(X[521],ee([1,0,23]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class k{constructor(E,w,b){this._editRange=E,this._originalSelection=w,this._text=b}getEditOperations(E,w){w.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(E,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(X[279],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function _(y,E){let w=0;for(let b=0;b<y.length;b++)y.charAt(b)===" "?w+=E:w++;return w}e.getSpaceCnt=_;function k(y,E,w){y=y<0?0:y;let b="";if(!w){const S=Math.floor(y/E);y=y%E;for(let g=0;g<S;g++)b+=" "}for(let S=0;S<y;S++)b+=" ";return b}e.generateIndent=k}),define(X[203],ee([1,0]),function(K,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(X[142],ee([1,0,11,2,80,12,5]),function(K,e,_,k,y,E,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 l=w.Range.lift(c.range);return{startOffset:h.getOffset(l.getStartPosition()),endOffset:h.getOffset(l.getEndPosition()),text:c.text}});o.sort((c,l)=>l.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)===`
- `&&this.lineStartOffsetByLineIdx.push(h+1)}getOffset(d){return this.lineStartOffsetByLineIdx[d.lineNumber-1]+d.column-1}}const g=[];function p(){return g}e.getReadonlyEmptyArray=p;class n{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=n;function t(r,d){const h=new k.DisposableStore,o=r.createDecorationsCollection();return h.add((0,y.autorun)(`Apply decorations from ${d.debugName}`,c=>{const l=d.read(c);o.set(l)})),h.add({dispose:()=>{o.clear()}}),h}e.applyObservableDecorations=t;function i(r,d){return new E.Position(r.lineNumber+d.lineNumber-1,d.lineNumber===1?r.column+d.column-1:d.column)}e.addPositions=i;function s(r){let d=1,h=1;for(const o of r)o===`
- `?(d++,h=1):h++;return new E.Position(d,h)}e.lengthOfText=s}),define(X[204],ee([1,0,142]),function(K,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(n=>({range:{startLineNumber:1,endLineNumber:1,startColumn:n.column,endColumn:n.column},text:n.lines.join(`
- `)}))).substring(this.parts[0].column-1)}get lineCount(){return 1+this.parts.reduce((b,S)=>b+S.lines.length-1,0)}}e.GhostText=k;class y{constructor(b,S,g){this.column=b,this.lines=S,this.preview=g}}e.GhostTextPart=y;class E{constructor(b,S,g,p=0){this.lineNumber=b,this.columnRange=S,this.newLines=g,this.additionalReservedLineCount=p,this.parts=[new y(this.columnRange.endColumnExclusive,this.newLines,!1)]}}e.GhostTextReplacement=E}),define(X[280],ee([1,0,161,9,5,204,142]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleTextEdit=void 0;class b{constructor(s,r){this.range=s,this.text=r}removeCommonPrefix(s,r){const d=r?this.range.intersectRanges(r):this.range;if(!d)return this;const h=s.getValueInRange(d,1),o=(0,k.commonPrefixLength)(h,this.text),c=(0,w.addPositions)(this.range.getStartPosition(),(0,w.lengthOfText)(h.substring(0,o))),l=this.text.substring(o),a=y.Range.fromPositions(c,this.range.getEndPosition());return new b(a,l)}augments(s){return this.text.startsWith(s.text)&&S(this.range,s.range)}computeGhostText(s,r,d,h=0){let o=this.removeCommonPrefix(s);if(o.range.endLineNumber!==o.range.startLineNumber)return;const c=s.getLineContent(o.range.startLineNumber),l=(0,k.getLeadingWhitespace)(c).length;if(o.range.startColumn-1<=l){const L=(0,k.getLeadingWhitespace)(o.text).length,D=c.substring(o.range.startColumn-1,l),I=y.Range.fromPositions(o.range.getStartPosition().delta(0,D.length),o.range.getEndPosition()),T=o.text.startsWith(D)?o.text.substring(D.length):o.text.substring(L);o=new b(I,T)}const u=s.getValueInRange(o.range),v=p(u,o.text);if(!v)return;const f=o.range.startLineNumber,m=new Array;if(r==="prefix"){const L=v.filter(D=>D.originalLength===0);if(L.length>1||L.length===1&&L[0].originalStart!==u.length)return}const C=o.text.length-h;for(const L of v){const D=o.range.startColumn+L.originalStart+L.originalLength;if(r==="subwordSmart"&&d&&d.lineNumber===o.range.startLineNumber&&D<d.column||L.originalLength>0)return;if(L.modifiedLength===0)continue;const I=L.modifiedStart+L.modifiedLength,T=Math.max(L.modifiedStart,Math.min(I,C)),O=o.text.substring(L.modifiedStart,T),R=o.text.substring(T,Math.max(L.modifiedStart,I));if(O.length>0){const A=(0,k.splitLines)(O);m.push(new E.GhostTextPart(D,A,!1))}if(R.length>0){const A=(0,k.splitLines)(R);m.push(new E.GhostTextPart(D,A,!0))}}return new E.GhostText(f,m)}}e.SingleTextEdit=b;function S(i,s){return s.getStartPosition().equals(i.getStartPosition())&&s.getEndPosition().isBeforeOrEqual(i.getEndPosition())}let g;function p(i,s){if(g?.originalValue===i&&g?.newValue===s)return g?.changes;{let r=t(i,s,!0);if(r){const d=n(r);if(d>0){const h=t(i,s,!1);h&&n(h)<d&&(r=h)}}return g={originalValue:i,newValue:s,changes:r},r}}function n(i){let s=0;for(const r of i)s+=r.originalLength;return s}function t(i,s,r){if(i.length>5e3||s.length>5e3)return;function d(u){let v=0;for(let f=0,m=u.length;f<m;f++){const C=u.charCodeAt(f);C>v&&(v=C)}return v}const h=Math.max(d(i),d(s));function o(u){if(u<0)throw new Error("unexpected");return h+u+1}function c(u){let v=0,f=0;const m=new Int32Array(u.length);for(let C=0,L=u.length;C<L;C++)if(r&&u[C]==="("){const D=f*100+v;m[C]=o(2*D),v++}else if(r&&u[C]===")"){v=Math.max(v-1,0);const D=f*100+v;m[C]=o(2*D+1),v===0&&f++}else m[C]=u.charCodeAt(C);return m}const l=c(i),a=c(s);return new _.LcsDiff({getElements:()=>l},{getElements:()=>a}).ComputeDiff(!1).changes}}),define(X[522],ee([1,0,5,23]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class y{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 n=S.startLineNumber;n<=S.endLineNumber;n++)g.push(w.getLineContent(n));const p=g.join(`
- `);p===""&&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()?"":`
- `):this._isCopyingDown?b.addEditOperation(new _.Range(S.startLineNumber,1,S.startLineNumber,1),p+`
- `):b.addEditOperation(new _.Range(S.endLineNumber,w.getLineMaxColumn(S.endLineNumber),S.endLineNumber,w.getLineMaxColumn(S.endLineNumber)),`
- `+p),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,p=S.startColumn,n=S.endLineNumber,t=S.endColumn;this._startLineNumberDelta!==0&&(g=g+this._startLineNumberDelta,p=1),this._endLineNumberDelta!==0&&(n=n+this._endLineNumberDelta,t=1),S=k.Selection.createWithDirection(g,p,n,t,this._selectionDirection)}return S}}e.CopyLinesCommand=y}),define(X[523],ee([1,0,65,5]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class y{static getCollator(){return y._COLLATOR||(y._COLLATOR=new Intl.Collator),y._COLLATOR}constructor(S,g){this.selection=S,this.descending=g,this.selectionId=null}getEditOperations(S,g){const p=w(S,this.selection,this.descending);p&&g.addEditOperation(p.range,p.text),this.selectionId=g.trackSelection(this.selection)}computeCursorState(S,g){return g.getTrackedSelection(this.selectionId)}static canRun(S,g,p){if(S===null)return!1;const n=E(S,g,p);if(!n)return!1;for(let t=0,i=n.before.length;t<i;t++)if(n.before[t]!==n.after[t])return!0;return!1}}e.SortLinesCommand=y,y._COLLATOR=null;function E(b,S,g){const p=S.startLineNumber;let n=S.endLineNumber;if(S.endColumn===1&&n--,p>=n)return null;const t=[];for(let s=p;s<=n;s++)t.push(b.getLineContent(s));let i=t.slice(0);return i.sort(y.getCollator().compare),g===!0&&(i=i.reverse()),{startLineNumber:p,endLineNumber:n,before:t,after:i}}function w(b,S,g){const p=E(b,S,g);return p?_.EditOperation.replace(new k.Range(p.startLineNumber,1,p.endLineNumber,b.getLineMaxColumn(p.endLineNumber)),p.after.join(`
- `)):null}}),define(X[281],ee([1,0]),function(K,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,y,E){var w;const b=(w=E.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:k.getLanguageId(),resource:k.uri}))===null||w===void 0?void 0:w.enabled;return typeof b=="boolean"?b:y.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=_}),define(X[282],ee([1,0,60,12,5]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class E{provideSelectionRanges(b,S){return we(this,void 0,void 0,function*(){const g=[];for(const p of S){const n=[];g.push(n);const t=new Map;yield new Promise(i=>E._bracketsRightYield(i,0,b,p,t)),yield new Promise(i=>E._bracketsLeftYield(i,0,b,p,t,n))}return g})}static _bracketsRightYield(b,S,g,p,n){const t=new Map,i=Date.now();for(;;){if(S>=E._maxRounds){b();break}if(!p){b();break}const s=g.bracketPairs.findNextBracket(p);if(!s){b();break}if(Date.now()-i>E._maxDuration){setTimeout(()=>E._bracketsRightYield(b,S+1,g,p,n));break}if(s.bracketInfo.isOpeningBracket){const d=s.bracketInfo.bracketText,h=t.has(d)?t.get(d):0;t.set(d,h+1)}else{const d=s.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=n.get(d);o||(o=new _.LinkedList,n.set(d,o)),o.push(s.range)}}p=s.range.getEndPosition()}}static _bracketsLeftYield(b,S,g,p,n,t){const i=new Map,s=Date.now();for(;;){if(S>=E._maxRounds&&n.size===0){b();break}if(!p){b();break}const r=g.bracketPairs.findPrevBracket(p);if(!r){b();break}if(Date.now()-s>E._maxDuration){setTimeout(()=>E._bracketsLeftYield(b,S+1,g,p,n,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=n.get(h);if(c){const l=c.shift();c.size===0&&n.delete(h);const a=y.Range.fromPositions(r.range.getEndPosition(),l.getStartPosition()),u=y.Range.fromPositions(r.range.getStartPosition(),l.getEndPosition());t.push({range:a}),t.push({range:u}),E._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)}p=r.range.getStartPosition()}}static _addBracketLeading(b,S,g){if(S.startLineNumber===S.endLineNumber)return;const p=S.startLineNumber,n=b.getLineFirstNonWhitespaceColumn(p);n!==0&&n!==S.startColumn&&(g.push({range:y.Range.fromPositions(new k.Position(p,n),S.getEndPosition())}),g.push({range:y.Range.fromPositions(new k.Position(p,1),S.getEndPosition())}));const t=p-1;if(t>0){const i=b.getLineFirstNonWhitespaceColumn(t);i===S.startColumn&&i!==b.getLineLastNonWhitespaceColumn(t)&&(g.push({range:y.Range.fromPositions(new k.Position(t,i),S.getEndPosition())}),g.push({range:y.Range.fromPositions(new k.Position(t,1),S.getEndPosition())}))}}}e.BracketSelectionRangeProvider=E,E._maxDuration=30,E._maxRounds=2}),define(X[524],ee([1,0,9,5]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class y{provideSelectionRanges(w,b){const S=[];for(const g of b){const p=[];S.push(p),this._addInWordRanges(p,w,g),this._addWordRanges(p,w,g),this._addWhitespaceLine(p,w,g),p.push({range:w.getFullModelRange()})}return S}_addInWordRanges(w,b,S){const g=b.getWordAtPosition(S);if(!g)return;const{word:p,startColumn:n}=g,t=S.column-n;let i=t,s=t,r=0;for(;i>=0;i--){const d=p.charCodeAt(i);if(i!==t&&(d===95||d===45))break;if((0,_.isLowerAsciiLetter)(d)&&(0,_.isUpperAsciiLetter)(r))break;r=d}for(i+=1;s<p.length;s++){const d=p.charCodeAt(s);if((0,_.isUpperAsciiLetter)(d)&&(0,_.isLowerAsciiLetter)(r))break;if(d===95||d===45)break;r=d}i<s&&w.push({range:new k.Range(S.lineNumber,n+i,S.lineNumber,n+s)})}_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=y}),define(X[95],ee([1,0]),function(K,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 y&&this._children[this._children.length-1]instanceof y?this._children[this._children.length-1].value+=r.value:(r.parent=this,this._children.push(r)),this}replace(r,d){const{parent:h}=r,o=h.children.indexOf(r),c=h.children.slice(0);c.splice(o,1,...d),h._children=c,function l(a,u){for(const v of a)v.parent=u,l(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 y extends k{constructor(r){super(),this.value=r}toString(){return this.value}len(){return this.value.length}clone(){return new y(this.value)}}e.Text=y;class E extends k{}e.TransformableMarker=E;class w extends E{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 y&&(r.parent=this,this.options.push(r)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const r=new b;return this.options.forEach(r.appendChild,r),r}}e.Choice=b;class 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 p extends E{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 y(d)],!0):!1}clone(){const r=new p(this.name);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(d=>d.clone()),r}}e.Variable=p;function n(s,r){const d=[...s];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 n([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 p&&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){n(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 l=(u,v)=>{const f=o.get(u.index);if(!f)return;const m=new w(u.index);m.transform=u.transform;for(const C of f){const L=C.clone();m.appendChild(L),L instanceof w&&o.has(L.index)&&!v.has(L.index)&&(v.add(L.index),l(L,v),v.delete(L.index))}d.replace(u,[m])},a=new Set;for(const u of c)l(u,a);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 y(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 p(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 y("${"+d+":")),c.children.forEach(r.appendChild,r),!0}else if(c.index>0&&this._accept(7)){const l=new b;for(;;){if(this._parseChoiceElement(l)){if(this._accept(2))continue;if(this._accept(7)&&(c.appendChild(l),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 y(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 p(d);if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(c),!0;if(!this._parse(c))return r.appendChild(new y("${"+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 y(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 l=this._until(4);if(l)return r.appendChild(new g(Number(o),void 0,c,l)),!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 y(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=i}),define(X[205],ee([1,0]),function(K,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 y{constructor(w,b,S,g){this.uri=w,this.version=b,this.element=S,this.outlineProviderId=g}}e.StickyModel=y}),define(X[283],ee([1,0,16,64,9]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class E{constructor(S,g){this.leadingLineContent=S,this.characterCountDelta=g}}e.LineContext=E;class w{constructor(S,g,p,n,t,i,s=k.FuzzyScoreOptions.default,r=void 0){this.clipboardText=r,this._snippetCompareFn=w._compareCompletionItems,this._items=S,this._column=g,this._wordDistance=n,this._options=t,this._refilterKind=1,this._lineContext=p,this._fuzzyScoreOptions=s,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,p]of this.getItemsByProvider())p.length>0&&p[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:p}=this._lineContext;let n="",t="";const i=this._refilterKind===1?this._items:this._filteredItems,s=[],r=!this._options.filterGraceful||i.length>2e3?k.fuzzyScore:k.fuzzyScoreGracefulAggressive;for(let 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,l=c+p-(h.position.column-this._column);if(n.length!==l&&(n=l===0?"":g.slice(-l),t=n.toLowerCase()),h.word=n,l===0)h.score=k.FuzzyScore.Default;else{let a=0;for(;a<c;){const u=n.charCodeAt(a);if(u===32||u===9)a+=1;else break}if(a>=l)h.score=k.FuzzyScore.Default;else if(typeof h.completion.filterText=="string"){const u=r(n,t,a,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!u)continue;(0,y.compareIgnoreCase)(h.completion.filterText,h.textLabel)===0?h.score=u:(h.score=(0,k.anyScore)(n,t,a,h.textLabel,h.labelLow,0),h.score[0]=u[0])}else{const u=r(n,t,a,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),s.push(h),S.push(h.textLabel.length)}this._filteredItems=s.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(X[525],ee([1,0,16,2,116]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class E{constructor(b,S,g,p){this._disposables=new k.DisposableStore,this._disposables.add(g.onDidSuggest(n=>{n.completionModel.items.length===0&&this.reset()})),this._disposables.add(g.onDidCancel(n=>{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(n=>{if(this._active&&!S.isFrozen()&&g.state!==0){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&b.getOption(0)&&p(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 y.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=E}),define(X[526],ee([1,0,2]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class k{constructor(E,w){this._disposables=new _.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(E.onWillType(()=>{if(this._locked||!E.hasModel())return;const b=E.getSelections(),S=b.length;let g=!1;for(let n=0;n<S;n++)if(!b[n].isEmpty()){g=!0;break}if(!g){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const p=E.getModel();for(let n=0;n<S;n++){const t=b[n];if(p.getValueLengthInRange(t)>k._maxSelectionLength)return;this._lastOvertyped[n]={value:p.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(E){if(E>=0&&E<this._lastOvertyped.length)return this._lastOvertyped[E]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=k,k._maxSelectionLength=51200}),define(X[284],ee([1,0,16,5,282]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class E{static create(b,S){return we(this,void 0,void 0,function*(){if(!S.getOption(113).localityBonus||!S.hasModel())return E.None;const g=S.getModel(),p=S.getPosition();if(!b.canComputeWordRanges(g.uri))return E.None;const[n]=yield new y.BracketSelectionRangeProvider().provideSelectionRanges(g,[p]);if(n.length===0)return E.None;const t=yield b.computeWordRanges(g.uri,n[0].range);if(!t)return E.None;const i=g.getWordUntilPosition(p);return delete t[i.word],new class extends E{distance(s,r){if(!p.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(s),k.Range.compareRangesUsingStarts),c=o>=0?h[o]:h[Math.max(0,~o-1)];let l=n.length;for(const a of n){if(!k.Range.containsRange(a.range,c))break;l-=1}return l}}})}}e.WordDistance=E,E.None=new class extends E{distance(){return 0}}}),define(X[285],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function _(s){return Array.isArray(s)}e.isFuzzyActionArr=_;function k(s){return!_(s)}e.isFuzzyAction=k;function y(s){return typeof s=="string"}e.isString=y;function E(s){return!y(s)}e.isIAction=E;function w(s){return!s}e.empty=w;function b(s,r){return s.ignoreCase&&r?r.toLowerCase():r}e.fixCase=b;function S(s){return s.replace(/[&<>'"_]/g,"-")}e.sanitize=S;function g(s,r){console.log(`${s.languageId}: ${r}`)}e.log=g;function p(s,r){return new Error(`${s.languageId}: ${r}`)}e.createError=p;function n(s,r,d,h,o){const c=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let l=null;return r.replace(c,function(a,u,v,f,m,C,L,D,I){return w(v)?w(f)?!w(m)&&m<h.length?b(s,h[m]):!w(L)&&s&&typeof s[L]=="string"?s[L]:(l===null&&(l=o.split("."),l.unshift(o)),!w(C)&&C<l.length?b(s,l[C]):""):b(s,d):"$"})}e.substituteMatches=n;function t(s,r){let d=r;for(;d&&d.length>0;){const h=s.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(s,r){let d=r;for(;d&&d.length>0;){if(s.stateNames[d])return!0;const o=d.lastIndexOf(".");o<0?d=null:d=d.substr(0,o)}return!1}e.stateExists=i}),define(X[527],ee([1,0,285]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function k(s,r){if(!r||!Array.isArray(r))return!1;for(const d of r)if(!s(d))return!1;return!0}function y(s,r){return typeof s=="boolean"?s:r}function E(s,r){return typeof s=="string"?s:r}function w(s){const r={};for(const d of s)r[d]=!0;return r}function b(s,r=!1){r&&(s=s.map(function(h){return h.toLowerCase()}));const d=w(s);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(s,r){r=r.replace(/@@/g,"");let d=0,h;do h=!1,r=r.replace(/@(\w+)/g,function(c,l){h=!0;let a="";if(typeof s[l]=="string")a=s[l];else if(s[l]&&s[l]instanceof RegExp)a=s[l].source;else throw s[l]===void 0?_.createError(s,"language definition does not contain attribute '"+l+"', used at: "+r):_.createError(s,"attribute reference '"+l+"' must be a string, used at: "+r);return _.empty(a)?"":"(?:"+a+")"}),d++;while(h&&d<5);r=r.replace(/\x01/g,"@");const o=(s.ignoreCase?"i":"")+(s.unicode?"u":"");return new RegExp(r,o)}function g(s,r,d,h){if(h<0)return s;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 p(s,r,d,h){let o=-1,c=d,l=d.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);l&&(l[3]&&(o=parseInt(l[3]),l[2]&&(o=o+100)),c=l[4]);let a="~",u=c;!c||c.length===0?(a="!=",u=""):/^\w*$/.test(u)?a="==":(l=c.match(/^(@|!@|~|!~|==|!=)(.*)$/),l&&(a=l[1],u=l[2]));let v;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(u)){const f=b(u.split("|"),s.ignoreCase);v=function(m){return a==="~"?f(m):!f(m)}}else if(a==="@"||a==="!@"){const f=s[u];if(!f)throw _.createError(s,"the @ match target '"+u+"' is not defined, in rule: "+r);if(!k(function(C){return typeof C=="string"},f))throw _.createError(s,"the @ match target '"+u+"' must be an array of strings, in rule: "+r);const m=b(f,s.ignoreCase);v=function(C){return a==="@"?m(C):!m(C)}}else if(a==="~"||a==="!~")if(u.indexOf("$")<0){const f=S(s,"^"+u+"$");v=function(m){return a==="~"?f.test(m):!f.test(m)}}else v=function(f,m,C,L){return S(s,"^"+_.substituteMatches(s,u,m,C,L)+"$").test(f)};else if(u.indexOf("$")<0){const f=_.fixCase(s,u);v=function(m){return a==="=="?m===f:m!==f}}else{const f=_.fixCase(s,u);v=function(m,C,L,D,I){const T=_.substituteMatches(s,f,C,L,D);return a==="=="?m===T:m!==T}}return o===-1?{name:d,value:h,test:function(f,m,C,L){return v(f,f,m,C,L)}}:{name:d,value:h,test:function(f,m,C,L){const D=g(f,m,C,o);return v(D||"",f,m,C,L)}}}function n(s,r,d){if(d){if(typeof d=="string")return d;if(d.token||d.token===""){if(typeof d.token!="string")throw _.createError(s,"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(s,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+r);if(d.next){if(typeof d.next!="string")throw _.createError(s,"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(s,_.substituteMatches(s,o,"",[],""))))throw _.createError(s,"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,s.usesEmbedded=!0),h}}else if(Array.isArray(d)){const h=[];for(let o=0,c=d.length;o<c;o++)h[o]=n(s,r,d[o]);return{group:h}}else if(d.cases){const h=[];for(const c in d.cases)if(d.cases.hasOwnProperty(c)){const l=n(s,r,d.cases[c]);c==="@default"||c==="@"||c===""?h.push({test:void 0,value:l,name:c}):c==="@eos"?h.push({test:function(a,u,v,f){return f},value:l,name:c}):h.push(p(s,r,c,l))}const o=s.defaultToken;return{test:function(c,l,a,u){for(const v of h)if(!v.test||v.test(c,l,a,u))return v.value;return o}}}else throw _.createError(s,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+r)}else return{token:""}}class t{constructor(r){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=r}setRegex(r,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=n(r,this.name,d)}}function i(s,r){if(!r||typeof r!="object")throw new Error("Monarch: expecting a language definition object");const d={};d.languageId=s,d.includeLF=y(r.includeLF,!1),d.noThrow=!1,d.maxStack=100,d.start=typeof r.start=="string"?r.start:null,d.ignoreCase=y(r.ignoreCase,!1),d.unicode=y(r.unicode,!1),d.tokenPostfix=E(r.tokenPostfix,"."+d.languageId),d.defaultToken=E(r.defaultToken,"source"),d.usesEmbedded=!1;const h=r;h.languageId=s,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(l,a,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: "+l);if(f[0]==="@"&&(f=f.substr(1)),!r.tokenizer[f])throw _.createError(d,"include target '"+f+"' is not defined at: "+l);o(l+"."+f,a,r.tokenizer[f])}else{const m=new t(l);if(Array.isArray(v)&&v.length>=1&&v.length<=3)if(m.setRegex(h,v[0]),v.length>=3)if(typeof v[1]=="string")m.setAction(h,{token:v[1],next:v[2]});else if(typeof v[1]=="object"){const C=v[1];C.next=v[2],m.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: "+l);else m.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: "+l);v.name&&typeof v.name=="string"&&(m.name=v.name),v.matchOnlyAtStart&&(m.matchOnlyAtLineStart=y(v.matchOnlyAtLineStart,!1)),m.setRegex(h,v.regex),m.setAction(h,v.action)}a.push(m)}}}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 l in r.tokenizer)if(r.tokenizer.hasOwnProperty(l)){d.start||(d.start=l);const a=r.tokenizer[l];d.tokenizer[l]=new Array,o("tokenizer."+l,d.tokenizer[l],a)}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 l of r.brackets){let a=l;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw _.createError(d,"open and close brackets in a 'brackets' attribute must be different: "+a.open+`
- hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")c.push({token:a.token+d.tokenPostfix,open:_.fixCase(d,a.open),close:_.fixCase(d,a.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(X[528],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(X[529],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/findinput/findInput",e)}),define(X[530],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(X[531],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(X[532],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(X[533],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(X[534],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(X[535],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(X[536],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(X[537],ee([3,4]),function(K,e){return K.create("vs/base/browser/ui/tree/abstractTree",e)}),define(X[538],ee([3,4]),function(K,e){return K.create("vs/base/common/actions",e)}),define(X[539],ee([3,4]),function(K,e){return K.create("vs/base/common/errorMessage",e)}),define(X[540],ee([1,0,16,18,539]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function E(g,p){return p&&(g.stack||g.stacktrace)?y.localize(0,null,b(g),w(g.stack)||w(g.stacktrace)):b(g)}function w(g){return Array.isArray(g)?g.join(`
- `):g}function b(g){return typeof g.code=="string"&&typeof g.errno=="number"&&typeof g.syscall=="string"?y.localize(1,null,g.message):g.message||y.localize(2,null)}function S(g=null,p=!1){if(!g)return y.localize(3,null);if(Array.isArray(g)){const n=_.coalesce(g),t=S(n[0],p);return n.length>1?y.localize(4,null,t,n.length):t}if(k.isString(g))return g;if(g.detail){const n=g.detail;if(n.error)return E(n.error,p);if(n.exception)return E(n.exception,p)}return g.stack?E(g,p):g.message?g.message:y.localize(5,null)}e.toErrorMessage=S}),define(X[541],ee([3,4]),function(K,e){return K.create("vs/base/common/keybindingLabels",e)}),define(X[206],ee([1,0,541]),function(K,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 p=0,n=b.length;p<n;p++){const t=b[p],i=S(t);if(i===null)return null;g[p]=y(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 y(E,w,b){if(w===null)return"";const S=[];return E.ctrlKey&&S.push(b.ctrlKey),E.shiftKey&&S.push(b.shiftKey),E.altKey&&S.push(b.altKey),E.metaKey&&S.push(b.metaKey),w!==""&&S.push(w),S.join(b.separator)}}),define(X[542],ee([3,4]),function(K,e){return K.create("vs/base/common/platform",e)}),define(X[17],ee([1,0,542]),function(K,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 y=!1,E=!1,w=!1,b=!1,S=!1,g=!1,p=!1,n=!1,t=!1,i=!1,s,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 l=typeof((k=c?.versions)===null||k===void 0?void 0:k.electron)=="string",a=l&&c?.type==="renderer";if(typeof navigator=="object"&&!a)o=navigator.userAgent,y=o.indexOf("Windows")>=0,E=o.indexOf("Macintosh")>=0,n=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,w=o.indexOf("Linux")>=0,i=o?.indexOf("Mobi")>=0,g=!0,s=_.getConfiguredDefaultLocale(_.localize(0,null))||e.LANGUAGE_DEFAULT,r=s,d=navigator.language;else if(typeof c=="object"){y=c.platform==="win32",E=c.platform==="darwin",w=c.platform==="linux",b=w&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,p=l,t=!!c.env.CI||!!c.env.BUILD_ARTIFACTSTAGINGDIRECTORY,s=e.LANGUAGE_DEFAULT,r=e.LANGUAGE_DEFAULT;const C=c.env.VSCODE_NLS_CONFIG;if(C)try{const L=JSON.parse(C),D=L.availableLanguages["*"];s=L.locale,d=L.osLocale,r=D||e.LANGUAGE_DEFAULT,h=L._translationsConfigFile}catch{}S=!0}else console.error("Unable to resolve platform.");let u=0;E?u=1:y?u=3:w&&(u=2),e.isWindows=y,e.isMacintosh=E,e.isLinux=w,e.isNative=S,e.isWeb=g,e.isWebWorker=g&&typeof e.globals.importScripts=="function",e.isIOS=n,e.isMobile=i,e.userAgent=o,e.language=r,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const C=[];e.globals.addEventListener("message",D=>{if(D.data&&D.data.vscodeScheduleAsyncWork)for(let I=0,T=C.length;I<T;I++){const O=C[I];if(O.id===D.data.vscodeScheduleAsyncWork){C.splice(I,1),O.callback();return}}});let L=0;return D=>{const I=++L;C.push({id:I,callback:D}),e.globals.postMessage({vscodeScheduleAsyncWork:I},"*")}}return C=>setTimeout(C)})(),e.OS=E||n?2:y?1:3;let v=!0,f=!1;function m(){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=m,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(X[543],ee([1,0,17]),function(K,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 y=_.globals.vscode.process;k={get platform(){return y.platform},get arch(){return y.arch},get env(){return y.env},cwd(){return y.cwd()}}}else typeof process<"u"?k={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:k={get platform(){return _.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(X[88],ee([1,0,543]),function(K,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,y=97,E=90,w=122,b=46,S=47,g=92,p=58,n=63;class t extends Error{constructor(v,f,m){let C;typeof f=="string"&&f.indexOf("not ")===0?(C="must not be",f=f.replace(/^not /,"")):C="must be";const L=v.indexOf(".")!==-1?"property":"argument";let D=`The "${v}" ${L} ${C} of type ${f}`;D+=`. Received type ${typeof m}`,super(D),this.code="ERR_INVALID_ARG_TYPE"}}function i(u,v){if(u===null||typeof u!="object")throw new t(v,"Object",u)}function s(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<=E||u>=y&&u<=w}function c(u,v,f,m){let C="",L=0,D=-1,I=0,T=0;for(let O=0;O<=u.length;++O){if(O<u.length)T=u.charCodeAt(O);else{if(m(T))break;T=S}if(m(T)){if(!(D===O-1||I===1))if(I===2){if(C.length<2||L!==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="",L=0):(C=C.slice(0,R),L=C.length-1-C.lastIndexOf(f)),D=O,I=0;continue}else if(C.length!==0){C="",L=0,D=O,I=0;continue}}v&&(C+=C.length>0?`${f}..`:"..",L=2)}else C.length>0?C+=`${f}${u.slice(D+1,O)}`:C=u.slice(D+1,O),L=O-D-1;D=O,I=0}else T===b&&I!==-1?++I:I=-1}return C}function l(u,v){i(v,"pathObject");const f=v.dir||v.root,m=v.base||`${v.name||""}${v.ext||""}`;return f?f===v.root?`${f}${m}`:`${f}${u}${m}`:m}e.win32={resolve(...u){let v="",f="",m=!1;for(let C=u.length-1;C>=-1;C--){let L;if(C>=0){if(L=u[C],s(L,"path"),L.length===0)continue}else v.length===0?L=_.cwd():(L=_.env[`=${v}`]||_.cwd(),(L===void 0||L.slice(0,2).toLowerCase()!==v.toLowerCase()&&L.charCodeAt(2)===g)&&(L=`${v}\\`));const D=L.length;let I=0,T="",O=!1;const R=L.charCodeAt(0);if(D===1)d(R)&&(I=1,O=!0);else if(d(R))if(O=!0,d(L.charCodeAt(1))){let A=2,N=A;for(;A<D&&!d(L.charCodeAt(A));)A++;if(A<D&&A!==N){const P=L.slice(N,A);for(N=A;A<D&&d(L.charCodeAt(A));)A++;if(A<D&&A!==N){for(N=A;A<D&&!d(L.charCodeAt(A));)A++;(A===D||A!==N)&&(T=`\\\\${P}\\${L.slice(N,A)}`,I=A)}}}else I=1;else o(R)&&L.charCodeAt(1)===p&&(T=L.slice(0,2),I=2,D>2&&d(L.charCodeAt(2))&&(O=!0,I=3));if(T.length>0)if(v.length>0){if(T.toLowerCase()!==v.toLowerCase())continue}else v=T;if(m){if(v.length>0)break}else if(f=`${L.slice(I)}\\${f}`,m=O,O&&v.length>0)break}return f=c(f,!m,"\\",d),m?`${v}\\${f}`:`${v}${f}`||"."},normalize(u){s(u,"path");const v=u.length;if(v===0)return".";let f=0,m,C=!1;const L=u.charCodeAt(0);if(v===1)return h(L)?"\\":u;if(d(L))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&&(m=`\\\\${O}\\${u.slice(T,I)}`,f=I)}}}else f=1;else o(L)&&u.charCodeAt(1)===p&&(m=u.slice(0,2),f=2,v>2&&d(u.charCodeAt(2))&&(C=!0,f=3));let D=f<v?c(u.slice(f),!C,"\\",d):"";return D.length===0&&!C&&(D="."),D.length>0&&d(u.charCodeAt(v-1))&&(D+="\\"),m===void 0?C?`\\${D}`:D:C?`${m}\\${D}`:`${m}${D}`},isAbsolute(u){s(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)===p&&d(u.charCodeAt(2))},join(...u){if(u.length===0)return".";let v,f;for(let L=0;L<u.length;++L){const D=u[L];s(D,"path"),D.length>0&&(v===void 0?v=f=D:v+=`\\${D}`)}if(v===void 0)return".";let m=!0,C=0;if(typeof f=="string"&&d(f.charCodeAt(0))){++C;const L=f.length;L>1&&d(f.charCodeAt(1))&&(++C,L>2&&(d(f.charCodeAt(2))?++C:m=!1))}if(m){for(;C<v.length&&d(v.charCodeAt(C));)C++;C>=2&&(v=`\\${v.slice(C)}`)}return e.win32.normalize(v)},relative(u,v){if(s(u,"from"),s(v,"to"),u===v)return"";const f=e.win32.resolve(u),m=e.win32.resolve(v);if(f===m||(u=f.toLowerCase(),v=m.toLowerCase(),u===v))return"";let C=0;for(;C<u.length&&u.charCodeAt(C)===g;)C++;let L=u.length;for(;L-1>C&&u.charCodeAt(L-1)===g;)L--;const D=L-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=D<O?D:O;let A=-1,N=0;for(;N<R;N++){const x=u.charCodeAt(C+N);if(x!==v.charCodeAt(I+N))break;x===g&&(A=N)}if(N!==R){if(A===-1)return m}else{if(O>R){if(v.charCodeAt(I+N)===g)return m.slice(I+N+1);if(N===2)return m.slice(I+N)}D>R&&(u.charCodeAt(C+N)===g?A=N:N===2&&(A=3)),A===-1&&(A=0)}let P="";for(N=C+A+1;N<=L;++N)(N===L||u.charCodeAt(N)===g)&&(P+=P.length===0?"..":"\\..");return I+=A,P.length>0?`${P}${m.slice(I,T)}`:(m.charCodeAt(I)===g&&++I,m.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!==n&&f!==b)return`\\\\?\\UNC\\${v.slice(2)}`}}else if(o(v.charCodeAt(0))&&v.charCodeAt(1)===p&&v.charCodeAt(2)===g)return`\\\\?\\${v}`;return u},dirname(u){s(u,"path");const v=u.length;if(v===0)return".";let f=-1,m=0;const C=u.charCodeAt(0);if(v===1)return d(C)?u:".";if(d(C)){if(f=m=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=m=I+1)}}}}else o(C)&&u.charCodeAt(1)===p&&(f=v>2&&d(u.charCodeAt(2))?3:2,m=f);let L=-1,D=!0;for(let I=v-1;I>=m;--I)if(d(u.charCodeAt(I))){if(!D){L=I;break}}else D=!1;if(L===-1){if(f===-1)return".";L=f}return u.slice(0,L)},basename(u,v){v!==void 0&&s(v,"ext"),s(u,"path");let f=0,m=-1,C=!0,L;if(u.length>=2&&o(u.charCodeAt(0))&&u.charCodeAt(1)===p&&(f=2),v!==void 0&&v.length>0&&v.length<=u.length){if(v===u)return"";let D=v.length-1,I=-1;for(L=u.length-1;L>=f;--L){const T=u.charCodeAt(L);if(d(T)){if(!C){f=L+1;break}}else I===-1&&(C=!1,I=L+1),D>=0&&(T===v.charCodeAt(D)?--D===-1&&(m=L):(D=-1,m=I))}return f===m?m=I:m===-1&&(m=u.length),u.slice(f,m)}for(L=u.length-1;L>=f;--L)if(d(u.charCodeAt(L))){if(!C){f=L+1;break}}else m===-1&&(C=!1,m=L+1);return m===-1?"":u.slice(f,m)},extname(u){s(u,"path");let v=0,f=-1,m=0,C=-1,L=!0,D=0;u.length>=2&&u.charCodeAt(1)===p&&o(u.charCodeAt(0))&&(v=m=2);for(let I=u.length-1;I>=v;--I){const T=u.charCodeAt(I);if(d(T)){if(!L){m=I+1;break}continue}C===-1&&(L=!1,C=I+1),T===b?f===-1?f=I:D!==1&&(D=1):f!==-1&&(D=-1)}return f===-1||C===-1||D===0||D===1&&f===C-1&&f===m+1?"":u.slice(f,C)},format:l.bind(null,"\\"),parse(u){s(u,"path");const v={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return v;const f=u.length;let m=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(m=1,d(u.charCodeAt(1))){let A=2,N=A;for(;A<f&&!d(u.charCodeAt(A));)A++;if(A<f&&A!==N){for(N=A;A<f&&d(u.charCodeAt(A));)A++;if(A<f&&A!==N){for(N=A;A<f&&!d(u.charCodeAt(A));)A++;A===f?m=A:A!==N&&(m=A+1)}}}}else if(o(C)&&u.charCodeAt(1)===p){if(f<=2)return v.root=v.dir=u,v;if(m=2,d(u.charCodeAt(2))){if(f===3)return v.root=v.dir=u,v;m=3}}m>0&&(v.root=u.slice(0,m));let L=-1,D=m,I=-1,T=!0,O=u.length-1,R=0;for(;O>=m;--O){if(C=u.charCodeAt(O),d(C)){if(!T){D=O+1;break}continue}I===-1&&(T=!1,I=O+1),C===b?L===-1?L=O:R!==1&&(R=1):L!==-1&&(R=-1)}return I!==-1&&(L===-1||R===0||R===1&&L===I-1&&L===D+1?v.base=v.name=u.slice(D,I):(v.name=u.slice(D,L),v.base=u.slice(D,I),v.ext=u.slice(L,I))),D>0&&D!==m?v.dir=u.slice(0,D-1):v.dir=v.root,v},sep:"\\",delimiter:";",win32:null,posix:null};const a=(()=>{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 m=u.length-1;m>=-1&&!f;m--){const C=m>=0?u[m]:a();s(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(s(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 s(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 m=u[f];s(m,"path"),m.length>0&&(v===void 0?v=m:v+=`/${m}`)}return v===void 0?".":e.posix.normalize(v)},relative(u,v){if(s(u,"from"),s(v,"to"),u===v||(u=e.posix.resolve(u),v=e.posix.resolve(v),u===v))return"";const f=1,m=u.length,C=m-f,L=1,D=v.length-L,I=C<D?C:D;let T=-1,O=0;for(;O<I;O++){const A=u.charCodeAt(f+O);if(A!==v.charCodeAt(L+O))break;A===S&&(T=O)}if(O===I)if(D>I){if(v.charCodeAt(L+O)===S)return v.slice(L+O+1);if(O===0)return v.slice(L+O)}else C>I&&(u.charCodeAt(f+O)===S?T=O:O===0&&(T=0));let R="";for(O=f+T+1;O<=m;++O)(O===m||u.charCodeAt(O)===S)&&(R+=R.length===0?"..":"/..");return`${R}${v.slice(L+T)}`},toNamespacedPath(u){return u},dirname(u){if(s(u,"path"),u.length===0)return".";const v=u.charCodeAt(0)===S;let f=-1,m=!0;for(let C=u.length-1;C>=1;--C)if(u.charCodeAt(C)===S){if(!m){f=C;break}}else m=!1;return f===-1?v?"/":".":v&&f===1?"//":u.slice(0,f)},basename(u,v){v!==void 0&&s(v,"ext"),s(u,"path");let f=0,m=-1,C=!0,L;if(v!==void 0&&v.length>0&&v.length<=u.length){if(v===u)return"";let D=v.length-1,I=-1;for(L=u.length-1;L>=0;--L){const T=u.charCodeAt(L);if(T===S){if(!C){f=L+1;break}}else I===-1&&(C=!1,I=L+1),D>=0&&(T===v.charCodeAt(D)?--D===-1&&(m=L):(D=-1,m=I))}return f===m?m=I:m===-1&&(m=u.length),u.slice(f,m)}for(L=u.length-1;L>=0;--L)if(u.charCodeAt(L)===S){if(!C){f=L+1;break}}else m===-1&&(C=!1,m=L+1);return m===-1?"":u.slice(f,m)},extname(u){s(u,"path");let v=-1,f=0,m=-1,C=!0,L=0;for(let D=u.length-1;D>=0;--D){const I=u.charCodeAt(D);if(I===S){if(!C){f=D+1;break}continue}m===-1&&(C=!1,m=D+1),I===b?v===-1?v=D:L!==1&&(L=1):v!==-1&&(L=-1)}return v===-1||m===-1||L===0||L===1&&v===m-1&&v===f+1?"":u.slice(v,m)},format:l.bind(null,"/"),parse(u){s(u,"path");const v={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return v;const f=u.charCodeAt(0)===S;let m;f?(v.root="/",m=1):m=0;let C=-1,L=0,D=-1,I=!0,T=u.length-1,O=0;for(;T>=m;--T){const R=u.charCodeAt(T);if(R===S){if(!I){L=T+1;break}continue}D===-1&&(I=!1,D=T+1),R===b?C===-1?C=T:O!==1&&(O=1):C!==-1&&(O=-1)}if(D!==-1){const R=L===0&&f?1:L;C===-1||O===0||O===1&&C===D-1&&C===L+1?v.base=v.name=u.slice(R,D):(v.name=u.slice(R,C),v.base=u.slice(R,D),v.ext=u.slice(C,D))}return L>0?v.dir=u.slice(0,L-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(X[207],ee([1,0,88,17,9]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function E(t){return t===47||t===92}e.isPathSeparator=E;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 s=t.length,r=t.charCodeAt(0);if(E(r)){if(E(t.charCodeAt(1))&&!E(t.charCodeAt(2))){let h=3;const o=h;for(;h<s&&!E(t.charCodeAt(h));h++);if(o!==h&&!E(t.charCodeAt(h+1))){for(h+=1;h<s;h++)if(E(t.charCodeAt(h)))return t.slice(0,h+1).replace(/[\\/]/g,i)}}return i}else if(p(r)&&t.charCodeAt(1)===58)return E(t.charCodeAt(2))?t.slice(0,2)+i:t.slice(0,2);let d=t.indexOf("://");if(d!==-1){for(d+=3;d<s;d++)if(E(t.charCodeAt(d)))return t.slice(0,d+1)}return""}e.getRoot=S;function g(t,i,s,r=_.sep){if(t===i)return!0;if(!t||!i||i.length>t.length)return!1;if(s){if(!(0,y.startsWithIgnoreCase)(t,i))return!1;if(i.length===t.length)return!0;let 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 p(t){return t>=65&&t<=90||t>=97&&t<=122}e.isWindowsDriveLetter=p;function n(t,i=k.isWindows){return i?p(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}e.hasDriveLetter=n}),define(X[544],ee([1,0,64,88,17,9]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const w=[void 0,[]];function b(o,c,l=0,a=0){const u=c;return u.values&&u.values.length>1?S(o,u.values,l,a):g(o,c,l,a)}e.scoreFuzzy2=b;function S(o,c,l,a){let u=0;const v=[];for(const f of c){const[m,C]=g(o,f,l,a);if(typeof m!="number")return w;u+=m,v.push(...C)}return[u,n(v)]}function g(o,c,l,a){const u=(0,_.fuzzyScore)(c.original,c.originalLowercase,l,o,o.toLowerCase(),a,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return u?[u[0],(0,_.createMatches)(u)]:w}const p=Object.freeze({score:0});function n(o){const c=o.sort((u,v)=>u.start-v.start),l=[];let a;for(const u of c)!a||!t(a,u)?(a=u,l.push(u)):(a.start=Math.min(a.start,u.start),a.end=Math.max(a.end,u.end));return l}function t(o,c){return!(o.end<c.start||c.end<o.start)}function i(o){return o.startsWith('"')&&o.endsWith('"')}const s=" ";function r(o){typeof o!="string"&&(o="");const c=o.toLowerCase(),{pathNormalized:l,normalized:a,normalizedLowercase:u}=d(o),v=l.indexOf(k.sep)>=0,f=i(o);let m;const C=o.split(s);if(C.length>1)for(const L of C){const D=i(L),{pathNormalized:I,normalized:T,normalizedLowercase:O}=d(L);T&&(m||(m=[]),m.push({original:L,originalLowercase:L.toLowerCase(),pathNormalized:I,normalized:T,normalizedLowercase:O,expectContiguousMatch:D}))}return{original:o,originalLowercase:c,pathNormalized:l,normalized:a,normalizedLowercase:u,values:m,containsPathSeparator:v,expectContiguousMatch:f}}e.prepareQuery=r;function d(o){let c;y.isWindows?c=o.replace(/\//g,k.sep):c=o.replace(/\\/g,k.sep);const l=(0,E.stripWildcards)(c).replace(/\s|"/g,"");return{pathNormalized:c,normalized:l,normalizedLowercase:l.toLowerCase()}}function h(o){return Array.isArray(o)?r(o.map(c=>c.original).join(s)):r(o.original)}e.pieceToQuery=h}),define(X[545],ee([1,0,207,17]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=void 0;function y(w,b=k.isWindows){return(0,_.hasDriveLetter)(w,b)?w.charAt(0).toUpperCase()+w.slice(1):w}e.normalizeDriveLetter=y;let E=Object.create(null)}),define(X[57],ee([1,0,17]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const k=_.globals.performance&&typeof _.globals.performance.now=="function";class y{static create(w=!0){return new y(w)}constructor(w){this._highResolution=k&&w,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?_.globals.performance.now():Date.now()}}e.StopWatch=y}),define(X[6],ee([1,0,11,93,2,60,57]),function(K,e,_,k,y,E,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(m){m.None=()=>y.Disposable.None;function C(Y){if(S){const{onDidAddListener:oe}=Y,ce=i.create();let ge=0;Y.onDidAddListener=()=>{++ge===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ce.print()),oe?.()}}}function L(Y,oe){return x(Y,()=>{},0,void 0,!0,void 0,oe)}m.defer=L;function D(Y){return(oe,ce=null,ge)=>{let le=!1,ue;return ue=Y(j=>{if(!le)return ue?ue.dispose():le=!0,oe.call(ce,j)},null,ge),le&&ue.dispose(),ue}}m.once=D;function I(Y,oe,ce){return P((ge,le=null,ue)=>Y(j=>ge.call(le,oe(j)),null,ue),ce)}m.map=I;function T(Y,oe,ce){return P((ge,le=null,ue)=>Y(j=>{oe(j),ge.call(le,j)},null,ue),ce)}m.forEach=T;function O(Y,oe,ce){return P((ge,le=null,ue)=>Y(j=>oe(j)&&ge.call(le,j),null,ue),ce)}m.filter=O;function R(Y){return Y}m.signal=R;function A(...Y){return(oe,ce=null,ge)=>(0,y.combinedDisposable)(...Y.map(le=>le(ue=>oe.call(ce,ue),null,ge)))}m.any=A;function N(Y,oe,ce,ge){let le=ce;return I(Y,ue=>(le=oe(le,ue),le),ge)}m.reduce=N;function P(Y,oe){let ce;const ge={onWillAddFirstListener(){ce=Y(le.fire,le)},onDidRemoveLastListener(){ce?.dispose()}};oe||C(ge);const le=new r(ge);return oe?.add(le),le.event}function x(Y,oe,ce=100,ge=!1,le=!1,ue,j){let z,U,J,te=0,G;const ae={leakWarningThreshold:ue,onWillAddFirstListener(){z=Y(Ce=>{te++,U=oe(U,Ce),ge&&!J&&(me.fire(U),U=void 0),G=()=>{const Se=U;U=void 0,J=void 0,(!ge||te>1)&&me.fire(Se),te=0},typeof ce=="number"?(clearTimeout(J),J=setTimeout(G,ce)):J===void 0&&(J=0,queueMicrotask(G))})},onWillRemoveListener(){le&&te>0&&G?.()},onDidRemoveLastListener(){G=void 0,z.dispose()}};j||C(ae);const me=new r(ae);return j?.add(me),me.event}m.debounce=x;function F(Y,oe=0,ce){return m.debounce(Y,(ge,le)=>ge?(ge.push(le),ge):[le],oe,void 0,!0,void 0,ce)}m.accumulate=F;function B(Y,oe=(ge,le)=>ge===le,ce){let ge=!0,le;return O(Y,ue=>{const j=ge||!oe(ue,le);return ge=!1,le=ue,j},ce)}m.latch=B;function V(Y,oe,ce){return[m.filter(Y,oe,ce),m.filter(Y,ge=>!oe(ge),ce)]}m.split=V;function $(Y,oe=!1,ce=[]){let ge=ce.slice(),le=Y(z=>{ge?ge.push(z):j.fire(z)});const ue=()=>{ge?.forEach(z=>j.fire(z)),ge=null},j=new r({onWillAddFirstListener(){le||(le=Y(z=>j.fire(z)))},onDidAddFirstListener(){ge&&(oe?setTimeout(ue):ue())},onDidRemoveLastListener(){le&&le.dispose(),le=null}});return j.event}m.buffer=$;class M{constructor(oe){this.event=oe,this.disposables=new y.DisposableStore}map(oe){return new M(I(this.event,oe,this.disposables))}forEach(oe){return new M(T(this.event,oe,this.disposables))}filter(oe){return new M(O(this.event,oe,this.disposables))}reduce(oe,ce){return new M(N(this.event,oe,ce,this.disposables))}latch(){return new M(B(this.event,void 0,this.disposables))}debounce(oe,ce=100,ge=!1,le=!1,ue){return new M(x(this.event,oe,ce,ge,le,ue,this.disposables))}on(oe,ce,ge){return this.event(oe,ce,ge)}once(oe,ce,ge){return D(this.event)(oe,ce,ge)}dispose(){this.disposables.dispose()}}function Q(Y){return new M(Y)}m.chain=Q;function ie(Y,oe,ce=ge=>ge){const ge=(...z)=>j.fire(ce(...z)),le=()=>Y.on(oe,ge),ue=()=>Y.removeListener(oe,ge),j=new r({onWillAddFirstListener:le,onDidRemoveLastListener:ue});return j.event}m.fromNodeEventEmitter=ie;function re(Y,oe,ce=ge=>ge){const ge=(...z)=>j.fire(ce(...z)),le=()=>Y.addEventListener(oe,ge),ue=()=>Y.removeEventListener(oe,ge),j=new r({onWillAddFirstListener:le,onDidRemoveLastListener:ue});return j.event}m.fromDOMEventEmitter=re;function ne(Y){return new Promise(oe=>D(Y)(oe))}m.toPromise=ne;function se(Y,oe){return oe(void 0),Y(ce=>oe(ce))}m.runAndSubscribe=se;function H(Y,oe){let ce=null;function ge(ue){ce?.dispose(),ce=new y.DisposableStore,oe(ue,ce)}ge(void 0);const le=Y(ue=>ge(ue));return(0,y.toDisposable)(()=>{le.dispose(),ce?.dispose()})}m.runAndSubscribeWithStore=H;class W{constructor(oe,ce){this._observable=oe,this._counter=0,this._hasChanged=!1;const ge={onWillAddFirstListener:()=>{oe.addObserver(this)},onDidRemoveLastListener:()=>{oe.removeObserver(this)}};ce||C(ge),this.emitter=new r(ge),ce&&ce.add(this.emitter)}beginUpdate(oe){this._counter++}handlePossibleChange(oe){}handleChange(oe,ce){this._hasChanged=!0}endUpdate(oe){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function q(Y,oe){return new W(Y,oe).emitter.event}m.fromObservable=q;function Z(Y){return oe=>{let ce=0,ge=!1;const le={beginUpdate(){ce++},endUpdate(){ce--,ce===0&&(Y.reportChanges(),ge&&(ge=!1,oe()))},handlePossibleChange(){},handleChange(){ge=!0}};return Y.addObserver(le),{dispose(){Y.removeObserver(le)}}}}m.fromObservableLight=Z})(g||(e.Event=g={}));class p{constructor(C){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${C}_${p._idPool++}`,p.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=p,p.all=new Set,p._idPool=0;let n=-1;class t{constructor(C,L=Math.random().toString(18).slice(2,5)){this.threshold=C,this.name=L,this._warnCountdown=0}dispose(){var C;(C=this._stacks)===null||C===void 0||C.clear()}check(C,L){const D=this.threshold;if(D<=0||L<D)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=D*.5;let T,O=0;for(const[R,A]of this._stacks)(!T||O<A)&&(T=R,O=A);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} 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(`
- `).slice(2).join(`
- `))}}class s{constructor(C,L,D){this.callback=C,this.callbackThis=L,this.stack=D,this.subscription=new y.SafeDisposable}invoke(C){this.callback.call(this.callbackThis,C)}}class r{constructor(C){var L,D,I,T,O;this._disposed=!1,this._options=C,this._leakageMon=n>0||!((L=this._options)===null||L===void 0)&&L.leakWarningThreshold?new t((I=(D=this._options)===null||D===void 0?void 0:D.leakWarningThreshold)!==null&&I!==void 0?I:n):void 0,this._perfMon=!((T=this._options)===null||T===void 0)&&T._profName?new p(this._options._profName):void 0,this._deliveryQueue=(O=this._options)===null||O===void 0?void 0:O.deliveryQueue}dispose(){var C,L,D,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),(D=(L=this._options)===null||L===void 0?void 0:L.onDidRemoveLastListener)===null||D===void 0||D.call(L),(I=this._leakageMon)===null||I===void 0||I.dispose()}}get event(){return this._event||(this._event=(C,L,D)=>{var I,T,O;if(this._listeners||(this._listeners=new E.LinkedList),this._leakageMon&&this._listeners.size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),y.Disposable.None;const R=this._listeners.isEmpty();R&&(!((I=this._options)===null||I===void 0)&&I.onWillAddFirstListener)&&this._options.onWillAddFirstListener(this);let A,N;this._leakageMon&&this._listeners.size>=Math.ceil(this._leakageMon.threshold*.2)&&(N=i.create(),A=this._leakageMon.check(N,this._listeners.size+1)),b&&(N=N??i.create());const P=new s(C,L,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,L);const F=P.subscription.set(()=>{var B,V;A?.(),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 D instanceof y.DisposableStore?D.add(F):Array.isArray(D)&&D.push(F),F}),this._event}fire(C){var L,D,I;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new h((L=this._options)===null||L===void 0?void 0:L.onListenerError));for(const T of this._listeners)this._deliveryQueue.push(this,T,C);(D=this._perfMon)===null||D===void 0||D.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 E.LinkedList}get size(){return this._queue.size}push(C,L,D){this._queue.push(new o(C,L,D))}clear(C){const L=new E.LinkedList;for(const D of this._queue)D.emitter!==C&&L.push(D);this._queue=L}deliver(){for(;this._queue.size>0;){const C=this._queue.shift();try{C.listener.invoke(C.event)}catch(L){this._onListenerError(L)}}}}e.EventDeliveryQueue=d;class h extends d{clear(C){this._queue.clear()}}class o{constructor(C,L,D){this.emitter=C,this.listener=L,this.event=D}}class c extends r{constructor(C){super(C),this._isPaused=0,this._eventQueue=new E.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 l extends c{constructor(C){var L;super(C),this._delay=(L=C.delay)!==null&&L!==void 0?L:100}fire(C){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(C)}}e.DebounceEmitter=l;class a 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(L=>super.fire(L)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=a;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 L={event:C,listener:null};this.events.push(L),this.hasListeners&&this.hook(L);const D=()=>{this.hasListeners&&this.unhook(L);const I=this.events.indexOf(L);this.events.splice(I,1)};return(0,y.toDisposable)((0,k.once)(D))}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(L=>this.emitter.fire(L))}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(L,D,I)=>C(T=>{const O=this.buffers[this.buffers.length-1];O?O.push(()=>L.call(D,T)):L.call(D,T)},void 0,I)}bufferEvents(C){const L=[];this.buffers.push(L);const D=C();return this.buffers.pop(),L.forEach(I=>I()),D}}e.EventBufferer=v;class f{constructor(){this.listening=!1,this.inputEvent=g.None,this.inputEventListener=y.Disposable.None,this.emitter=new r({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(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(X[47],ee([1,0,6,2]),function(K,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 y{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}y.INSTANCE=new y;class E 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(s){var r;(r=this._mediaQueryList)===null||r===void 0||r.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),s&&this._onDidChange.fire()}}class w extends k.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const s=this._register(new E);this._register(s.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const s=document.createElement("canvas").getContext("2d"),r=window.devicePixelRatio||1,d=s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.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,s){typeof i=="string"&&(i=window.matchMedia(i)),i.addEventListener("change",s)}e.addMatchMediaChangeListener=S,e.PixelRatio=new b;function g(){return y.INSTANCE.getZoomFactor()}e.getZoomFactor=g;const p=navigator.userAgent;e.isFirefox=p.indexOf("Firefox")>=0,e.isWebKit=p.indexOf("AppleWebKit")>=0,e.isChrome=p.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&p.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=p.indexOf("Electron/")>=0,e.isAndroid=p.indexOf("Android")>=0;let n=!1;if(window.matchMedia){const i=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),s=window.matchMedia("(display-mode: fullscreen)");n=i.matches,S(i,({matches:r})=>{n&&s.matches||(n=r)})}function t(){return n}e.isStandalone=t}),define(X[208],ee([1,0,47,17]),function(K,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(X[77],ee([1,0,6]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class k{get event(){return this.emitter.event}constructor(E,w,b){const S=g=>this.emitter.fire(g);this.emitter=new _.Emitter({onWillAddFirstListener:()=>E.addEventListener(w,S,b),onDidRemoveLastListener:()=>E.removeEventListener(w,S,b)})}dispose(){this.emitter.dispose()}}e.DomEmitter=k}),define(X[44],ee([1,0,47,59,113,17]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function w(t){if(t.charCode){const s=String.fromCharCode(t.charCode).toUpperCase();return k.KeyCodeUtils.fromString(s)}const i=t.keyCode;if(i===3)return 7;if(_.isFirefox)switch(i){case 59:return 85;case 60:if(E.isLinux)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(E.isMacintosh)return 57;break}else if(_.isWebKit){if(E.isMacintosh&&i===93)return 57;if(!E.isMacintosh&&i===92)return 57}return k.EVENT_KEY_CODE_MAP[i]||0}const b=E.isMacintosh?256:2048,S=512,g=1024,p=E.isMacintosh?2048:256;class n{constructor(i){this._standardKeyboardEventBrand=!0;const s=i;this.browserEvent=s,this.target=s.target,this.ctrlKey=s.ctrlKey,this.shiftKey=s.shiftKey,this.altKey=s.altKey,this.metaKey=s.metaKey,this.altGraphKey=s.getModifierState("AltGraph"),this.keyCode=w(s),this.code=s.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(i){return this._asKeybinding===i}_computeKeybinding(){let i=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(i=this.keyCode);let s=0;return this.ctrlKey&&(s|=b),this.altKey&&(s|=S),this.shiftKey&&(s|=g),this.metaKey&&(s|=p),s|=i,s}_computeKeyCodeChord(){let i=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(i=this.keyCode),new y.KeyCodeChord(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,i)}}e.StandardKeyboardEvent=n}),define(X[67],ee([1,0,47,360,17]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class E{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=E;class w{constructor(S,g=0,p=0){if(this.browserEvent=S||null,this.target=S?S.target||S.targetNode||S.srcElement:null,this.deltaY=p,this.deltaX=g,S){const n=S,t=S;if(typeof n.wheelDeltaY<"u")this.deltaY=n.wheelDeltaY/120;else if(typeof t.VERTICAL_AXIS<"u"&&t.axis===t.VERTICAL_AXIS)this.deltaY=-t.detail/3;else if(S.type==="wheel"){const i=S;i.deltaMode===i.DOM_DELTA_LINE?_.isFirefox&&!y.isMacintosh?this.deltaY=-S.deltaY/3:this.deltaY=-S.deltaY:this.deltaY=-S.deltaY/40}if(typeof n.wheelDeltaX<"u")_.isSafari&&y.isWindows?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof t.HORIZONTAL_AXIS<"u"&&t.axis===t.HORIZONTAL_AXIS)this.deltaX=-S.detail/3;else if(S.type==="wheel"){const i=S;i.deltaMode===i.DOM_DELTA_LINE?_.isFirefox&&!y.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(X[40],ee([1,0,6,2,538]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toAction=e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class E extends k.Disposable{constructor(t,i="",s="",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=s,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=E;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 s;try{yield this.runAction(t,i)}catch(r){s=r}this._onDidRun.fire({action:t,error:s})})}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 s of t)s.length&&(i.length?i=[...i,new b,...s]:i=s);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,s,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=t,this.label=i,this.class=r,this._actions=s}run(){return we(this,void 0,void 0,function*(){})}}e.SubmenuAction=S;class g extends E{constructor(){super(g.ID,y.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=g,g.ID="vs.actions.empty";function p(n){var t,i;return{id:n.id,label:n.label,class:void 0,enabled:(t=n.enabled)!==null&&t!==void 0?t:!0,checked:(i=n.checked)!==null&&i!==void 0?i:!1,run:()=>we(this,void 0,void 0,function*(){return n.run()}),tooltip:n.label}}e.toAction=p}),define(X[21],ee([1,0,6]),function(K,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 y;(function(b){function S(g){return g===b.None||g===b.Cancelled||g instanceof E?!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})})(y||(e.CancellationToken=y={}));class E{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 E),this._token}cancel(){this._token?this._token instanceof E&&this._token.cancel():this._token=y.Cancelled}dispose(S=!1){var g;S&&this.cancel(),(g=this._parentListener)===null||g===void 0||g.dispose(),this._token?this._token instanceof E&&this._token.dispose():this._token=y.None}}e.CancellationTokenSource=w});var wt=this&&this.__asyncValues||function(K){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=K[Symbol.asyncIterator],_;return e?e.call(K):(K=typeof __values=="function"?__values(K):K[Symbol.iterator](),_={},k("next"),k("throw"),k("return"),_[Symbol.asyncIterator]=function(){return this},_);function k(E){_[E]=K[E]&&function(w){return new Promise(function(b,S){w=K[E](w),y(b,S,w.done,w.value)})}}function y(E,w,b,S){Promise.resolve(S).then(function(g){E({value:g,done:b})},w)}};define(X[13],ee([1,0,21,11,6,2,17,251]),function(K,e,_,k,y,E,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(D){return!!D&&typeof D.then=="function"}e.isThenable=S;function g(D){const I=new _.CancellationTokenSource,T=D(I.token),O=new Promise((R,A)=>{const N=I.token.onCancellationRequested(()=>{N.dispose(),I.dispose(),A(new k.CancellationError)});Promise.resolve(T).then(P=>{N.dispose(),I.dispose(),R(P)},P=>{N.dispose(),I.dispose(),A(P)})});return new class{cancel(){I.cancel()}then(R,A){return O.then(R,A)}catch(R){return this.then(void 0,R)}finally(R){return O.finally(R)}}}e.createCancelablePromise=g;function p(D,I,T){return new Promise((O,R)=>{const A=I.onCancellationRequested(()=>{A.dispose(),O(T)});D.then(O,R).finally(()=>A.dispose())})}e.raceCancellation=p;class n{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(I){if(this.activePromise){if(this.queuedPromiseFactory=I,!this.queuedPromise){const T=()=>{this.queuedPromise=null;const 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=n;const t=(D,I)=>{let T=!0;const O=setTimeout(()=>{T=!1,I()},D);return{isTriggered:()=>T,dispose:()=>{clearTimeout(O),T=!1}}},i=D=>{let I=!0;return queueMicrotask(()=>{I&&(I=!1,D())}),{isTriggered:()=>I,dispose:()=>{I=!1}}};class s{constructor(I){this.defaultDelay=I,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(I,T=this.defaultDelay){this.task=I,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((R,A)=>{this.doResolve=R,this.doReject=A}).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=s;class r{constructor(I){this.delayer=new s(I),this.throttler=new n}trigger(I,T){return this.delayer.trigger(()=>this.throttler.queue(I),T)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=r;function d(D,I){return I?new Promise((T,O)=>{const R=setTimeout(()=>{A.dispose(),T()},D),A=I.onCancellationRequested(()=>{clearTimeout(R),A.dispose(),O(new k.CancellationError)})}):g(T=>d(D,T))}e.timeout=d;function h(D,I=0){const T=setTimeout(D,I);return(0,E.toDisposable)(()=>clearTimeout(T))}e.disposableTimeout=h;function o(D,I=O=>!!O,T=null){let O=0;const R=D.length,A=()=>{if(O>=R)return Promise.resolve(T);const N=D[O++];return Promise.resolve(N()).then(x=>I(x)?Promise.resolve(x):A())};return A()}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 l{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=l;class a{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=a,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=D=>{(0,w.setTimeout0)(()=>{if(I)return;const T=Date.now()+15;D(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,T-Date.now())}}))});let I=!1;return{dispose(){I||(I=!0)}}}:e.runWhenIdle=(D,I)=>{const T=requestIdleCallback(D,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(){return this.rejected}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((I,T)=>{this.completeCallback=I,this.errorCallback=T})}complete(I){return new Promise(T=>{this.completeCallback(I),this.resolved=!0,T()})}cancel(){new Promise(I=>{this.errorCallback(new k.CancellationError),this.rejected=!0,I()})}}e.DeferredPromise=v;var f;(function(D){function I(O){return we(this,void 0,void 0,function*(){let R;const A=yield Promise.all(O.map(N=>N.then(P=>P,P=>{R||(R=P)})));if(typeof R<"u")throw R;return A})}D.settled=I;function T(O){return new Promise((R,A)=>we(this,void 0,void 0,function*(){try{yield O(R,A)}catch(N){A(N)}}))}D.withAsyncBody=T})(f||(e.Promises=f={}));class m{static fromArray(I){return new m(T=>{T.emitMany(I)})}static fromPromise(I){return new m(T=>we(this,void 0,void 0,function*(){T.emitMany(yield I)}))}static fromPromises(I){return new m(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 m(T=>we(this,void 0,void 0,function*(){yield Promise.all(I.map(O=>{var R,A,N;return we(this,void 0,void 0,function*(){var P,x,F,B;try{for(R=!0,A=wt(O);N=yield A.next(),P=N.done,!P;){B=N.value,R=!1;try{const V=B;T.emitOne(V)}finally{R=!0}}}catch(V){x={error:V}}finally{try{!R&&!P&&(F=A.return)&&(yield F.call(A))}finally{if(x)throw x.error}}})}))}))}constructor(I){this._state=0,this._results=[],this._error=null,this._onStateChanged=new y.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 y.Event.toPromise(this._onStateChanged.event)}while(!0)})}}static map(I,T){return new m(O=>we(this,void 0,void 0,function*(){var R,A,N,P;try{for(var x=!0,F=wt(I),B;B=yield F.next(),R=B.done,!R;){P=B.value,x=!1;try{const V=P;O.emitOne(T(V))}finally{x=!0}}}catch(V){A={error:V}}finally{try{!x&&!R&&(N=F.return)&&(yield N.call(F))}finally{if(A)throw A.error}}}))}map(I){return m.map(this,I)}static filter(I,T){return new m(O=>we(this,void 0,void 0,function*(){var R,A,N,P;try{for(var x=!0,F=wt(I),B;B=yield F.next(),R=B.done,!R;){P=B.value,x=!1;try{const V=P;T(V)&&O.emitOne(V)}finally{x=!0}}}catch(V){A={error:V}}finally{try{!x&&!R&&(N=F.return)&&(yield N.call(F))}finally{if(A)throw A.error}}}))}filter(I){return m.filter(this,I)}static coalesce(I){return m.filter(I,T=>!!T)}coalesce(){return m.coalesce(this)}static toPromise(I){var T,O,R,A,N,P,x;return we(this,void 0,void 0,function*(){const F=[];try{for(T=!0,O=wt(I);R=yield O.next(),A=R.done,!A;){x=R.value,T=!1;try{const B=x;F.push(B)}finally{T=!0}}}catch(B){N={error:B}}finally{try{!T&&!A&&(P=O.return)&&(yield P.call(O))}finally{if(N)throw N.error}}return F})}toPromise(){return m.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=m,m.EMPTY=m.fromArray([]);class C extends m{constructor(I,T){super(T),this._source=I}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=C;function L(D){const I=new _.CancellationTokenSource,T=D(I.token);return new C(I,O=>we(this,void 0,void 0,function*(){var R,A,N,P;const x=I.token.onCancellationRequested(()=>{x.dispose(),I.dispose(),O.reject(new k.CancellationError)});try{try{for(var F=!0,B=wt(T),V;V=yield B.next(),R=V.done,!R;){P=V.value,F=!1;try{const $=P;if(I.token.isCancellationRequested)return;O.emitOne($)}finally{F=!0}}}catch($){A={error:$}}finally{try{!F&&!R&&(N=B.return)&&(yield N.call(B))}finally{if(A)throw A.error}}x.dispose(),I.dispose()}catch($){x.dispose(),I.dispose(),O.reject($)}}))}e.createCancelableAsyncIterable=L}),define(X[546],ee([1,0,13,2]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class y 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=y}),define(X[209],ee([1,0,131,16,13,251,161,6,53]),function(K,e,_,k,y,E,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 p(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}e.getVisibleState=p;function n(i){return typeof i.collapsible=="boolean"}class t{constructor(s,r,d,h={}){this.user=s,this.list=r,this.rootRef=[],this.eventBufferer=new b.EventBufferer,this._onDidChangeCollapseState=new b.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new b.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new b.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new y.Delayer(E.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(s,r,d=S.Iterable.empty(),h={}){if(s.length===0)throw new _.TreeError(this.user,"Invalid tree location");h.diffIdentityProvider?this.spliceSmart(h.diffIdentityProvider,s,r,d,h):this.spliceSimple(s,r,d,h)}spliceSmart(s,r,d,h,o,c){var l;h===void 0&&(h=S.Iterable.empty()),c===void 0&&(c=(l=o.diffDepth)!==null&&l!==void 0?l:0);const{parentNode:a}=this.getParentNodeWithListIndex(r);if(!a.lastDiffIds)return this.spliceSimple(r,d,h,o);const u=[...h],v=r[r.length-1],f=new w.LcsDiff({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,v),...u,...a.children.slice(v+d)].map(I=>s.getId(I.element).toString())}).ComputeDiff(!1);if(f.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(r,d,u,o);const m=r.slice(0,-1),C=(I,T,O)=>{if(c>0)for(let R=0;R<O;R++)I--,T--,this.spliceSmart(s,[...m,I,0],Number.MAX_SAFE_INTEGER,u[T].children,o,c-1)};let L=Math.min(a.children.length,v+d),D=u.length;for(const I of f.changes.sort((T,O)=>O.originalStart-T.originalStart))C(L,D,L-(I.originalStart+I.originalLength)),L=I.originalStart,D=I.modifiedStart-v,this.spliceSimple([...m,L],I.originalLength,S.Iterable.slice(u,D,D+I.modifiedLength),o);C(L,D,L)}spliceSimple(s,r,d=S.Iterable.empty(),{onDidCreateNode:h,onDidDeleteNode:o,diffIdentityProvider:c}){const{parentNode:l,listIndex:a,revealed:u,visible:v}=this.getParentNodeWithListIndex(s),f=[],m=S.Iterable.map(d,x=>this.createTreeNode(x,l,l.visible?1:0,u,f,h)),C=s[s.length-1],L=l.children.length>0;let D=0;for(let x=C;x>=0&&x<l.children.length;x--){const F=l.children[x];if(F.visible){D=F.visibleChildIndex;break}}const I=[];let T=0,O=0;for(const x of m)I.push(x),O+=x.renderNodeCount,x.visible&&(x.visibleChildIndex=D+T++);const R=(0,k.splice)(l.children,C,r,I);c?l.lastDiffIds?(0,k.splice)(l.lastDiffIds,C,r,I.map(x=>c.getId(x.element).toString())):l.lastDiffIds=l.children.map(x=>c.getId(x.element).toString()):l.lastDiffIds=void 0;let A=0;for(const x of R)x.visible&&A++;if(A!==0)for(let x=C+I.length;x<l.children.length;x++){const F=l.children[x];F.visible&&(F.visibleChildIndex-=A)}if(l.visibleChildrenCount+=T-A,u&&v){const x=R.reduce((F,B)=>F+(B.visible?B.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(l,O-x),this.list.splice(a,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=l.children.length>0;L!==N&&this.setCollapsible(s.slice(0,-1),N);let P=l;for(;P;){if(P.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}P=P.parent}}rerender(s){if(s.length===0)throw new _.TreeError(this.user,"Invalid tree location");const{node:r,listIndex:d,revealed:h}=this.getTreeNodeWithListIndex(s);r.visible&&h&&this.list.splice(d,1,[r])}has(s){return this.hasTreeNode(s)}getListIndex(s){const{listIndex:r,visible:d,revealed:h}=this.getTreeNodeWithListIndex(s);return d&&h?r:-1}getListRenderCount(s){return this.getTreeNode(s).renderNodeCount}isCollapsible(s){return this.getTreeNode(s).collapsible}setCollapsible(s,r){const d=this.getTreeNode(s);typeof r>"u"&&(r=!d.collapsible);const h={collapsible:r};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(s,h))}isCollapsed(s){return this.getTreeNode(s).collapsed}setCollapsed(s,r,d){const h=this.getTreeNode(s);typeof r>"u"&&(r=!h.collapsed);const o={collapsed:r,recursive:d||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(s,o))}_setCollapseState(s,r){const{node:d,listIndex:h,revealed:o}=this.getTreeNodeWithListIndex(s),c=this._setListNodeCollapseState(d,h,o,r);if(d!==this.root&&this.autoExpandSingleChildren&&c&&!n(r)&&d.collapsible&&!d.collapsed&&!r.recursive){let l=-1;for(let a=0;a<d.children.length;a++)if(d.children[a].visible)if(l>-1){l=-1;break}else l=a;l>-1&&this._setCollapseState([...s,l],r)}return c}_setListNodeCollapseState(s,r,d,h){const o=this._setNodeCollapseState(s,h,!1);if(!d||!s.visible||!o)return o;const c=s.renderNodeCount,l=this.updateNodeAfterCollapseChange(s),a=c-(r===-1?0:1);return this.list.splice(r+1,a,l.slice(1)),o}_setNodeCollapseState(s,r,d){let h;if(s===this.root?h=!1:(n(r)?(h=s.collapsible!==r.collapsible,s.collapsible=r.collapsible):s.collapsible?(h=s.collapsed!==r.collapsed,s.collapsed=r.collapsed):h=!1,h&&this._onDidChangeCollapseState.fire({node:s,deep:d})),!n(r)&&r.recursive)for(const o of s.children)h=this._setNodeCollapseState(o,r,!0)||h;return h}expandTo(s){this.eventBufferer.bufferEvents(()=>{let r=this.getTreeNode(s);for(;r.parent;)r=r.parent,s=s.slice(0,s.length-1),r.collapsed&&this._setCollapseState(s,{collapsed:!1,recursive:!1})})}refilter(){const s=this.root.renderNodeCount,r=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,s,r),this.refilterDelayer.cancel()}createTreeNode(s,r,d,h,o,c){const l={parent:r,element:s.element,children:[],depth:r.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof s.collapsible=="boolean"?s.collapsible:typeof s.collapsed<"u",collapsed:typeof s.collapsed>"u"?this.collapseByDefault:s.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(l,d);l.visibility=a,h&&o.push(l);const u=s.children||S.Iterable.empty(),v=h&&a!==0&&!l.collapsed;let f=0,m=1;for(const C of u){const L=this.createTreeNode(C,l,a,v,o,c);l.children.push(L),m+=L.renderNodeCount,L.visible&&(L.visibleChildIndex=f++)}return l.collapsible=l.collapsible||l.children.length>0,l.visibleChildrenCount=f,l.visible=a===2?f>0:a===1,l.visible?l.collapsed||(l.renderNodeCount=m):(l.renderNodeCount=0,h&&o.pop()),c?.(l),l}updateNodeAfterCollapseChange(s){const r=s.renderNodeCount,d=[];return this._updateNodeAfterCollapseChange(s,d),this._updateAncestorsRenderNodeCount(s.parent,d.length-r),d}_updateNodeAfterCollapseChange(s,r){if(s.visible===!1)return 0;if(r.push(s),s.renderNodeCount=1,!s.collapsed)for(const d of s.children)s.renderNodeCount+=this._updateNodeAfterCollapseChange(d,r);return this._onDidChangeRenderNodeCount.fire(s),s.renderNodeCount}updateNodeAfterFilterChange(s){const r=s.renderNodeCount,d=[];return this._updateNodeAfterFilterChange(s,s.visible?1:0,d),this._updateAncestorsRenderNodeCount(s.parent,d.length-r),d}_updateNodeAfterFilterChange(s,r,d,h=!0){let o;if(s!==this.root){if(o=this._filterNode(s,r),o===0)return s.visible=!1,s.renderNodeCount=0,!1;h&&d.push(s)}const c=d.length;s.renderNodeCount=s===this.root?0:1;let l=!1;if(!s.collapsed||o!==0){let a=0;for(const u of s.children)l=this._updateNodeAfterFilterChange(u,o,d,h&&!s.collapsed)||l,u.visible&&(u.visibleChildIndex=a++);s.visibleChildrenCount=a}else s.visibleChildrenCount=0;return s!==this.root&&(s.visible=o===2?l:o===1,s.visibility=o),s.visible?s.collapsed||(s.renderNodeCount+=d.length-c):(s.renderNodeCount=0,h&&d.pop()),this._onDidChangeRenderNodeCount.fire(s),s.visible}_updateAncestorsRenderNodeCount(s,r){if(r!==0)for(;s;)s.renderNodeCount+=r,this._onDidChangeRenderNodeCount.fire(s),s=s.parent}_filterNode(s,r){const d=this.filter?this.filter.filter(s.element,r):1;return typeof d=="boolean"?(s.filterData=void 0,d?1:0):g(d)?(s.filterData=d.data,p(d.visibility)):(s.filterData=void 0,p(d))}hasTreeNode(s,r=this.root){if(!s||s.length===0)return!0;const[d,...h]=s;return d<0||d>r.children.length?!1:this.hasTreeNode(h,r.children[d])}getTreeNode(s,r=this.root){if(!s||s.length===0)return r;const[d,...h]=s;if(d<0||d>r.children.length)throw new _.TreeError(this.user,"Invalid tree location");return this.getTreeNode(h,r.children[d])}getTreeNodeWithListIndex(s){if(s.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:r,listIndex:d,revealed:h,visible:o}=this.getParentNodeWithListIndex(s),c=s[s.length-1];if(c<0||c>r.children.length)throw new _.TreeError(this.user,"Invalid tree location");const l=r.children[c];return{node:l,listIndex:d,revealed:h,visible:o&&l.visible}}getParentNodeWithListIndex(s,r=this.root,d=0,h=!0,o=!0){const[c,...l]=s;if(c<0||c>r.children.length)throw new _.TreeError(this.user,"Invalid tree location");for(let a=0;a<c;a++)d+=r.children[a].renderNodeCount;return h=h&&!r.collapsed,o=o&&r.visible,l.length===0?{parentNode:r,listIndex:d,revealed:h,visible:o}:this.getParentNodeWithListIndex(l,r.children[c],d+1,h,o)}getNode(s=[]){return this.getTreeNode(s)}getNodeLocation(s){const r=[];let d=s;for(;d.parent;)r.push(d.parent.children.indexOf(d)),d=d.parent;return r.reverse()}getParentNodeLocation(s){if(s.length!==0)return s.length===1?[]:(0,k.tail2)(s)[0]}getFirstElementChild(s){const r=this.getTreeNode(s);if(r.children.length!==0)return r.children[0].element}}e.IndexTreeModel=t}),define(X[210],ee([1,0,209,131,53]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class E{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(p,n){return g.sorter.compare(p.element,n.element)}}),this.identityProvider=g.identityProvider}setChildren(b,S=y.Iterable.empty(),g={}){const p=this.getElementLocation(b);this._setChildren(p,this.preserveCollapseState(S),g)}_setChildren(b,S=y.Iterable.empty(),g){const p=new Set,n=new Set,t=s=>{var r;if(s.element===null)return;const d=s;if(p.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();n.add(h),this.nodesByIdentity.set(h,d)}(r=g.onDidCreateNode)===null||r===void 0||r.call(g,d)},i=s=>{var r;if(s.element===null)return;const d=s;if(p.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();n.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=y.Iterable.empty()){return this.sorter&&(b=[...b].sort(this.sorter.compare.bind(this.sorter))),y.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 p=typeof S.collapsible=="boolean"?S.collapsible:g.collapsible;let n;return typeof S.collapsed>"u"||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?n=g.collapsed:S.collapsed===k.ObjectTreeElementCollapseState.Collapsed?n=!0:S.collapsed===k.ObjectTreeElementCollapseState.Expanded?n=!1:n=!!S.collapsed,Object.assign(Object.assign({},S),{collapsible:p,collapsed:n,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 p=this.getElementLocation(b);return this.model.setCollapsed(p,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),p=this.model.getParentNodeLocation(g);return this.model.getNode(p).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=E}),define(X[547],ee([1,0,210,131,6,53]),function(K,e,_,k,y,E){"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],l=o.incompressible||!1;return{element:{elements:c,incompressible:l},children:E.Iterable.map(E.Iterable.from(o.children),w),collapsible:o.collapsible,collapsed:o.collapsed}}function b(o){const c=[o.element],l=o.incompressible||!1;let a,u;for(;[u,a]=E.Iterable.consume(E.Iterable.from(o.children),2),!(u.length!==1||u[0].incompressible);)o=u[0],c.push(o.element);return{element:{elements:c,incompressible:l},children:E.Iterable.map(E.Iterable.concat(u,a),b),collapsible:o.collapsible,collapsed:o.collapsed}}e.compress=b;function S(o,c=0){let l;return c<o.element.elements.length-1?l=[S(o,c+1)]:l=E.Iterable.map(E.Iterable.from(o.children),a=>S(a,0)),c===0&&o.element.incompressible?{element:o.element.elements[c],children:l,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[c],children:l,collapsible:o.collapsible,collapsed:o.collapsed}}function g(o){return S(o,0)}e.decompress=g;function p(o,c,l){return o.element===c?Object.assign(Object.assign({},o),{children:l}):Object.assign(Object.assign({},o),{children:E.Iterable.map(E.Iterable.from(o.children),a=>p(a,c,l))})}const n=o=>({getId(c){return c.elements.map(l=>o.getId(l).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,l,a={}){this.user=c,this.rootRef=null,this.nodes=new Map,this.model=new _.ObjectTreeModel(c,l,a),this.enabled=typeof a.compressionEnabled>"u"?!0:a.compressionEnabled,this.identityProvider=a.identityProvider}setChildren(c,l=E.Iterable.empty(),a){const u=a.diffIdentityProvider&&n(a.diffIdentityProvider);if(c===null){const O=E.Iterable.map(l,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),m=this.model.getParentNodeLocation(v),C=this.model.getNode(m),L=g(f),D=p(L,c,l),I=(this.enabled?b:w)(D),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 a=this.model.getNode().children,u=E.Iterable.map(a,g),v=E.Iterable.map(u,c?b:w);this._setChildren(null,v,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(c,l,a){const u=new Set,v=m=>{for(const C of m.element.elements)u.add(C),this.nodes.set(C,m.element)},f=m=>{for(const C of m.element.elements)u.has(C)||this.nodes.delete(C)};this.model.setChildren(c,l,Object.assign(Object.assign({},a),{onDidCreateNode:v,onDidDeleteNode:f}))}has(c){return this.nodes.has(c)}getListIndex(c){const l=this.getCompressedNode(c);return this.model.getListIndex(l)}getListRenderCount(c){const l=this.getCompressedNode(c);return this.model.getListRenderCount(l)}getNode(c){if(typeof c>"u")return this.model.getNode();const l=this.getCompressedNode(c);return this.model.getNode(l)}getNodeLocation(c){const l=this.model.getNodeLocation(c);return l===null?null:l.elements[l.elements.length-1]}getParentNodeLocation(c){const l=this.getCompressedNode(c),a=this.model.getParentNodeLocation(l);return a===null?null:a.elements[a.elements.length-1]}getFirstElementChild(c){const l=this.getCompressedNode(c);return this.model.getFirstElementChild(l)}isCollapsible(c){const l=this.getCompressedNode(c);return this.model.isCollapsible(l)}setCollapsible(c,l){const a=this.getCompressedNode(c);return this.model.setCollapsible(a,l)}isCollapsed(c){const l=this.getCompressedNode(c);return this.model.isCollapsed(l)}setCollapsed(c,l,a){const u=this.getCompressedNode(c);return this.model.setCollapsed(u,l,a)}expandTo(c){const l=this.getCompressedNode(c);this.model.expandTo(l)}rerender(c){const l=this.getCompressedNode(c);this.model.rerender(l)}refilter(){this.model.refilter()}getCompressedNode(c){if(c===null)return null;const l=this.nodes.get(c);if(!l)throw new k.TreeError(this.user,`Tree element not found: ${c}`);return l}}e.CompressedObjectTreeModel=t;const i=o=>o[o.length-1];e.DefaultElementMapper=i;class s{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(c=>new s(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,l){this.unwrapper=c,this.node=l}}function r(o,c){return{splice(l,a,u){c.splice(l,a,u.map(v=>o.map(v)))},updateElementHeight(l,a){c.updateElementHeight(l,a)}}}function d(o,c){return Object.assign(Object.assign({},c),{identityProvider:c.identityProvider&&{getId(l){return c.identityProvider.getId(o(l))}},sorter:c.sorter&&{compare(l,a){return c.sorter.compare(l.elements[0],a.elements[0])}},filter:c.filter&&{filter(l,a){return c.filter.filter(o(l),a)}}})}class h{get onDidSplice(){return y.Event.map(this.model.onDidSplice,({insertedNodes:c,deletedNodes:l})=>({insertedNodes:c.map(a=>this.nodeMapper.map(a)),deletedNodes:l.map(a=>this.nodeMapper.map(a))}))}get onDidChangeCollapseState(){return y.Event.map(this.model.onDidChangeCollapseState,({node:c,deep:l})=>({node:this.nodeMapper.map(c),deep:l}))}get onDidChangeRenderNodeCount(){return y.Event.map(this.model.onDidChangeRenderNodeCount,c=>this.nodeMapper.map(c))}constructor(c,l,a={}){this.rootRef=null,this.elementMapper=a.elementMapper||e.DefaultElementMapper;const u=v=>this.elementMapper(v.elements);this.nodeMapper=new k.WeakMapper(v=>new s(u,v)),this.model=new t(c,r(this.nodeMapper,l),d(u,a))}setChildren(c,l=E.Iterable.empty(),a={}){this.model.setChildren(c,l,a)}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 l=this.model.getFirstElementChild(c);return l===null||typeof l>"u"?l:this.elementMapper(l.elements)}isCollapsible(c){return this.model.isCollapsible(c)}setCollapsible(c,l){return this.model.setCollapsible(c,l)}isCollapsed(c){return this.model.isCollapsed(c)}setCollapsed(c,l,a){return this.model.setCollapsed(c,l,a)}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(X[286],ee([1,0,13,207,56,88,17,9]),function(K,e,_,k,y,E,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="[^/\\\\]",p=/\//g;function n(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 $=!1,M=!1,Q="";for(const ie of F){switch(ie){case B:if(!$&&!M){V.push(Q),Q="";continue}break;case"{":$=!0;break;case"}":$=!1;break;case"[":M=!0;break;case"]":M=!1;break}Q+=ie}return Q&&V.push(Q),V}e.splitGlobAware=t;function i(F){if(!F)return"";let B="";const V=t(F,e.GLOB_SPLIT);if(V.every($=>$===e.GLOBSTAR))B=".*";else{let $=!1;V.forEach((M,Q)=>{if(M===e.GLOBSTAR){if($)return;B+=n(2,Q===V.length-1)}else{let ie=!1,re="",ne=!1,se="";for(const H of M){if(H!=="}"&&ie){re+=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 q=`(?:${t(re,",").map(Z=>i(Z)).join("|")})`;B+=q,ie=!1,re="";break}case"]":{B+="["+se+"]",ne=!1,se="";break}case"?":B+=g;continue;case"*":B+=n(1);continue;default:B+=(0,b.escapeRegExpCharacters)(H)}}Q<V.length-1&&(V[Q+1]!==e.GLOBSTAR||Q+2<V.length)&&(B+=S)}$=M===e.GLOBSTAR})}return B}const s=/^\*\*\/\*\.[\w\.-]+$/,r=/^\*\*\/([\w\.-]+)\/?$/,d=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,h=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,o=/^\*\*((\/[\w\.-]+)+)\/?$/,c=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,l=new y.LRUCache(1e4),a=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 $=`${V}_${!!B.trimForExclusions}`;let M=l.get($);if(M)return f(M,F);let Q;return s.test(V)?M=C(V.substr(4),V):(Q=r.exec(m(V,B)))?M=L(Q[1],V):(B.trimForExclusions?h:d).test(V)?M=D(V,B):(Q=o.exec(m(V,B)))?M=I(Q[1].substr(1),V,!0):(Q=c.exec(m(V,B)))?M=I(Q[1],V,!1):M=T(V),l.set($,M),f(M,F)}function f(F,B){if(typeof B=="string")return F;const V=function($,M){return(0,k.isEqualOrParent)($,B.base,!w.isLinux)?F((0,b.ltrim)($.substr(B.base.length),E.sep),M):null};return V.allBasenames=F.allBasenames,V.allPaths=F.allPaths,V.basenames=F.basenames,V.patterns=F.patterns,V}function m(F,B){return B.trimForExclusions&&F.endsWith("/**")?F.substr(0,F.length-2):F}function C(F,B){return function(V,$){return typeof V=="string"&&V.endsWith(F)?B:null}}function L(F,B){const V=`/${F}`,$=`\\${F}`,M=function(ie,re){return typeof ie!="string"?null:re?re===F?B:null:ie===F||ie.endsWith(V)||ie.endsWith($)?B:null},Q=[F];return M.basenames=Q,M.patterns=[B],M.allBasenames=Q,M}function D(F,B){const V=x(F.slice(1,-1).split(",").map(re=>v(re,B)).filter(re=>re!==u),F),$=V.length;if(!$)return u;if($===1)return V[0];const M=function(re,ne){for(let se=0,H=V.length;se<H;se++)if(V[se](re,ne))return F;return null},Q=V.find(re=>!!re.allBasenames);Q&&(M.allBasenames=Q.allBasenames);const ie=V.reduce((re,ne)=>ne.allPaths?re.concat(ne.allPaths):re,[]);return ie.length&&(M.allPaths=ie),M}function I(F,B,V){const $=E.sep===E.posix.sep,M=$?F:F.replace(p,E.sep),Q=E.sep+M,ie=E.posix.sep+F;let re;return V?re=function(ne,se){return typeof ne=="string"&&(ne===M||ne.endsWith(Q)||!$&&(ne===F||ne.endsWith(ie)))?B:null}:re=function(ne,se){return typeof ne=="string"&&(ne===M||!$&&ne===F)?B:null},re.allPaths=[(V?"*/":"./")+F],re}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 a;if(typeof F=="string"||A(F)){const V=v(F,B);if(V===u)return a;const $=function(M,Q){return!!V(M,Q)};return V.allBasenames&&($.allBasenames=V.allBasenames),V.allPaths&&($.allPaths=V.allPaths),$}return N(F,B)}e.parse=R;function A(F){const B=F;return B?typeof B.base=="string"&&typeof B.pattern=="string":!1}e.isRelativePattern=A;function N(F,B){const V=x(Object.getOwnPropertyNames(F).map(re=>P(re,F[re],B)).filter(re=>re!==u)),$=V.length;if(!$)return u;if(!V.some(re=>!!re.requiresSiblings)){if($===1)return V[0];const re=function(H,W){let q;for(let Z=0,Y=V.length;Z<Y;Z++){const oe=V[Z](H,W);if(typeof oe=="string")return oe;(0,_.isThenable)(oe)&&(q||(q=[]),q.push(oe))}return q?(()=>we(this,void 0,void 0,function*(){for(const Z of q){const Y=yield Z;if(typeof Y=="string")return Y}return null}))():null},ne=V.find(H=>!!H.allBasenames);ne&&(re.allBasenames=ne.allBasenames);const se=V.reduce((H,W)=>W.allPaths?H.concat(W.allPaths):H,[]);return se.length&&(re.allPaths=se),re}const M=function(re,ne,se){let H,W;for(let q=0,Z=V.length;q<Z;q++){const Y=V[q];Y.requiresSiblings&&se&&(ne||(ne=(0,E.basename)(re)),H||(H=ne.substr(0,ne.length-(0,E.extname)(re).length)));const oe=Y(re,ne,H,se);if(typeof oe=="string")return oe;(0,_.isThenable)(oe)&&(W||(W=[]),W.push(oe))}return W?(()=>we(this,void 0,void 0,function*(){for(const q of W){const Z=yield q;if(typeof Z=="string")return Z}return null}))():null},Q=V.find(re=>!!re.allBasenames);Q&&(M.allBasenames=Q.allBasenames);const ie=V.reduce((re,ne)=>ne.allPaths?re.concat(ne.allPaths):re,[]);return ie.length&&(M.allPaths=ie),M}function P(F,B,V){if(B===!1)return u;const $=v(F,V);if($===u)return u;if(typeof B=="boolean")return $;if(B){const M=B.when;if(typeof M=="string"){const Q=(ie,re,ne,se)=>{if(!se||!$(ie,re))return null;const H=M.replace("$(basename)",()=>ne),W=se(H);return(0,_.isThenable)(W)?W.then(q=>q?F:null):W?F:null};return Q.requiresSiblings=!0,Q}}return $}function x(F,B){const V=F.filter(re=>!!re.basenames);if(V.length<2)return F;const $=V.reduce((re,ne)=>{const se=ne.basenames;return se?re.concat(se):re},[]);let M;if(B){M=[];for(let re=0,ne=$.length;re<ne;re++)M.push(B)}else M=V.reduce((re,ne)=>{const se=ne.patterns;return se?re.concat(se):re},[]);const Q=function(re,ne){if(typeof re!="string")return null;if(!ne){let H;for(H=re.length;H>0;H--){const W=re.charCodeAt(H-1);if(W===47||W===92)break}ne=re.substr(H)}const se=$.indexOf(ne);return se!==-1?M[se]:null};Q.basenames=$,Q.patterns=M,Q.allBasenames=$;const ie=F.filter(re=>!re.basenames);return ie.push(Q),ie}}),define(X[287],ee([1,0,6]),function(K,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(X[177],ee([1,0,6,2]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class y{constructor(i,s,r,d,h,o,c){this._forceIntegerValues=i,this._scrollStateBrand=void 0,this._forceIntegerValues&&(s=s|0,r=r|0,d=d|0,h=h|0,o=o|0,c=c|0),this.rawScrollLeft=d,this.rawScrollTop=c,s<0&&(s=0),d+s>r&&(d=r-s),d<0&&(d=0),h<0&&(h=0),c+h>o&&(c=o-h),c<0&&(c=0),this.width=s,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,s){return new y(this._forceIntegerValues,typeof i.width<"u"?i.width:this.width,typeof i.scrollWidth<"u"?i.scrollWidth:this.scrollWidth,s?this.rawScrollLeft:this.scrollLeft,typeof i.height<"u"?i.height:this.height,typeof i.scrollHeight<"u"?i.scrollHeight:this.scrollHeight,s?this.rawScrollTop:this.scrollTop)}withScrollPosition(i){return new y(this._forceIntegerValues,this.width,this.scrollWidth,typeof i.scrollLeft<"u"?i.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof i.scrollTop<"u"?i.scrollTop:this.rawScrollTop)}createScrollEvent(i,s){const r=this.width!==i.width,d=this.scrollWidth!==i.scrollWidth,h=this.scrollLeft!==i.scrollLeft,o=this.height!==i.height,c=this.scrollHeight!==i.scrollHeight,l=this.scrollTop!==i.scrollTop;return{inSmoothScrolling:s,oldWidth:i.width,oldScrollWidth:i.scrollWidth,oldScrollLeft:i.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:i.height,oldScrollHeight:i.scrollHeight,oldScrollTop:i.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:r,scrollWidthChanged:d,scrollLeftChanged:h,heightChanged:o,scrollHeightChanged:c,scrollTopChanged:l}}}e.ScrollState=y;class E 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 y(i.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(i){this._smoothScrollDuration=i}validateScrollPosition(i){return this._state.withScrollPosition(i)}getScrollDimensions(){return this._state}setScrollDimensions(i,s){var r;const d=this._state.withScrollDimensions(i,s);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 s=this._state.withScrollPosition(i);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(s,!1)}setScrollPositionSmooth(i,s){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(i);if(this._smoothScrolling){i={scrollLeft:typeof i.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:i.scrollLeft,scrollTop:typeof i.scrollTop>"u"?this._smoothScrolling.to.scrollTop:i.scrollTop};const r=this._state.withScrollPosition(i);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let d;s?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(),s=this._state.withScrollPosition(i);if(this._setState(s,!0),!!this._smoothScrolling){if(i.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(i,s){const r=this._state;r.equals(i)||(this._state=i,this._onScroll.fire(this._state.createScrollEvent(r,s)))}}e.Scrollable=E;class w{constructor(i,s,r){this.scrollLeft=i,this.scrollTop=s,this.isDone=r}}e.SmoothScrollingUpdate=w;function b(t,i){const s=i-t;return function(r){return t+s*n(r)}}function S(t,i,s){return function(r){return r<s?t(r/s):i((r-s)/(1-s))}}class g{constructor(i,s,r,d){this.from=i,this.to=s,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,s,r){if(Math.abs(i-s)>2.5*r){let h,o;return i<s?(h=i+.75*r,o=s-.75*r):(h=i-.75*r,o=s+.75*r),S(b(i,h),b(o,s),.33)}return b(i,s)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(i){this.to=i.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(i){const s=(i-this.startTime)/this.duration;if(s<1){const r=this.scrollLeft(s),d=this.scrollTop(s);return new w(r,d,!1)}return new w(this.to.scrollLeft,this.to.scrollTop,!0)}combine(i,s,r){return g.start(i,s,r)}static start(i,s,r){r=r+10;const d=Date.now()-10;return new g(i,s,d,r)}}e.SmoothScrollingOperation=g;function p(t){return Math.pow(t,3)}function n(t){return 1-p(1-t)}}),define(X[20],ee([1,0,88,17]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const y=/^\w[\w\d+.-]*$/,E=/^\//,w=/^\/\//;function b(f,m){if(!f.scheme&&m)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${f.authority}", path: "${f.path}", query: "${f.query}", fragment: "${f.fragment}"}`);if(f.scheme&&!y.test(f.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(f.path){if(f.authority){if(!E.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,m){return!f&&!m?"file":f}function g(f,m){switch(f){case"https":case"http":case"file":m?m[0]!==n&&(m=n+m):m=n;break}return m}const p="",n="/",t=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class i{static isUri(m){return m instanceof i?!0:m?typeof m.authority=="string"&&typeof m.fragment=="string"&&typeof m.path=="string"&&typeof m.query=="string"&&typeof m.scheme=="string"&&typeof m.fsPath=="string"&&typeof m.with=="function"&&typeof m.toString=="function":!1}constructor(m,C,L,D,I,T=!1){typeof m=="object"?(this.scheme=m.scheme||p,this.authority=m.authority||p,this.path=m.path||p,this.query=m.query||p,this.fragment=m.fragment||p):(this.scheme=S(m,T),this.authority=C||p,this.path=g(this.scheme,L||p),this.query=D||p,this.fragment=I||p,b(this,T))}get fsPath(){return c(this,!1)}with(m){if(!m)return this;let{scheme:C,authority:L,path:D,query:I,fragment:T}=m;return C===void 0?C=this.scheme:C===null&&(C=p),L===void 0?L=this.authority:L===null&&(L=p),D===void 0?D=this.path:D===null&&(D=p),I===void 0?I=this.query:I===null&&(I=p),T===void 0?T=this.fragment:T===null&&(T=p),C===this.scheme&&L===this.authority&&D===this.path&&I===this.query&&T===this.fragment?this:new r(C,L,D,I,T)}static parse(m,C=!1){const L=t.exec(m);return L?new r(L[2]||p,v(L[4]||p),v(L[5]||p),v(L[7]||p),v(L[9]||p),C):new r(p,p,p,p,p)}static file(m){let C=p;if(k.isWindows&&(m=m.replace(/\\/g,n)),m[0]===n&&m[1]===n){const L=m.indexOf(n,2);L===-1?(C=m.substring(2),m=n):(C=m.substring(2,L),m=m.substring(L)||n)}return new r("file",C,m,p,p)}static from(m){const C=new r(m.scheme,m.authority,m.path,m.query,m.fragment);return b(C,!0),C}static joinPath(m,...C){if(!m.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let L;return k.isWindows&&m.scheme==="file"?L=i.file(_.win32.join(c(m,!0),...C)).path:L=_.posix.join(m.path,...C),m.with({path:L})}toString(m=!1){return l(this,m)}toJSON(){return this}static revive(m){if(m){if(m instanceof i)return m;{const C=new r(m);return C._formatted=m.external,C._fsPath=m._sep===s?m.fsPath:null,C}}else return m}}e.URI=i;const s=k.isWindows?1:void 0;class r extends i{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=c(this,!1)),this._fsPath}toString(m=!1){return m?l(this,!0):(this._formatted||(this._formatted=l(this,!1)),this._formatted)}toJSON(){const m={$mid:1};return this._fsPath&&(m.fsPath=this._fsPath,m._sep=s),this._formatted&&(m.external=this._formatted),this.path&&(m.path=this.path),this.scheme&&(m.scheme=this.scheme),this.authority&&(m.authority=this.authority),this.query&&(m.query=this.query),this.fragment&&(m.fragment=this.fragment),m}}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,m,C){let L,D=-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||m&&T===47||C&&T===91||C&&T===93||C&&T===58)D!==-1&&(L+=encodeURIComponent(f.substring(D,I)),D=-1),L!==void 0&&(L+=f.charAt(I));else{L===void 0&&(L=f.substr(0,I));const O=d[T];O!==void 0?(D!==-1&&(L+=encodeURIComponent(f.substring(D,I)),D=-1),L+=O):D===-1&&(D=I)}}return D!==-1&&(L+=encodeURIComponent(f.substring(D))),L!==void 0?L:f}function o(f){let m;for(let C=0;C<f.length;C++){const L=f.charCodeAt(C);L===35||L===63?(m===void 0&&(m=f.substr(0,C)),m+=d[L]):m!==void 0&&(m+=f[C])}return m!==void 0?m:f}function c(f,m){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?m?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 l(f,m){const C=m?o:h;let L="",{scheme:D,authority:I,path:T,query:O,fragment:R}=f;if(D&&(L+=D,L+=":"),(I||D==="file")&&(L+=n,L+=n),I){let A=I.indexOf("@");if(A!==-1){const N=I.substr(0,A);I=I.substr(A+1),A=N.lastIndexOf(":"),A===-1?L+=C(N,!1,!1):(L+=C(N.substr(0,A),!1,!1),L+=":",L+=C(N.substr(A+1),!1,!0)),L+="@"}I=I.toLowerCase(),A=I.lastIndexOf(":"),A===-1?L+=C(I,!1,!0):(L+=C(I.substr(0,A),!1,!0),L+=I.substr(A))}if(T){if(T.length>=3&&T.charCodeAt(0)===47&&T.charCodeAt(2)===58){const A=T.charCodeAt(1);A>=65&&A<=90&&(T=`/${String.fromCharCode(A+32)}:${T.substr(3)}`)}else if(T.length>=2&&T.charCodeAt(1)===58){const A=T.charCodeAt(0);A>=65&&A<=90&&(T=`${String.fromCharCode(A+32)}:${T.substr(2)}`)}L+=C(T,!0,!1)}return O&&(L+="?",L+=C(O,!1,!1)),R&&(L+="#",L+=m?R:h(R,!1,!1)),L}function a(f){try{return decodeURIComponent(f)}catch{return f.length>3?f.substr(0,3)+a(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,m=>a(m)):f}}),define(X[211],ee([1,0,132,20]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=void 0;function y(w){let b=JSON.parse(w);return b=E(b),b}e.parse=y;function E(w,b=0){if(!w||b>200)return w;if(typeof w=="object"){switch(w.$mid){case 1:return k.URI.revive(w);case 2:return new RegExp(w.source,w.flags);case 16:return new Date(w.source)}if(w instanceof _.VSBuffer||w instanceof Uint8Array)return w;if(Array.isArray(w))for(let S=0;S<w.length;++S)w[S]=E(w[S],b+1);else for(const S in w)Object.hasOwnProperty.call(w,S)&&(w[S]=E(w[S],b+1))}return w}e.revive=E}),define(X[48],ee([1,0,11,17,20]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.Schemas=void 0;var E;(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.vscodeInteractiveSesssion="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"})(E||(e.Schemas=E={})),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=`/${E.vscodeRemoteResource}`}setPreferredWebSchema(p){this._preferredWebSchema=p}rewrite(p){if(this._delegate)try{return this._delegate(p)}catch(d){return _.onUnexpectedError(d),p}const n=p.authority;let t=this._hosts[n];t&&t.indexOf(":")!==-1&&t.indexOf("[")===-1&&(t=`[${t}]`);const i=this._ports[n],s=this._connectionTokens[n];let r=`path=${encodeURIComponent(p.path)}`;return typeof s=="string"&&(r+=`&${e.connectionTokenQueryName}=${encodeURIComponent(s)}`),y.URI.from({scheme:k.isWeb?this._preferredWebSchema:E.vscodeRemoteResource,authority:`${t}:${i}`,path:this._remoteResourcesPath,query:r})}}e.RemoteAuthorities=new w;class b{uriToBrowserUri(p){return p.scheme===E.vscodeRemote?e.RemoteAuthorities.rewrite(p):p.scheme===E.file&&(k.isNative||k.isWebWorker&&k.globals.origin===`${E.vscodeFileResource}://${b.FALLBACK_AUTHORITY}`)?p.with({scheme:E.vscodeFileResource,authority:p.authority||b.FALLBACK_AUTHORITY,query:null,fragment:null}):p}}b.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new b;var S;(function(g){const p=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(p.get("3"));const n="vscode-coi";function t(s){let r;typeof s=="string"?r=new URL(s).searchParams:s instanceof URL?r=s.searchParams:y.URI.isUri(s)&&(r=new URL(s.toString(!0)).searchParams);const d=r?.get(n);if(d)return p.get(d)}g.getHeadersFromQuery=t;function i(s,r,d){if(!globalThis.crossOriginIsolated)return;const h=r&&d?"3":d?"2":"1";s instanceof URLSearchParams?s.set(n,h):s[n]=h}g.addSearchParam=i})(S||(e.COI=S={}))}),define(X[7],ee([1,0,47,208,44,67,11,6,288,2,48,17]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.h=e.DragAndDropObserver=e.ModifierKeyEmitter=e.basicMarkupHtmlTags=e.hookDomPurifyHrefAndSrcSanitizer=e.asCssValueWithDefault=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.hide=e.show=e.setVisibility=e.$=e.Namespace=e.reset=e.prepend=e.append=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.isEventLike=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createStyleSheet=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestor=e.getTotalHeight=e.getContentHeight=e.getContentWidth=e.getTotalWidth=e.getDomNodeZoomLevel=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function t(be){for(;be.firstChild;)be.firstChild.remove()}e.clearNode=t;function i(be){var _e;return(_e=be?.isConnected)!==null&&_e!==void 0?_e:!1}e.isInDOM=i;class s{constructor(_e,Te,Oe,Pe){this._node=_e,this._type=Te,this._handler=Oe,this._options=Pe||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function r(be,_e,Te,Oe){return new s(be,_e,Te,Oe)}e.addDisposableListener=r;function d(be){return function(_e){return be(new E.StandardMouseEvent(_e))}}function h(be){return function(_e){return be(new y.StandardKeyboardEvent(_e))}}const o=function(_e,Te,Oe,Pe){let Be=Oe;return Te==="click"||Te==="mousedown"?Be=d(Oe):(Te==="keydown"||Te==="keypress"||Te==="keyup")&&(Be=h(Oe)),r(_e,Te,Be,Pe)};e.addStandardDisposableListener=o;const c=function(_e,Te,Oe){const Pe=d(Te);return a(_e,Pe,Oe)};e.addStandardDisposableGenericMouseDownListener=c;const l=function(_e,Te,Oe){const Pe=d(Te);return u(_e,Pe,Oe)};e.addStandardDisposableGenericMouseUpListener=l;function a(be,_e,Te){return r(be,n.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,_e,Te)}e.addDisposableGenericMouseDownListener=a;function u(be,_e,Te){return r(be,n.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,_e,Te)}e.addDisposableGenericMouseUpListener=u;class v{constructor(_e,Te=0){this._runner=_e,this.priority=Te,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(_e){(0,w.onUnexpectedError)(_e)}}static sort(_e,Te){return Te.priority-_e.priority}}(function(){let be=[],_e=null,Te=!1,Oe=!1;const Pe=()=>{for(Te=!1,_e=be,be=[],Oe=!0;_e.length>0;)_e.sort(v.sort),_e.shift().execute();Oe=!1};e.scheduleAtNextAnimationFrame=(Be,Fe=0)=>{const ze=new v(Be,Fe);return be.push(ze),Te||(Te=!0,requestAnimationFrame(Pe)),ze},e.runAtThisOrScheduleAtNextAnimationFrame=(Be,Fe)=>{if(Oe){const ze=new v(Be,Fe);return _e.push(ze),ze}else return(0,e.scheduleAtNextAnimationFrame)(Be,Fe)}})();function f(be){return document.defaultView.getComputedStyle(be,null)}e.getComputedStyle=f;function m(be){if(be!==document.body)return new L(be.clientWidth,be.clientHeight);if(n.isIOS&&window.visualViewport)return new L(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new L(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new L(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new L(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=m;class C{static convertToPixels(_e,Te){return parseFloat(Te)||0}static getDimension(_e,Te,Oe){const Pe=f(_e),Be=Pe?Pe.getPropertyValue(Te):"0";return C.convertToPixels(_e,Be)}static getBorderLeftWidth(_e){return C.getDimension(_e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(_e){return C.getDimension(_e,"border-right-width","borderRightWidth")}static getBorderTopWidth(_e){return C.getDimension(_e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(_e){return C.getDimension(_e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(_e){return C.getDimension(_e,"padding-left","paddingLeft")}static getPaddingRight(_e){return C.getDimension(_e,"padding-right","paddingRight")}static getPaddingTop(_e){return C.getDimension(_e,"padding-top","paddingTop")}static getPaddingBottom(_e){return C.getDimension(_e,"padding-bottom","paddingBottom")}static getMarginLeft(_e){return C.getDimension(_e,"margin-left","marginLeft")}static getMarginTop(_e){return C.getDimension(_e,"margin-top","marginTop")}static getMarginRight(_e){return C.getDimension(_e,"margin-right","marginRight")}static getMarginBottom(_e){return C.getDimension(_e,"margin-bottom","marginBottom")}}class L{constructor(_e,Te){this.width=_e,this.height=Te}with(_e=this.width,Te=this.height){return _e!==this.width||Te!==this.height?new L(_e,Te):this}static is(_e){return typeof _e=="object"&&typeof _e.height=="number"&&typeof _e.width=="number"}static lift(_e){return _e instanceof L?_e:new L(_e.width,_e.height)}static equals(_e,Te){return _e===Te?!0:!_e||!Te?!1:_e.width===Te.width&&_e.height===Te.height}}e.Dimension=L,L.None=new L(0,0);function D(be){let _e=be.offsetParent,Te=be.offsetTop,Oe=be.offsetLeft;for(;(be=be.parentNode)!==null&&be!==document.body&&be!==document.documentElement;){Te-=be.scrollTop;const Pe=V(be)?null:f(be);Pe&&(Oe-=Pe.direction!=="rtl"?be.scrollLeft:-be.scrollLeft),be===_e&&(Oe+=C.getBorderLeftWidth(be),Te+=C.getBorderTopWidth(be),Te+=be.offsetTop,Oe+=be.offsetLeft,_e=be.offsetParent)}return{left:Oe,top:Te}}e.getTopLeftOffset=D;function I(be,_e,Te){typeof _e=="number"&&(be.style.width=`${_e}px`),typeof Te=="number"&&(be.style.height=`${Te}px`)}e.size=I;function T(be){const _e=be.getBoundingClientRect();return{left:_e.left+window.scrollX,top:_e.top+window.scrollY,width:_e.width,height:_e.height}}e.getDomNodePagePosition=T;function O(be){let _e=be,Te=1;do{const Oe=f(_e).zoom;Oe!=null&&Oe!=="1"&&(Te*=Oe),_e=_e.parentElement}while(_e!==null&&_e!==document.documentElement);return Te}e.getDomNodeZoomLevel=O;function R(be){const _e=C.getMarginLeft(be)+C.getMarginRight(be);return be.offsetWidth+_e}e.getTotalWidth=R;function A(be){const _e=C.getBorderLeftWidth(be)+C.getBorderRightWidth(be),Te=C.getPaddingLeft(be)+C.getPaddingRight(be);return be.offsetWidth-_e-Te}e.getContentWidth=A;function N(be){const _e=C.getBorderTopWidth(be)+C.getBorderBottomWidth(be),Te=C.getPaddingTop(be)+C.getPaddingBottom(be);return be.offsetHeight-_e-Te}e.getContentHeight=N;function P(be){const _e=C.getMarginTop(be)+C.getMarginBottom(be);return be.offsetHeight+_e}e.getTotalHeight=P;function x(be,_e){for(;be;){if(be===_e)return!0;be=be.parentNode}return!1}e.isAncestor=x;function F(be,_e,Te){for(;be&&be.nodeType===be.ELEMENT_NODE;){if(be.classList.contains(_e))return be;if(Te){if(typeof Te=="string"){if(be.classList.contains(Te))return null}else if(be===Te)return null}be=be.parentNode}return null}e.findParentWithClass=F;function B(be,_e,Te){return!!F(be,_e,Te)}e.hasParentWithClass=B;function V(be){return be&&!!be.host&&!!be.mode}e.isShadowRoot=V;function $(be){return!!M(be)}e.isInShadowDOM=$;function M(be){for(;be.parentNode;){if(be===document.body)return null;be=be.parentNode}return V(be)?be:null}e.getShadowRoot=M;function Q(){let be=document.activeElement;for(;be?.shadowRoot;)be=be.shadowRoot.activeElement;return be}e.getActiveElement=Q;function ie(be=document.getElementsByTagName("head")[0],_e){const Te=document.createElement("style");return Te.type="text/css",Te.media="screen",_e?.(Te),be.appendChild(Te),Te}e.createStyleSheet=ie;let re=null;function ne(){return re||(re=ie()),re}function se(be){var _e,Te;return!((_e=be?.sheet)===null||_e===void 0)&&_e.rules?be.sheet.rules:!((Te=be?.sheet)===null||Te===void 0)&&Te.cssRules?be.sheet.cssRules:[]}function H(be,_e,Te=ne()){!Te||!_e||Te.sheet.insertRule(be+"{"+_e+"}",0)}e.createCSSRule=H;function W(be,_e=ne()){if(!_e)return;const Te=se(_e),Oe=[];for(let Pe=0;Pe<Te.length;Pe++)Te[Pe].selectorText.indexOf(be)!==-1&&Oe.push(Pe);for(let Pe=Oe.length-1;Pe>=0;Pe--)_e.sheet.deleteRule(Oe[Pe])}e.removeCSSRulesContainingSelector=W;function q(be){return typeof HTMLElement=="object"?be instanceof HTMLElement:be&&typeof be=="object"&&be.nodeType===1&&typeof be.nodeName=="string"}e.isHTMLElement=q,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(be){const _e=be;return!!(_e&&typeof _e.preventDefault=="function"&&typeof _e.stopPropagation=="function")}e.isEventLike=Z,e.EventHelper={stop:(be,_e)=>(be.preventDefault(),_e&&be.stopPropagation(),be)};function Y(be){const _e=[];for(let Te=0;be&&be.nodeType===be.ELEMENT_NODE;Te++)_e[Te]=be.scrollTop,be=be.parentNode;return _e}e.saveParentsScrollTop=Y;function oe(be,_e){for(let Te=0;be&&be.nodeType===be.ELEMENT_NODE;Te++)be.scrollTop!==_e[Te]&&(be.scrollTop=_e[Te]),be=be.parentNode}e.restoreParentsScrollTop=oe;class ce extends g.Disposable{static hasFocusWithin(_e){const Te=M(_e),Oe=Te?Te.activeElement:document.activeElement;return x(Oe,_e)}constructor(_e){super(),this._onDidFocus=this._register(new b.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new b.Emitter),this.onDidBlur=this._onDidBlur.event;let Te=ce.hasFocusWithin(_e),Oe=!1;const Pe=()=>{Oe=!1,Te||(Te=!0,this._onDidFocus.fire())},Be=()=>{Te&&(Oe=!0,window.setTimeout(()=>{Oe&&(Oe=!1,Te=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{ce.hasFocusWithin(_e)!==Te&&(Te?Be():Pe())},this._register(r(_e,e.EventType.FOCUS,Pe,!0)),this._register(r(_e,e.EventType.BLUR,Be,!0)),this._register(r(_e,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(r(_e,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}}function ge(be){return new ce(be)}e.trackFocus=ge;function le(be,..._e){if(be.append(..._e),_e.length===1&&typeof _e[0]!="string")return _e[0]}e.append=le;function ue(be,_e){return be.insertBefore(_e,be.firstChild),_e}e.prepend=ue;function j(be,..._e){be.innerText="",le(be,..._e)}e.reset=j;const z=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var U;(function(be){be.HTML="http://www.w3.org/1999/xhtml",be.SVG="http://www.w3.org/2000/svg"})(U||(e.Namespace=U={}));function J(be,_e,Te,...Oe){const Pe=z.exec(_e);if(!Pe)throw new Error("Bad use of emmet");const Be=Pe[1]||"div";let Fe;return be!==U.HTML?Fe=document.createElementNS(be,Be):Fe=document.createElement(Be),Pe[3]&&(Fe.id=Pe[3]),Pe[4]&&(Fe.className=Pe[4].replace(/\./g," ").trim()),Te&&Object.entries(Te).forEach(([ze,Ze])=>{typeof Ze>"u"||(/^on\w+$/.test(ze)?Fe[ze]=Ze:ze==="selected"?Ze&&Fe.setAttribute(ze,"true"):Fe.setAttribute(ze,Ze))}),Fe.append(...Oe),Fe}function te(be,_e,...Te){return J(U.HTML,be,_e,...Te)}e.$=te,te.SVG=function(be,_e,...Te){return J(U.SVG,be,_e,...Te)};function G(be,..._e){be?ae(..._e):me(..._e)}e.setVisibility=G;function ae(...be){for(const _e of be)_e.style.display="",_e.removeAttribute("aria-hidden")}e.show=ae;function me(...be){for(const _e of be)_e.style.display="none",_e.setAttribute("aria-hidden","true")}e.hide=me;function Ce(be){const _e=window.devicePixelRatio*be;return Math.max(1,Math.floor(_e))/window.devicePixelRatio}e.computeScreenAwareSize=Ce;function Se(be){window.open(be,"_blank","noopener")}e.windowOpenNoOpener=Se;function ye(be){const _e=()=>{be(),Te=(0,e.scheduleAtNextAnimationFrame)(_e)};let Te=(0,e.scheduleAtNextAnimationFrame)(_e);return(0,g.toDisposable)(()=>Te.dispose())}e.animate=ye,p.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Ee(be){return be?`url('${p.FileAccess.uriToBrowserUri(be).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=Ee;function De(be){return`'${be.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=De;function ke(be,_e){if(be!==void 0){const Te=be.match(/^\s*var\((.+)\)$/);if(Te){const Oe=Te[1].split(",",2);return Oe.length===2&&(_e=ke(Oe[1].trim(),_e)),`var(${Oe[0]}, ${_e})`}return be}return _e}e.asCssValueWithDefault=ke;function Ie(be,_e=!1){const Te=document.createElement("a");return S.addHook("afterSanitizeAttributes",Oe=>{for(const Pe of["href","src"])if(Oe.hasAttribute(Pe)){const Be=Oe.getAttribute(Pe);if(Pe==="href"&&Be.startsWith("#"))continue;if(Te.href=Be,!be.includes(Te.protocol.replace(/:$/,""))){if(_e&&Pe==="src"&&Te.href.startsWith("data:"))continue;Oe.removeAttribute(Pe)}}}),(0,g.toDisposable)(()=>{S.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=Ie,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 he=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 ve 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",_e=>{if(_e.defaultPrevented)return;const Te=new y.StandardKeyboardEvent(_e);if(!(Te.keyCode===6&&_e.repeat)){if(_e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(_e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(_e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(_e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Te.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=_e.altKey,this._keyStatus.ctrlKey=_e.ctrlKey,this._keyStatus.metaKey=_e.metaKey,this._keyStatus.shiftKey=_e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=_e,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(r(window,"keyup",_e=>{_e.defaultPrevented||(!_e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!_e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!_e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!_e.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=_e.altKey,this._keyStatus.ctrlKey=_e.ctrlKey,this._keyStatus.metaKey=_e.metaKey,this._keyStatus.shiftKey=_e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=_e,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",_e=>{_e.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 ve.instance||(ve.instance=new ve),ve.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=ve;class de extends g.Disposable{constructor(_e,Te){super(),this.element=_e,this.callbacks=Te,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(r(this.element,e.EventType.DRAG_ENTER,_e=>{this.counter++,this.dragStartTime=_e.timeStamp,this.callbacks.onDragEnter(_e)})),this._register(r(this.element,e.EventType.DRAG_OVER,_e=>{var Te,Oe;_e.preventDefault(),(Oe=(Te=this.callbacks).onDragOver)===null||Oe===void 0||Oe.call(Te,_e,_e.timeStamp-this.dragStartTime)})),this._register(r(this.element,e.EventType.DRAG_LEAVE,_e=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(_e))})),this._register(r(this.element,e.EventType.DRAG_END,_e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(_e)})),this._register(r(this.element,e.EventType.DROP,_e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(_e)}))}}e.DragAndDropObserver=de;const pe=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function Le(be,..._e){let Te,Oe;Array.isArray(_e[0])?(Te={},Oe=_e[0]):(Te=_e[0]||{},Oe=_e[1]);const Pe=pe.exec(be);if(!Pe||!Pe.groups)throw new Error("Bad use of h");const Be=Pe.groups.tag||"div",Fe=document.createElement(Be);Pe.groups.id&&(Fe.id=Pe.groups.id);const ze=[];if(Pe.groups.class)for(const Ge of Pe.groups.class.split("."))Ge!==""&&ze.push(Ge);if(Te.className!==void 0)for(const Ge of Te.className.split("."))Ge!==""&&ze.push(Ge);ze.length>0&&(Fe.className=ze.join(" "));const Ze={};if(Pe.groups.name&&(Ze[Pe.groups.name]=Fe),Oe)for(const Ge of Oe)Ge instanceof HTMLElement?Fe.appendChild(Ge):typeof Ge=="string"?Fe.append(Ge):(Object.assign(Ze,Ge),Fe.appendChild(Ge.root));for(const[Ge,tt]of Object.entries(Te))if(Ge!=="className")if(Ge==="style")for(const[He,Ae]of Object.entries(tt))Fe.style.setProperty(Ne(He),typeof Ae=="number"?Ae+"px":""+Ae);else Ge==="tabIndex"?Fe.tabIndex=tt:Fe.setAttribute(Ne(Ge),tt.toString());return Ze.root=Fe,Ze}e.h=Le;function Ne(be){return be.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(X[289],ee([1,0,7]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function k(n,t={}){const i=E(t);return i.textContent=n,i}e.renderText=k;function y(n,t={}){const i=E(t);return b(i,S(n,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}e.renderFormattedText=y;function E(n){const t=n.inline?"span":"div",i=document.createElement(t);return n.className&&(i.className=n.className),i}e.createElement=E;class w{constructor(t){this.source=t,this.index=0}eos(){return this.index>=this.source.length}next(){const t=this.peek();return this.advance(),t}peek(){return this.source[this.index]}advance(){this.index++}}function b(n,t,i,s){let r;if(t.type===2)r=document.createTextNode(t.content||"");else if(t.type===3)r=document.createElement("b");else if(t.type===4)r=document.createElement("i");else if(t.type===7&&s)r=document.createElement("code");else if(t.type===5&&i){const 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=n);r&&n!==r&&n.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach(d=>{b(r,d,i,s)})}function S(n,t){const i={type:1,children:[]};let s=0,r=i;const d=[],h=new w(n);for(;!h.eos();){let o=h.next();const c=o==="\\"&&p(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 l=p(o,t);if(r.type===l||r.type===5&&l===6)r=d.pop();else{const a={type:l,children:[]};l===5&&(a.index=s,s++),r.children.push(a),d.push(r),r=a}}else if(o===`
- `)r.type===2&&(r=d.pop()),r.children.push({type:8});else if(r.type!==2){const l={type:2,content:o};r.children.push(l),d.push(r),r=l}else r.content+=o}return r.type===2&&(r=d.pop()),d.length,i}function g(n,t){return p(n,t)!==0}function p(n,t){switch(n){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}}),define(X[143],ee([1,0,7,2]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class y{constructor(){this._hooks=new k.DisposableStore,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(w,b){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const S=this._onStopCallback;this._onStopCallback=null,w&&S&&S(b)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(w,b,S,g,p){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=g,this._onStopCallback=p;let n=w;try{w.setPointerCapture(b),this._hooks.add((0,k.toDisposable)(()=>{try{w.releasePointerCapture(b)}catch{}}))}catch{n=window}this._hooks.add(_.addDisposableListener(n,_.EventType.POINTER_MOVE,t=>{if(t.buttons!==S){this.stopMonitoring(!0);return}t.preventDefault(),this._pointerMoveCallback(t)})),this._hooks.add(_.addDisposableListener(n,_.EventType.POINTER_UP,t=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=y}),define(X[58],ee([1,0,7,16,100,2,60]),function(K,e,_,k,y,E,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 E.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",p=>this.onTouchStart(p),{passive:!1})),this._register(_.addDisposableListener(document,"touchend",p=>this.onTouchEnd(p))),this._register(_.addDisposableListener(document,"touchmove",p=>this.onTouchMove(p),{passive:!1}))}static addTarget(p){if(!S.isTouchDevice())return E.Disposable.None;S.INSTANCE||(S.INSTANCE=new S);const n=S.INSTANCE.targets.push(p);return(0,E.toDisposable)(n)}static ignoreTarget(p){if(!S.isTouchDevice())return E.Disposable.None;S.INSTANCE||(S.INSTANCE=new S);const n=S.INSTANCE.ignoreTargets.push(p);return(0,E.toDisposable)(n)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(p){const n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let t=0,i=p.targetTouches.length;t<i;t++){const s=p.targetTouches.item(t);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:n,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[n],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};const r=this.newGestureEvent(b.Start,s.target);r.pageX=s.pageX,r.pageY=s.pageY,this.dispatchEvent(r)}this.dispatched&&(p.preventDefault(),p.stopPropagation(),this.dispatched=!1)}onTouchEnd(p){const n=Date.now(),t=Object.keys(this.activeTouches).length;for(let i=0,s=p.changedTouches.length;i<s;i++){const r=p.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),l=k.tail(d.rollingTimestamps)-d.rollingTimestamps[0],a=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,n,Math.abs(a)/l,a>0?1:-1,o,Math.abs(u)/l,u>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(b.End,d.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(p.preventDefault(),p.stopPropagation(),this.dispatched=!1)}newGestureEvent(p,n){const t=document.createEvent("CustomEvent");return t.initEvent(p,!1,!0),t.initialTarget=n,t.tapCount=0,t}dispatchEvent(p){if(p.type===b.Tap){const n=new Date().getTime();let t=0;n-this._lastSetTapCountTime>S.CLEAR_TAP_COUNT_TIME?t=1:t=2,this._lastSetTapCountTime=n,p.tapCount=t}else(p.type===b.Change||p.type===b.Contextmenu)&&(this._lastSetTapCountTime=0);if(p.initialTarget instanceof Node){for(const n of this.ignoreTargets)if(n.contains(p.initialTarget))return;for(const n of this.targets)n.contains(p.initialTarget)&&(n.dispatchEvent(p),this.dispatched=!0)}}inertia(p,n,t,i,s,r,d,h){this.handle=_.scheduleAtNextAnimationFrame(()=>{const o=Date.now(),c=o-n;let l=0,a=0,u=!0;t+=S.SCROLL_FRICTION*c,r+=S.SCROLL_FRICTION*c,t>0&&(u=!1,l=i*t*c),r>0&&(u=!1,a=d*r*c);const v=this.newGestureEvent(b.Change);v.translationX=l,v.translationY=a,p.forEach(f=>f.dispatchEvent(v)),u||this.inertia(p,o,t,i,s+l,r,d,h+a)})}onTouchMove(p){const n=Date.now();for(let t=0,i=p.changedTouches.length;t<i;t++){const s=p.changedTouches.item(t);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}const r=this.activeTouches[s.identifier],d=this.newGestureEvent(b.Change,r.initialTarget);d.translationX=s.pageX-k.tail(r.rollingPageX),d.translationY=s.pageY-k.tail(r.rollingPageY),d.pageX=s.pageX,d.pageY=s.pageY,this.dispatchEvent(d),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(s.pageX),r.rollingPageY.push(s.pageY),r.rollingTimestamps.push(n)}this.dispatched&&(p.preventDefault(),p.stopPropagation(),this.dispatched=!1)}}e.Gesture=S,S.SCROLL_FRICTION=-.005,S.HOLD_DELAY=700,S.CLEAR_TAP_COUNT_TIME=400,Me([y.memoize],S,"isTouchDevice",null)}),define(X[49],ee([1,0,7,17,375]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const y=2e4;let E,w,b,S,g;function p(s){E=document.createElement("div"),E.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"),E.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"),E.appendChild(h),h};S=d(),g=d(),s.appendChild(E)}e.setARIAContainer=p;function n(s){E&&(w.textContent!==s?(_.clearNode(b),i(w,s)):(_.clearNode(w),i(b,s)))}e.alert=n;function t(s){E&&(k.isMacintosh?n(s):S.textContent!==s?(_.clearNode(g),i(S,s)):(_.clearNode(S),i(g,s)))}e.status=t;function i(s,r){_.clearNode(s),r.length>y&&(r=r.substr(0,y)),s.textContent=r,s.style.visibility="hidden",s.style.visibility="visible"}}),define(X[290],ee([1,0,208,7,2,17,160,379]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=void 0;var b;(function(n){n[n.AVOID=0]="AVOID",n[n.ALIGN=1]="ALIGN"})(b||(e.LayoutAnchorMode=b={}));function S(n,t,i){const s=i.mode===b.ALIGN?i.offset:i.offset+i.size,r=i.mode===b.ALIGN?i.offset+i.size:i.offset;return i.position===0?t<=n-s?s:t<=r?r-t:Math.max(n-t,0):t<=r?r-t:t<=n-s?s:0}e.layout=S;class g extends y.Disposable{constructor(t,i){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=y.Disposable.None,this.toDisposeOnSetContainer=y.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=k.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,k.hide(this.view),this.setContainer(t,i),this._register((0,y.toDisposable)(()=>this.setContainer(null,1)))}setContainer(t,i){var s;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(s=this.shadowRootHostElement)===null||s===void 0||s.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),t){if(this.container=t,this.useFixedPosition=i!==1,this.useShadowDOM=i===3,this.useShadowDOM){this.shadowRootHostElement=k.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const d=document.createElement("style");d.textContent=p,this.shadowRoot.appendChild(d),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(k.$("slot"))}else this.container.appendChild(this.view);const r=new y.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,s;this.isVisible()&&this.hide(),k.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",k.show(this.view),this.toDisposeOnClean=t.render(this.view)||y.Disposable.None,this.delegate=t,this.doLayout(),(s=(i=this.delegate).focus)===null||s===void 0||s.call(i)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(E.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 s=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,l;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),l=S(window.innerWidth,s,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};l=S(window.innerWidth,s,u),w.Range.intersects({start:l,end:l+s},{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 a=k.getDomNodePagePosition(this.container);this.view.style.top=`${c-(this.useFixedPosition?k.getDomNodePagePosition(this.view).top:a.top)}px`,this.view.style.left=`${l-(this.useFixedPosition?k.getDomNodePagePosition(this.view).left:a.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 p=`
- :host {
- all: initial; /* 1st rule so subsequent properties are reset. */
- }
- .codicon[class*='codicon-'] {
- font: normal normal normal 16px/1 codicon;
- display: inline-block;
- text-decoration: none;
- text-rendering: auto;
- text-align: center;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- }
- :host {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
- }
- :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
- :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
- :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
- :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
- :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
- :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
- :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
- :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
- :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
- :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
- :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
- :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
- :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
- :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
- :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
- `}),define(X[291],ee([1,0,7,9,380]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;class y{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=y}),define(X[548],ee([1,0,7,44,58,40,6,253]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=void 0;class b extends E.ActionRunner{constructor(p,n){super(),this._onDidChangeVisibility=this._register(new w.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,_.append)(p,(0,_.$)(".monaco-dropdown")),this._label=(0,_.append)(this._element,(0,_.$)(".dropdown-label"));let t=n.labelRenderer;t||(t=s=>(s.textContent=n.label||"",null));for(const s of[_.EventType.CLICK,_.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,_.addDisposableListener)(this.element,s,r=>_.EventHelper.stop(r,!0)));for(const s of[_.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,_.addDisposableListener)(this._label,s,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,s=>{const r=new k.StandardKeyboardEvent(s);(r.equals(3)||r.equals(10))&&(_.EventHelper.stop(s,!0),this.visible?this.hide():this.show())}));const i=t(this._label);i&&this._register(i),this._register(y.Gesture.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class S extends b{constructor(p,n){super(p,n),this._actions=[],this._contextMenuProvider=n.contextMenuProvider,this.actions=n.actions||[],this.actionProvider=n.actionProvider,this.menuClassName=n.menuClassName||"",this.menuAsChild=!!n.menuAsChild}set menuOptions(p){this._menuOptions=p}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(p){this._actions=p}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(p,n)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(p,n):void 0,getKeyBinding:p=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(p):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=S}),define(X[144],ee([1,0,7,30]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const y=new RegExp(`(\\\\)?\\$\\((${k.ThemeIcon.iconNameExpression}(?:${k.ThemeIcon.iconModifierExpression})?)\\)`,"g");function E(b){const S=new Array;let g,p=0,n=0;for(;(g=y.exec(b))!==null;){n=g.index||0,p<n&&S.push(b.substring(p,n)),p=(g.index||0)+g[0].length;const[,t,i]=g;S.push(t?`$(${i})`:w({id:i}))}return p<b.length&&S.push(b.substring(p)),S}e.renderLabelWithIcons=E;function w(b){const S=_.$("span");return S.classList.add(...k.ThemeIcon.asClassNameArray(b)),S}e.renderIcon=w}),define(X[292],ee([1,0,7,144,45]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class E{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="",p){b||(b=""),p&&(b=E.escapeNewLines(b,S)),!(this.didEverRender&&this.text===b&&this.title===g&&y.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 p=this.text.substring(S,g.end),n=_.$("span.highlight",void 0,...this.supportIcons?(0,k.renderLabelWithIcons)(p):[p]);g.extraClasses&&n.classList.add(...g.extraClasses),b.push(n),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,p=0;return b.replace(/\r\n|\r|\n/g,(n,t)=>{p=n===`\r
- `?-1:0,t+=g;for(const i of S)i.end<=t||(i.start>=t&&(i.start+=p),i.end>=t&&(i.end+=p));return g+=p,"\u23CE"})}}e.HighlightedLabel=E}),define(X[212],ee([1,0,7,206,45,534,384]),function(K,e,_,k,y,E){"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,p,n){this.os=p,this.keyElements=new Set,this.options=n||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,p){this.didEverRender&&this.keybinding===g&&b.areSame(this.matches,p)||(this.keybinding=g,this.matches=p,this.render())}render(){var g;if(this.clear(),this.keybinding){const p=this.keybinding.getChords();p[0]&&this.renderChord(this.domNode,p[0],this.matches?this.matches.firstPart:null);for(let t=1;t<p.length;t++)_.append(this.domNode,w("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,p[t],this.matches?this.matches.chordPart:null);const n=(g=this.options.disableTitle)!==null&&g!==void 0&&g?void 0:this.keybinding.getAriaLabel()||void 0;n!==void 0?this.domNode.title=n:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){_.clearNode(this.domNode),this.keyElements.clear()}renderChord(g,p,n){const t=k.UILabelProvider.modifierLabels[this.os];p.ctrlKey&&this.renderKey(g,t.ctrlKey,!!n?.ctrlKey,t.separator),p.shiftKey&&this.renderKey(g,t.shiftKey,!!n?.shiftKey,t.separator),p.altKey&&this.renderKey(g,t.altKey,!!n?.altKey,t.separator),p.metaKey&&this.renderKey(g,t.metaKey,!!n?.metaKey,t.separator);const i=p.keyLabel;i&&this.renderKey(g,i,!!n?.keyCode,"")}renderKey(g,p,n,t){_.append(g,this.createKeyElement(p,n?".highlight":"")),t&&_.append(g,w("span.monaco-keybinding-key-separator",void 0,t))}renderUnbound(g){_.append(g,this.createKeyElement((0,E.localize)(0,null)))}createKeyElement(g,p=""){const n=w("span.monaco-keybinding-key"+p,void 0,g);return this.keyElements.add(n),this.options.keybindingLabelBackground&&(n.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(n.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(n.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(n.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),n}static areSame(g,p){return g===p||!g&&!p?!0:!!g&&!!p&&(0,y.equals)(g.firstPart,p.firstPart)&&(0,y.equals)(g.chordPart,p.chordPart)}}e.KeybindingLabel=b}),define(X[549],ee([1,0,7]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function k(E){var w;try{(w=E.parentElement)===null||w===void 0||w.removeChild(E)}catch{}}class y{constructor(w){this.renderers=w,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(w){let b=this.getTemplateCache(w).pop(),S=!1;if(b)S=this.transactionNodesPendingRemoval.has(b.domNode),S&&this.transactionNodesPendingRemoval.delete(b.domNode);else{const g=(0,_.$)(".monaco-list-row"),n=this.getRenderer(w).renderTemplate(g);b={domNode:g,templateId:w,templateData:n}}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=y}),define(X[550],ee([1,0,7,13,2,386]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const E="done",w="active",b="infinite",S="infinite-long-running",g="discrete";class p extends y.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(),p.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(E),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,E,S),this.element.classList.add(w,b),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(S)}getContainer(){return this.element}}e.ProgressBar=p,p.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(X[145],ee([1,0,7,77,58,13,100,6,2,17,387]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;const p=!1;var n;(function(a){a.North="north",a.South="south",a.East="east",a.West="west"})(n||(e.OrthogonalEdge=n={}));let t=4;const i=new b.Emitter;let s=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()}}Me([w.memoize],d.prototype,"onPointerMove",null),Me([w.memoize],d.prototype,"onPointerUp",null);class h{get onPointerMove(){return this.disposables.add(new k.DomEmitter(this.el,y.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new k.DomEmitter(this.el,y.EventType.End)).event}constructor(u){this.el=u,this.disposables=new S.DisposableStore}dispose(){this.disposables.dispose()}}Me([w.memoize],h.prototype,"onPointerMove",null),Me([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(){}}Me([w.memoize],o.prototype,"onPointerMove",null),Me([w.memoize],o.prototype,"onPointerUp",null);const c="pointer-events-disabled";class l 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(()=>l.onMouseEnter(u),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>l.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(()=>l.onMouseEnter(u),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>l.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=s,this.hoverDelayer=this._register(new E.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 m=this._register(new k.DomEmitter(this.el,"mousedown")).event;this._register(m(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 L=this._register(new k.DomEmitter(this.el,"mouseenter")).event;this._register(L(()=>l.onMouseEnter(this)));const D=this._register(new k.DomEmitter(this.el,"mouseleave")).event;this._register(D(()=>l.onMouseLeave(this))),this._register(y.Gesture.addTarget(this.el));const I=this._register(new k.DomEmitter(this.el,y.EventType.Start)).event;this._register(I(R=>this.onPointerStart(R,new h(this.el)),this));const T=this._register(new k.DomEmitter(this.el,y.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",p),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 m=document.getElementsByTagName("iframe");for(const P of m)P.classList.add(c);const C=u.pageX,L=u.pageY,D=u.altKey,I={startX:C,currentX:C,startY:L,currentY:L,altKey:D};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 A=P=>{_.EventHelper.stop(P,!1);const x={startX:C,currentX:P.pageX,startY:L,currentY:P.pageY,altKey:D};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 m)x.classList.remove(c)};v.onPointerMove(A,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&&l.onMouseEnter(u.linkedSash,!0)}static onMouseLeave(u,v=!1){u.hoverDelayer.cancel(),u.el.classList.remove("hover"),!v&&u.linkedSash&&l.onMouseLeave(u.linkedSash,!0)}clearSashHoverState(){l.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=l}),define(X[293],ee([1,0,7,145,6,2]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class w{constructor(){this._onDidWillResize=new y.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new y.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new E.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,p=0;this._sashListener.add(y.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,p=0)})),this._sashListener.add(y.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{S!==void 0&&(S=void 0,g=0,p=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{S&&(p=n.currentX-n.startX,this.layout(S.height+g,S.width+p),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{S&&(p=-(n.currentX-n.startX),this.layout(S.height+g,S.width+p),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{S&&(g=-(n.currentY-n.startY),this.layout(S.height+g,S.width+p),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{S&&(g=n.currentY-n.startY,this.layout(S.height+g,S.width+p),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(y.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(y.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(S,g,p,n){this._northSash.state=S?3:0,this._eastSash.state=g?3:0,this._southSash.state=p?3:0,this._westSash.state=n?3:0}layout(S=this.size.height,g=this.size.width){const{height:p,width:n}=this._minSize,{height:t,width:i}=this._maxSize;S=Math.max(p,Math.min(t,S)),g=Math.max(n,Math.min(i,g));const s=new _.Dimension(g,S);_.Dimension.equals(s,this._size)||(this.domNode.style.height=S+"px",this.domNode.style.width=g+"px",this._size=s,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(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(X[551],ee([1,0,7,58,16,6,2,17]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class S extends w.Disposable{constructor(p,n,t,i){super(),this.selected=0,this.selectBoxOptions=i||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new E.Emitter),this.styles=t,this.registerListeners(),this.setOptions(p,n)}registerListeners(){this._register(k.Gesture.addTarget(this.selectElement)),[k.EventType.Tap].forEach(p=>{this._register(_.addDisposableListener(this.selectElement,p,n=>{this.selectElement.focus()}))}),this._register(_.addStandardDisposableListener(this.selectElement,"click",p=>{_.EventHelper.stop(p,!0)})),this._register(_.addStandardDisposableListener(this.selectElement,"change",p=>{this.selectElement.title=p.target.value,this._onDidSelect.fire({index:p.target.selectedIndex,selected:p.target.value})})),this._register(_.addStandardDisposableListener(this.selectElement,"keydown",p=>{let n=!1;b.isMacintosh?(p.keyCode===18||p.keyCode===16||p.keyCode===10)&&(n=!0):(p.keyCode===18&&p.altKey||p.keyCode===10||p.keyCode===3)&&(n=!0),n&&p.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(p,n){(!this.options||!y.equals(this.options,p))&&(this.options=p,this.selectElement.options.length=0,this.options.forEach((t,i)=>{this.selectElement.add(this.createOption(t.text,i,t.isDisabled))})),n!==void 0&&this.select(n)}select(p){this.options.length===0?this.selected=0:p>=0&&p<this.options.length?this.selected=p:p>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(p){this.selectElement.tabIndex=p?0:-1}render(p){p.classList.add("select-container"),p.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){var p,n,t;this.selectElement&&(this.selectElement.style.backgroundColor=(p=this.styles.selectBackground)!==null&&p!==void 0?p:"",this.selectElement.style.color=(n=this.styles.selectForeground)!==null&&n!==void 0?n:"",this.selectElement.style.borderColor=(t=this.styles.selectBorder)!==null&&t!==void 0?t:"")}createOption(p,n,t){const i=document.createElement("option");return i.value=p,i.text=p,i.disabled=!!t,i}}e.SelectBoxNative=S}),define(X[68],ee([1,0,7,44,67,58,2]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class b extends w.Disposable{onclick(g,p){this._register(_.addDisposableListener(g,_.EventType.CLICK,n=>p(new y.StandardMouseEvent(n))))}onmousedown(g,p){this._register(_.addDisposableListener(g,_.EventType.MOUSE_DOWN,n=>p(new y.StandardMouseEvent(n))))}onmouseover(g,p){this._register(_.addDisposableListener(g,_.EventType.MOUSE_OVER,n=>p(new y.StandardMouseEvent(n))))}onmouseleave(g,p){this._register(_.addDisposableListener(g,_.EventType.MOUSE_LEAVE,n=>p(new y.StandardMouseEvent(n))))}onkeydown(g,p){this._register(_.addDisposableListener(g,_.EventType.KEY_DOWN,n=>p(new k.StandardKeyboardEvent(n))))}onkeyup(g,p){this._register(_.addDisposableListener(g,_.EventType.KEY_UP,n=>p(new k.StandardKeyboardEvent(n))))}oninput(g,p){this._register(_.addDisposableListener(g,_.EventType.INPUT,p))}onblur(g,p){this._register(_.addDisposableListener(g,_.EventType.BLUR,p))}onfocus(g,p){this._register(_.addDisposableListener(g,_.EventType.FOCUS,p))}ignoreGesture(g){return E.Gesture.ignoreTarget(g)}}e.Widget=b}),define(X[213],ee([1,0,143,68,13,30,7]),function(K,e,_,k,y,E,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(...E.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,p=>this._arrowPointerDown(p))),this._register(w.addStandardDisposableListener(this.domNode,w.EventType.POINTER_DOWN,p=>this._arrowPointerDown(p))),this._pointerdownRepeatTimer=this._register(new y.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new y.TimeoutTimer)}_arrowPointerDown(g){if(!g.target||!(g.target instanceof Element))return;const p=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(p,200),this._pointerMoveMonitor.startMonitoring(g.target,g.pointerId,g.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),g.preventDefault()}}e.ScrollbarArrow=b}),define(X[294],ee([1,0,7,36,143,213,546,68,17]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const g=140;class p extends b.Widget{constructor(t){super(),this._lazyRender=t.lazyRender,this._host=t.host,this._scrollable=t.scrollable,this._scrollByPage=t.scrollByPage,this._scrollbarState=t.scrollbarState,this._visibilityController=this._register(new w.ScrollbarVisibilityController(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new y.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,k.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(_.addDisposableListener(this.domNode.domNode,_.EventType.POINTER_DOWN,i=>this._domNodePointerDown(i)))}_createArrow(t){const i=this._register(new E.ScrollbarArrow(t));this.domNode.domNode.appendChild(i.bgDomNode),this.domNode.domNode.appendChild(i.domNode)}_createSlider(t,i,s,r){this.slider=(0,k.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(t),this.slider.setLeft(i),typeof s=="number"&&this.slider.setWidth(s),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(_.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,s=i+this._scrollbarState.getSliderPosition(),r=i+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),d=this._sliderPointerPosition(t);s<=d&&d<=r?t.button===0&&(t.preventDefault(),this._sliderPointerDown(t)):this._onPointerDown(t)}_onPointerDown(t){let i,s;if(t.target===this.domNode.domNode&&typeof t.offsetX=="number"&&typeof t.offsetY=="number")i=t.offsetX,s=t.offsetY;else{const d=_.getDomNodePagePosition(this.domNode.domNode);i=t.pageX-d.left,s=t.pageY-d.top}const r=this._pointerDownRelativePosition(i,s);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),t.button===0&&(t.preventDefault(),this._sliderPointerDown(t))}_sliderPointerDown(t){if(!t.target||!(t.target instanceof Element))return;const i=this._sliderPointerPosition(t),s=this._sliderOrthogonalPointerPosition(t),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(t.target,t.pointerId,t.buttons,d=>{const h=this._sliderOrthogonalPointerPosition(d),o=Math.abs(h-s);if(S.isWindows&&o>g){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const l=this._sliderPointerPosition(d)-i;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(l))},()=>{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=p}),define(X[552],ee([1,0,67,294,213,249,27]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class b extends k.AbstractScrollbar{constructor(g,p,n){const t=g.getScrollDimensions(),i=g.getCurrentScrollPosition();if(super({lazyRender:p.lazyRender,host:n,scrollbarState:new E.ScrollbarState(p.horizontalHasArrows?p.arrowSize:0,p.horizontal===2?0:p.horizontalScrollbarSize,p.vertical===2?0:p.verticalScrollbarSize,t.width,t.scrollWidth,i.scrollLeft),visibility:p.horizontal,extraScrollbarClassName:"horizontal",scrollable:g,scrollByPage:p.scrollByPage}),p.horizontalHasArrows){const s=(p.arrowSize-y.ARROW_IMG_SIZE)/2,r=(p.horizontalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonLeft,top:r,left:s,bottom:void 0,right:void 0,bgWidth:p.arrowSize,bgHeight:p.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:s,bgWidth:p.arrowSize,bgHeight:p.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((p.horizontalScrollbarSize-p.horizontalSliderSize)/2),0,void 0,p.horizontalSliderSize)}_updateSlider(g,p){this.slider.setWidth(g),this.slider.setLeft(p)}_renderDomNode(g,p){this.domNode.setWidth(g),this.domNode.setHeight(p),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,p){return g}_sliderPointerPosition(g){return g.pageX}_sliderOrthogonalPointerPosition(g){return g.pageY}_updateScrollbarSize(g){this.slider.setHeight(g)}writeScrollPosition(g,p){g.scrollLeft=p}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(X[553],ee([1,0,67,294,213,249,27]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class b extends k.AbstractScrollbar{constructor(g,p,n){const t=g.getScrollDimensions(),i=g.getCurrentScrollPosition();if(super({lazyRender:p.lazyRender,host:n,scrollbarState:new E.ScrollbarState(p.verticalHasArrows?p.arrowSize:0,p.vertical===2?0:p.verticalScrollbarSize,0,t.height,t.scrollHeight,i.scrollTop),visibility:p.vertical,extraScrollbarClassName:"vertical",scrollable:g,scrollByPage:p.scrollByPage}),p.verticalHasArrows){const s=(p.arrowSize-y.ARROW_IMG_SIZE)/2,r=(p.verticalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonUp,top:s,left:r,bottom:void 0,right:void 0,bgWidth:p.verticalScrollbarSize,bgHeight:p.arrowSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonDown,top:void 0,left:r,bottom:s,right:void 0,bgWidth:p.verticalScrollbarSize,bgHeight:p.arrowSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((p.verticalScrollbarSize-p.verticalSliderSize)/2),p.verticalSliderSize,void 0)}_updateSlider(g,p){this.slider.setHeight(g),this.slider.setTop(p)}_renderDomNode(g,p){this.domNode.setWidth(p),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,p){return p}_sliderPointerPosition(g){return g.pageY}_sliderOrthogonalPointerPosition(g){return g.pageX}_updateScrollbarSize(g){this.slider.setWidth(g)}writeScrollPosition(g,p){g.scrollTop=p}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(X[78],ee([1,0,47,7,36,67,552,553,68,13,6,2,17,177,388]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const s=500,r=50,d=!0;class h{constructor(m,C,L){this.timestamp=m,this.deltaX=C,this.deltaY=L,this.score=0}}class o{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let m=1,C=0,L=1,D=this._rear;do{const I=D===this._front?m:Math.pow(2,-L);if(m-=I,C+=this._memory[D].score*I,D===this._front)break;D=(this._capacity+D-1)%this._capacity,L++}while(!0);return C<=.5}acceptStandardWheelEvent(m){const C=window.devicePixelRatio/(0,_.getZoomFactor)();t.isWindows||t.isLinux?this.accept(Date.now(),m.deltaX/C,m.deltaY/C):this.accept(Date.now(),m.deltaX,m.deltaY)}accept(m,C,L){const D=new h(m,C,L);D.score=this._computeScore(D),this._front===-1&&this._rear===-1?(this._memory[0]=D,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]=D)}_computeScore(m){if(Math.abs(m.deltaX)>0&&Math.abs(m.deltaY)>0)return 1;let C=.5;const L=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(m.deltaX)||!this._isAlmostInt(m.deltaY))&&(C+=.25),Math.min(Math.max(C,0),1)}_isAlmostInt(m){return Math.abs(Math.round(m)-m)<.01}}e.MouseWheelClassifier=o,o.INSTANCE=new o;class c extends S.Widget{get options(){return this._options}constructor(m,C,L){super(),this._onScroll=this._register(new p.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new p.Emitter),m.style.overflow="hidden",this._options=v(C),this._scrollable=L,this._register(this._scrollable.onScroll(I=>{this._onWillScroll.fire(I),this._onDidScroll(I),this._onScroll.fire(I)}));const D={onMouseWheel:I=>this._onMouseWheel(I),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b.VerticalScrollbar(this._scrollable,this._options,D)),this._horizontalScrollbar=this._register(new w.HorizontalScrollbar(this._scrollable,this._options,D)),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(m),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,I=>this._onMouseOver(I)),this.onmouseleave(this._listenOnDomNode,I=>this._onMouseLeave(I)),this._hideTimeout=this._register(new g.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,n.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(m){this._verticalScrollbar.delegatePointerDown(m)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(m){this._scrollable.setScrollDimensions(m,!1)}updateClassName(m){this._options.className=m,t.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(m){typeof m.handleMouseWheel<"u"&&(this._options.handleMouseWheel=m.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof m.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=m.mouseWheelScrollSensitivity),typeof m.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=m.fastScrollSensitivity),typeof m.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=m.scrollPredominantAxis),typeof m.horizontal<"u"&&(this._options.horizontal=m.horizontal),typeof m.vertical<"u"&&(this._options.vertical=m.vertical),typeof m.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=m.horizontalScrollbarSize),typeof m.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=m.verticalScrollbarSize),typeof m.scrollByPage<"u"&&(this._options.scrollByPage=m.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(m){this._onMouseWheel(new E.StandardWheelEvent(m))}_setListeningToMouseWheel(m){if(this._mouseWheelToDispose.length>0!==m&&(this._mouseWheelToDispose=(0,n.dispose)(this._mouseWheelToDispose),m)){const L=D=>{this._onMouseWheel(new E.StandardWheelEvent(D))};this._mouseWheelToDispose.push(k.addDisposableListener(this._listenOnDomNode,k.EventType.MOUSE_WHEEL,L,{passive:!1}))}}_onMouseWheel(m){const C=o.INSTANCE;d&&C.acceptStandardWheelEvent(m);let L=!1;if(m.deltaY||m.deltaX){let I=m.deltaY*this._options.mouseWheelScrollSensitivity,T=m.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&&m.browserEvent&&m.browserEvent.shiftKey;(this._options.scrollYToX||O)&&!T&&(T=I,I=0),m.browserEvent&&m.browserEvent.altKey&&(T=T*this._options.fastScrollSensitivity,I=I*this._options.fastScrollSensitivity);const R=this._scrollable.getFutureScrollPosition();let A={};if(I){const N=r*I,P=R.scrollTop-(N<0?Math.floor(N):Math.ceil(N));this._verticalScrollbar.writeScrollPosition(A,P)}if(T){const N=r*T,P=R.scrollLeft-(N<0?Math.floor(N):Math.ceil(N));this._horizontalScrollbar.writeScrollPosition(A,P)}A=this._scrollable.validateScrollPosition(A),(R.scrollLeft!==A.scrollLeft||R.scrollTop!==A.scrollTop)&&(d&&this._options.mouseWheelSmoothScroll&&C.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(A):this._scrollable.setScrollPositionNow(A),L=!0)}let D=L;!D&&this._options.alwaysConsumeMouseWheel&&(D=!0),!D&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(D=!0),D&&(m.preventDefault(),m.stopPropagation())}_onDidScroll(m){this._shouldRender=this._horizontalScrollbar.onDidScroll(m)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(m)||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 m=this._scrollable.getCurrentScrollPosition(),C=m.scrollTop>0,L=m.scrollLeft>0,D=L?" left":"",I=C?" top":"",T=L||C?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${D}`),this._topShadowDomNode.setClassName(`shadow${I}`),this._topLeftShadowDomNode.setClassName(`shadow${T}${I}${D}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(m){this._mouseIsOver=!1,this._hide()}_onMouseOver(m){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),s)}}e.AbstractScrollableElement=c;class l extends c{constructor(m,C){C=C||{},C.mouseWheelSmoothScroll=!1;const L=new i.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:D=>k.scheduleAtNextAnimationFrame(D)});super(m,C,L),this._register(L)}setScrollPosition(m){this._scrollable.setScrollPositionNow(m)}}e.ScrollableElement=l;class a extends c{constructor(m,C,L){super(m,C,L)}setScrollPosition(m){m.reuseAnimation?this._scrollable.setScrollPositionSmooth(m,m.reuseAnimation):this._scrollable.setScrollPositionNow(m)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=a;class u extends c{constructor(m,C){C=C||{},C.mouseWheelSmoothScroll=!1;const L=new i.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:D=>k.scheduleAtNextAnimationFrame(D)});super(m,C,L),this._register(L),this._element=m,this.onScroll(D=>{D.scrollTopChanged&&(this._element.scrollTop=D.scrollTop),D.scrollLeftChanged&&(this._element.scrollLeft=D.scrollLeft)}),this.scanDomNode()}setScrollPosition(m){this._scrollable.setScrollPositionNow(m)}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 m={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 m.horizontalSliderSize=typeof f.horizontalSliderSize<"u"?f.horizontalSliderSize:m.horizontalScrollbarSize,m.verticalSliderSize=typeof f.verticalSliderSize<"u"?f.verticalSliderSize:m.verticalScrollbarSize,t.isMacintosh&&(m.className+=" mac"),m}}),define(X[295],ee([1,0,7,44,78,2,381]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=void 0;const w=_.$;class b extends E.Disposable{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new y.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=b;class S extends E.Disposable{static render(p,n,t){return new S(p,n,t)}constructor(p,n,t){super(),this.actionContainer=_.append(p,w("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=_.append(this.actionContainer,w("a.action")),this.action.setAttribute("role","button"),n.iconClass&&_.append(this.action,w(`span.icon.${n.iconClass}`));const i=_.append(this.action,w("span"));i.textContent=t?`${n.label} (${t})`:n.label,this._register(_.addDisposableListener(this.actionContainer,_.EventType.CLICK,s=>{s.stopPropagation(),s.preventDefault(),n.run(this.actionContainer)})),this._register(_.addDisposableListener(this.actionContainer,_.EventType.KEY_DOWN,s=>{const r=new k.StandardKeyboardEvent(s);(r.equals(3)||r.equals(10))&&(s.stopPropagation(),s.preventDefault(),n.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(p){p?(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(X[214],ee([1,0,159,7,77,58,78,16,13,100,6,2,160,177,373,549,11]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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(m){return[m]},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 l{constructor(C){this.elements=C}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=l;class a{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 L=0;L<C.files.length;L++){const D=C.files.item(L);D&&(D.size||D.type)&&this.files.push(D)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=a;function u(m,C){return Array.isArray(m)&&Array.isArray(C)?(0,b.equals)(m,C):m===C}class v{constructor(C){C?.getSetSize?this.getSetSize=C.getSetSize.bind(C):this.getSetSize=(L,D,I)=>I,C?.getPosInSet?this.getPosInSet=C.getPosInSet.bind(C):this.getPosInSet=(L,D)=>D+1,C?.getRole?this.getRole=C.getRole.bind(C):this.getRole=L=>"listitem",C?.isChecked?this.isChecked=C.isChecked.bind(C):this.isChecked=L=>{}}}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 L of this.items)this.measureItemWidth(L);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,k.getContentWidth)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(C,L,D,I=o){var T,O,R,A,N,P,x,F,B,V,$,M;if(this.virtualDelegate=L,this.domId=`list_id_${++f.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new S.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=n.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=n.Disposable.None,this.onDragLeaveTimeout=n.Disposable.None,this.disposables=new n.DisposableStore,this._onDidChangeContentHeight=new p.Emitter,this._horizontalScrolling=!1,I.horizontalScrolling&&I.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new s.RangeMap;for(const ie of D)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(E.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:(A=I.alwaysConsumeMouseWheel)!==null&&A!==void 0?A: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,E.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(($=I.initialSize)===null||$===void 0?void 0:$.height,(M=I.initialSize)===null||M===void 0?void 0:M.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 L;C.scrollByPage!==void 0&&(L=Object.assign(Object.assign({},L??{}),{scrollByPage:C.scrollByPage})),C.mouseWheelScrollSensitivity!==void 0&&(L=Object.assign(Object.assign({},L??{}),{mouseWheelScrollSensitivity:C.mouseWheelScrollSensitivity})),C.fastScrollSensitivity!==void 0&&(L=Object.assign(Object.assign({},L??{}),{fastScrollSensitivity:C.fastScrollSensitivity})),L&&this.scrollableElement.updateOptions(L)}splice(C,L,D=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(C,L,D)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(C,L,D=[]){const I=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),T={start:C,end:C+L},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 q=R.get(W.templateId);q||(q=[],R.set(W.templateId,q));const Z=this.renderers.get(W.templateId);Z&&Z.disposeElement&&Z.disposeElement(W.element,H,W.row.templateData,W.size),q.push(W.row)}W.row=null}const A={start:C+L,end:this.items.length},N=t.Range.intersect(A,I),P=t.Range.relativeComplement(A,I),x=D.map(H=>({id:String(this.itemId++),element:H,templateId:this.virtualDelegate.getTemplateId(H),size:this.virtualDelegate.getHeight(H),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(H),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:n.Disposable.None,checkedDisposable:n.Disposable.None}));let F;C===0&&L>=this.items.length?(this.rangeMap=new s.RangeMap,this.rangeMap.splice(0,0,x),F=this.items,this.items=x):(this.rangeMap.splice(C,L,x),F=this.items.splice(C,L,...x));const B=D.length-L,V=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),$=(0,s.shift)(N,B),M=t.Range.intersect(V,$);for(let H=M.start;H<M.end;H++)this.updateItemInDOM(this.items[H],H);const Q=t.Range.relativeComplement($,V);for(const H of Q)for(let W=H.start;W<H.end;W++)this.removeItemFromDOM(W);const ie=P.map(H=>(0,s.shift)(H,B)),ne=[{start:C,end:C+D.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 q=this.items[W],Z=R.get(q.templateId),Y=Z?.pop();this.insertItemInDOM(W,se,Y)}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 L of this.items)typeof L.width<"u"&&(C=Math.max(C,L.width));this.scrollWidth=C,this.scrollableElement.setScrollDimensions({scrollWidth:C===0?0:C+10})}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),L=this.rangeMap.positionAt(C.start),D=this.rangeMap.positionAt(C.start+1);return D!==-1&&(D-L)/2+L<this.scrollTop?C.start+1:C.start}element(C){return this.items[C].element}domElement(C){const L=this.items[C].row;return L&&L.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,L){const D={height:typeof C=="number"?C:(0,k.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,D.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(D),typeof L<"u"&&(this.renderWidth=L,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof L=="number"?L:(0,k.getContentWidth)(this.domNode)})}render(C,L,D,I,T,O=!1){const R=this.getRenderRange(L,D),A=t.Range.relativeComplement(R,C),N=t.Range.relativeComplement(C,R),P=this.getNextToLastElement(A);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 A)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=`-${L}px`,this.horizontalScrolling&&T!==void 0&&(this.rowsContainer.style.width=`${Math.max(T,this.renderWidth)}px`),this.lastRenderTop=L,this.lastRenderHeight=D}insertItemInDOM(C,L,D){const I=this.items[C];let T=!1;if(!I.row)if(D)I.row=D;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)&&(L?this.rowsContainer.insertBefore(I.row.domNode,L):this.rowsContainer.appendChild(I.row.domNode)),this.updateItemInDOM(I,C);const A=this.renderers.get(I.templateId);if(!A)throw new Error(`No renderer found for template id ${I.templateId}`);A?.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 L=window.getComputedStyle(C.row.domNode);L.paddingLeft&&(C.width+=parseFloat(L.paddingLeft)),L.paddingRight&&(C.width+=parseFloat(L.paddingRight)),C.row.domNode.style.width=""}updateItemInDOM(C,L){C.row.domNode.style.top=`${this.elementTop(L)}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",`${L}`),C.row.domNode.setAttribute("data-last-element",L===this.length-1?"true":"false"),C.row.domNode.setAttribute("data-parity",L%2===0?"even":"odd"),C.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(C.element,L,this.length))),C.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(C.element,L))),C.row.domNode.setAttribute("id",this.getElementDomId(L)),C.row.domNode.classList.toggle("drop-target",C.dropTarget)}removeItemFromDOM(C){const L=this.items[C];if(L.dragStartDisposable.dispose(),L.checkedDisposable.dispose(),L.row){const D=this.renderers.get(L.templateId);D&&D.disposeElement&&D.disposeElement(L.element,C,L.row.templateData,L.size),this.cache.release(L.row),L.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(C,L){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:C,reuseAnimation:L})}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 p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"click")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseDblClick(){return p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"dblclick")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseMiddleClick(){return p.Event.filter(p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"auxclick")).event,C=>this.toMouseEvent(C),this.disposables),C=>C.browserEvent.button===1,this.disposables)}get onMouseDown(){return p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mousedown")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseOver(){return p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseover")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseOut(){return p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseout")).event,C=>this.toMouseEvent(C),this.disposables)}get onContextMenu(){return p.Event.any(p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"contextmenu")).event,C=>this.toMouseEvent(C),this.disposables),p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,E.EventType.Contextmenu)).event,C=>this.toGestureEvent(C),this.disposables))}get onTouchStart(){return p.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"touchstart")).event,C=>this.toTouchEvent(C),this.disposables)}get onTap(){return p.Event.map(this.disposables.add(new y.DomEmitter(this.rowsContainer,E.EventType.Tap)).event,C=>this.toGestureEvent(C),this.disposables)}toMouseEvent(C){const L=this.getItemIndexFromEventTarget(C.target||null),D=typeof L>"u"?void 0:this.items[L],I=D&&D.element;return{browserEvent:C,index:L,element:I}}toTouchEvent(C){const L=this.getItemIndexFromEventTarget(C.target||null),D=typeof L>"u"?void 0:this.items[L],I=D&&D.element;return{browserEvent:C,index:L,element:I}}toGestureEvent(C){const L=this.getItemIndexFromEventTarget(C.initialTarget||null),D=typeof L>"u"?void 0:this.items[L],I=D&&D.element;return{browserEvent:C,index:L,element:I}}toDragEvent(C){const L=this.getItemIndexFromEventTarget(C.target||null),D=typeof L>"u"?void 0:this.items[L],I=D&&D.element;return{browserEvent:C,index:L,element:I}}onScroll(C){try{const L=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(L,C.scrollTop,C.height,C.scrollLeft,C.scrollWidth),this.supportDynamicHeights&&this._rerender(C.scrollTop,C.height,C.inSmoothScrolling)}catch(L){throw console.error("Got bad scroll event:",C),L}}onTouchChange(C){C.preventDefault(),C.stopPropagation(),this.scrollTop-=C.translationY}onDragStart(C,L,D){var I,T;if(!D.dataTransfer)return;const O=this.dnd.getDragElements(C);if(D.dataTransfer.effectAllowed="copyMove",D.dataTransfer.setData(_.DataTransfers.TEXT,L),D.dataTransfer.setDragImage){let R;this.dnd.getDragLabel&&(R=this.dnd.getDragLabel(O,D)),typeof R>"u"&&(R=String(O.length));const A=(0,k.$)(".monaco-drag-image");A.textContent=R;const P=(x=>{for(;x&&!x.classList.contains("monaco-workbench");)x=x.parentElement;return x||document.body})(this.domNode);P.appendChild(A),D.dataTransfer.setDragImage(A,-10,-10),setTimeout(()=>P.removeChild(A),0)}this.domNode.classList.add("dragging"),this.currentDragData=new c(O),h.CurrentDragAndDropData=new l(O),(T=(I=this.dnd).onDragStart)===null||T===void 0||T.call(I,this.currentDragData,D)}onDragOver(C){var L;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 a}const D=this.dnd.onDragOver(this.currentDragData,C.element,C.index,C.browserEvent);if(this.canDrop=typeof D=="boolean"?D:D.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;C.browserEvent.dataTransfer.dropEffect=typeof D!="boolean"&&D.effect===0?"copy":"move";let I;if(typeof D!="boolean"&&D.feedback?I=D.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,n.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,(L=O.row)===null||L===void 0||L.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,n.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 L,D;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,S.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((D=(L=this.dnd).onDragLeave)===null||D===void 0||D.call(L,this.currentDragData,C.element,C.index,C.browserEvent))}onDrop(C){if(!this.canDrop)return;const L=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,h.CurrentDragAndDropData=void 0,!(!L||!C.browserEvent.dataTransfer)&&(C.browserEvent.preventDefault(),L.update(C.browserEvent.dataTransfer),this.dnd.drop(L,C.element,C.index,C.browserEvent))}onDragEnd(C){var L,D;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,h.CurrentDragAndDropData=void 0,(D=(L=this.dnd).onDragEnd)===null||D===void 0||D.call(L,C)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=n.Disposable.None}setupDragAndDropScrollTopAnimation(C){if(!this.dragOverAnimationDisposable){const L=(0,k.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,k.animate)(this.animateDragAndDropScrollTop.bind(this,L))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,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 L=this.dragOverMouseY-C,D=this.renderHeight-35;L<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(L-35))):L>D&&(this.scrollTop+=Math.min(14,Math.floor(.3*(L-D))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(C){const L=this.scrollableElement.getDomNode();let D=C;for(;D instanceof HTMLElement&&D!==this.rowsContainer&&L.contains(D);){const I=D.getAttribute("data-index");if(I){const T=Number(I);if(!isNaN(T))return T}D=D.parentElement}}getRenderRange(C,L){return{start:this.rangeMap.indexAt(C),end:this.rangeMap.indexAfter(C+L-1)}}_rerender(C,L,D){const I=this.getRenderRange(C,L);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 A=this.getRenderRange(C,L);let N=!1;for(let P=A.start;P<A.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,A);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(A,I);for(const F of x)for(let B=F.start;B<F.end;B++){const V=B+1,$=V<this.items.length?this.items[V].row:null,M=$?$.domNode:null;this.insertItemInDOM(B,M)}for(let F=A.start;F<A.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,D)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(C){var L,D,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 A=this.renderers.get(T.templateId);if(!A)throw new d.BugIndicatingError("Missing renderer for templateId: "+T.templateId);return A.renderElement(T.element,C,R.templateData,void 0),T.size=R.domNode.offsetHeight,(L=A.disposeElement)===null||L===void 0||L.call(A,T.element,C,R.templateData,void 0),(I=(D=this.virtualDelegate).setDynamicHeight)===null||I===void 0||I.call(D,T.element,T.size),T.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(R.domNode),this.cache.release(R),T.size-O}getNextToLastElement(C){const L=C[C.length-1];if(!L)return null;const D=this.items[L.end];return!D||!D.row?null:D.row.domNode}getElementDomId(C){return`${this.domId}_${C}`}dispose(){var C;if(this.items){for(const L of this.items)if(L.row){const D=this.renderers.get(L.row.templateId);D&&((C=D.disposeElement)===null||C===void 0||C.call(D,L.element,-1,L.row.templateData,void 0),D.disposeTemplate(L.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,n.dispose)(this.disposables)}}e.ListView=f,f.InstanceCount=0,Me([g.memoize],f.prototype,"onMouseClick",null),Me([g.memoize],f.prototype,"onMouseDblClick",null),Me([g.memoize],f.prototype,"onMouseMiddleClick",null),Me([g.memoize],f.prototype,"onMouseDown",null),Me([g.memoize],f.prototype,"onMouseOver",null),Me([g.memoize],f.prototype,"onMouseOut",null),Me([g.memoize],f.prototype,"onContextMenu",null),Me([g.memoize],f.prototype,"onTouchStart",null),Me([g.memoize],f.prototype,"onTap",null)}),define(X[109],ee([1,0,7,77,44,58,49,362,16,13,37,100,6,64,2,133,17,18,361,214,255]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 l{constructor(W){this.trait=W,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(W){return W}renderElement(W,q,Z){const Y=this.renderedElements.findIndex(oe=>oe.templateData===Z);if(Y>=0){const oe=this.renderedElements[Y];this.trait.unrender(Z),oe.index=q}else{const oe={index:q,templateData:Z};this.renderedElements.push(oe)}this.trait.renderIndex(q,Z)}splice(W,q,Z){const Y=[];for(const oe of this.renderedElements)oe.index<W?Y.push(oe):oe.index>=W+q&&Y.push({index:oe.index+Z-q,templateData:oe.templateData});this.renderedElements=Y}renderIndexes(W){for(const{index:q,templateData:Z}of this.renderedElements)W.indexOf(q)>-1&&this.trait.renderIndex(q,Z)}disposeTemplate(W){const q=this.renderedElements.findIndex(Z=>Z.templateData===W);q<0||this.renderedElements.splice(q,1)}}class a{get name(){return this._trait}get renderer(){return new l(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,q,Z){var Y;q=Math.max(0,Math.min(q,this.length-W));const oe=Z.length-q,ce=W+q,ge=[...this.sortedIndexes.filter(ue=>ue<W),...Z.map((ue,j)=>ue?j+W:-1).filter(ue=>ue!==-1),...this.sortedIndexes.filter(ue=>ue>=ce).map(ue=>ue+oe)],le=this.length+oe;if(this.sortedIndexes.length>0&&ge.length===0&&le>0){const ue=(Y=this.sortedIndexes.find(j=>j>=W))!==null&&Y!==void 0?Y:le-1;ge.push(Math.min(ue,le-1))}this.renderer.splice(W,q,Z.length),this._set(ge,ge),this.length=le}renderIndex(W,q){q.classList.toggle(this._trait,this.contains(W))}unrender(W){W.classList.remove(this._trait)}set(W,q){return this._set(W,[...W].sort(Q),q)}_set(W,q,Z){const Y=this.indexes,oe=this.sortedIndexes;this.indexes=W,this.sortedIndexes=q;const ce=$(oe,W);return this.renderer.renderIndexes(ce),this._onChange.fire({indexes:W,browserEvent:Z}),Y}get(){return this.indexes}contains(W){return(0,S.binarySearch)(this.sortedIndexes,W,Q)>=0}dispose(){(0,s.dispose)(this._onChange)}}Me([n.memoize],a.prototype,"renderer",null);class u extends a{constructor(W){super("selected"),this.setAriaSelected=W}renderIndex(W,q){super.renderIndex(W,q),this.setAriaSelected&&(this.contains(W)?q.setAttribute("aria-selected","true"):q.setAttribute("aria-selected","false"))}}class v{constructor(W,q,Z){this.trait=W,this.view=q,this.identityProvider=Z}splice(W,q,Z){if(!this.identityProvider)return this.trait.splice(W,q,Z.map(()=>!1));const Y=this.trait.get().map(ce=>this.identityProvider.getId(this.view.element(ce)).toString()),oe=Z.map(ce=>Y.indexOf(this.identityProvider.getId(ce).toString())>-1);this.trait.splice(W,q,oe)}}function f(H){return H.tagName==="INPUT"||H.tagName==="TEXTAREA"}e.isInputElement=f;function m(H){return H.classList.contains("monaco-editor")?!0:H.classList.contains("monaco-list")||!H.parentElement?!1:m(H.parentElement)}e.isMonacoEditor=m;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 L{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 y.StandardKeyboardEvent(W)))}constructor(W,q,Z){this.list=W,this.view=q,this.disposables=new s.DisposableStore,this.multipleSelectionDisposables=new s.DisposableStore,this.onKeyDown.filter(Y=>Y.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===9).on(this.onEscape,this,this.disposables),Z.multipleSelectionSupport!==!1&&this.onKeyDown.filter(Y=>(d.isMacintosh?Y.metaKey:Y.ctrlKey)&&Y.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(W){W.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),W.multipleSelectionSupport&&this.onKeyDown.filter(q=>(d.isMacintosh?q.metaKey:q.ctrlKey)&&q.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 q=this.list.getFocus()[0];this.list.setAnchor(q),this.list.reveal(q),this.view.domNode.focus()}onDownArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusNext(1,!1,W.browserEvent);const q=this.list.getFocus()[0];this.list.setAnchor(q),this.list.reveal(q),this.view.domNode.focus()}onPageUpArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusPreviousPage(W.browserEvent);const q=this.list.getFocus()[0];this.list.setAnchor(q),this.list.reveal(q),this.view.domNode.focus()}onPageDownArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusNextPage(W.browserEvent);const q=this.list.getFocus()[0];this.list.setAnchor(q),this.list.reveal(q),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()}}Me([n.memoize],L.prototype,"onKeyDown",null);var D;(function(H){H[H.Automatic=0]="Automatic",H[H.Trigger=1]="Trigger"})(D||(e.TypeNavigationMode=D={}));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,q,Z,Y,oe){this.list=W,this.view=q,this.keyboardNavigationLabelProvider=Z,this.keyboardNavigationEventFilter=Y,this.delegate=oe,this.enabled=!1,this.state=I.Idle,this.mode=D.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new s.DisposableStore,this.disposables=new s.DisposableStore,this.updateOptions(W.options)}updateOptions(W){var q,Z;!((q=W.typeNavigationEnabled)!==null&&q!==void 0)||q?this.enable():this.disable(),this.mode=(Z=W.typeNavigationMode)!==null&&Z!==void 0?Z:D.Automatic}enable(){if(this.enabled)return;let W=!1;const q=this.enabledDisposables.add(t.Event.chain(this.enabledDisposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event)).filter(oe=>!f(oe.target)).filter(()=>this.mode===D.Automatic||this.triggered).map(oe=>new y.StandardKeyboardEvent(oe)).filter(oe=>W||this.keyboardNavigationEventFilter(oe)).filter(oe=>this.delegate.mightProducePrintableCharacter(oe)).forEach(oe=>_.EventHelper.stop(oe,!0)).map(oe=>oe.browserEvent.key).event,Z=t.Event.debounce(q,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);t.Event.reduce(t.Event.any(q,Z),(oe,ce)=>ce===null?null:(oe||"")+ce,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),Z(this.onClear,this,this.enabledDisposables),q(()=>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 q=this.list.getFocus();if(q.length>0&&q[0]===this.previouslyFocused){const Z=(W=this.list.options.accessibilityProvider)===null||W===void 0?void 0:W.getAriaLabel(this.list.element(q[0]));Z&&(0,w.alert)(Z)}this.previouslyFocused=-1}onInput(W){if(!W){this.state=I.Idle,this.triggered=!1;return}const q=this.list.getFocus(),Z=q.length>0?q[0]:0,Y=this.state===I.Idle?1:0;this.state=I.Typing;for(let oe=0;oe<this.list.length;oe++){const ce=(Z+oe+Y)%this.list.length,ge=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(ce)),le=ge&&ge.toString();if(typeof le>"u"||(0,i.matchesPrefix)(W,le)){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,q){this.list=W,this.view=q,this.disposables=new s.DisposableStore,this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(q.domNode,"keydown")).event)).filter(Y=>!f(Y.target)).map(Y=>new y.StandardKeyboardEvent(Y)).filter(Y=>Y.keyCode===2&&!Y.ctrlKey&&!Y.metaKey&&!Y.shiftKey&&!Y.altKey).on(this.onTab,this,this.disposables)}onTab(W){if(W.target!==this.view.domNode)return;const q=this.list.getFocus();if(q.length===0)return;const Z=this.view.domElement(q[0]);if(!Z)return;const Y=Z.querySelector("[tabIndex]");if(!Y||!(Y instanceof HTMLElement)||Y.tabIndex===-1)return;const oe=window.getComputedStyle(Y);oe.visibility==="hidden"||oe.display==="none"||(W.preventDefault(),W.stopPropagation(),Y.focus())}dispose(){this.disposables.dispose()}}function R(H){return d.isMacintosh?H.browserEvent.metaKey:H.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=R;function A(H){return H.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=A;function N(H){return H instanceof MouseEvent&&H.button===2}const P={isSelectionSingleChangeEvent:R,isSelectionRangeChangeEvent:A};class x{constructor(W){this.list=W,this.disposables=new s.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(E.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){m(W.browserEvent.target)||document.activeElement!==W.browserEvent.target&&this.list.domFocus()}onContextMenu(W){if(f(W.browserEvent.target)||m(W.browserEvent.target))return;const q=typeof W.index>"u"?[]:[W.index];this.list.setFocus(q,W.browserEvent)}onViewPointer(W){if(!this.mouseSupport||f(W.browserEvent.target)||m(W.browserEvent.target))return;const q=W.index;if(typeof q>"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([q],W.browserEvent),this.list.setAnchor(q),N(W.browserEvent)||this.list.setSelection([q],W.browserEvent),this._onPointer.fire(W)}onDoubleClick(W){if(f(W.browserEvent.target)||m(W.browserEvent.target)||this.isSelectionChangeEvent(W))return;const q=this.list.getFocus();this.list.setSelection(q,W.browserEvent)}changeSelection(W){const q=W.index;let Z=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(W)){if(typeof Z>"u"){const j=this.list.getFocus()[0];Z=j??q,this.list.setAnchor(Z)}const Y=Math.min(Z,q),oe=Math.max(Z,q),ce=(0,S.range)(Y,oe+1),ge=this.list.getSelection(),le=V($(ge,[Z]),Z);if(le.length===0)return;const ue=$(ce,M(ge,le));this.list.setSelection(ue,W.browserEvent),this.list.setFocus([q],W.browserEvent)}else if(this.isSelectionSingleChangeEvent(W)){const Y=this.list.getSelection(),oe=Y.filter(ce=>ce!==q);this.list.setFocus([q]),this.list.setAnchor(q),Y.length===oe.length?this.list.setSelection([...oe,q],W.browserEvent):this.list.setSelection(oe,W.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=x;class F{constructor(W,q){this.styleElement=W,this.selectorSuffix=q}style(W){var q,Z;const Y=this.selectorSuffix&&`.${this.selectorSuffix}`,oe=[];W.listBackground&&oe.push(`.monaco-list${Y} .monaco-list-rows { background: ${W.listBackground}; }`),W.listFocusBackground&&(oe.push(`.monaco-list${Y}:focus .monaco-list-row.focused { background-color: ${W.listFocusBackground}; }`),oe.push(`.monaco-list${Y}:focus .monaco-list-row.focused:hover { background-color: ${W.listFocusBackground}; }`)),W.listFocusForeground&&oe.push(`.monaco-list${Y}:focus .monaco-list-row.focused { color: ${W.listFocusForeground}; }`),W.listActiveSelectionBackground&&(oe.push(`.monaco-list${Y}:focus .monaco-list-row.selected { background-color: ${W.listActiveSelectionBackground}; }`),oe.push(`.monaco-list${Y}:focus .monaco-list-row.selected:hover { background-color: ${W.listActiveSelectionBackground}; }`)),W.listActiveSelectionForeground&&oe.push(`.monaco-list${Y}:focus .monaco-list-row.selected { color: ${W.listActiveSelectionForeground}; }`),W.listActiveSelectionIconForeground&&oe.push(`.monaco-list${Y}:focus .monaco-list-row.selected .codicon { color: ${W.listActiveSelectionIconForeground}; }`),W.listFocusAndSelectionBackground&&oe.push(`
- .monaco-drag-image,
- .monaco-list${Y}:focus .monaco-list-row.selected.focused { background-color: ${W.listFocusAndSelectionBackground}; }
- `),W.listFocusAndSelectionForeground&&oe.push(`
- .monaco-drag-image,
- .monaco-list${Y}:focus .monaco-list-row.selected.focused { color: ${W.listFocusAndSelectionForeground}; }
- `),W.listInactiveFocusForeground&&(oe.push(`.monaco-list${Y} .monaco-list-row.focused { color: ${W.listInactiveFocusForeground}; }`),oe.push(`.monaco-list${Y} .monaco-list-row.focused:hover { color: ${W.listInactiveFocusForeground}; }`)),W.listInactiveSelectionIconForeground&&oe.push(`.monaco-list${Y} .monaco-list-row.focused .codicon { color: ${W.listInactiveSelectionIconForeground}; }`),W.listInactiveFocusBackground&&(oe.push(`.monaco-list${Y} .monaco-list-row.focused { background-color: ${W.listInactiveFocusBackground}; }`),oe.push(`.monaco-list${Y} .monaco-list-row.focused:hover { background-color: ${W.listInactiveFocusBackground}; }`)),W.listInactiveSelectionBackground&&(oe.push(`.monaco-list${Y} .monaco-list-row.selected { background-color: ${W.listInactiveSelectionBackground}; }`),oe.push(`.monaco-list${Y} .monaco-list-row.selected:hover { background-color: ${W.listInactiveSelectionBackground}; }`)),W.listInactiveSelectionForeground&&oe.push(`.monaco-list${Y} .monaco-list-row.selected { color: ${W.listInactiveSelectionForeground}; }`),W.listHoverBackground&&oe.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${W.listHoverBackground}; }`),W.listHoverForeground&&oe.push(`.monaco-list${Y}: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,(q=W.listFocusOutline)!==null&&q!==void 0?q:""));ce&&oe.push(`.monaco-list${Y}:focus .monaco-list-row.focused.selected { outline: 1px solid ${ce}; outline-offset: -1px;}`),W.listFocusOutline&&oe.push(`
- .monaco-drag-image,
- .monaco-list${Y}:focus .monaco-list-row.focused { outline: 1px solid ${W.listFocusOutline}; outline-offset: -1px; }
- .monaco-workbench.context-menu-visible .monaco-list${Y}.last-focused .monaco-list-row.focused { outline: 1px solid ${W.listFocusOutline}; outline-offset: -1px; }
- `);const ge=(0,_.asCssValueWithDefault)(W.listSelectionOutline,(Z=W.listInactiveFocusOutline)!==null&&Z!==void 0?Z:"");ge&&oe.push(`.monaco-list${Y} .monaco-list-row.focused.selected { outline: 1px dotted ${ge}; outline-offset: -1px; }`),W.listSelectionOutline&&oe.push(`.monaco-list${Y} .monaco-list-row.selected { outline: 1px dotted ${W.listSelectionOutline}; outline-offset: -1px; }`),W.listInactiveFocusOutline&&oe.push(`.monaco-list${Y} .monaco-list-row.focused { outline: 1px dotted ${W.listInactiveFocusOutline}; outline-offset: -1px; }`),W.listHoverOutline&&oe.push(`.monaco-list${Y} .monaco-list-row:hover { outline: 1px dashed ${W.listHoverOutline}; outline-offset: -1px; }`),W.listDropBackground&&oe.push(`
- .monaco-list${Y}.drop-target,
- .monaco-list${Y} .monaco-list-rows.drop-target,
- .monaco-list${Y} .monaco-list-row.drop-target { background-color: ${W.listDropBackground} !important; color: inherit !important; }
- `),W.tableColumnsBorder&&oe.push(`
- .monaco-table > .monaco-split-view2,
- .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,
- .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,
- .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
- border-color: ${W.tableColumnsBorder};
- }
- .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,
- .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
- border-color: transparent;
- }
- `),W.tableOddRowsBackgroundColor&&oe.push(`
- .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
- .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
- .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
- background-color: ${W.tableOddRowsBackgroundColor};
- }
- `),this.styleElement.textContent=oe.join(`
- `)}}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:p.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:p.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:p.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 q=H.indexOf(W);if(q===-1)return[];const Z=[];let Y=q-1;for(;Y>=0&&H[Y]===W-(q-Y);)Z.push(H[Y--]);for(Z.reverse(),Y=q;Y<H.length&&H[Y]===W+(Y-q);)Z.push(H[Y++]);return Z}function $(H,W){const q=[];let Z=0,Y=0;for(;Z<H.length||Y<W.length;)if(Z>=H.length)q.push(W[Y++]);else if(Y>=W.length)q.push(H[Z++]);else if(H[Z]===W[Y]){q.push(H[Z]),Z++,Y++;continue}else H[Z]<W[Y]?q.push(H[Z++]):q.push(W[Y++]);return q}function M(H,W){const q=[];let Z=0,Y=0;for(;Z<H.length||Y<W.length;)if(Z>=H.length)q.push(W[Y++]);else if(Y>=W.length)q.push(H[Z++]);else if(H[Z]===W[Y]){Z++,Y++;continue}else H[Z]<W[Y]?q.push(H[Z++]):Y++;return q}const Q=(H,W)=>H-W;class ie{constructor(W,q){this._templateId=W,this.renderers=q}get templateId(){return this._templateId}renderTemplate(W){return this.renderers.map(q=>q.renderTemplate(W))}renderElement(W,q,Z,Y){let oe=0;for(const ce of this.renderers)ce.renderElement(W,q,Z[oe++],Y)}disposeElement(W,q,Z,Y){var oe;let ce=0;for(const ge of this.renderers)(oe=ge.disposeElement)===null||oe===void 0||oe.call(ge,W,q,Z[ce],Y),ce+=1}disposeTemplate(W){let q=0;for(const Z of this.renderers)Z.disposeTemplate(W[q++])}}class re{constructor(W){this.accessibilityProvider=W,this.templateId="a18n"}renderTemplate(W){return W}renderElement(W,q,Z){const Y=this.accessibilityProvider.getAriaLabel(W);Y?Z.setAttribute("aria-label",Y):Z.removeAttribute("aria-label");const oe=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(W);typeof oe=="number"?Z.setAttribute("aria-level",`${oe}`):Z.removeAttribute("aria-level")}disposeTemplate(W){}}class ne{constructor(W,q){this.list=W,this.dnd=q}getDragElements(W){const q=this.list.getSelectedElements();return q.indexOf(W)>-1?q:[W]}getDragURI(W){return this.dnd.getDragURI(W)}getDragLabel(W,q){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(W,q)}onDragStart(W,q){var Z,Y;(Y=(Z=this.dnd).onDragStart)===null||Y===void 0||Y.call(Z,W,q)}onDragOver(W,q,Z,Y){return this.dnd.onDragOver(W,q,Z,Y)}onDragLeave(W,q,Z,Y){var oe,ce;(ce=(oe=this.dnd).onDragLeave)===null||ce===void 0||ce.call(oe,W,q,Z,Y)}onDragEnd(W){var q,Z;(Z=(q=this.dnd).onDragEnd)===null||Z===void 0||Z.call(q,W)}drop(W,q,Z,Y){this.dnd.drop(W,q,Z,Y)}}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 q=this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event)).map(oe=>new y.StandardKeyboardEvent(oe)).filter(oe=>W=oe.keyCode===58||oe.shiftKey&&oe.keyCode===68).map(oe=>_.EventHelper.stop(oe,!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(oe=>new y.StandardKeyboardEvent(oe)).filter(oe=>oe.keyCode===58||oe.shiftKey&&oe.keyCode===68).map(oe=>_.EventHelper.stop(oe,!0)).map(({browserEvent:oe})=>{const ce=this.getFocus(),ge=ce.length?ce[0]:void 0,le=typeof ge<"u"?this.view.element(ge):void 0,ue=typeof ge<"u"?this.view.domElement(ge):this.view.domNode;return{index:ge,element:le,anchor:ue,browserEvent:oe}}).event,Y=this.disposables.add(t.Event.chain(this.view.onContextMenu)).filter(oe=>!W).map(({element:oe,index:ce,browserEvent:ge})=>({element:oe,index:ce,anchor:{x:ge.pageX+1,y:ge.pageY},browserEvent:ge})).event;return t.Event.any(q,Z,Y)}get onKeyDown(){return this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return t.Event.signal(this.disposables.add(new k.DomEmitter(this.view.domNode,"focus",!0)).event)}constructor(W,q,Z,Y,oe=B){var ce,ge,le,ue;this.user=W,this._options=oe,this.focus=new a("focused"),this.anchor=new a("anchor"),this.eventBufferer=new t.EventBufferer,this._ariaLabel="",this.disposables=new s.DisposableStore,this._onDidDispose=new t.Emitter,this.onDidDispose=this._onDidDispose.event;const j=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(ce=this._options.accessibilityProvider)===null||ce===void 0?void 0:ce.getWidgetRole():"list";this.selection=new u(j!=="listbox");const z=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=oe.accessibilityProvider,this.accessibilityProvider&&(z.push(new re(this.accessibilityProvider)),(le=(ge=this.accessibilityProvider).onDidChangeActiveDescendant)===null||le===void 0||le.call(ge,this.onDidChangeActiveDescendant,this,this.disposables)),Y=Y.map(J=>new ie(J.templateId,[...z,J]));const U=Object.assign(Object.assign({},oe),{dnd:oe.dnd&&new ne(this,oe.dnd)});if(this.view=this.createListView(q,Z,Y,U),this.view.domNode.setAttribute("role",j),oe.styleController)this.styleController=oe.styleController(this.view.domId);else{const J=(0,_.createStyleSheet)(this.view.domNode);this.styleController=new F(J,this.view.domId)}if(this.spliceable=new b.CombinedSpliceable([new v(this.focus,this.view,oe.identityProvider),new v(this.selection,this.view,oe.identityProvider),new v(this.anchor,this.view,oe.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 oe.keyboardSupport!="boolean"||oe.keyboardSupport)&&(this.keyboardController=new L(this,this.view,oe),this.disposables.add(this.keyboardController)),oe.keyboardNavigationLabelProvider){const J=oe.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new T(this,this.view,oe.keyboardNavigationLabelProvider,(ue=oe.keyboardNavigationEventFilter)!==null&&ue!==void 0?ue:()=>!0,J),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(oe),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,q,Z,Y){return new c.ListView(W,q,Z,Y)}createMouseController(W){return new x(this)}updateOptions(W={}){var q,Z;this._options=Object.assign(Object.assign({},this._options),W),(q=this.typeNavigationController)===null||q===void 0||q.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,q,Z=[]){if(W<0||W>this.view.length)throw new o.ListError(this.user,`Invalid start index: ${W}`);if(q<0)throw new o.ListError(this.user,`Invalid delete count: ${q}`);q===0&&Z.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(W,q,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,q){this.view.layout(W,q)}setSelection(W,q){for(const Z of W)if(Z<0||Z>=this.length)throw new o.ListError(this.user,`Invalid index ${Z}`);this.selection.set(W,q)}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,q){for(const Z of W)if(Z<0||Z>=this.length)throw new o.ListError(this.user,`Invalid index ${Z}`);this.focus.set(W,q)}focusNext(W=1,q=!1,Z,Y){if(this.length===0)return;const oe=this.focus.get(),ce=this.findNextIndex(oe.length>0?oe[0]+W:0,q,Y);ce>-1&&this.setFocus([ce],Z)}focusPrevious(W=1,q=!1,Z,Y){if(this.length===0)return;const oe=this.focus.get(),ce=this.findPreviousIndex(oe.length>0?oe[0]-W:0,q,Y);ce>-1&&this.setFocus([ce],Z)}focusNextPage(W,q){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 Y=this.getFocus()[0];if(Y!==Z&&(Y===void 0||Z>Y)){const oe=this.findPreviousIndex(Z,!1,q);oe>-1&&Y!==oe?this.setFocus([oe],W):this.setFocus([Z],W)}else{const oe=this.view.getScrollTop();let ce=oe+this.view.renderHeight;Z>Y&&(ce-=this.view.elementHeight(Z)),this.view.setScrollTop(ce),this.view.getScrollTop()!==oe&&(this.setFocus([]),yield(0,g.timeout)(0),yield this.focusNextPage(W,q))}})}focusPreviousPage(W,q){return we(this,void 0,void 0,function*(){let Z;const Y=this.view.getScrollTop();Y===0?Z=this.view.indexAt(Y):Z=this.view.indexAfter(Y-1);const oe=this.getFocus()[0];if(oe!==Z&&(oe===void 0||oe>=Z)){const ce=this.findNextIndex(Z,!1,q);ce>-1&&oe!==ce?this.setFocus([ce],W):this.setFocus([Z],W)}else{const ce=Y;this.view.setScrollTop(Y-this.view.renderHeight),this.view.getScrollTop()!==ce&&(this.setFocus([]),yield(0,g.timeout)(0),yield this.focusPreviousPage(W,q))}})}focusLast(W,q){if(this.length===0)return;const Z=this.findPreviousIndex(this.length-1,!1,q);Z>-1&&this.setFocus([Z],W)}focusFirst(W,q){this.focusNth(0,W,q)}focusNth(W,q,Z){if(this.length===0)return;const Y=this.findNextIndex(W,!1,Z);Y>-1&&this.setFocus([Y],q)}findNextIndex(W,q=!1,Z){for(let Y=0;Y<this.length;Y++){if(W>=this.length&&!q)return-1;if(W=W%this.length,!Z||Z(this.element(W)))return W;W++}return-1}findPreviousIndex(W,q=!1,Z){for(let Y=0;Y<this.length;Y++){if(W<0&&!q)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,q){if(W<0||W>=this.length)throw new o.ListError(this.user,`Invalid index ${W}`);const Z=this.view.getScrollTop(),Y=this.view.elementTop(W),oe=this.view.elementHeight(W);if((0,h.isNumber)(q)){const ce=oe-this.view.renderHeight;this.view.setScrollTop(ce*(0,r.clamp)(q,0,1)+Y)}else{const ce=Y+oe,ge=Z+this.view.renderHeight;Y<Z&&ce>=ge||(Y<Z||ce>=ge&&oe>=this.view.renderHeight?this.view.setScrollTop(Y):ce>=ge&&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:q}){return{indexes:W,elements:W.map(Z=>this.view.element(Z)),browserEvent:q}}_onFocusChange(){const W=this.focus.get();this.view.domNode.classList.toggle("element-focused",W.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var W;const q=this.focus.get();if(q.length>0){let Z;!((W=this.accessibilityProvider)===null||W===void 0)&&W.getActiveDescendantId&&(Z=this.accessibilityProvider.getActiveDescendantId(this.view.element(q[0]))),this.view.domNode.setAttribute("aria-activedescendant",Z||this.view.getElementDomId(q[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,Me([n.memoize],se.prototype,"onDidChangeFocus",null),Me([n.memoize],se.prototype,"onDidChangeSelection",null),Me([n.memoize],se.prototype,"onContextMenu",null),Me([n.memoize],se.prototype,"onKeyDown",null),Me([n.memoize],se.prototype,"onDidFocus",null)}),define(X[554],ee([1,0,16,21,6,2,109,255]),function(K,e,_,k,y,E,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:E.Disposable.None}}renderElement(t,i,s,r){var d;if((d=s.disposable)===null||d===void 0||d.dispose(),!s.data)return;const h=this.modelProvider();if(h.isResolved(t))return this.renderer.renderElement(h.get(t),t,s.data,r);const o=new k.CancellationTokenSource,c=h.resolve(t,o.token);s.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(t,s.data),c.then(l=>this.renderer.renderElement(l,t,s.data,r))}disposeTemplate(t){t.disposable&&(t.disposable.dispose(),t.disposable=void 0),t.data&&(this.renderer.disposeTemplate(t.data),t.data=void 0)}}class 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(n,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new S(n,t.accessibilityProvider)})}class p{constructor(t,i,s,r,d={}){const h=()=>this.model,o=r.map(c=>new b(c,h));this.list=new w.List(t,i,s,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 y.Event.map(this.list.onMouseDblClick,({element:t,index:i,browserEvent:s})=>({element:t===void 0?void 0:this._model.get(t),index:i,browserEvent:s}))}get onPointer(){return y.Event.map(this.list.onPointer,({element:t,index:i,browserEvent:s})=>({element:t===void 0?void 0:this._model.get(t),index:i,browserEvent:s}))}get onDidChangeSelection(){return y.Event.map(this.list.onDidChangeSelection,({elements:t,indexes:i,browserEvent:s})=>({elements:t.map(r=>this._model.get(r)),indexes:i,browserEvent:s}))}get model(){return this._model}set model(t){this._model=t,this.list.splice(0,this.list.length,(0,_.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=p}),define(X[296],ee([1,0,7,77,145,78,16,37,6,2,133,177,18,391]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const i={separatorBorder:b.Color.transparent};class s{set size(a){this._size=a}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(a,u){var v,f;a!==this.visible&&(a?(this.size=(0,p.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",a),(f=(v=this.view).setVisible)===null||f===void 0||f.call(v,a))}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 a;return(a=this.view.proportionalLayout)!==null&&a!==void 0?a:!0}get snap(){return!!this.view.snap}set enabled(a){this.container.style.pointerEvents=a?"":"none"}constructor(a,u,v,f){this.container=a,this.view=u,this.disposable=f,this._cachedVisibleSize=void 0,typeof v=="number"?(this._size=v,this._cachedVisibleSize=void 0,a.classList.add("visible")):(this._size=0,this._cachedVisibleSize=v.cachedVisibleSize)}layout(a,u){this.layoutContainer(a),this.view.layout(this.size,a,u)}dispose(){return this.disposable.dispose(),this.view}}class r extends s{layoutContainer(a){this.container.style.top=`${a}px`,this.container.style.height=`${this.size}px`}}class d extends s{layoutContainer(a){this.container.style.left=`${a}px`,this.container.style.width=`${this.size}px`}}var h;(function(l){l[l.Idle=0]="Idle",l[l.Busy=1]="Busy"})(h||(h={}));var o;(function(l){l.Distribute={type:"distribute"};function a(v){return{type:"split",index:v}}l.Split=a;function u(v){return{type:"invisible",cachedVisibleSize:v}}l.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(a){for(const u of this.sashItems)u.sash.orthogonalStartSash=a;this._orthogonalStartSash=a}set orthogonalEndSash(a){for(const u of this.sashItems)u.sash.orthogonalEndSash=a;this._orthogonalEndSash=a}set startSnappingEnabled(a){this._startSnappingEnabled!==a&&(this._startSnappingEnabled=a,this.updateSashEnablement())}set endSnappingEnabled(a){this._endSnappingEnabled!==a&&(this._endSnappingEnabled=a,this.updateSashEnablement())}constructor(a,u={}){var v,f,m,C,L;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=(m=u.proportionalLayout)!==null&&m!==void 0?m:!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"),a.appendChild(this.el),this.sashContainer=(0,_.append)(this.el,(0,_.$)(".sash-container")),this.viewContainer=(0,_.$)(".split-view-container"),this.scrollable=new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:_.scheduleAtNextAnimationFrame}),this.scrollableElement=this._register(new E.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(C=u.scrollbarVisibility)!==null&&C!==void 0?C:1:2,horizontal:this.orientation===1?(L=u.scrollbarVisibility)!==null&&L!==void 0?L:1:2},this.scrollable));const D=this._register(new k.DomEmitter(this.viewContainer,"scroll")).event;this._register(D(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(a){a.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",a.separatorBorder.toString()))}addView(a,u,v=this.viewItems.length,f){this.doAddView(a,u,v,f)}layout(a,u){const v=Math.max(this.size,this.contentSize);if(this.size=a,this.layoutContext=u,this.proportions){let f=0;for(let m=0;m<this.viewItems.length;m++){const C=this.viewItems[m],L=this.proportions[m];typeof L=="number"?f+=L:a-=C.size}for(let m=0;m<this.viewItems.length;m++){const C=this.viewItems[m],L=this.proportions[m];typeof L=="number"&&(C.size=(0,p.clamp)(Math.round(L*a/f),C.minimumSize,C.maximumSize))}}else{const f=(0,w.range)(this.viewItems.length),m=f.filter(L=>this.viewItems[L].priority===1),C=f.filter(L=>this.viewItems[L].priority===2);this.resize(this.viewItems.length-1,a-v,void 0,m,C)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(a=>a.proportionalLayout?a.size/this.contentSize:void 0))}onSashStart({sash:a,start:u,alt:v}){for(const L of this.viewItems)L.enabled=!1;const f=this.sashItems.findIndex(L=>L.sash===a),m=(0,g.combinedDisposable)((0,_.addDisposableListener)(document.body,"keydown",L=>C(this.sashDragState.current,L.altKey)),(0,_.addDisposableListener)(document.body,"keyup",()=>C(this.sashDragState.current,!1))),C=(L,D)=>{const I=this.viewItems.map(N=>N.size);let T=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(D=!D),D)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,A;if(!D){const N=(0,w.range)(f,-1),P=(0,w.range)(f+1,this.viewItems.length),x=N.reduce((re,ne)=>re+(this.viewItems[ne].minimumSize-I[ne]),0),F=N.reduce((re,ne)=>re+(this.viewItems[ne].viewMaximumSize-I[ne]),0),B=P.length===0?Number.POSITIVE_INFINITY:P.reduce((re,ne)=>re+(I[ne]-this.viewItems[ne].minimumSize),0),V=P.length===0?Number.NEGATIVE_INFINITY:P.reduce((re,ne)=>re+(I[ne]-this.viewItems[ne].viewMaximumSize),0),$=Math.max(x,V),M=Math.min(B,F),Q=this.findFirstSnapIndex(N),ie=this.findFirstSnapIndex(P);if(typeof Q=="number"){const re=this.viewItems[Q],ne=Math.floor(re.viewMinimumSize/2);R={index:Q,limitDelta:re.visible?$-ne:$+ne,size:re.size}}if(typeof ie=="number"){const re=this.viewItems[ie],ne=Math.floor(re.viewMinimumSize/2);A={index:ie,limitDelta:re.visible?M+ne:M-ne,size:re.size}}}this.sashDragState={start:L,current:L,index:f,sizes:I,minDelta:T,maxDelta:O,alt:D,snapBefore:R,snapAfter:A,disposable:m}};C(u,v)}onSashChange({current:a}){const{index:u,start:v,sizes:f,alt:m,minDelta:C,maxDelta:L,snapBefore:D,snapAfter:I}=this.sashDragState;this.sashDragState.current=a;const T=a-v,O=this.resize(u,T,f,void 0,void 0,C,L,D,I);if(m){const R=u===this.sashItems.length-1,A=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,A,void 0,void 0,x,F)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(a){this._onDidSashChange.fire(a),this.sashDragState.disposable.dispose(),this.saveProportions();for(const u of this.viewItems)u.enabled=!0}onViewChange(a,u){const v=this.viewItems.indexOf(a);v<0||v>=this.viewItems.length||(u=typeof u=="number"?u:a.size,u=(0,p.clamp)(u,a.minimumSize,a.maximumSize),this.inverseAltBehavior&&v>0?(this.resize(v-1,Math.floor((a.size-u)/2)),this.distributeEmptySpace(),this.layoutViews()):(a.size=u,this.relayout([v],void 0)))}resizeView(a,u){if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(this.state=h.Busy,a<0||a>=this.viewItems.length)return;const v=(0,w.range)(this.viewItems.length).filter(L=>L!==a),f=[...v.filter(L=>this.viewItems[L].priority===1),a],m=v.filter(L=>this.viewItems[L].priority===2),C=this.viewItems[a];u=Math.round(u),u=(0,p.clamp)(u,C.minimumSize,Math.min(C.maximumSize,this.size)),C.size=u,this.relayout(f,m),this.state=h.Idle}distributeViewSizes(){const a=[];let u=0;for(const L of this.viewItems)L.maximumSize-L.minimumSize>0&&(a.push(L),u+=L.size);const v=Math.floor(u/a.length);for(const L of a)L.size=(0,p.clamp)(v,L.minimumSize,L.maximumSize);const f=(0,w.range)(this.viewItems.length),m=f.filter(L=>this.viewItems[L].priority===1),C=f.filter(L=>this.viewItems[L].priority===2);this.relayout(m,C)}getViewSize(a){return a<0||a>=this.viewItems.length?-1:this.viewItems[a].size}doAddView(a,u,v=this.viewItems.length,f){if(this.state!==h.Idle)throw new Error("Cant modify splitview");this.state=h.Busy;const m=(0,_.$)(".split-view-view");v===this.viewItems.length?this.viewContainer.appendChild(m):this.viewContainer.insertBefore(m,this.viewContainer.children.item(v));const C=a.onDidChange(R=>this.onViewChange(T,R)),L=(0,g.toDisposable)(()=>this.viewContainer.removeChild(m)),D=(0,g.combinedDisposable)(C,L);let I;typeof u=="number"?I=u:u.type==="split"?I=this.getViewSize(u.index)/2:u.type==="invisible"?I={cachedVisibleSize:u.cachedVisibleSize}:I=a.minimumSize;const T=this.orientation===0?new r(m,a,I,D):new d(m,a,I,D);if(this.viewItems.splice(v,0,T),this.viewItems.length>1){const R={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},A=this.orientation===0?new y.Sash(this.sashContainer,{getHorizontalSashTop:re=>this.getSashPosition(re),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},R),{orientation:1})):new y.Sash(this.sashContainer,{getVerticalSashLeft:re=>this.getSashPosition(re),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},R),{orientation:0})),N=this.orientation===0?re=>({sash:A,start:re.startY,current:re.currentY,alt:re.altKey}):re=>({sash:A,start:re.startX,current:re.currentX,alt:re.altKey}),x=S.Event.map(A.onDidStart,N)(this.onSashStart,this),B=S.Event.map(A.onDidChange,N)(this.onSashChange,this),$=S.Event.map(A.onDidEnd,()=>this.sashItems.findIndex(re=>re.sash===A))(this.onSashEnd,this),M=A.onDidReset(()=>{const re=this.sashItems.findIndex(q=>q.sash===A),ne=(0,w.range)(re,-1),se=(0,w.range)(re+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(re)}),Q=(0,g.combinedDisposable)(x,B,$,M,A),ie={sash:A,disposable:Q};this.sashItems.splice(v-1,0,ie)}m.appendChild(a.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(a,u){const v=this.viewItems.reduce((f,m)=>f+m.size,0);this.resize(this.viewItems.length-1,this.size-v,void 0,a,u),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(a,u,v=this.viewItems.map(T=>T.size),f,m,C=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,D,I){if(a<0||a>=this.viewItems.length)return 0;const T=(0,w.range)(a,-1),O=(0,w.range)(a+1,this.viewItems.length);if(m)for(const ie of m)(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]),A=T.map(ie=>v[ie]),N=O.map(ie=>this.viewItems[ie]),P=O.map(ie=>v[ie]),x=T.reduce((ie,re)=>ie+(this.viewItems[re].minimumSize-v[re]),0),F=T.reduce((ie,re)=>ie+(this.viewItems[re].maximumSize-v[re]),0),B=O.length===0?Number.POSITIVE_INFINITY:O.reduce((ie,re)=>ie+(v[re]-this.viewItems[re].minimumSize),0),V=O.length===0?Number.NEGATIVE_INFINITY:O.reduce((ie,re)=>ie+(v[re]-this.viewItems[re].maximumSize),0),$=Math.max(x,V,C),M=Math.min(B,F,L);let Q=!1;if(D){const ie=this.viewItems[D.index],re=u>=D.limitDelta;Q=re!==ie.visible,ie.setVisible(re,D.size)}if(!Q&&I){const ie=this.viewItems[I.index],re=u<I.limitDelta;Q=re!==ie.visible,ie.setVisible(re,I.size)}if(Q)return this.resize(a,u,v,f,m,C,L);u=(0,p.clamp)(u,$,M);for(let ie=0,re=u;ie<R.length;ie++){const ne=R[ie],se=(0,p.clamp)(A[ie]+re,ne.minimumSize,ne.maximumSize),H=se-A[ie];re-=H,ne.size=se}for(let ie=0,re=u;ie<N.length;ie++){const ne=N[ie],se=(0,p.clamp)(P[ie]-re,ne.minimumSize,ne.maximumSize),H=se-P[ie];re+=H,ne.size=se}return u}distributeEmptySpace(a){const u=this.viewItems.reduce((L,D)=>L+D.size,0);let v=this.size-u;const f=(0,w.range)(this.viewItems.length-1,-1),m=f.filter(L=>this.viewItems[L].priority===1),C=f.filter(L=>this.viewItems[L].priority===2);for(const L of C)(0,w.pushToStart)(f,L);for(const L of m)(0,w.pushToEnd)(f,L);typeof a=="number"&&(0,w.pushToEnd)(f,a);for(let L=0;v!==0&&L<f.length;L++){const D=this.viewItems[f[L]],I=(0,p.clamp)(D.size+v,D.minimumSize,D.maximumSize),T=I-D.size;v-=T,D.size=I}}layoutViews(){this.contentSize=this.viewItems.reduce((u,v)=>u+v.size,0);let a=0;for(const u of this.viewItems)u.layout(a,this.layoutContext),a+=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 a=!1;const u=this.viewItems.map(D=>a=D.size-D.minimumSize>0||a);a=!1;const v=this.viewItems.map(D=>a=D.maximumSize-D.size>0||a),f=[...this.viewItems].reverse();a=!1;const m=f.map(D=>a=D.size-D.minimumSize>0||a).reverse();a=!1;const C=f.map(D=>a=D.maximumSize-D.size>0||a).reverse();let L=0;for(let D=0;D<this.sashItems.length;D++){const{sash:I}=this.sashItems[D],T=this.viewItems[D];L+=T.size;const O=!(u[D]&&C[D+1]),R=!(v[D]&&m[D+1]);if(O&&R){const A=(0,w.range)(D,-1),N=(0,w.range)(D+1,this.viewItems.length),P=this.findFirstSnapIndex(A),x=this.findFirstSnapIndex(N),F=typeof P=="number"&&!this.viewItems[P].visible,B=typeof x=="number"&&!this.viewItems[x].visible;F&&m[D]&&(L>0||this.startSnappingEnabled)?I.state=1:B&&u[D]&&(L<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(a){let u=0;for(let v=0;v<this.sashItems.length;v++)if(u+=this.viewItems[v].size,this.sashItems[v].sash===a)return u;return 0}findFirstSnapIndex(a){for(const u of a){const v=this.viewItems[u];if(v.visible&&v.snap)return u}for(const u of a){const v=this.viewItems[u];if(v.visible&&v.maximumSize-v.minimumSize>0)return;if(!v.visible&&v.snap)return u}}dispose(){var a;(a=this.sashDragState)===null||a===void 0||a.disposable.dispose(),(0,g.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(u=>u.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=c}),define(X[555],ee([1,0,7,109,296,6,2,392]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class b{constructor(t,i,s){this.columns=t,this.getColumnSize=s,this.templateId=b.TemplateId,this.renderedTemplates=new Set;const r=new Map(i.map(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")),s=[],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`,s.push(c),r.push(o.renderTemplate(c))}const d={container:t,cellContainers:s,cellTemplateData:r};return this.renderedTemplates.add(d),d}renderElement(t,i,s,r){for(let d=0;d<this.columns.length;d++){const o=this.columns[d].project(t);this.renderers[d].renderElement(o,i,s.cellTemplateData[d],r)}}disposeElement(t,i,s,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,s.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:s}of this.renderedTemplates)s[t].style.width=`${i}px`}}b.TemplateId="row";function S(n){return{getHeight(t){return n.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:E.Event.None}constructor(t,i){this.column=t,this.index=i,this._onDidLayout=new E.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 p{get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}constructor(t,i,s,r,d,h){this.virtualDelegate=s,this.domId=`table_id_${++p.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((a,u)=>new g(a,u)),c={size:o.reduce((a,u)=>a+u.column.weight,0),views:o.map(a=>({size:a.column.weight,view:a}))};this.splitview=this.disposables.add(new y.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:c})),this.splitview.el.style.height=`${s.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${s.headerRowHeight}px`;const l=new b(r,d,a=>this.splitview.getViewSize(a));this.list=this.disposables.add(new k.List(t,this.domNode,S(s),[l],h)),E.Event.any(...o.map(a=>a.onDidLayout))(([a,u])=>l.layoutColumn(a,u),null,this.disposables),this.splitview.onDidSashReset(a=>{const u=r.reduce((f,m)=>f+m.weight,0),v=r[a].weight/u*this.cachedWidth;this.splitview.resizeView(a,v)},null,this.disposables),this.styleElement=(0,_.createStyleSheet)(this.domNode),this.style(k.unthemedListStyles)}updateOptions(t){this.list.updateOptions(t)}splice(t,i,s=[]){this.list.splice(t,i,s)}getHTMLElement(){return this.domNode}style(t){const i=[];i.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
- top: ${this.virtualDelegate.headerRowHeight+1}px;
- height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
- }`),this.styleElement.textContent=i.join(`
- `),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=p,p.InstanceCount=0}),define(X[146],ee([1,0,68,30,6,393]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=e.unthemedToggleStyles=void 0,e.unthemedToggleStyles={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class E extends _.Widget{constructor(b){super(),this._onChange=this._register(new y.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new y.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=b,this._checked=this._opts.isChecked;const 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=E}),define(X[297],ee([1,0,146,27,530]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const E=y.localize(0,null),w=y.localize(1,null),b=y.localize(2,null);class S extends _.Toggle{constructor(t){super({icon:k.Codicon.caseSensitive,title:E+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 p 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=p}),define(X[42],ee([1,0,207,48,88,17,9,20]),function(K,e,_,k,y,E,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(n){return(0,b.uriToFsPath)(n,!0)}e.originalFSPath=S;class g{constructor(t){this._ignorePathCasing=t}compare(t,i,s=!1){return t===i?0:(0,w.compare)(this.getComparisonKey(t,s),this.getComparisonKey(i,s))}isEqual(t,i,s=!1){return t===i?!0:!t||!i?!1:this.getComparisonKey(t,s)===this.getComparisonKey(i,s)}getComparisonKey(t,i=!1){return t.with({path:this._ignorePathCasing(t)?t.path.toLowerCase():void 0,fragment:i?null:void 0}).toString()}isEqualOrParent(t,i,s=!1){if(t.scheme===i.scheme){if(t.scheme===k.Schemas.file)return _.isEqualOrParent(S(t),S(i),this._ignorePathCasing(t))&&t.query===i.query&&(s||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&&(s||t.fragment===i.fragment)}return!1}joinPath(t,...i){return b.URI.joinPath(t,...i)}basenameOrAuthority(t){return(0,e.basename)(t)||t.authority}basename(t){return y.posix.basename(t.path)}extname(t){return y.posix.extname(t.path)}dirname(t){if(t.path.length===0)return t;let i;return t.scheme===k.Schemas.file?i=b.URI.file(y.dirname(S(t))).path:(i=y.posix.dirname(t.path),t.authority&&i.length&&i.charCodeAt(0)!==47&&(console.error(`dirname("${t.toString})) resulted in a relative path`),i="/")),t.with({path:i})}normalizePath(t){if(!t.path.length)return t;let i;return t.scheme===k.Schemas.file?i=b.URI.file(y.normalize(S(t))).path:i=y.posix.normalize(t.path),t.with({path:i})}relativePath(t,i){if(t.scheme!==i.scheme||!(0,e.isEqualAuthority)(t.authority,i.authority))return;if(t.scheme===k.Schemas.file){const d=y.relative(S(t),S(i));return E.isWindows?_.toSlashes(d):d}let s=t.path||"/";const r=i.path||"/";if(this._ignorePathCasing(t)){let d=0;for(const h=Math.min(s.length,r.length);d<h&&!(s.charCodeAt(d)!==r.charCodeAt(d)&&s.charAt(d).toLowerCase()!==r.charAt(d).toLowerCase());d++);s=r.substr(0,d)+s.substr(d)}return y.posix.relative(s,r)}resolvePath(t,i){if(t.scheme===k.Schemas.file){const s=b.URI.file(y.resolve(S(t),i));return t.with({authority:s.authority,path:s.path})}return i=_.toPosixPath(i),t.with({path:y.posix.resolve(t.path,i)})}isAbsolutePath(t){return!!t.path&&t.path[0]==="/"}isEqualAuthority(t,i){return t===i||t!==void 0&&i!==void 0&&(0,w.equalsIgnoreCase)(t,i)}hasTrailingPathSeparator(t,i=y.sep){if(t.scheme===k.Schemas.file){const s=S(t);return s.length>_.getRoot(s).length&&s[s.length-1]===i}else{const s=t.path;return s.length>1&&s.charCodeAt(s.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(t.fsPath)}}removeTrailingPathSeparator(t,i=y.sep){return(0,e.hasTrailingPathSeparator)(t,i)?t.with({path:t.path.substr(0,t.path.length-1)}):t}addTrailingPathSeparator(t,i=y.sep){let s=!1;if(t.scheme===k.Schemas.file){const r=S(t);s=r!==void 0&&r.length===_.getRoot(r).length&&r[r.length-1]===i}else{i="/";const r=t.path;s=r.length===1&&r.charCodeAt(r.length-1)===47}return!s&&!(0,e.hasTrailingPathSeparator)(t,i)?t.with({path:t.path+"/"}):t}}e.ExtUri=g,e.extUri=new g(()=>!1),e.extUriBiasedIgnorePathCase=new g(n=>n.scheme===k.Schemas.file?!E.isLinux:!0),e.extUriIgnorePathCase=new g(n=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);var p;(function(n){n.META_DATA_LABEL="label",n.META_DATA_DESCRIPTION="description",n.META_DATA_SIZE="size",n.META_DATA_MIME="mime";function t(i){const s=new Map;i.path.substring(i.path.indexOf(";")+1,i.path.lastIndexOf(";")).split(";").forEach(h=>{const[o,c]=h.split(":");o&&c&&s.set(o,c)});const d=i.path.substring(0,i.path.indexOf(";"));return d&&s.set(n.META_DATA_MIME,d),s}n.parseMetaData=t})(p||(e.DataUri=p={}))}),define(X[61],ee([1,0,11,114,42,9,20]),function(K,e,_,k,y,E,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,l;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=(l=h.supportHtml)!==null&&l!==void 0?l:!1)}appendText(d,h=0){return this.value+=n(this.supportThemeIcons?(0,k.escapeIcons)(d):d).replace(/([ \t]+)/g,(o,c)=>" ".repeat(c.length)).replace(/\>/gm,"\\>").replace(/\n/g,h===1?`\\
- `:`
- `),this}appendMarkdown(d){return this.value+=d,this}appendCodeblock(d,h){return this.value+="\n```",this.value+=d,this.value+=`
- `,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,E.escapeRegExpCharacters)(h),"g");return d.replace(o,(c,l)=>d.charAt(l-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 p(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,y.isEqual)(w.URI.from(r.baseUri),w.URI.from(d.baseUri)))}e.markdownStringEqual=p;function n(r){return r.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=n;function t(r){return r.replace(/"/g,""")}e.escapeDoubleQuotes=t;function i(r){return r&&r.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}e.removeMarkdownEscapes=i;function s(r){const d=[],h=r.split("|").map(c=>c.trim());r=h[0];const o=h[1];if(o){const c=/height=(\d+)/.exec(o),l=/width=(\d+)/.exec(o),a=c?c[1]:"",u=l?l[1]:"",v=isFinite(parseInt(u)),f=isFinite(parseInt(a));v&&d.push(`width="${u}"`),f&&d.push(`height="${a}"`)}return{href:r,dimensions:d}}e.parseHrefAndDimensions=s}),define(X[215],ee([1,0,7,288,77,289,44,67,144,11,6,61,114,158,101,2,367,211,48,45,42,9,20]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 q=[],Z=[];return se&&({href:se,dimensions:q}=(0,n.parseHrefAndDimensions)(se),Z.push(`src="${(0,n.escapeDoubleQuotes)(se)}"`)),W&&Z.push(`alt="${(0,n.escapeDoubleQuotes)(W)}"`),H&&Z.push(`title="${(0,n.escapeDoubleQuotes)(H)}"`),q.length&&(Z=Z.concat(q)),"<img "+Z.join(" ")+">"},paragraph:se=>`<p>${se}</p>`,link:(se,H,W)=>typeof se!="string"?"":(se===W&&(W=(0,n.removeMarkdownEscapes)(W)),H=typeof H=="string"?(0,n.escapeDoubleQuotes)((0,n.removeMarkdownEscapes)(H)):"",se=(0,n.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 q,Z;const Y=new r.DisposableStore;let oe=!1;const ce=(0,E.createElement)(H),ge=function(ae){let me;try{me=(0,h.parse)(decodeURIComponent(ae))}catch{}return me?(me=(0,c.cloneAndChange)(me,Ce=>{if(se.uris&&se.uris[Ce])return u.URI.revive(se.uris[Ce])}),encodeURIComponent(JSON.stringify(me))):ae},le=function(ae,me){const Ce=se.uris&&se.uris[ae];let Se=u.URI.revive(Ce);return me?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:ge(Se.query)})),Se.toString())},ue=new d.marked.Renderer;ue.image=v.image,ue.link=v.link,ue.paragraph=v.paragraph;const j=[],z=[];if(H.codeBlockRendererSync?ue.code=(ae,me)=>{const Ce=i.defaultGenerator.nextId(),Se=H.codeBlockRendererSync(m(me),ae);return z.push([Ce,Se]),`<div class="code" data-code="${Ce}">${(0,a.escape)(ae)}</div>`}:H.codeBlockRenderer&&(ue.code=(ae,me)=>{const Ce=i.defaultGenerator.nextId(),Se=H.codeBlockRenderer(m(me),ae);return j.push(Se.then(ye=>[Ce,ye])),`<div class="code" data-code="${Ce}">${(0,a.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 Ee=ye.dataset.href;Ee&&(se.baseUri&&(Ee=C(u.URI.from(se.baseUri),Ee)),H.actionHandler.callback(Ee,Se))}catch(Ee){(0,g.onUnexpectedError)(Ee)}finally{Se.preventDefault()}},me=H.actionHandler.disposables.add(new y.DomEmitter(ce,"click")),Ce=H.actionHandler.disposables.add(new y.DomEmitter(ce,"auxclick"));H.actionHandler.disposables.add(p.Event.any(me.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=(q=se.value)!==null&&q!==void 0?q:"";U.length>1e5&&(U=`${U.substr(0,1e5)}\u2026`),se.supportThemeIcons&&(U=(0,t.markdownEscapeEscapedIcons)(U));let J;if(H.fillInIncompleteTokens){const ae=Object.assign(Object.assign({},d.marked.defaults),W),me=d.marked.lexer(U,ae),Ce=P(me);J=d.marked.parser(Ce,ae)}else J=d.marked.parse(U,W);se.supportThemeIcons&&(J=(0,S.renderLabelWithIcons)(J).map(me=>typeof me=="string"?me:me.outerHTML).join(""));const G=new DOMParser().parseFromString(L(se,J),"text/html");if(G.body.querySelectorAll("img").forEach(ae=>{const me=ae.getAttribute("src");if(me){let Ce=me;try{se.baseUri&&(Ce=C(u.URI.from(se.baseUri),Ce))}catch{}ae.src=le(Ce,!0)}}),G.body.querySelectorAll("a").forEach(ae=>{const me=ae.getAttribute("href");if(ae.setAttribute("href",""),!me||/^data:|javascript:/i.test(me)||/^command:/i.test(me)&&!se.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(me))ae.replaceWith(...ae.childNodes);else{let Ce=le(me,!1);se.baseUri&&(Ce=C(u.URI.from(se.baseUri),me)),ae.dataset.href=Ce}}),ce.innerHTML=L(se,G.body.innerHTML),j.length>0)Promise.all(j).then(ae=>{var me,Ce;if(oe)return;const Se=new Map(ae),ye=ce.querySelectorAll("div[data-code]");for(const Ee of ye){const De=Se.get((me=Ee.dataset.code)!==null&&me!==void 0?me:"");De&&_.reset(Ee,De)}(Ce=H.asyncRenderCallback)===null||Ce===void 0||Ce.call(H)});else if(z.length>0){const ae=new Map(z),me=ce.querySelectorAll("div[data-code]");for(const Ce of me){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 me=Y.add(_.addDisposableListener(ae,"load",()=>{me.dispose(),H.asyncRenderCallback()}))}return{element:ce,dispose:()=>{oe=!0,Y.dispose()}}}e.renderMarkdown=f;function m(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,l.resolvePath)(se,H).toString():(0,l.resolvePath)((0,l.dirname)(se),H).toString()}function L(se,H){const{config:W,allowedSchemes:q}=D(se);k.addHook("uponSanitizeAttribute",(Y,oe)=>{if(oe.attrName==="style"||oe.attrName==="class"){if(Y.tagName==="SPAN"){if(oe.attrName==="style"){oe.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(oe.attrValue);return}else if(oe.attrName==="class"){oe.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(oe.attrValue);return}}oe.keepAttr=!1;return}});const Z=_.hookDomPurifyHrefAndSrcSanitizer(q);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 D(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 q=d.marked.parse(W,{renderer:R.value}).replace(/&(#\d+|[a-zA-Z]+);/g,Z=>{var Y;return(Y=O.get(Z))!==null&&Y!==void 0?Y:Z});return L({isTrusted:!1},q).toString()}e.renderMarkdownAsPlaintext=T;const O=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),R=new s.Lazy(()=>{const se=new d.marked.Renderer;return se.code=H=>H,se.blockquote=H=>H,se.html=H=>"",se.heading=(H,W,q)=>H+`
- `,se.hr=()=>"",se.list=(H,W)=>H,se.listitem=H=>H+`
- `,se.paragraph=H=>H+`
- `,se.table=(H,W)=>H+W+`
- `,se.tablerow=H=>H,se.tablecell=(H,W)=>H+" ",se.strong=H=>H,se.em=H=>H,se.codespan=H=>H,se.br=()=>`
- `,se.del=H=>H,se.image=(H,W,q)=>"",se.text=H=>H,se.link=(H,W,q)=>q,se});function A(se){let H="";return se.forEach(W=>{H+=W.raw}),H}function N(se){const H=se.tokens[0];if(H.type==="text"){const W=H.raw.split(`
- `),q=W[W.length-1];if(q.includes("`"))return F(se);if(q.includes("**"))return Q(se);if(q.match(/\*\w/))return B(se);if(q.match(/(^|\s)__\w/))return ie(se);if(q.match(/(^|\s)_\w/))return V(se);if(q.match(/(^|\s)\[.*\]\(\w*/))return $(se);if(q.match(/(^|\s)\[\w/))return M(se)}}function P(se){let H,W;for(H=0;H<se.length;H++){const q=se[H];if(q.type==="paragraph"&&q.raw.match(/(\n|^)```/)){W=x(se.slice(H));break}if(q.type==="paragraph"&&q.raw.match(/(\n|^)\|/)){W=ne(se.slice(H));break}if(H===se.length-1&&q.type==="paragraph"){const Z=N(q);if(Z){W=[Z];break}}}if(W){const q=[...se.slice(0,H),...W];return q.links=se.links,q}return se}e.fillInIncompleteTokens=P;function x(se){const H=A(se);return d.marked.lexer(H+"\n```")}function F(se){return re(se,"`")}function B(se){return re(se,"*")}function V(se){return re(se,"_")}function $(se){return re(se,")")}function M(se){return re(se,"](about:blank)")}function Q(se){return re(se,"**")}function ie(se){return re(se,"__")}function re(se,H){const W=A(Array.isArray(se)?se:[se]);return d.marked.lexer(W+H)[0]}function ne(se){const H=A(se),W=H.split(`
- `);let q,Z=!1;for(let Y=0;Y<W.length;Y++){const oe=W[Y].trim();if(typeof q>"u"&&oe.match(/^\s*\|/)){const ce=oe.match(/(\|[^\|]+)(?=\||$)/g);ce&&(q=ce.length)}else if(typeof q=="number")if(oe.match(/^\s*\|/)){if(Y!==W.length-1)return;Z=!0}else return}if(typeof q=="number"&&q>0){const Y=Z?W.slice(0,-1).join(`
- `):H,oe=!!Y.match(/\|\s*$/),ce=Y+(oe?"":"|")+`
- |${" --- |".repeat(q)}`;return d.marked.lexer(ce)}}}),define(X[298],ee([1,0,7,288,44,215,58,144,37,6,61,2,376]),function(K,e,_,k,y,E,w,b,S,g,p,n){"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 n.Disposable{get onDidClick(){return this._onDidClick.event}constructor(s,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")),s.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 y.StandardKeyboardEvent(o);let l=!1;this.enabled&&(c.equals(3)||c.equals(10))?(this._onDidClick.fire(o),l=!0):c.equals(9)&&(this._element.blur(),l=!0),l&&_.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(s){const r=[];for(let d of(0,b.renderLabelWithIcons)(s))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(s){let r;this.options.secondary?r=s?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:r=s?this.options.buttonHoverBackground:this.options.buttonBackground,r&&(this._element.style.backgroundColor=r)}get element(){return this._element}set label(s){var r;if(this._label===s||(0,p.isMarkdownString)(this._label)&&(0,p.isMarkdownString)(s)&&(0,p.markdownStringEqual)(this._label,s))return;this._element.classList.add("monaco-text-button");const d=this.options.supportShortLabel?this._labelElement:this._element;if((0,p.isMarkdownString)(s)){const h=(0,E.renderMarkdown)(s,{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(s)):d.textContent=s;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,E.renderStringAsPlaintext)(s)),this._label=s}get label(){return this._label}set enabled(s){s?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}e.Button=t}),define(X[299],ee([1,0,7,13,21,61,114,2,18,532]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function p(i,s){(0,S.isString)(s)?i.title=(0,w.stripIcons)(s):s?.markdownNotSupportedFallback?i.title=s.markdownNotSupportedFallback:i.removeAttribute("title")}e.setupNativeHover=p;class n{constructor(s,r,d){this.hoverDelegate=s,this.target=r,this.fadeInAnimation=d}update(s,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(s===void 0||(0,S.isString)(s)||s instanceof HTMLElement)o=s;else if(!(0,S.isFunction)(s.markdown))o=(h=s.markdown)!==null&&h!==void 0?h:s.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,g.localize)(0,null),r),this._cancellationTokenSource=new y.CancellationTokenSource;const c=this._cancellationTokenSource.token;if(o=yield s.markdown(c),o===void 0&&(o=s.markdownNotSupportedFallback),this.isDisposed||c.isCancellationRequested)return}this.show(o,r,d)})}show(s,r,d){const h=this._hoverWidget;if(this.hasContent(s)){const o=Object.assign({content:s,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!h},d);this._hoverWidget=this.hoverDelegate.showHover(o,r)}h?.dispose()}hasContent(s){return s?(0,E.isMarkdownString)(s)?!!s.value:!0:!1}get isDisposed(){var s;return(s=this._hoverWidget)===null||s===void 0?void 0:s.isDisposed}dispose(){var s,r;(s=this._hoverWidget)===null||s===void 0||s.dispose(),(r=this._cancellationTokenSource)===null||r===void 0||r.dispose(!0),this._cancellationTokenSource=void 0}}function t(i,s,r,d){let h,o;const c=(f,m)=>{var C;const L=o!==void 0;f&&(o?.dispose(),o=void 0),m&&(h?.dispose(),h=void 0),L&&((C=i.onDidHideHover)===null||C===void 0||C.call(i))},l=(f,m,C)=>new k.TimeoutTimer(()=>we(this,void 0,void 0,function*(){(!o||o.isDisposed)&&(o=new n(i,C||s,f>0),yield o.update(r,m,d))}),f),a=()=>{if(h)return;const f=new b.DisposableStore,m=D=>c(!1,D.fromElement===s);f.add(_.addDisposableListener(s,_.EventType.MOUSE_LEAVE,m,!0));const C=()=>c(!0,!0);f.add(_.addDisposableListener(s,_.EventType.MOUSE_DOWN,C,!0));const L={targetElements:[s],dispose:()=>{}};if(i.placement===void 0||i.placement==="mouse"){const D=I=>{L.x=I.x+10,I.target instanceof HTMLElement&&I.target.classList.contains("action-label")&&c(!0,!0)};f.add(_.addDisposableListener(s,_.EventType.MOUSE_MOVE,D,!0))}f.add(l(i.delay,!1,L)),h=f},u=_.addDisposableListener(s,_.EventType.MOUSE_OVER,a,!0);return{show:f=>{c(!1,!0),l(0,f)},hide:()=>{c(!0,!0)},update:(f,m)=>we(this,void 0,void 0,function*(){r=f,yield o?.update(r,void 0,m)}),dispose:()=>{u.dispose(),c(!0,!0)}}}e.setupCustomHover=t}),define(X[216],ee([1,0,7,292,299,2,45,160,382]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class S{constructor(s){this._element=s}get element(){return this._element}set textContent(s){this.disposed||s===this._textContent||(this._textContent=s,this._element.textContent=s)}set className(s){this.disposed||s===this._className||(this._className=s,this._element.className=s)}set empty(s){this.disposed||s===this._empty||(this._empty=s,this._element.style.marginLeft=s?"0":"")}dispose(){this.disposed=!0}}class g extends E.Disposable{constructor(s,r){super(),this.customHovers=new Map,this.creationOptions=r,this.domNode=this._register(new S(_.append(s,_.$(".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 p(d),this.hoverDelegate=r?.hoverDelegate}get element(){return this.domNode.element}setLabel(s,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(s,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(s,r){const d=this.customHovers.get(s);if(d&&(d.dispose(),this.customHovers.delete(s)),!r){s.removeAttribute("title");return}if(!this.hoverDelegate)(0,y.setupNativeHover)(s,r);else{const h=(0,y.setupCustomHover)(this.hoverDelegate,s,r);h&&this.customHovers.set(s,h)}}dispose(){super.dispose();for(const s of this.customHovers.values())s.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var s;if(!this.descriptionNode){const r=this._register(new S(_.append(this.labelContainer,_.$("span.monaco-icon-description-container"))));!((s=this.creationOptions)===null||s===void 0)&&s.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 p{constructor(s){this.container=s,this.label=void 0,this.singleLabel=void 0}setLabel(s,r){if(!(this.label===s&&(0,w.equals)(this.options,r)))if(this.label=s,this.options=r,typeof s=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=_.append(this.container,_.$("a.label-name",{id:r?.domId}))),this.singleLabel.textContent=s;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let d=0;d<s.length;d++){const h=s[d],o=r?.domId&&`${r?.domId}_${d}`;_.append(this.container,_.$("a.label-name",{id:o,"data-icon-label-count":s.length,"data-icon-label-index":d,role:"treeitem"},h)),d<s.length-1&&_.append(this.container,_.$("span.label-separator",void 0,r?.separator||"/"))}}}}function n(i,s,r){if(!r)return;let d=0;return i.map(h=>{const o={start:d,end:d+h.length},c=r.map(l=>b.Range.intersect(o,l)).filter(l=>!b.Range.isEmpty(l)).map(({start:l,end:a})=>({start:l-d,end:a-d}));return d=o.end+s.length,c})}class t{constructor(s,r){this.container=s,this.supportIcons=r,this.label=void 0,this.singleLabel=void 0}setLabel(s,r){if(!(this.label===s&&(0,w.equals)(this.options,r)))if(this.label=s,this.options=r,typeof s=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new k.HighlightedLabel(_.append(this.container,_.$("a.label-name",{id:r?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(s,r?.matches,void 0,r?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const d=r?.separator||"/",h=n(s,d,r?.matches);for(let o=0;o<s.length;o++){const c=s[o],l=h?h[o]:void 0,a=r?.domId&&`${r?.domId}_${o}`,u=_.$("a.label-name",{id:a,"data-icon-label-count":s.length,"data-icon-label-index":o,role:"treeitem"});new k.HighlightedLabel(_.append(this.container,u),{supportIcons:this.supportIcons}).set(c,l,void 0,r?.labelEscapeNewLines),o<s.length-1&&_.append(u,_.$("span.label-separator",void 0,d))}}}}}),define(X[556],ee([1,0,7,77,44,215,109,16,6,59,2,17,535,390]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const i=_.$,s="selectOption.entry.template";class r{get templateId(){return s}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,l){const a=l,u=o.text,v=o.detail,f=o.decoratorRight,m=o.isDisabled;a.text.textContent=u,a.detail.textContent=v||"",a.decoratorRight.innerText=f||"",m?a.root.classList.add("option-disabled"):a.root.classList.remove("option-disabled")}disposeTemplate(o){}}class d extends p.Disposable{constructor(o,c,l,a,u){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=a,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(l),this.selected=c||0,o&&this.setOptions(o,c),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return s}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")),l=_.append(c,i(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",_.append(l,this.widthControlElement),this._dropDownPosition=0,this.styleElement=_.createStyleSheet(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(_.addDisposableListener(this.selectDropDownContainer,_.EventType.DRAG_START,a=>{_.EventHelper.stop(a,!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 l=new y.StandardKeyboardEvent(c);let a=!1;n.isMacintosh?(l.keyCode===18||l.keyCode===16||l.keyCode===10||l.keyCode===3)&&(a=!0):(l.keyCode===18&&l.altKey||l.keyCode===16&&l.altKey||l.keyCode===10||l.keyCode===3)&&(a=!0),a&&(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((l,a)=>{this.selectElement.add(this.createOption(l.text,a,l.isDisabled)),typeof l.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(`
- `)}styleSelectElement(){var o,c,l;const a=(o=this.styles.selectBackground)!==null&&o!==void 0?o:"",u=(c=this.styles.selectForeground)!==null&&c!==void 0?c:"",v=(l=this.styles.selectBorder)!==null&&l!==void 0?l:"";this.selectElement.style.backgroundColor=a,this.selectElement.style.color=u,this.selectElement.style.borderColor=v}styleList(){var o,c;const l=(o=this.styles.selectBackground)!==null&&o!==void 0?o:"",a=_.asCssValueWithDefault(this.styles.selectListBackground,l);this.selectDropDownListContainer.style.backgroundColor=a,this.selectionDetailsPane.style.backgroundColor=a;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,l){const a=document.createElement("option");return a.value=o,a.text=o,a.disabled=!!l,a}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,l)=>{this.updateDetail(l),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),l=getComputedStyle(this.selectElement),a=parseFloat(l.getPropertyValue("--dropdown-padding-top"))+parseFloat(l.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,m=this.setWidthControlElement(this.widthControlElement),C=Math.max(m,Math.round(f)).toString()+"px";this.selectDropDownContainer.style.width=C,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let L=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const D=this._hasDetails?this._cachedMaxDetailsHeight:0,I=L+a+D,T=Math.floor((u-a-D)/this.getHeight()),O=Math.floor((v-a-D)/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&&(L=T*this.getHeight())}else I>v&&(L=O*this.getHeight());return this.selectList.layout(L),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=L+a+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=L+a+"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 l=0,a=0;this.options.forEach((u,v)=>{const f=u.detail?u.detail.length:0,m=u.decoratorRight?u.decoratorRight.length:0,C=u.text.length+f+m;C>a&&(l=v,a=C)}),o.textContent=this.options[l].text+(this.options[l].decoratorRight?this.options[l].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:a=>{let u=a.text;return a.detail&&(u+=`. ${a.detail}`),a.decoratorRight&&(u+=`. ${a.decoratorRight}`),a.description&&(u+=`. ${a.description}`),u},getWidgetAriaLabel:()=>(0,t.localize)(0,null),getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const c=this._register(new k.DomEmitter(this.selectDropDownListContainer,"keydown")),l=S.Event.chain(c.event).filter(()=>this.selectList.length>0).map(a=>new y.StandardKeyboardEvent(a));this._register(l.filter(a=>a.keyCode===3).on(a=>this.onEnter(a),this)),this._register(l.filter(a=>a.keyCode===2).on(a=>this.onEnter(a),this)),this._register(l.filter(a=>a.keyCode===9).on(a=>this.onEscape(a),this)),this._register(l.filter(a=>a.keyCode===16).on(a=>this.onUpArrow(a),this)),this._register(l.filter(a=>a.keyCode===18).on(a=>this.onDownArrow(a),this)),this._register(l.filter(a=>a.keyCode===12).on(this.onPageDown,this)),this._register(l.filter(a=>a.keyCode===11).on(this.onPageUp,this)),this._register(l.filter(a=>a.keyCode===14).on(this.onHome,this)),this._register(l.filter(a=>a.keyCode===13).on(this.onEnd,this)),this._register(l.filter(a=>a.keyCode>=21&&a.keyCode<=56||a.keyCode>=85&&a.keyCode<=113).on(this.onCharacter,this)),this._register(_.addDisposableListener(this.selectList.getHTMLElement(),_.EventType.POINTER_UP,a=>this.onPointerUp(a))),this._register(this.selectList.onMouseOver(a=>typeof a.index<"u"&&this.selectList.setFocus([a.index]))),this._register(this.selectList.onDidChangeFocus(a=>this.onListFocus(a))),this._register(_.addDisposableListener(this.selectDropDownContainer,_.EventType.FOCUS_OUT,a=>{!this._isVisible||_.isAncestor(a.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 l=c.closest(".monaco-list-row");if(!l)return;const a=Number(l.getAttribute("data-index")),u=l.classList.contains("option-disabled");a>=0&&a<this.options.length&&!u&&(this.selected=a,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 l=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):l(f)}},a=(0,E.renderMarkdown)({value:o,supportThemeIcons:!0},{actionHandler:c});return a.element.classList.add("select-box-description-markdown"),l(a.element),a.element}onListFocus(o){!this._isVisible||!this._hasDetails||this.updateDetail(o.indexes[0])}updateDetail(o){var c,l;this.selectionDetailsPane.innerText="";const a=this.options[o],u=(c=a?.description)!==null&&c!==void 0?c:"",v=(l=a?.descriptionIsMarkdown)!==null&&l!==void 0?l:!1;if(u){if(v){const f=a.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 l=-1;for(let a=0;a<this.options.length-1;a++)if(l=(a+this.selected+1)%this.options.length,this.options[l].text.charAt(0).toUpperCase()===c&&!this.options[l].isDisabled){this.select(l),this.selectList.setFocus([l]),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(X[557],ee([1,0,556,551,68,17,389]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=void 0;class w extends y.Widget{constructor(S,g,p,n,t){super(),E.isMacintosh&&!t?.useCustomDrawn?this.selectBoxDelegate=new k.SelectBoxNative(S,g,n,t):this.selectBoxDelegate=new _.SelectBoxList(S,g,p,n,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(X[147],ee([1,0,47,159,7,58,299,557,40,2,17,18,528,252]),function(K,e,_,k,y,E,w,b,S,g,p,n,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(l=>{this.element&&this.handleActionChangeEvent(l)}))}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(E.Gesture.addTarget(h));const c=this.options&&this.options.draggable;c&&(h.draggable=!0,_.isFirefox&&this._register((0,y.addDisposableListener)(h,y.EventType.DRAG_START,l=>{var a;return(a=l.dataTransfer)===null||a===void 0?void 0:a.setData(k.DataTransfers.TEXT,this._action.label)}))),this._register((0,y.addDisposableListener)(o,E.EventType.Tap,l=>this.onClick(l,!0))),this._register((0,y.addDisposableListener)(o,y.EventType.MOUSE_DOWN,l=>{c||y.EventHelper.stop(l,!0),this._action.enabled&&l.button===0&&o.classList.add("active")})),p.isMacintosh&&this._register((0,y.addDisposableListener)(o,y.EventType.CONTEXT_MENU,l=>{l.button===0&&l.ctrlKey===!0&&this.onClick(l)})),this._register((0,y.addDisposableListener)(o,y.EventType.CLICK,l=>{y.EventHelper.stop(l,!0),this.options&&this.options.isMenu||this.onClick(l)})),this._register((0,y.addDisposableListener)(o,y.EventType.DBLCLICK,l=>{y.EventHelper.stop(l,!0)})),[y.EventType.MOUSE_UP,y.EventType.MOUSE_OUT].forEach(l=>{this._register((0,y.addDisposableListener)(o,l,a=>{y.EventHelper.stop(a),o.classList.remove("active")}))})}onClick(h,o=!1){var c;y.EventHelper.stop(h,!0);const l=n.isUndefinedOrNull(this._context)?!((c=this.options)===null||c===void 0)&&c.useEventAsContext?h:{preserveFocus:o}:this._context;this.actionRunner.run(this._action,l)}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 s 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,y.append)(this.element,(0,y.$)("a.action-label"))),this.label&&(this._action.id===S.Separator.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,y.append)(this.element,(0,y.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(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?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=s;class r extends i{constructor(h,o,c,l,a,u,v){super(h,o),this.selectBox=new b.SelectBox(c,l,a,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(X[69],ee([1,0,7,44,147,40,6,2,18,252]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class g extends b.Disposable{constructor(n,t={}){var i,s,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=(s=this.options.orientation)!==null&&s!==void 0?s: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 E.ActionRunner,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(a=>this._onDidRun.fire(a))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(a=>this._onWillRun.fire(a))),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,l;switch(this._orientation){case 0:c=[15],l=[17];break;case 1:c=[16],l=[18],this.domNode.className+=" vertical";break}this._register(_.addDisposableListener(this.domNode,_.EventType.KEY_DOWN,a=>{const u=new k.StandardKeyboardEvent(a);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():l&&(u.equals(l[0])||u.equals(l[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 y.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,a=>{const u=new k.StandardKeyboardEvent(a);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),n.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(n){if(this.focusable=n,this.focusable){const t=this.viewItems.find(i=>i instanceof y.BaseActionViewItem&&i.isEnabled());t instanceof y.BaseActionViewItem&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof y.BaseActionViewItem&&t.setFocusable(!1)})}isTriggerKeyEvent(n){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||n.equals(i)}),t}updateFocusedItem(){for(let n=0;n<this.actionsList.children.length;n++){const t=this.actionsList.children[n];if(_.isAncestor(_.getActiveElement(),t)){this.focusedItem=n;break}}}get context(){return this._context}set context(n){this._context=n,this.viewItems.forEach(t=>t.setActionContext(n))}get actionRunner(){return this._actionRunner}set actionRunner(n){this._actionRunner=n,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=n)}getContainer(){return this.domNode}getAction(n){var t;if(typeof n=="number")return(t=this.viewItems[n])===null||t===void 0?void 0:t.action;if(n instanceof HTMLElement){for(;n.parentElement!==this.actionsList;){if(!n.parentElement)return;n=n.parentElement}for(let i=0;i<this.actionsList.childNodes.length;i++)if(this.actionsList.childNodes[i]===n)return this.viewItems[i].action}}push(n,t={}){const i=Array.isArray(n)?n:[n];let s=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 y.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 y.BaseActionViewItem&&this.viewItems.length===0&&h.setFocusable(!0),s===null||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(d),this.viewItems.push(h)):(this.actionsList.insertBefore(d,this.actionsList.children[s]),this.viewItems.splice(s,0,h),s++)}),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(n){let t=!1,i;if(n===void 0?t=!0:typeof n=="number"?i=n:typeof n=="boolean"&&(t=n),t&&typeof this.focusedItem>"u"){const s=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=s===-1?void 0:s,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(n){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!n&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===E.Separator.ID));return this.updateFocus(),!0}focusPrevious(n){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!n&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===E.Separator.ID));return this.updateFocus(!0),!0}updateFocus(n,t,i=!1){var s;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((s=this.viewItems[this.previouslyFocusedItem])===null||s===void 0||s.blur());const r=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(r){let d=!0;S.isFunction(r.focus)||(d=!1),this.options.focusOnlyEnabledItems&&S.isFunction(r.isEnabled)&&!r.isEnabled()&&(d=!1),r.action.id===E.Separator.ID&&(d=!1),d?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(n),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(n){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof y.BaseActionViewItem){const i=t._context===null||t._context===void 0?n:t._context;this.run(t._action,i)}}run(n,t){return we(this,void 0,void 0,function*(){yield this._actionRunner.run(n,t)})}dispose(){this._context=void 0,this.viewItems=(0,b.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=g}),define(X[300],ee([1,0,7,147,548,6,253]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class w extends k.BaseActionViewItem{constructor(S,g,p,n=Object.create(null)){super(null,S,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new E.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=g,this.contextMenuProvider=p,this.options=n,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(s=>!!s):this.options.classNames&&(i=this.options.classNames),i.find(s=>s==="icon")||i.push("codicon"),this.element.classList.add(...i),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},p=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:g,menuAsChild:this.options.menuAsChild,actions:p?this.menuActionsOrProvider:void 0,actionProvider:p?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new y.DropdownMenu(S,n)),this._register(this.dropdownMenu.onDidChangeVisibility(t=>{var i;(i=this.element)===null||i===void 0||i.setAttribute("aria-expanded",`${t}`),this._onDidChangeVisibility.fire(t)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const t=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return t.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let 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 p=!this.action.enabled;(S=this.actionItem)===null||S===void 0||S.classList.toggle("disabled",p),(g=this.element)===null||g===void 0||g.classList.toggle("disabled",p)}}e.DropdownMenuActionViewItem=w}),define(X[217],ee([1,0,7,77,289,69,49,78,68,6,369,45,533,383]),function(K,e,_,k,y,E,w,b,S,g,p,n,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 s extends S.Widget{constructor(h,o,c){var l;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=(l=this.options.tooltip)!==null&&l!==void 0?l: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 a=this.options.flexibleHeight?"textarea":"input",u=_.append(this.element,i(".ibwrapper"));if(this.input=_.append(u,i(a+".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(m=>this.input.scrollTop=m.scrollTop));const v=this._register(new k.DomEmitter(document,"selectionchange")),f=g.Event.filter(v.event,()=>{const m=document.getSelection();return m?.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 E.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,n.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:l=>{var a,u;if(!this.message)return null;h=_.append(l,i(".monaco-inputbox-container")),o();const v={inline:!0,className:"monaco-inputbox-message"},f=this.message.formatContent?(0,y.renderFormattedText)(this.message.content,v):(0,y.renderText)(this.message.content,v);f.classList.add(this.classForType(this.message.type));const m=this.stylesForType(this.message.type);return f.style.backgroundColor=(a=m.background)!==null&&a!==void 0?a:"",f.style.color=(u=m.foreground)!==null&&u!==void 0?u:"",f.style.border=m.border?`1px solid ${m.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 l=this.options.inputBoxStyles,a=(h=l.inputBackground)!==null&&h!==void 0?h:"",u=(o=l.inputForeground)!==null&&o!==void 0?o:"",v=(c=l.inputBorder)!==null&&c!==void 0?c:"";this.element.style.backgroundColor=a,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,l=o.selectionEnd,a=o.value;c!==null&&l!==null&&(this.value=a.substr(0,c)+h+a.substr(l),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=s;class r extends s{constructor(h,o,c){const l=t.localize(3,null),a=` or \u21C5 ${l}`,u=` (\u21C5 ${l})`;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 p.HistoryNavigator(c.history,100);const v=()=>{if(c.showHistoryHint&&c.showHistoryHint()&&!this.placeholder.endsWith(a)&&!this.placeholder.endsWith(u)&&this.history.getHistory().length){const f=this.placeholder.endsWith(")")?a:u,m=this.placeholder+f;c.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=m:this.setPlaceHolder(m)}};this.observer=new MutationObserver((f,m)=>{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=m=>{if(this.placeholder.endsWith(m)){const C=this.placeholder.slice(0,this.placeholder.length-m.length);return c.showPlaceholderOnFocus?this.placeholder=C:this.setPlaceHolder(C),!0}else return!1};f(u)||f(a)})}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(X[218],ee([1,0,7,297,217,68,6,529,2,254]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const g=b.localize(0,null);class p extends E.Widget{constructor(t,i,s){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=s.placeholder||"",this.validation=s.validation,this.label=s.label||g,this.showCommonFindToggles=!!s.showCommonFindToggles;const r=s.appendCaseSensitiveLabel||"",d=s.appendWholeWordsLabel||"",h=s.appendRegexLabel||"",o=s.history||[],c=!!s.flexibleHeight,l=!!s.flexibleWidth,a=s.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,i,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:s.showHistoryHint,flexibleHeight:c,flexibleWidth:l,flexibleMaxHeight:a,inputBoxStyles:s.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new k.RegexToggle(Object.assign({appendTitle:h,isChecked:!1},s.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},s.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},s.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 m=-1;v.equals(17)?m=(f+1)%u.length:v.equals(15)&&(f===0?m=u.length-1:m=f-1),v.equals(9)?(u[f].blur(),this.inputBox.focus()):m>=0&&u[m].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(s?.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,s;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(t=this.regex)===null||t===void 0||t.enable(),(i=this.wholeWords)===null||i===void 0||i.enable(),(s=this.caseSensitive)===null||s===void 0||s.enable();for(const r of this.additionalToggles)r.enable()}disable(){var t,i,s;this.domNode.classList.add("disabled"),this.inputBox.disable(),(t=this.regex)===null||t===void 0||t.disable(),(i=this.wholeWords)===null||i===void 0||i.disable(),(s=this.caseSensitive)===null||s===void 0||s.disable();for(const r of this.additionalToggles)r.disable()}setFocusInputOnOptionClick(t){this.fixFocusOnOptionClickEnabled=t}setEnabled(t){t?this.enable():this.disable()}setAdditionalToggles(t){for(const i of this.additionalToggles)i.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.dispose(),this.additionalTogglesDisposables=new S.DisposableStore;for(const i of t??[])this.additionalTogglesDisposables.add(i),this.controls.appendChild(i.domNode),this.additionalTogglesDisposables.add(i.onChange(s=>{this._onDidOptionChange.fire(s),!s&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(i);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(t=!1){var i,s,r,d,h,o;t?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((s=(i=this.caseSensitive)===null||i===void 0?void 0:i.width())!==null&&s!==void 0?s:0)+((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,l)=>c+l.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=p}),define(X[558],ee([1,0,7,146,217,68,27,6,531,254]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const g=S.localize(0,null),p=S.localize(1,null);class n extends k.Toggle{constructor(s){super({icon:w.Codicon.preserveCase,title:p+s.appendTitle,isChecked:s.isChecked,inputActiveOptionBorder:s.inputActiveOptionBorder,inputActiveOptionForeground:s.inputActiveOptionForeground,inputActiveOptionBackground:s.inputActiveOptionBackground})}}class t extends E.Widget{constructor(s,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||[],l=!!h.flexibleHeight,a=!!h.flexibleWidth,u=h.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:c,showHistoryHint:h.showHistoryHint,flexibleHeight:l,flexibleWidth:a,flexibleMaxHeight:u,inputBoxStyles:h.inputBoxStyles})),this.preserveCase=this._register(new n(Object.assign({appendTitle:o,isChecked:!1},h.toggleStyles))),this._register(this.preserveCase.onChange(m=>{this._onDidOptionChange.fire(m),!m&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(m=>{this._onPreserveCaseKeyDown.fire(m)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const v=[this.preserveCase.domNode];this.onkeydown(this.domNode,m=>{if(m.equals(15)||m.equals(17)||m.equals(9)){const C=v.indexOf(document.activeElement);if(C>=0){let L=-1;m.equals(17)?L=(C+1)%v.length:m.equals(15)&&(C===0?L=v.length-1:L=C-1),m.equals(9)?(v[C].blur(),this.inputBox.focus()):L>=0&&v[L].focus(),_.EventHelper.stop(m,!0)}}});const f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),s?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,m=>this._onKeyDown.fire(m)),this.onkeyup(this.inputBox.inputElement,m=>this._onKeyUp.fire(m)),this.oninput(this.inputBox.inputElement,m=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,m=>this._onMouseDown.fire(m))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(s){s?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(s){this.preserveCase.checked=s}focusOnPreserve(){this.preserveCase.focus()}validate(){var s;(s=this.inputBox)===null||s===void 0||s.validate()}set width(s){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=s+"px"}dispose(){super.dispose()}}e.ReplaceInput=t}),define(X[559],ee([1,0,47,58,7,44,67,69,147,290,78,40,13,27,30,114,2,17,9]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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(L){L[L.Right=0]="Right",L[L.Left=1]="Left"})(c||(e.Direction=c={}));class l extends b.ActionBar{constructor(D,I,T,O){D.classList.add("monaco-menu-container"),D.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,A),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(D,O),this._register(k.Gesture.addTarget(R)),(0,y.addDisposableListener)(R,y.EventType.KEY_DOWN,P=>{new E.StandardKeyboardEvent(P).equals(2)&&P.preventDefault()}),T.enableMnemonics&&this.menuDisposables.add((0,y.addDisposableListener)(R,y.EventType.KEY_DOWN,P=>{const x=P.key.toLocaleLowerCase();if(this.mnemonics.has(x)){y.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,y.addDisposableListener)(R,y.EventType.KEY_DOWN,P=>{const x=new E.StandardKeyboardEvent(P);x.equals(14)||x.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),y.EventHelper.stop(P,!0)):(x.equals(13)||x.equals(12))&&(this.focusedItem=0,this.focusPrevious(),y.EventHelper.stop(P,!0))})),this._register((0,y.addDisposableListener)(this.domNode,y.EventType.MOUSE_OUT,P=>{const x=P.relatedTarget;(0,y.isAncestor)(x,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),P.stopPropagation())})),this._register((0,y.addDisposableListener)(this.actionsList,y.EventType.MOUSE_OVER,P=>{let x=P.target;if(!(!x||!(0,y.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,y.addDisposableListener)(this.actionsList,k.EventType.Tap,P=>{let x=P.initialTarget;if(!(!x||!(0,y.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 A={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new p.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,y.addDisposableListener)(R,k.EventType.Change,P=>{y.EventHelper.stop(P,!0);const x=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:x-P.translationY})})),this._register((0,y.addDisposableListener)(N,y.EventType.MOUSE_UP,P=>{P.preventDefault()})),R.style.maxHeight=`${Math.max(10,window.innerHeight-D.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}),D.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(D,I){this.styleSheet||((0,y.isInShadowDOM)(D)?this.styleSheet=(0,y.createStyleSheet)(D):(l.globalStyleSheet||(l.globalStyleSheet=(0,y.createStyleSheet)()),this.styleSheet=l.globalStyleSheet)),this.styleSheet.textContent=C(I,(0,y.isInShadowDOM)(D))}styleScrollElement(D,I){var T,O;const R=(T=I.foregroundColor)!==null&&T!==void 0?T:"",A=(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}`:"";D.style.outline=N,D.style.borderRadius=P,D.style.color=R,D.style.backgroundColor=A,D.style.boxShadow=x}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(D){const I=this.focusedItem;this.setFocusedItem(D),I!==this.focusedItem&&this.updateFocus()}setFocusedItem(D){for(let I=0;I<this.actionsList.children.length;I++){const T=this.actionsList.children[I];if(D===T){this.focusedItem=I;break}}}updateFocus(D){super.updateFocus(D,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(D,I,T){if(D instanceof n.Separator)return new v(I.context,D,{icon:!0},this.menuStyles);if(D instanceof n.SubmenuAction){const O=new u(D,D.actions,T,Object.assign(Object.assign({},I),{submenuIds:new Set([...I.submenuIds||[],D.id])}),this.menuStyles);if(I.enableMnemonics){const R=O.getMnemonic();if(R&&O.isEnabled()){let A=[];this.mnemonics.has(R)&&(A=this.mnemonics.get(R)),A.push(O),this.mnemonics.set(R,A)}}return O}else{const O={enableMnemonics:I.enableMnemonics,useEventAsContext:I.useEventAsContext};if(I.getKeyBinding){const A=I.getKeyBinding(D);if(A){const N=A.getLabel();N&&(O.keybinding=N)}}const R=new a(I.context,D,O,this.menuStyles);if(I.enableMnemonics){const A=R.getMnemonic();if(A&&R.isEnabled()){let N=[];this.mnemonics.has(A)&&(N=this.mnemonics.get(A)),N.push(R),this.mnemonics.set(A,N)}}return R}}}e.Menu=l;class a extends S.BaseActionViewItem{constructor(D,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 A=e.MENU_MNEMONIC_REGEX.exec(R);A&&(this.mnemonic=(A[1]?A[1]:A[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new t.RunOnceScheduler(()=>{this.element&&(this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_UP,R=>{if(y.EventHelper.stop(R,!0),_.isFirefox){if(new w.StandardMouseEvent(R).rightButton)return;this.onClick(R)}else setTimeout(()=>{this.onClick(R)},0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.CONTEXT_MENU,R=>{y.EventHelper.stop(R,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(D){super.render(D),this.element&&(this.container=D,this.item=(0,y.append)(this.element,(0,y.$)("a.action-menu-item")),this._action.id===n.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,y.append)(this.item,(0,y.$)("span.menu-item-check"+s.ThemeIcon.asCSSSelector(i.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,y.append)(this.item,(0,y.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,y.append)(this.item,(0,y.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var D;super.focus(),(D=this.item)===null||D===void 0||D.focus(),this.applyStyle()}updatePositionInSet(D,I){this.item&&(this.item.setAttribute("aria-posinset",`${D}`),this.item.setAttribute("aria-setsize",`${I}`))}updateLabel(){var D;if(this.label&&this.options.label){(0,y.clearNode)(this.label);let I=(0,r.stripIcons)(this.action.label);if(I){const T=f(I);this.options.enableMnemonics||(I=T),this.label.setAttribute("aria-label",T.replace(/&&/g,"&"));const 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 A=N=>N.replace(/&&/g,"&");R?this.label.append(o.ltrim(A(I.substr(0,R.index))," "),(0,y.$)("u",{"aria-hidden":"true"},R[3]),o.rtrim(A(I.substr(R.index+R[0].length))," ")):this.label.innerText=A(I).trim(),(D=this.item)===null||D===void 0||D.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 D=this.action.checked;this.item.classList.toggle("checked",!!D),D!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",D?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const D=this.element&&this.element.classList.contains("focused"),I=D&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,T=D&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,O=D&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",R=D&&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 a{constructor(D,I,T,O,R){super(D,D,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,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(D){super.render(D),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,y.append)(this.item,(0,y.$)("span.submenu-indicator"+s.ThemeIcon.asCSSSelector(i.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_UP,I=>{const T=new E.StandardKeyboardEvent(I);(T.equals(17)||T.equals(3))&&(y.EventHelper.stop(I,!0),this.createSubmenu(!0))})),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_DOWN,I=>{const T=new E.StandardKeyboardEvent(I);(0,y.getActiveElement)()===this.item&&(T.equals(17)||T.equals(3))&&y.EventHelper.stop(I,!0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_OVER,I=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_LEAVE,I=>{this.mouseOver=!1})),this._register((0,y.addDisposableListener)(this.element,y.EventType.FOCUS_OUT,I=>{this.element&&!(0,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(D){y.EventHelper.stop(D,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(D){if(this.parentData.submenu&&(D||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(D,I,T,O){const R={top:0,left:0};return R.left=(0,g.layout)(D.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<=D.width&&(R.left=T.left+10),T.top+=10,T.height=0),R.top=(0,g.layout)(D.height,I.height,{position:0,offset:T.top,size:0}),R.top+I.height===T.top&&R.top+T.height+I.height<=D.height&&(R.top+=T.height),R}createSubmenu(D=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,y.append)(this.element,(0,y.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const I=getComputedStyle(this.parentData.parent.domNode),T=parseFloat(I.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new l(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new n.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},A=this.submenuContainer.getBoundingClientRect(),{top:N,left:P}=this.calculateSubmenuMenuLayout(new y.Dimension(window.innerWidth,window.innerHeight),y.Dimension.lift(A),R,this.expandDirection);this.submenuContainer.style.left=`${P-A.left}px`,this.submenuContainer.style.top=`${N-A.top}px`,this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_UP,x=>{new E.StandardKeyboardEvent(x).equals(15)&&(y.EventHelper.stop(x,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_DOWN,x=>{new E.StandardKeyboardEvent(x).equals(15)&&y.EventHelper.stop(x,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(D),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(D){var I;this.item&&((I=this.item)===null||I===void 0||I.setAttribute("aria-expanded",D))}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(D,I,T,O){super(D,I,T),this.menuStyles=O}render(D){super.render(D),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function f(L){const D=e.MENU_MNEMONIC_REGEX,I=D.exec(L);if(!I)return L;const T=!I[1];return L.replace(D,T?"$2$3":"").trim()}e.cleanMnemonic=f;function m(L){const D=(0,i.getCodiconFontCharacters)()[L.id];return`.codicon-${L.id}:before { content: '\\${D.toString(16)}'; }`}e.formatRule=m;function C(L,D){let I=`
- .monaco-menu {
- font-size: 13px;
- border-radius: 5px;
- min-width: 160px;
- }
- ${m(i.Codicon.menuSelection)}
- ${m(i.Codicon.menuSubmenu)}
- .monaco-menu .monaco-action-bar {
- text-align: right;
- overflow: hidden;
- white-space: nowrap;
- }
- .monaco-menu .monaco-action-bar .actions-container {
- display: flex;
- margin: 0 auto;
- padding: 0;
- width: 100%;
- justify-content: flex-end;
- }
- .monaco-menu .monaco-action-bar.vertical .actions-container {
- display: inline-block;
- }
- .monaco-menu .monaco-action-bar.reverse .actions-container {
- flex-direction: row-reverse;
- }
- .monaco-menu .monaco-action-bar .action-item {
- cursor: pointer;
- display: inline-block;
- transition: transform 50ms ease;
- position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
- }
- .monaco-menu .monaco-action-bar .action-item.disabled {
- cursor: default;
- }
- .monaco-menu .monaco-action-bar.animated .action-item.active {
- transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
- }
- .monaco-menu .monaco-action-bar .action-item .icon,
- .monaco-menu .monaco-action-bar .action-item .codicon {
- display: inline-block;
- }
- .monaco-menu .monaco-action-bar .action-item .codicon {
- display: flex;
- align-items: center;
- }
- .monaco-menu .monaco-action-bar .action-label {
- font-size: 11px;
- margin-right: 4px;
- }
- .monaco-menu .monaco-action-bar .action-item.disabled .action-label,
- .monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
- color: var(--vscode-disabledForeground);
- }
- /* Vertical actions */
- .monaco-menu .monaco-action-bar.vertical {
- text-align: left;
- }
- .monaco-menu .monaco-action-bar.vertical .action-item {
- display: block;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label.separator {
- display: block;
- border-bottom: 1px solid var(--vscode-menu-separatorBackground);
- padding-top: 1px;
- padding: 30px;
- }
- .monaco-menu .secondary-actions .monaco-action-bar .action-label {
- margin-left: 6px;
- }
- /* Action Items */
- .monaco-menu .monaco-action-bar .action-item.select-container {
- overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
- flex: 1;
- max-width: 170px;
- min-width: 60px;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 10px;
- }
- .monaco-menu .monaco-action-bar.vertical {
- margin-left: 0;
- overflow: visible;
- }
- .monaco-menu .monaco-action-bar.vertical .actions-container {
- display: block;
- }
- .monaco-menu .monaco-action-bar.vertical .action-item {
- padding: 0;
- transform: none;
- display: flex;
- }
- .monaco-menu .monaco-action-bar.vertical .action-item.active {
- transform: none;
- }
- .monaco-menu .monaco-action-bar.vertical .action-menu-item {
- flex: 1 1 auto;
- display: flex;
- height: 2em;
- align-items: center;
- position: relative;
- margin: 0 4px;
- border-radius: 4px;
- }
- .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,
- .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
- opacity: unset;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label {
- flex: 1 1 auto;
- text-decoration: none;
- padding: 0 1em;
- background: none;
- font-size: 12px;
- line-height: 1;
- }
- .monaco-menu .monaco-action-bar.vertical .keybinding,
- .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
- display: inline-block;
- flex: 2 1 auto;
- padding: 0 1em;
- text-align: right;
- font-size: 12px;
- line-height: 1;
- }
- .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
- height: 100%;
- }
- .monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
- font-size: 16px !important;
- display: flex;
- align-items: center;
- }
- .monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
- margin-left: auto;
- margin-right: -20px;
- }
- .monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
- .monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
- opacity: 0.4;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
- display: inline-block;
- box-sizing: border-box;
- margin: 0;
- }
- .monaco-menu .monaco-action-bar.vertical .action-item {
- position: static;
- overflow: visible;
- }
- .monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
- position: absolute;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label.separator {
- width: 100%;
- height: 0px !important;
- opacity: 1;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
- padding: 0.7em 1em 0.1em 1em;
- font-weight: bold;
- opacity: 1;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label:hover {
- color: inherit;
- }
- .monaco-menu .monaco-action-bar.vertical .menu-item-check {
- position: absolute;
- visibility: hidden;
- width: 1em;
- height: 100%;
- }
- .monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
- visibility: visible;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /* Context Menu */
- .context-view.monaco-menu-container {
- outline: 0;
- border: none;
- animation: fadeIn 0.083s linear;
- -webkit-app-region: no-drag;
- }
- .context-view.monaco-menu-container :focus,
- .context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
- .context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
- outline: 0;
- }
- .hc-black .context-view.monaco-menu-container,
- .hc-light .context-view.monaco-menu-container,
- :host-context(.hc-black) .context-view.monaco-menu-container,
- :host-context(.hc-light) .context-view.monaco-menu-container {
- box-shadow: none;
- }
- .hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
- .hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
- :host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
- :host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
- background: none;
- }
- /* Vertical Action Bar Styles */
- .monaco-menu .monaco-action-bar.vertical {
- padding: 4px 0;
- }
- .monaco-menu .monaco-action-bar.vertical .action-menu-item {
- height: 2em;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
- .monaco-menu .monaco-action-bar.vertical .keybinding {
- font-size: inherit;
- padding: 0 2em;
- }
- .monaco-menu .monaco-action-bar.vertical .menu-item-check {
- font-size: inherit;
- width: 2em;
- }
- .monaco-menu .monaco-action-bar.vertical .action-label.separator {
- font-size: inherit;
- margin: 5px 0 !important;
- padding: 0;
- border-radius: 0;
- }
- .linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
- :host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
- margin-left: 0;
- margin-right: 0;
- }
- .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
- font-size: 60%;
- padding: 0 1.8em;
- }
- .linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
- :host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
- height: 100%;
- mask-size: 10px 10px;
- -webkit-mask-size: 10px 10px;
- }
- .monaco-menu .action-item {
- cursor: default;
- }`;if(D){I+=`
- /* Arrows */
- .monaco-scrollable-element > .scrollbar > .scra {
- cursor: pointer;
- font-size: 11px !important;
- }
- .monaco-scrollable-element > .visible {
- opacity: 1;
- /* Background rule added for IE9 - to allow clicks on dom node */
- background:rgba(0,0,0,0);
- transition: opacity 100ms linear;
- }
- .monaco-scrollable-element > .invisible {
- opacity: 0;
- pointer-events: none;
- }
- .monaco-scrollable-element > .invisible.fade {
- transition: opacity 800ms linear;
- }
- /* Scrollable Content Inset Shadow */
- .monaco-scrollable-element > .shadow {
- position: absolute;
- display: none;
- }
- .monaco-scrollable-element > .shadow.top {
- display: block;
- top: 0;
- left: 3px;
- height: 3px;
- width: 100%;
- }
- .monaco-scrollable-element > .shadow.left {
- display: block;
- top: 3px;
- left: 0;
- height: 100%;
- width: 3px;
- }
- .monaco-scrollable-element > .shadow.top-left-corner {
- display: block;
- top: 0;
- left: 0;
- height: 3px;
- width: 3px;
- }
- `;const T=L.scrollbarShadow;T&&(I+=`
- .monaco-scrollable-element > .shadow.top {
- box-shadow: ${T} 0 6px 6px -6px inset;
- }
- .monaco-scrollable-element > .shadow.left {
- box-shadow: ${T} 6px 0 6px -6px inset;
- }
- .monaco-scrollable-element > .shadow.top.left {
- box-shadow: ${T} 6px 6px 6px -6px inset;
- }
- `);const O=L.scrollbarSliderBackground;O&&(I+=`
- .monaco-scrollable-element > .scrollbar > .slider {
- background: ${O};
- }
- `);const R=L.scrollbarSliderHoverBackground;R&&(I+=`
- .monaco-scrollable-element > .scrollbar > .slider:hover {
- background: ${R};
- }
- `);const A=L.scrollbarSliderActiveBackground;A&&(I+=`
- .monaco-scrollable-element > .scrollbar > .slider.active {
- background: ${A};
- }
- `)}return I}}),define(X[560],ee([1,0,69,300,40,27,30,6,2,18,536,394]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class n extends S.Disposable{constructor(s,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",s.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:E.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 l=d.actionViewItemProvider(h,o);if(l)return l}if(h instanceof y.SubmenuAction){const l=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 l.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(l),this.disposables.add(this._onDidChangeDropdownVisibility.add(l.onDidChangeVisibility)),l}}}))}set actionRunner(s){this.actionBar.actionRunner=s}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(s){return this.actionBar.getAction(s)}setActions(s,r){this.clear();const d=s?s.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(s){var r,d;const h=this.lookupKeybindings?(d=(r=this.options).getKeyBinding)===null||d===void 0?void 0:d.call(r,s):void 0;return(0,g.withNullAsUndefined)(h?.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}e.ToolBar=n;class t extends y.Action{constructor(s,r){r=r||p.localize(0,null),super(t.ID,r,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=s}run(){return we(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(s){this._menuActions=s}}e.ToggleMenuAction=t,t.ID="toolbar.toggle.more"}),define(X[178],ee([1,0,7,77,44,69,218,217,214,109,146,209,131,40,16,13,27,30,363,6,64,2,133,18,537,395]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m extends S.ElementsDragAndDropData{constructor(W){super(W.elements.map(q=>q.element)),this.data=W}}function C(H){return H instanceof S.ElementsDragAndDropData?new m(H):H}class L{constructor(W,q){this.modelProvider=W,this.dnd=q,this.autoExpandDisposable=a.Disposable.None}getDragURI(W){return this.dnd.getDragURI(W.element)}getDragLabel(W,q){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(W.map(Z=>Z.element),q)}onDragStart(W,q){var Z,Y;(Y=(Z=this.dnd).onDragStart)===null||Y===void 0||Y.call(Z,C(W),q)}onDragOver(W,q,Z,Y,oe=!0){const ce=this.dnd.onDragOver(C(W),q&&q.element,Z,Y),ge=this.autoExpandNode!==q;if(ge&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=q),typeof q>"u")return ce;if(ge&&typeof ce!="boolean"&&ce.autoExpand&&(this.autoExpandDisposable=(0,r.disposableTimeout)(()=>{const U=this.modelProvider(),J=U.getNodeLocation(q);U.isCollapsed(J)&&U.setCollapsed(J,!1),this.autoExpandNode=void 0},500)),typeof ce=="boolean"||!ce.accept||typeof ce.bubble>"u"||ce.feedback){if(!oe){const U=typeof ce=="boolean"?ce:ce.accept,J=typeof ce=="boolean"?void 0:ce.effect;return{accept:U,effect:J,feedback:[Z]}}return ce}if(ce.bubble===1){const U=this.modelProvider(),J=U.getNodeLocation(q),te=U.getParentNodeLocation(J),G=U.getNode(te),ae=te&&U.getListIndex(te);return this.onDragOver(W,G,ae,Y,!1)}const le=this.modelProvider(),ue=le.getNodeLocation(q),j=le.getListIndex(ue),z=le.getListRenderCount(ue);return Object.assign(Object.assign({},ce),{feedback:(0,s.range)(j,j+z)})}drop(W,q,Z,Y){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(C(W),q&&q.element,Z,Y)}onDragEnd(W){var q,Z;(Z=(q=this.dnd).onDragEnd)===null||Z===void 0||Z.call(q,W)}}function D(H,W){return W&&Object.assign(Object.assign({},W),{identityProvider:W.identityProvider&&{getId(q){return W.identityProvider.getId(q.element)}},dnd:W.dnd&&new L(H,W.dnd),multipleSelectionController:W.multipleSelectionController&&{isSelectionSingleChangeEvent(q){return W.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},q),{element:q.element}))},isSelectionRangeChangeEvent(q){return W.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},q),{element:q.element}))}},accessibilityProvider:W.accessibilityProvider&&Object.assign(Object.assign({},W.accessibilityProvider),{getSetSize(q){const Z=H(),Y=Z.getNodeLocation(q),oe=Z.getParentNodeLocation(Y);return Z.getNode(oe).visibleChildrenCount},getPosInSet(q){return q.visibleChildIndex+1},isChecked:W.accessibilityProvider&&W.accessibilityProvider.isChecked?q=>W.accessibilityProvider.isChecked(q.element):void 0,getRole:W.accessibilityProvider&&W.accessibilityProvider.getRole?q=>W.accessibilityProvider.getRole(q.element):()=>"treeitem",getAriaLabel(q){return W.accessibilityProvider.getAriaLabel(q.element)},getWidgetAriaLabel(){return W.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:W.accessibilityProvider&&W.accessibilityProvider.getWidgetRole?()=>W.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:W.accessibilityProvider&&W.accessibilityProvider.getAriaLevel?q=>W.accessibilityProvider.getAriaLevel(q.element):q=>q.depth,getActiveDescendantId:W.accessibilityProvider.getActiveDescendantId&&(q=>W.accessibilityProvider.getActiveDescendantId(q.element))}),keyboardNavigationLabelProvider:W.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},W.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(q){return W.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(q.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,q){var Z,Y;(Y=(Z=this.delegate).setDynamicHeight)===null||Y===void 0||Y.call(Z,W.element,q)}}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,q=[]){this._elements=q,this.disposables=new a.DisposableStore,this.onDidChange=c.Event.forEach(W,Z=>this._elements=Z,this.disposables)}dispose(){this.disposables.dispose()}}class R{constructor(W,q,Z,Y,oe,ce={}){var ge;this.renderer=W,this.modelProvider=q,this.activeNodes=Y,this.renderedIndentGuides=oe,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=R.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=a.Disposable.None,this.disposables=new a.DisposableStore,this.templateId=W.templateId,this.updateOptions(ce),c.Event.map(Z,le=>le.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(ge=W.onDidChangeTwistieState)===null||ge===void 0||ge.call(W,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(W={}){if(typeof W.indent<"u"){const q=(0,u.clamp)(W.indent,0,40);if(q!==this.indent){this.indent=q;for(const[Z,Y]of this.renderedNodes)this.renderTreeElement(Z,Y)}}if(typeof W.renderIndentGuides<"u"){const q=W.renderIndentGuides!==T.None;if(q!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=q;for(const[Z,Y]of this.renderedNodes)this._renderIndentGuides(Z,Y);if(this.indentGuidesDisposable.dispose(),q){const Z=new a.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 q=(0,_.append)(W,(0,_.$)(".monaco-tl-row")),Z=(0,_.append)(q,(0,_.$)(".monaco-tl-indent")),Y=(0,_.append)(q,(0,_.$)(".monaco-tl-twistie")),oe=(0,_.append)(q,(0,_.$)(".monaco-tl-contents")),ce=this.renderer.renderTemplate(oe);return{container:W,indent:Z,twistie:Y,indentGuidesDisposable:a.Disposable.None,templateData:ce}}renderElement(W,q,Z,Y){this.renderedNodes.set(W,Z),this.renderedElements.set(W.element,W),this.renderTreeElement(W,Z),this.renderer.renderElement(W,q,Z.templateData,Y)}disposeElement(W,q,Z,Y){var oe,ce;Z.indentGuidesDisposable.dispose(),(ce=(oe=this.renderer).disposeElement)===null||ce===void 0||ce.call(oe,W,q,Z.templateData,Y),typeof Y=="number"&&(this.renderedNodes.delete(W),this.renderedElements.delete(W.element))}disposeTemplate(W){this.renderer.disposeTemplate(W.templateData)}onDidChangeTwistieState(W){const q=this.renderedElements.get(W);q&&this.onDidChangeNodeTwistieState(q)}onDidChangeNodeTwistieState(W){const q=this.renderedNodes.get(W);q&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(W,q))}renderTreeElement(W,q){const Z=R.DefaultIndent+(W.depth-1)*this.indent;q.twistie.style.paddingLeft=`${Z}px`,q.indent.style.width=`${Z+this.indent-16}px`,W.collapsible?q.container.setAttribute("aria-expanded",String(!W.collapsed)):q.container.removeAttribute("aria-expanded"),q.twistie.classList.remove(...h.ThemeIcon.asClassNameArray(d.Codicon.treeItemExpanded));let Y=!1;this.renderer.renderTwistie&&(Y=this.renderer.renderTwistie(W.element,q.twistie)),W.collapsible&&(!this.hideTwistiesOfChildlessElements||W.visibleChildrenCount>0)?(Y||q.twistie.classList.add(...h.ThemeIcon.asClassNameArray(d.Codicon.treeItemExpanded)),q.twistie.classList.add("collapsible"),q.twistie.classList.toggle("collapsed",W.collapsed)):q.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(W,q)}_renderIndentGuides(W,q){if((0,_.clearNode)(q.indent),q.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Z=new a.DisposableStore,Y=this.modelProvider();for(;;){const oe=Y.getNodeLocation(W),ce=Y.getParentNodeLocation(oe);if(!ce)break;const ge=Y.getNode(ce),le=(0,_.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(ge)&&le.classList.add("active"),q.indent.childElementCount===0?q.indent.appendChild(le):q.indent.insertBefore(le,q.indent.firstElementChild),this.renderedIndentGuides.add(ge,le),Z.add((0,a.toDisposable)(()=>this.renderedIndentGuides.delete(ge,le))),W=ge}q.indentGuidesDisposable=Z}_onDidChangeActiveNodes(W){if(!this.shouldRenderIndentGuides)return;const q=new Set,Z=this.modelProvider();W.forEach(Y=>{const oe=Z.getNodeLocation(Y);try{const ce=Z.getParentNodeLocation(oe);Y.collapsible&&Y.children.length>0&&!Y.collapsed?q.add(Y):ce&&q.add(Z.getNode(ce))}catch{}}),this.activeIndentNodes.forEach(Y=>{q.has(Y)||this.renderedIndentGuides.forEach(Y,oe=>oe.classList.remove("active"))}),q.forEach(Y=>{this.activeIndentNodes.has(Y)||this.renderedIndentGuides.forEach(Y,oe=>oe.classList.add("active"))}),this.activeIndentNodes=q}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,a.dispose)(this.disposables)}}R.DefaultIndent=8;class A{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(W,q,Z){this.tree=W,this.keyboardNavigationLabelProvider=q,this._filter=Z,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new a.DisposableStore,W.onWillRefilter(this.reset,this,this.disposables)}filter(W,q){let Z=1;if(this._filter){const ce=this._filter.filter(W,q);if(typeof ce=="boolean"?Z=ce?1:0:(0,n.isFilterResult)(ce)?Z=(0,n.getVisibleState)(ce.visibility):Z=ce,Z===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:l.FuzzyScore.Default,visibility:Z};const Y=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(W),oe=Array.isArray(Y)?Y:[Y];for(const ce of oe){const ge=ce&&ce.toString();if(typeof ge>"u")return{data:l.FuzzyScore.Default,visibility:Z};let le;if(this.tree.findMatchType===B.Contiguous){const ue=ge.toLowerCase().indexOf(this._lowercasePattern);if(ue>-1){le=[Number.MAX_SAFE_INTEGER,0];for(let j=this._lowercasePattern.length;j>0;j--)le.push(ue+j-1)}}else le=(0,l.fuzzyScore)(this._pattern,this._lowercasePattern,0,ge,ge.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(le)return this._matchCount++,oe.length===1?{data:le,visibility:Z}:{data:{label:ge,score:le},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:l.FuzzyScore.Default,visibility:Z}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,a.dispose)(this.disposables)}}class N extends p.Toggle{constructor(W){var q;super({icon:d.Codicon.listFilter,title:(0,f.localize)(0,null),isChecked:(q=W.isChecked)!==null&&q!==void 0?q:!1,inputActiveOptionBorder:W.inputActiveOptionBorder,inputActiveOptionForeground:W.inputActiveOptionForeground,inputActiveOptionBackground:W.inputActiveOptionBackground})}}e.ModeToggle=N;class P extends p.Toggle{constructor(W){var q;super({icon:d.Codicon.searchFuzzy,title:(0,f.localize)(1,null),isChecked:(q=W.isChecked)!==null&&q!==void 0?q:!1,inputActiveOptionBorder:W.inputActiveOptionBorder,inputActiveOptionForeground:W.inputActiveOptionForeground,inputActiveOptionBackground:W.inputActiveOptionBackground})}}e.FuzzyToggle=P;const x={inputBoxStyles:b.unthemedInboxStyles,toggleStyles:p.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 a.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,q,Z,Y,oe,ce){var ge;super(),this.tree=q,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,a.toDisposable)(()=>W.removeChild(this.elements.root)));const le=(ge=ce?.styles)!==null&&ge!==void 0?ge:x;le.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=le.listFilterWidgetBackground),le.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${le.listFilterWidgetShadow}`),this.modeToggle=this._register(new N(Object.assign(Object.assign({},le.toggleStyles),{isChecked:Y===F.Filter}))),this.matchTypeToggle=this._register(new P(Object.assign(Object.assign({},le.toggleStyles),{isChecked:oe===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:le.inputBoxStyles,toggleStyles:le.toggleStyles,history:ce?.history})),this.actionbar=this._register(new E.ActionBar(this.elements.actionbar)),this.mode=Y;const ue=this._register(new k.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),j=this._register(c.Event.chain(ue.event)).map(te=>new y.StandardKeyboardEvent(te)).event;this._register(j(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 a.DisposableStore,ae=G.add(new k.DomEmitter(window,"mousemove")),me=G.add(new k.DomEmitter(window,"mouseup")),Ce=this.right,Se=te.pageX,ye=this.top,Ee=te.pageY;this.elements.grab.classList.add("grabbing");const De=this.elements.root.style.transition;this.elements.root.style.transition="unset";const ke=Ie=>{const he=Ie.pageX-Se;this.right=Ce-he;const ve=Ie.pageY-Ee;this.top=ye+ve,this.layout()};G.add(ae.event(ke)),G.add(me.event(Ie=>{ke(Ie),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=De,G.dispose()}))}));const J=this._register(c.Event.chain(this._register(new k.DomEmitter(this.elements.grab,"keydown")).event)).map(te=>new y.StandardKeyboardEvent(te)).event;this._register(J(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 me=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=me},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(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 ${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,q,Z,Y,oe,ce={}){var ge,le;this.tree=W,this.view=Z,this.filter=Y,this.contextViewProvider=oe,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 a.DisposableStore,this.disposables=new a.DisposableStore,this._mode=(ge=W.options.defaultFindMode)!==null&&ge!==void 0?ge:F.Highlight,this._matchType=(le=W.options.defaultFindMatchType)!==null&&le!==void 0?le:B.Fuzzy,q.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,q,Z,Y;const oe=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&oe?!((W=this.tree.options.showNotFoundMessage)!==null&&W!==void 0)||W?(q=this.widget)===null||q===void 0||q.showMessage({type:2,content:(0,f.localize)(6,null)}):(Z=this.widget)===null||Z===void 0||Z.showMessage({type:2}):(Y=this.widget)===null||Y===void 0||Y.clearMessage()}shouldAllowFocus(W){return!this.widget||!this.pattern||this._mode===F.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!l.FuzzyScore.isDefault(W.filterData)}layout(W){var q;this.width=W,(q=this.widget)===null||q===void 0||q.layout(W)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function M(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 Q(H,W){W(H),H.children.forEach(q=>Q(q,W))}class ie{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(W,q){this.getFirstViewElementWithTrait=W,this.identityProvider=q,this.nodes=[],this._onDidChange=new c.Emitter,this.onDidChange=this._onDidChange.event}set(W,q){!q?.__forceEvent&&(0,s.equals)(this.nodes,W)||this._set(W,!1,q)}_set(W,q,Z){if(this.nodes=[...W],this.elements=void 0,this._nodeSet=void 0,!q){const Y=this;this._onDidChange.fire({get elements(){return Y.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:q}){if(!this.identityProvider){const le=this.createNodeSet(),ue=j=>le.delete(j);q.forEach(j=>Q(j,ue)),this.set([...le.values()]);return}const Z=new Set,Y=le=>Z.add(this.identityProvider.getId(le.element).toString());q.forEach(le=>Q(le,Y));const oe=new Map,ce=le=>oe.set(this.identityProvider.getId(le.element).toString(),le);W.forEach(le=>Q(le,ce));const ge=[];for(const le of this.nodes){const ue=this.identityProvider.getId(le.element).toString();if(!Z.has(ue))ge.push(le);else{const z=oe.get(ue);z&&z.visible&&ge.push(z)}}if(this.nodes.length>0&&ge.length===0){const le=this.getFirstViewElementWithTrait();le&&ge.push(le)}this._set(ge,!0)}createNodeSet(){const W=new Set;for(const q of this.nodes)W.add(q);return W}}class re extends g.MouseController{constructor(W,q){super(W),this.tree=q}onViewPointer(W){if((0,g.isButton)(W.browserEvent.target)||(0,g.isInputElement)(W.browserEvent.target)||(0,g.isMonacoEditor)(W.browserEvent.target))return;const q=W.element;if(!q)return super.onViewPointer(W);if(this.isSelectionRangeChangeEvent(W)||this.isSelectionSingleChangeEvent(W))return super.onViewPointer(W);const Z=W.browserEvent.target,Y=Z.classList.contains("monaco-tl-twistie")||Z.classList.contains("monaco-icon-label")&&Z.classList.contains("folder-icon")&&W.browserEvent.offsetX<16;let oe=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?oe=this.tree.expandOnlyOnTwistieClick(q.element):oe=!!this.tree.expandOnlyOnTwistieClick,oe&&!Y&&W.browserEvent.detail!==2)return super.onViewPointer(W);if(!this.tree.expandOnDoubleClick&&W.browserEvent.detail===2)return super.onViewPointer(W);if(q.collapsible){const ce=this.tree.getNodeLocation(q),ge=W.browserEvent.altKey;if(this.tree.setFocus([ce]),this.tree.toggleCollapsed(ce,ge),oe&&Y)return}super.onViewPointer(W)}onDoubleClick(W){W.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(W)}}class ne extends g.List{constructor(W,q,Z,Y,oe,ce,ge,le){super(W,q,Z,Y,le),this.focusTrait=oe,this.selectionTrait=ce,this.anchorTrait=ge}createMouseController(W){return new re(this,W.tree)}splice(W,q,Z=[]){if(super.splice(W,q,Z),Z.length===0)return;const Y=[],oe=[];let ce;Z.forEach((ge,le)=>{this.focusTrait.has(ge)&&Y.push(W+le),this.selectionTrait.has(ge)&&oe.push(W+le),this.anchorTrait.has(ge)&&(ce=W+le)}),Y.length>0&&super.setFocus((0,s.distinct)([...super.getFocus(),...Y])),oe.length>0&&super.setSelection((0,s.distinct)([...super.getSelection(),...oe])),typeof ce=="number"&&super.setAnchor(ce)}setFocus(W,q,Z=!1){super.setFocus(W,q),Z||this.focusTrait.set(W.map(Y=>this.element(Y)),q)}setSelection(W,q,Z=!1){super.setSelection(W,q),Z||this.selectionTrait.set(W.map(Y=>this.element(Y)),q)}setAnchor(W,q=!1){super.setAnchor(W),q||(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,M),W=>W.target!==t.TreeMouseEventTarget.Filter)}get onPointer(){return c.Event.map(this.view.onPointer,M)}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,q;return(q=(W=this.findController)===null||W===void 0?void 0:W.mode)!==null&&q!==void 0?q:F.Highlight}set findMode(W){this.findController&&(this.findController.mode=W)}get findMatchType(){var W,q;return(q=(W=this.findController)===null||W===void 0?void 0:W.matchType)!==null&&q!==void 0?q: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,q,Z,Y,oe={}){var ce;this._user=W,this._options=oe,this.eventBufferer=new c.EventBufferer,this.onDidChangeFindOpenState=c.Event.None,this.disposables=new a.DisposableStore,this._onWillRefilter=new c.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new c.Emitter;const ge=new I(Z),le=new c.Relay,ue=new c.Relay,j=this.disposables.add(new O(ue.event)),z=new o.SetMap;this.renderers=Y.map(te=>new R(te,()=>this.model,le.event,j,z,oe));for(const te of this.renderers)this.disposables.add(te);let U;oe.keyboardNavigationLabelProvider&&(U=new A(this,oe.keyboardNavigationLabelProvider,oe.filter),oe=Object.assign(Object.assign({},oe),{filter:U}),this.disposables.add(U)),this.focus=new ie(()=>this.view.getFocusedElements()[0],oe.identityProvider),this.selection=new ie(()=>this.view.getSelectedElements()[0],oe.identityProvider),this.anchor=new ie(()=>this.view.getAnchorElement(),oe.identityProvider),this.view=new ne(W,q,ge,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},D(()=>this.model,oe)),{tree:this})),this.model=this.createModel(W,this.view,oe),le.input=this.model.onDidChangeCollapseState;const J=c.Event.forEach(this.model.onDidSplice,te=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(te),this.selection.onDidModelSplice(te)})},this.disposables);if(J(()=>null,null,this.disposables),ue.input=c.Event.chain(c.Event.any(J,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,oe.keyboardSupport!==!1){const te=c.Event.chain(this.view.onKeyDown).filter(G=>!(0,g.isInputElement)(G.target)).map(G=>new y.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=oe.findWidgetEnabled)!==null&&ce!==void 0)||ce)&&oe.keyboardNavigationLabelProvider&&oe.contextViewProvider){const te=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new $(this,this.model,this.view,U,oe.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 q;this._options=Object.assign(Object.assign({},this._options),W);for(const Z of this.renderers)Z.updateOptions(W);this.view.updateOptions(this._options),(q=this.findController)===null||q===void 0||q.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,q){var Z;this.view.layout(W,q),(0,v.isNumber)(q)&&((Z=this.findController)===null||Z===void 0||Z.layout(q))}style(W){const q=`.${this.view.domId}`,Z=[];W.treeIndentGuidesStroke&&(Z.push(`.monaco-list${q}:hover .monaco-tl-indent > .indent-guide, .monaco-list${q}.always .monaco-tl-indent > .indent-guide { border-color: ${W.treeInactiveIndentGuidesStroke}; }`),Z.push(`.monaco-list${q} .monaco-tl-indent > .indent-guide.active { border-color: ${W.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Z.join(`
- `),this.view.style(W)}getParentElement(W){const q=this.model.getParentNodeLocation(W);return this.model.getNode(q).element}getFirstElementChild(W){return this.model.getFirstElementChild(W)}getNode(W){return this.model.getNode(W)}getNodeLocation(W){return this.model.getNodeLocation(W)}collapse(W,q=!1){return this.model.setCollapsed(W,!0,q)}expand(W,q=!1){return this.model.setCollapsed(W,!1,q)}toggleCollapsed(W,q=!1){return this.model.setCollapsed(W,void 0,q)}isCollapsible(W){return this.model.isCollapsible(W)}setCollapsible(W,q){return this.model.setCollapsible(W,q)}isCollapsed(W){return this.model.isCollapsed(W)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(W,q){const Z=W.map(oe=>this.model.getNode(oe));this.selection.set(Z,q);const Y=W.map(oe=>this.model.getListIndex(oe)).filter(oe=>oe>-1);this.view.setSelection(Y,q,!0)}getSelection(){return this.selection.get()}setFocus(W,q){const Z=W.map(oe=>this.model.getNode(oe));this.focus.set(Z,q);const Y=W.map(oe=>this.model.getListIndex(oe)).filter(oe=>oe>-1);this.view.setFocus(Y,q,!0)}getFocus(){return this.focus.get()}reveal(W,q){this.model.expandTo(W);const Z=this.model.getListIndex(W);Z!==-1&&this.view.reveal(Z,q)}onLeftArrow(W){W.preventDefault(),W.stopPropagation();const q=this.view.getFocusedElements();if(q.length===0)return;const Z=q[0],Y=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(Y,!0)){const ce=this.model.getParentNodeLocation(Y);if(!ce)return;const ge=this.model.getListIndex(ce);this.view.reveal(ge),this.view.setFocus([ge])}}onRightArrow(W){W.preventDefault(),W.stopPropagation();const q=this.view.getFocusedElements();if(q.length===0)return;const Z=q[0],Y=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(Y,!1)){if(!Z.children.some(le=>le.visible))return;const[ce]=this.view.getFocus(),ge=ce+1;this.view.reveal(ge),this.view.setFocus([ge])}}onSpace(W){W.preventDefault(),W.stopPropagation();const q=this.view.getFocusedElements();if(q.length===0)return;const Z=q[0],Y=this.model.getNodeLocation(Z),oe=W.browserEvent.altKey;this.model.setCollapsed(Y,void 0,oe)}dispose(){(0,a.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=se}),define(X[561],ee([1,0,178,210]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class y extends _.AbstractTree{constructor(w,b,S,g,p,n={}){super(w,b,S,g,n),this.user=w,this.dataSource=p,this.identityProvider=n.identityProvider}createModel(w,b,S){return new k.ObjectTreeModel(w,b,S)}}e.DataTree=y}),define(X[301],ee([1,0,178,547,210,100,53]),function(K,e,_,k,y,E,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,s,r,d={}){super(t,i,s,r,d),this.user=t}setChildren(t,i=w.Iterable.empty(),s){this.model.setChildren(t,i,s)}rerender(t){if(t===void 0){this.view.rerender();return}this.model.rerender(t)}hasElement(t){return this.model.has(t)}createModel(t,i,s){return new y.ObjectTreeModel(t,i,s)}}e.ObjectTree=b;class 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,s,r){const d=this.compressedTreeNodeProvider.getCompressedTreeNode(t.element);d.element.elements.length===1?(s.compressedTreeNode=void 0,this.renderer.renderElement(t,i,s.data,r)):(s.compressedTreeNode=d,this.renderer.renderCompressedElements(d,i,s.data,r))}disposeElement(t,i,s,r){var d,h,o,c;s.compressedTreeNode?(h=(d=this.renderer).disposeCompressedElements)===null||h===void 0||h.call(d,s.compressedTreeNode,i,s.data,r):(c=(o=this.renderer).disposeElement)===null||c===void 0||c.call(o,t,i,s.data,r)}disposeTemplate(t){this.renderer.disposeTemplate(t.data)}renderTwistie(t,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(t,i):!1}}Me([E.memoize],S.prototype,"compressedTreeNodeProvider",null);function g(n,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let s;try{s=n().getCompressedTreeNode(i)}catch{return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return s.element.elements.length===1?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(s.element.elements)}}})}class p extends b{constructor(t,i,s,r,d={}){const h=()=>this,o=r.map(c=>new S(h,c));super(t,i,s,o,g(h,d))}setChildren(t,i=w.Iterable.empty(),s){this.model.setChildren(t,i,s)}createModel(t,i,s){return new k.CompressibleObjectTreeModel(t,i,s)}updateOptions(t={}){super.updateOptions(t),typeof t.compressionEnabled<"u"&&this.model.setCompressionEnabled(t.compressionEnabled)}getCompressedTreeNode(t=null){return this.model.getCompressedTreeNode(t)}}e.CompressibleObjectTree=p}),define(X[562],ee([1,0,214,178,209,301,131,13,27,30,11,6,53,2,18]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function r(A){return Object.assign(Object.assign({},A),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function d(A,N){return N.parent?N.parent===A?!0:d(A,N.parent):!1}function h(A,N){return A===N||d(A,N)||d(N,A)}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 l(A){return{browserEvent:A.browserEvent,elements:A.elements.map(N=>N.element)}}function a(A){return{browserEvent:A.browserEvent,element:A.element&&A.element.element,target:A.target}}class u extends _.ElementsDragAndDropData{constructor(N){super(N.elements.map(P=>P.element)),this.data=N}}function v(A){return A instanceof _.ElementsDragAndDropData?new u(A):A}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 m(A){return A&&Object.assign(Object.assign({},A),{collapseByDefault:!0,identityProvider:A.identityProvider&&{getId(N){return A.identityProvider.getId(N.element)}},dnd:A.dnd&&new f(A.dnd),multipleSelectionController:A.multipleSelectionController&&{isSelectionSingleChangeEvent(N){return A.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},N),{element:N.element}))},isSelectionRangeChangeEvent(N){return A.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},N),{element:N.element}))}},accessibilityProvider:A.accessibilityProvider&&Object.assign(Object.assign({},A.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:A.accessibilityProvider.getRole?N=>A.accessibilityProvider.getRole(N.element):()=>"treeitem",isChecked:A.accessibilityProvider.isChecked?N=>{var P;return!!(!((P=A.accessibilityProvider)===null||P===void 0)&&P.isChecked(N.element))}:void 0,getAriaLabel(N){return A.accessibilityProvider.getAriaLabel(N.element)},getWidgetAriaLabel(){return A.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:A.accessibilityProvider.getWidgetRole?()=>A.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:A.accessibilityProvider.getAriaLevel&&(N=>A.accessibilityProvider.getAriaLevel(N.element)),getActiveDescendantId:A.accessibilityProvider.getActiveDescendantId&&(N=>A.accessibilityProvider.getActiveDescendantId(N.element))}),filter:A.filter&&{filter(N,P){return A.filter.filter(N.element,P)}},keyboardNavigationLabelProvider:A.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},A.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(N){return A.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(N.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof A.expandOnlyOnTwistieClick>"u"?void 0:typeof A.expandOnlyOnTwistieClick!="function"?A.expandOnlyOnTwistieClick:N=>A.expandOnlyOnTwistieClick(N.element),defaultFindVisibility:N=>N.hasChildren&&N.stale?1:typeof A.defaultFindVisibility=="number"?A.defaultFindVisibility:typeof A.defaultFindVisibility>"u"?2:A.defaultFindVisibility(N.element)})}function C(A,N){N(A),A.children.forEach(P=>C(P,N))}class L{get onDidChangeFocus(){return n.Event.map(this.tree.onDidChangeFocus,l)}get onDidChangeSelection(){return n.Event.map(this.tree.onDidChangeSelection,l)}get onMouseDblClick(){return n.Event.map(this.tree.onMouseDblClick,a)}get onPointer(){return n.Event.map(this.tree.onPointer,a)}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 n.Emitter,this._onDidChangeNodeSlowState=new n.Emitter,this.nodeMapper=new w.WeakMapper($=>new o($)),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),$=F.map(Q=>new c(Q,this.nodeMapper,this._onDidChangeNodeSlowState.event)),M=m(B)||{};return new E.ObjectTree(N,P,V,$,M)}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 n.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 n.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 n.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 n.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,s.isIterable)(B))F=Promise.resolve(B);else{const V=(0,b.timeout)(800);V.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},$=>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,p.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,s.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(p.onUnexpectedError))}setChildren(N,P,x,F){const B=[...P];if(N.children.length===0&&B.length===0)return[];const V=new Map,$=new Map;for(const ie of N.children)if(V.set(ie.element,ie),this.identityProvider){const re=this.tree.isCollapsed(ie);$.set(ie.id,{node:ie,collapsed:re})}const M=[],Q=B.map(ie=>{const re=!!this.dataSource.hasChildren(ie);if(!this.identityProvider){const W=r({element:ie,parent:N,hasChildren:re});return re&&this.collapseByDefault&&!this.collapseByDefault(ie)&&(W.collapsedByDefault=!1,M.push(W)),W}const ne=this.identityProvider.getId(ie).toString(),se=$.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=re,x?se.collapsed?(W.children.forEach(q=>C(q,Z=>this.nodes.delete(Z.element))),W.children.splice(0,W.children.length),W.stale=!0):M.push(W):re&&this.collapseByDefault&&!this.collapseByDefault(ie)&&(W.collapsedByDefault=!1,M.push(W)),W}const H=r({element:ie,parent:N,id:ne,hasChildren:re});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?M.push(H):re&&this.collapseByDefault&&!this.collapseByDefault(ie)&&(H.collapsedByDefault=!1,M.push(H)),H});for(const ie of V.values())C(ie,re=>this.nodes.delete(re.element));for(const ie of Q)this.nodes.set(ie.element,ie);return N.children.splice(0,N.children.length,...Q),N!==this.root&&this.autoExpandSingleChildren&&Q.length===1&&M.length===0&&(Q[0].collapsedByDefault=!1,M.push(Q[0])),M}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=L;class D{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 D(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(A){const N=A&&m(A);return N&&Object.assign(Object.assign({},N),{keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},N.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(P){return A.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(P.map(x=>x.element))}})})}class O extends L{constructor(N,P,x,F,B,V,$={}){super(N,P,x,B,V,$),this.compressionDelegate=F,this.compressibleNodeMapper=new w.WeakMapper(M=>new D(M)),this.filter=$.filter}createTree(N,P,x,F,B){const V=new k.ComposedTreeDelegate(x),$=F.map(Q=>new I(Q,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),M=T(B)||{};return new E.CompressibleObjectTree(N,P,V,$,M)}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 q of W.element.elements)se.add(x(q.element))}return se},B=F(this.tree.getSelection()),V=F(this.tree.getFocus());super.render(N,P);const $=this.getSelection();let M=!1;const Q=this.getFocus();let ie=!1;const re=ne=>{const se=ne.element;if(se)for(let H=0;H<se.elements.length;H++){const W=x(se.elements[H].element),q=se.elements[se.elements.length-1].element;B.has(W)&&$.indexOf(q)===-1&&($.push(q),M=!0),V.has(W)&&Q.indexOf(q)===-1&&(Q.push(q),ie=!0)}ne.children.forEach(re)};re(this.tree.getCompressedTreeNode(N===this.root?null:N)),M&&this.setSelection($),ie&&this.setFocus(Q)}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(A){return typeof A=="boolean"?A?1:0:(0,y.isFilterResult)(A)?(0,y.getVisibleState)(A.visibility):(0,y.getVisibleState)(A)}}),define(X[302],ee([1,0,11,6,2,45,17,9]),function(K,e,_,k,y,E,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 p(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=p;class n{constructor(f,m,C,L){this.vsWorker=f,this.req=m,this.method=C,this.args=L,this.type=0}}class t{constructor(f,m,C,L){this.vsWorker=f,this.seq=m,this.res=C,this.err=L,this.type=1}}class i{constructor(f,m,C,L){this.vsWorker=f,this.req=m,this.eventName=C,this.arg=L,this.type=2}}class s{constructor(f,m,C){this.vsWorker=f,this.req=m,this.event=C,this.type=3}}class r{constructor(f,m){this.vsWorker=f,this.req=m,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,m){const C=String(++this._lastSentReq);return new Promise((L,D)=>{this._pendingReplies[C]={resolve:L,reject:D},this._send(new n(this._workerId,C,f,m))})}listen(f,m){let C=null;const L=new k.Emitter({onWillAddFirstListener:()=>{C=String(++this._lastSentReq),this._pendingEmitters.set(C,L),this._send(new i(this._workerId,C,f,m))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(C),this._send(new r(this._workerId,C)),C=null}});return L.event}handleMessage(f){!f||!f.vsWorker||this._workerId!==-1&&f.vsWorker!==this._workerId||this._handleMessage(f)}_handleMessage(f){switch(f.type){case 1:return this._handleReplyMessage(f);case 0:return this._handleRequestMessage(f);case 2:return this._handleSubscribeEventMessage(f);case 3:return this._handleEventMessage(f);case 4:return this._handleUnsubscribeEventMessage(f)}}_handleReplyMessage(f){if(!this._pendingReplies[f.seq]){console.warn("Got reply to unknown seq");return}const m=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),m.reject(C);return}m.resolve(f.res)}_handleRequestMessage(f){const m=f.req;this._handler.handleMessage(f.method,f.args).then(L=>{this._send(new t(this._workerId,m,L,void 0))},L=>{L.detail instanceof Error&&(L.detail=(0,_.transformErrorForSerialization)(L.detail)),this._send(new t(this._workerId,m,void 0,(0,_.transformErrorForSerialization)(L)))})}_handleSubscribeEventMessage(f){const m=f.req,C=this._handler.handleEvent(f.eventName,f.arg)(L=>{this._send(new s(this._workerId,m,L))});this._pendingEvents.set(m,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 m=[];if(f.type===0)for(let C=0;C<f.args.length;C++)f.args[C]instanceof ArrayBuffer&&m.push(f.args[C]);else f.type===1&&f.res instanceof ArrayBuffer&&m.push(f.res);this._handler.sendMessage(f,m)}}class h extends y.Disposable{constructor(f,m,C){super();let L=null;this._worker=this._register(f.create("vs/base/common/worker/simpleWorker",A=>{this._protocol.handleMessage(A)},A=>{L?.(A)})),this._protocol=new d({sendMessage:(A,N)=>{this._worker.postMessage(A,N)},handleMessage:(A,N)=>{if(typeof C[A]!="function")return Promise.reject(new Error("Missing method "+A+" on main thread host."));try{return Promise.resolve(C[A].apply(C,N))}catch(P){return Promise.reject(P)}},handleEvent:(A,N)=>{if(c(A)){const P=C[A].call(C,N);if(typeof P!="function")throw new Error(`Missing dynamic event ${A} on main thread host.`);return P}if(o(A)){const P=C[A];if(typeof P!="function")throw new Error(`Missing event ${A} on main thread host.`);return P}throw new Error(`Malformed event name ${A}`)}}),this._protocol.setWorkerId(this._worker.getId());let D=null;const I=globalThis.require;typeof I<"u"&&typeof I.getConfig=="function"?D=I.getConfig():typeof globalThis.requirejs<"u"&&(D=globalThis.requirejs.s.contexts._.config);const T=(0,E.getAllMethodNames)(C);this._onModuleLoaded=this._protocol.sendMessage(S,[this._worker.getId(),JSON.parse(JSON.stringify(D)),m,T]);const O=(A,N)=>this._request(A,N),R=(A,N)=>this._protocol.listen(A,N);this._lazyProxy=new Promise((A,N)=>{L=N,this._onModuleLoaded.then(P=>{A(l(P,O,R))},P=>{N(P),this._onError("Worker failed to load "+m,P)})})}getProxyObject(){return this._lazyProxy}_request(f,m){return new Promise((C,L)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(f,m).then(C,L)},L)})}_onError(f,m){console.error(f),console.info(m)}}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 l(v,f,m){const C=I=>function(){const T=Array.prototype.slice.call(arguments,0);return f(I,T)},L=I=>function(T){return m(I,T)},D={};for(const I of v){if(c(I)){D[I]=L(I);continue}if(o(I)){D[I]=m(I,void 0);continue}D[I]=C(I)}return D}class a{constructor(f,m){this._requestHandlerFactory=m,this._requestHandler=null,this._protocol=new d({sendMessage:(C,L)=>{f(C,L)},handleMessage:(C,L)=>this._handleMessage(C,L),handleEvent:(C,L)=>this._handleEvent(C,L)})}onmessage(f){this._protocol.handleMessage(f)}_handleMessage(f,m){if(f===S)return this.initialize(m[0],m[1],m[2],m[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,m))}catch(C){return Promise.reject(C)}}_handleEvent(f,m){if(!this._requestHandler)throw new Error("Missing requestHandler");if(c(f)){const C=this._requestHandler[f].call(this._requestHandler,m);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,m,C,L){this._protocol.setWorkerId(f);const T=l(L,(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,E.getAllMethodNames)(this._requestHandler))):(m&&(typeof m.baseUrl<"u"&&delete m.baseUrl,typeof m.paths<"u"&&typeof m.paths.vs<"u"&&delete m.paths.vs,typeof m.trustedTypesPolicy!==void 0&&delete m.trustedTypesPolicy,m.catchError=!0,globalThis.require.config(m)),new Promise((O,R)=>{(globalThis.require||K)([C],N=>{if(this._requestHandler=N.create(T),!this._requestHandler){R(new Error("No RequestHandler!"));return}O((0,E.getAllMethodNames)(this._requestHandler))},R)}))}}e.SimpleWorkerServer=a;function u(v){return new a(v,null)}e.create=u}),define(X[563],ee([1,0,48,302]),function(K,e,_,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const E=(y=window.trustedTypes)===null||y===void 0?void 0:y.createPolicy("defaultWorkerFactory",{createScriptURL:n=>n});function w(n){const t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",n);if(typeof t.getWorkerUrl=="function"){const i=t.getWorkerUrl("workerMain.js",n);return new Worker(E?E.createScriptURL(i):i,{name:n})}}if(typeof K=="function"){const i=K.toUrl("vs/base/worker/workerMain.js"),s=b(i,n);return new Worker(E?E.createScriptURL(s):s,{name:n})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function b(n,t){if(/^((http:)|(https:)|(file:))/.test(n)&&n.substring(0,globalThis.origin.length)!==globalThis.origin){const h="vs/base/worker/defaultWorkerFactory.js",o=K.toUrl(h).slice(0,-h.length),c=`/*${t}*/globalThis.MonacoEnvironment={baseUrl: '${o}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${n}') ?? '${n}');/*${t}*/`,l=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(l)}const i=n.lastIndexOf("?"),s=n.lastIndexOf("#",i),r=i>0?new URLSearchParams(n.substring(i+1,~s?s:void 0)):new URLSearchParams;return _.COI.addSearchParam(r,!0,!0),r.toString()?`${n}?${r.toString()}#${t}`:`${n}#${t}`}e.getWorkerBootstrapUrl=b;function S(n){return typeof n.then=="function"}class g{constructor(t,i,s,r,d){this.id=i;const h=w(s);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 s;(s=this.worker)===null||s===void 0||s.then(r=>r.postMessage(t,i))}dispose(){var t;(t=this.worker)===null||t===void 0||t.then(i=>i.terminate()),this.worker=null}}class p{constructor(t){this._label=t,this._webWorkerFailedBeforeError=!1}create(t,i,s){const r=++p.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new g(t,r,this._label||"anonymous"+r,i,d=>{(0,k.logOnceWebWorkerWarning)(d),this._webWorkerFailedBeforeError=d,s(d)})}}e.DefaultWorkerFactory=p,p.LAST_WORKER_ID=0}),define(X[564],ee([1,0,13,6,2,18]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var w;(function(p){p[p.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",p[p.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(w||(e.StorageHint=w={}));var b;(function(p){p[p.None=0]="None",p[p.Initialized=1]="Initialized",p[p.Closed=2]="Closed"})(b||(e.StorageState=b={}));class S extends y.Disposable{constructor(n,t=Object.create(null)){super(),this.database=n,this.options=t,this._onDidChangeStorage=this._register(new k.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=b.None,this.cache=new Map,this.flushDelayer=new _.ThrottledDelayer(S.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(n=>this.onDidChangeItemsExternal(n)))}onDidChangeItemsExternal(n){var t,i;(t=n.changed)===null||t===void 0||t.forEach((s,r)=>this.accept(r,s)),(i=n.deleted)===null||i===void 0||i.forEach(s=>this.accept(s,void 0))}accept(n,t){if(this.state===b.Closed)return;let i=!1;(0,E.isUndefinedOrNull)(t)?i=this.cache.delete(n):this.cache.get(n)!==t&&(this.cache.set(n,t),i=!0),i&&this._onDidChangeStorage.fire(n)}get(n,t){const i=this.cache.get(n);return(0,E.isUndefinedOrNull)(i)?t:i}getBoolean(n,t){const i=this.get(n);return(0,E.isUndefinedOrNull)(i)?t:i==="true"}getNumber(n,t){const i=this.get(n);return(0,E.isUndefinedOrNull)(i)?t:parseInt(i,10)}set(n,t){return we(this,void 0,void 0,function*(){if(this.state===b.Closed)return;if((0,E.isUndefinedOrNull)(t))return this.delete(n);const i=String(t);if(this.cache.get(n)!==i)return this.cache.set(n,i),this.pendingInserts.set(n,i),this.pendingDeletes.delete(n),this._onDidChangeStorage.fire(n),this.doFlush()})}delete(n){return we(this,void 0,void 0,function*(){if(!(this.state===b.Closed||!this.cache.delete(n)))return this.pendingDeletes.has(n)||this.pendingDeletes.add(n),this.pendingInserts.delete(n),this._onDidChangeStorage.fire(n),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return we(this,void 0,void 0,function*(){if(!this.hasPending)return;const n={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(n).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}doFlush(n){return we(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),n)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=S,S.DEFAULT_FLUSH_DELAY=100;class g{constructor(){this.onDidChangeItemsExternal=k.Event.None,this.items=new Map}updateItems(n){var t,i;return we(this,void 0,void 0,function*(){(t=n.insert)===null||t===void 0||t.forEach((s,r)=>this.items.set(r,s)),(i=n.delete)===null||i===void 0||i.forEach(s=>this.items.delete(s))})}}e.InMemoryStorageDatabase=g}),define(X[303],ee([1,0,2,6]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class y 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=y}),define(X[219],ee([1,0,6]),function(K,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(E){return E==="terminalFocus"?this._tabFocusTerminal:this._tabFocusEditor}setTabFocusMode(E,w){w==="terminalFocus"?this._tabFocusTerminal=E:this._tabFocusEditor=E,this._onDidChangeTabFocus.fire()}}e.TabFocus=new k}),define(X[220],ee([1,0,47,7,77,44,248,13,6,2,102,9,259,23]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var s;(function(l){l.Tap="-monaco-textarea-synthetic-tap"})(s||(e.TextAreaSyntethicEvents=s={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class r{constructor(){this._lastState=null}set(a,u){this._lastState={lastCopiedValue:a,data:u}}get(a){return this._lastState&&this._lastState.lastCopiedValue===a?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=r,r.INSTANCE=new r;class d{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(a){a=a||"";const u={text:a,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=a.length,u}}class h extends g.Disposable{get textAreaState(){return this._textAreaState}constructor(a,u,v,f){super(),this._host=a,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 m=null;this._register(this._textArea.onKeyDown(C=>{const L=new E.StandardKeyboardEvent(C);(L.keyCode===114||this._currentComposition&&L.keyCode===1)&&L.stopPropagation(),L.equals(9)&&L.preventDefault(),m=L,this._onKeyDown.fire(L)})),this._register(this._textArea.onKeyUp(C=>{const L=new E.StandardKeyboardEvent(C);this._onKeyUp.fire(L)})),this._register(this._textArea.onCompositionStart(C=>{t._debugComposition&&console.log("[compositionstart]",C);const L=new d;if(this._currentComposition){this._currentComposition=L;return}if(this._currentComposition=L,this._OS===2&&m&&m.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===C.data&&(m.code==="ArrowRight"||m.code==="ArrowLeft")){t._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",C),L.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 L=this._currentComposition;if(!L)return;if(this._browser.isAndroid){const I=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),T=t.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,I);this._textAreaState=I,this._onType.fire(T),this._onCompositionUpdate.fire(C);return}const D=L.handleCompositionUpdate(C.data);this._textAreaState=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(D),this._onCompositionUpdate.fire(C)})),this._register(this._textArea.onCompositionEnd(C=>{t._debugComposition&&console.log("[compositionend]",C);const L=this._currentComposition;if(!L)return;if(this._currentComposition=null,this._browser.isAndroid){const I=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),T=t.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,I);this._textAreaState=I,this._onType.fire(T),this._onCompositionEnd.fire();return}const D=L.handleCompositionUpdate(C.data);this._textAreaState=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(D),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 L=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),D=t.TextAreaState.deduceInput(this._textAreaState,L,this._OS===2);D.replacePrevCharCnt===0&&D.text.length===1&&(n.isHighSurrogate(D.text.charCodeAt(0))||D.text.charCodeAt(0)===127)||(this._textAreaState=L,(D.text!==""||D.replacePrevCharCnt!==0||D.replaceNextCharCnt!==0||D.positionDelta!==0)&&this._onType.fire(D))})),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[L,D]=o.getTextData(C.clipboardData);L&&(D=D||r.INSTANCE.get(L),this._onPaste.fire({text:L,metadata:D}))})),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 a=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-a;if(a=v,f<5)return;const m=v-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),m<100||!this._textAreaState.selection)return;const C=this._textArea.getValue();if(this._textAreaState.value!==C)return;const L=this._textArea.getSelectionStart(),D=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===L&&this._textAreaState.selectionEnd===D)return;const I=this._textAreaState.deduceEditorPosition(L),T=this._host.deduceModelPosition(I[0],I[1],I[2]),O=this._textAreaState.deduceEditorPosition(D),R=this._host.deduceModelPosition(O[0],O[1],O[2]),A=new i.Selection(T.lineNumber,T.column,R.lineNumber,R.column);this._onSelectionChangeRequest.fire(A)})}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(a){this._hasFocus!==a&&(this._hasFocus=a,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(a,u){this._hasFocus||(u=u.collapseSelection()),u.writeToTextArea(a,this._textArea,this._hasFocus),this._textAreaState=u}writeScreenReaderContent(a){this._currentComposition||this._setAndWriteTextAreaState(a,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(a){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,`
- `):u.text,v),a.preventDefault(),a.clipboardData&&o.setTextData(a.clipboardData,u.text,u.html,v)}}e.TextAreaInput=h;class o{static getTextData(a){const u=a.getData(p.Mimes.text);let v=null;const f=a.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&&a.files.length>0?[Array.prototype.slice.call(a.files,0).map(C=>C.name).join(`
- `),null]:[u,v]}static setTextData(a,u,v,f){a.setData(p.Mimes.text,u),typeof v=="string"&&a.setData("text/html",v),a.setData("vscode-editor-data",JSON.stringify(f))}}class c extends g.Disposable{constructor(a){super(),this._actual=a,this.onKeyDown=this._register(new y.DomEmitter(this._actual,"keydown")).event,this.onKeyUp=this._register(new y.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new y.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new y.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new y.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new y.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new y.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new y.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new y.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new y.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new y.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new y.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new 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,s.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const a=k.getShadowRoot(this._actual);return a?a.activeElement===this._actual:k.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(a){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(a,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(a,u,v){const f=this._actual;let m=null;const C=k.getShadowRoot(f);C?m=C.activeElement:m=document.activeElement;const L=m===f,D=f.selectionStart,I=f.selectionEnd;if(L&&D===u&&I===v){_.isFirefox&&window.parent!==window&&f.focus();return}if(L){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(X[565],ee([1,0,7,36,54]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class E extends y.ViewPart{constructor(t,i){super(t),this._viewDomNode=i,this._widgets={},this.domNode=(0,k.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,k.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].onConfigurationChanged(t);return!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLineMappingChanged(t){return this._updateAnchorsViewPositions(),!0}onLinesChanged(t){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(t){return this._updateAnchorsViewPositions(),!0}onLinesInserted(t){return this._updateAnchorsViewPositions(),!0}onScrollChanged(t){return!0}onZonesChanged(t){return!0}_updateAnchorsViewPositions(){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].updateAnchorViewPosition()}addWidget(t){const i=new w(this._context,this._viewDomNode,t);this._widgets[i.id]=i,i.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(i.domNode):this.domNode.appendChild(i.domNode),this.setShouldRender()}setWidgetPosition(t,i,s,r,d){this._widgets[t.getId()].setPosition(i,s,r,d),this.setShouldRender()}removeWidget(t){const i=t.getId();if(this._widgets.hasOwnProperty(i)){const s=this._widgets[i];delete this._widgets[i];const r=s.domNode.domNode;r.parentNode.removeChild(r),r.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(t){return this._widgets.hasOwnProperty(t)?this._widgets[t].suppressMouseDown:!1}onBeforeRender(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].onBeforeRender(t)}prepareRender(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].prepareRender(t)}render(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].render(t)}}e.ViewContentWidgets=E;class w{constructor(t,i,s){this._primaryAnchor=new b(null,null),this._secondaryAnchor=new b(null,null),this._context=t,this._viewDomNode=i,this._actual=s,this.domNode=(0,k.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const r=this._context.configuration.options,d=r.get(139);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(139)){const s=i.get(139);this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(t,i,s){this._affinity=t,this._primaryAnchor=r(i,this._context.viewModel,this._affinity),this._secondaryAnchor=r(s,this._context.viewModel,this._affinity);function r(d,h,o){if(!d)return new b(null,null);const c=h.model.validatePosition(d);if(h.coordinatesConverter.modelPositionIsVisible(c)){const l=h.coordinatesConverter.convertModelPositionToViewPosition(c,o??void 0);return new b(d,l)}return new b(d,null)}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(t,i,s,r){this._setPosition(r,t,i),this._preference=s,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(t,i,s,r){const d=t.top,h=d,o=t.top+t.height,c=r.viewportHeight-o,l=d-s,a=h>=s,u=o,v=c>=s;let f=t.left;return f+i>r.scrollLeft+r.viewportWidth&&(f=r.scrollLeft+r.viewportWidth-i),f<r.scrollLeft&&(f=r.scrollLeft),{fitsAbove:a,aboveTop:l,fitsBelow:v,belowTop:u,left:f}}_layoutHorizontalSegmentInPage(t,i,s,r){const o=Math.max(15,i.left-r),c=Math.min(i.left+i.width+r,t.width-15);let l=i.left+s-window.scrollX;if(l+r>c){const a=l-(c-r);l-=a,s-=a}if(l<o){const a=l-o;l-=a,s-=a}return[s,l]}_layoutBoxInPage(t,i,s,r){const d=t.top-s,h=t.top+t.height,o=_.getDomNodePagePosition(this._viewDomNode.domNode),c=o.top+d-window.scrollY,l=o.top+h-window.scrollY,a=_.getClientArea(document.body),[u,v]=this._layoutHorizontalSegmentInPage(a,o,t.left-r.scrollLeft+this._contentLeft,i),f=22,m=22,C=c>=f,L=l+s<=a.height-m;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(c,f),fitsBelow:L,belowTop:l,left:v}:{fitsAbove:C,aboveTop:d,fitsBelow:L,belowTop:h,left:u}}_prepareRenderWidgetAtExactPositionOverflowing(t){return new S(t.top,t.left+this._contentLeft)}_getAnchorsCoordinates(t){var i,s;const r=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),d=((i=this._secondaryAnchor.viewPosition)===null||i===void 0?void 0:i.lineNumber)===((s=this._primaryAnchor.viewPosition)===null||s===void 0?void 0:s.lineNumber)?this._secondaryAnchor.viewPosition:null,h=o(d,this._affinity,this._lineHeight);return{primary:r,secondary:h};function o(c,l,a){if(!c)return null;const u=t.visibleRangeForPosition(c);if(!u)return null;const v=c.column===1&&l===3?0:u.left,f=t.getVerticalOffsetForLineNumber(c.lineNumber)-t.scrollTop;return new g(f,v,a)}}_reduceAnchorCoordinates(t,i,s){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-s+r.typicalFullwidthCharacterWidth):d=Math.min(d,t.left+s-r.typicalFullwidthCharacterWidth),new g(t.top,d,t.height)}_prepareRenderWidget(t){if(!this._preference||this._preference.length===0)return null;const{primary:i,secondary:s}=this._getAnchorsCoordinates(t);if(!i)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let h=null;if(typeof this._actual.beforeRender=="function"&&(h=p(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,s,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"&&p(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"&&p(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,s){this.top=t,this.left=i,this.height=s,this._anchorCoordinateBrand=void 0}}function p(n,t,...i){try{return n.call(t,...i)}catch{return null}}}),define(X[566],ee([1,0,13,11,2]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class E extends y.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new y.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(b,S,g){this._editor=b,this._instantiationService=g;for(const p of S){if(this._pending.has(p.id)){(0,k.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${p.id}`));continue}this._pending.set(p.id,p)}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=E}),define(X[148],ee([1,0,6]),function(K,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(X[96],ee([1,0,9,17,132]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let E;function w(){return E||(E=new TextDecoder("UTF-16LE")),E}let b;function S(){return b||(b=new TextDecoder("UTF-16BE")),b}let g;function p(){return g||(g=k.isLittleEndian()?w():S()),g}e.getPlatformTextDecoder=p;function n(s,r,d){const h=new Uint16Array(s.buffer,r,d);return d>0&&(h[0]===65279||h[0]===65534)?t(s,r,d):w().decode(h)}e.decodeUTF16LE=n;function t(s,r,d){const h=[];let o=0;for(let c=0;c<d;c++){const l=y.readUInt16LE(s,r);r+=2,h[o++]=String.fromCharCode(l)}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 p().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(X[567],ee([1,0,96,9,75,106,268]),function(K,e,_,k,y,E,w){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const S=(b=window.trustedTypes)===null||b===void 0?void 0:b.createPolicy("domLineBreaksComputer",{createHTML:r=>r});class g{static create(){return new g}constructor(){}createLineBreaksComputer(d,h,o,c,l){const a=[],u=[];return{addRequest:(v,f,m)=>{a.push(v),u.push(f)},finalize:()=>p(a,d,h,o,c,l,u)}}}e.DOMLineBreaksComputerFactory=g;function p(r,d,h,o,c,l,a){var u;function v($){const M=a[$];if(M){const Q=E.LineInjectedText.applyInjectedText(r[$],M),ie=M.map(ne=>ne.options),re=M.map(ne=>ne.column-1);return new w.ModelLineProjectionData(re,ie,[Q.length],[],0)}else return null}if(o===-1){const $=[];for(let M=0,Q=r.length;M<Q;M++)$[M]=v(M);return $}const f=Math.round(o*d.typicalHalfwidthCharacterWidth),C=Math.round(h*(c===3?2:c===2?1:0)),L=Math.ceil(d.spaceWidth*C),D=document.createElement("div");(0,y.applyFontInfo)(D,d);const I=new _.StringBuilder(1e4),T=[],O=[],R=[],A=[],N=[];for(let $=0;$<r.length;$++){const M=E.LineInjectedText.applyInjectedText(r[$],a[$]);let Q=0,ie=0,re=f;if(c!==0)if(Q=k.firstNonWhitespaceIndex(M),Q===-1)Q=0;else{for(let W=0;W<Q;W++){const q=M.charCodeAt(W)===9?h-ie%h:1;ie+=q}const H=Math.ceil(d.spaceWidth*ie);H+d.typicalFullwidthCharacterWidth>f?(Q=0,ie=0):re=f-H}const ne=M.substr(Q),se=n(ne,ie,h,re,I,L);T[$]=Q,O[$]=ie,R[$]=ne,A[$]=se[0],N[$]=se[1]}const P=I.build(),x=(u=S?.createHTML(P))!==null&&u!==void 0?u:P;D.innerHTML=x,D.style.position="absolute",D.style.top="10000",l==="keepAll"?(D.style.wordBreak="keep-all",D.style.overflowWrap="anywhere"):(D.style.wordBreak="inherit",D.style.overflowWrap="break-word"),document.body.appendChild(D);const F=document.createRange(),B=Array.prototype.slice.call(D.children,0),V=[];for(let $=0;$<r.length;$++){const M=B[$],Q=t(F,M,R[$],A[$]);if(Q===null){V[$]=v($);continue}const ie=T[$],re=O[$]+C,ne=N[$],se=[];for(let Z=0,Y=Q.length;Z<Y;Z++)se[Z]=ne[Q[Z]];if(ie!==0)for(let Z=0,Y=Q.length;Z<Y;Z++)Q[Z]+=ie;let H,W;const q=a[$];q?(H=q.map(Z=>Z.options),W=q.map(Z=>Z.column-1)):(H=null,W=null),V[$]=new w.ModelLineProjectionData(W,H,Q,se,re)}return document.body.removeChild(D),V}function n(r,d,h,o,c,l){if(l!==0){const L=String(l);c.appendString('<div style="text-indent: -'),c.appendString(L),c.appendString("px; padding-left: "),c.appendString(L),c.appendString("px; box-sizing: border-box; width:")}else c.appendString('<div style="width:');c.appendString(String(o)),c.appendString('px;">');const a=r.length;let u=d,v=0;const f=[],m=[];let C=0<a?r.charCodeAt(0):0;c.appendString("<span>");for(let L=0;L<a;L++){L!==0&&L%16384===0&&c.appendString("</span><span>"),f[L]=v,m[L]=u;const D=C;C=L+1<a?r.charCodeAt(L+1):0;let I=1,T=1;switch(D){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(D)&&T++,D<32?c.appendCharCode(9216+D):c.appendCharCode(D)}v+=I,u+=T}return c.appendString("</span>"),f[r.length]=v,m[r.length]=u,c.appendString("</div>"),[f,m]}function t(r,d,h,o){if(h.length<=1)return null;const c=Array.prototype.slice.call(d.children,0),l=[];try{i(r,c,o,0,null,h.length-1,null,l)}catch(a){return console.log(a),null}return l.length===0?null:(l.push(h.length),l)}function i(r,d,h,o,c,l,a,u){if(o===l||(c=c||s(r,d,h[o],h[o+1]),a=a||s(r,d,h[l],h[l+1]),Math.abs(c[0].top-a[0].top)<=.1))return;if(o+1===l){u.push(l);return}const v=o+(l-o)/2|0,f=s(r,d,h[v],h[v+1]);i(r,d,h,o,c,v,f,u),i(r,d,h,v,f,l,a,u)}function s(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(X[221],ee([1,0,36,96]),function(K,e,_,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class E{constructor(g){this._createLine=g,this._set(1,[])}flush(){this._set(1,[])}_set(g,p){this._lines=p,this._rendLineNumberStart=g}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(g){const p=g-this._rendLineNumberStart;if(p<0||p>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[p]}onLinesDeleted(g,p){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),t=this.getEndLineNumber();if(p<n){const d=p-g+1;return this._rendLineNumberStart-=d,null}if(g>t)return null;let i=0,s=0;for(let d=n;d<=t;d++){const h=d-this._rendLineNumberStart;g<=d&&d<=p&&(s===0?(i=h,s=1):s++)}if(g<n){let d=0;p<n?d=p-g+1:d=n-g,this._rendLineNumberStart-=d}return this._lines.splice(i,s)}onLinesChanged(g,p){const n=g+p-1;if(this.getCount()===0)return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let s=!1;for(let r=g;r<=n;r++)r>=t&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(g,p){if(this.getCount()===0)return null;const n=p-g+1,t=this.getStartLineNumber(),i=this.getEndLineNumber();if(g<=t)return this._rendLineNumberStart+=n,null;if(g>i)return null;if(n+g>i)return this._lines.splice(g-this._rendLineNumberStart,i-g+1);const s=[];for(let c=0;c<n;c++)s[c]=this._createLine();const r=g-this._rendLineNumberStart,d=this._lines.slice(0,r),h=this._lines.slice(r,this._lines.length-n),o=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=d.concat(s).concat(h),o}onTokensChanged(g){if(this.getCount()===0)return!1;const p=this.getStartLineNumber(),n=this.getEndLineNumber();let t=!1;for(let i=0,s=g.length;i<s;i++){const r=g[i];if(r.toLineNumber<p||r.fromLineNumber>n)continue;const d=Math.max(p,r.fromLineNumber),h=Math.min(n,r.toLineNumber);for(let o=d;o<=h;o++){const c=o-this._rendLineNumberStart;this._lines[c].onTokensChanged(),t=!0}}return t}}e.RenderedLinesCollection=E;class w{constructor(g){this._host=g,this.domNode=this._createDomNode(),this._linesCollection=new E(()=>this._host.createVisibleLine())}_createDomNode(){const g=(0,_.createFastDomNode)(document.createElement("div"));return g.setClassName("view-layer"),g.setPosition("absolute"),g.domNode.setAttribute("role","presentation"),g.domNode.setAttribute("aria-hidden","true"),g}onConfigurationChanged(g){return!!g.hasChanged(139)}onFlushed(g){return this._linesCollection.flush(),!0}onLinesChanged(g){return this._linesCollection.onLinesChanged(g.fromLineNumber,g.count)}onLinesDeleted(g){const p=this._linesCollection.onLinesDeleted(g.fromLineNumber,g.toLineNumber);if(p)for(let n=0,t=p.length;n<t;n++){const i=p[n].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(g){const p=this._linesCollection.onLinesInserted(g.fromLineNumber,g.toLineNumber);if(p)for(let n=0,t=p.length;n<t;n++){const i=p[n].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(g){return g.scrollTopChanged}onTokensChanged(g){return this._linesCollection.onTokensChanged(g.ranges)}onZonesChanged(g){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(g){return this._linesCollection.getLine(g)}renderLines(g){const p=this._linesCollection._get(),n=new b(this.domNode.domNode,this._host,g),t={rendLineNumberStart:p.rendLineNumberStart,lines:p.lines,linesLength:p.lines.length},i=n.render(t,g.startLineNumber,g.endLineNumber,g.relativeVerticalOffset);this._linesCollection._set(i.rendLineNumberStart,i.lines)}}e.VisibleLinesCollection=w;class b{constructor(g,p,n){this.domNode=g,this.host=p,this.viewportData=n}render(g,p,n,t){const i={rendLineNumberStart:g.rendLineNumberStart,lines:g.lines.slice(0),linesLength:g.linesLength};if(i.rendLineNumberStart+i.linesLength-1<p||n<i.rendLineNumberStart){i.rendLineNumberStart=p,i.linesLength=n-p+1,i.lines=[];for(let s=p;s<=n;s++)i.lines[s-p]=this.host.createVisibleLine();return this._finishRendering(i,!0,t),i}if(this._renderUntouchedLines(i,Math.max(p-i.rendLineNumberStart,0),Math.min(n-i.rendLineNumberStart,i.linesLength-1),t,p),i.rendLineNumberStart>p){const s=p,r=Math.min(n,i.rendLineNumberStart-1);s<=r&&(this._insertLinesBefore(i,s,r,t,p),i.linesLength+=r-s+1)}else if(i.rendLineNumberStart<p){const s=Math.min(i.linesLength,p-i.rendLineNumberStart);s>0&&(this._removeLinesBefore(i,s),i.linesLength-=s)}if(i.rendLineNumberStart=p,i.rendLineNumberStart+i.linesLength-1<n){const s=i.rendLineNumberStart+i.linesLength,r=n;s<=r&&(this._insertLinesAfter(i,s,r,t,p),i.linesLength+=r-s+1)}else if(i.rendLineNumberStart+i.linesLength-1>n){const s=Math.max(0,n-i.rendLineNumberStart+1),d=i.linesLength-1-s+1;d>0&&(this._removeLinesAfter(i,d),i.linesLength-=d)}return this._finishRendering(i,!1,t),i}_renderUntouchedLines(g,p,n,t,i){const s=g.rendLineNumberStart,r=g.lines;for(let d=p;d<=n;d++){const h=s+d;r[d].layoutLine(h,t[h-i])}}_insertLinesBefore(g,p,n,t,i){const s=[];let r=0;for(let d=p;d<=n;d++)s[r++]=this.host.createVisibleLine();g.lines=s.concat(g.lines)}_removeLinesBefore(g,p){for(let n=0;n<p;n++){const t=g.lines[n].getDomNode();t&&this.domNode.removeChild(t)}g.lines.splice(0,p)}_insertLinesAfter(g,p,n,t,i){const s=[];let r=0;for(let d=p;d<=n;d++)s[r++]=this.host.createVisibleLine();g.lines=g.lines.concat(s)}_removeLinesAfter(g,p){const n=g.linesLength-p;for(let t=0;t<p;t++){const i=g.lines[n+t].getDomNode();i&&this.domNode.removeChild(i)}g.lines.splice(n,p)}_finishRenderingNewLines(g,p,n,t){b._ttPolicy&&(n=b._ttPolicy.createHTML(n));const i=this.domNode.lastChild;p||!i?this.domNode.innerHTML=n:i.insertAdjacentHTML("afterend",n);let s=this.domNode.lastChild;for(let r=g.linesLength-1;r>=0;r--){const d=g.lines[r];t[r]&&(d.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(g,p,n){const t=document.createElement("div");b._ttPolicy&&(p=b._ttPolicy.createHTML(p)),t.innerHTML=p;for(let i=0;i<g.linesLength;i++){const s=g.lines[i];if(n[i]){const r=t.firstChild,d=s.getDomNode();d.parentNode.replaceChild(r,d),s.setDomNode(r)}}}_finishRendering(g,p,n){const t=b._sb,i=g.linesLength,s=g.lines,r=g.rendLineNumberStart,d=[];{t.reset();let h=!1;for(let o=0;o<i;o++){const c=s[o];d[o]=!1,!(c.getDomNode()||!c.renderLine(o+r,n[o],this.viewportData,t))&&(d[o]=!0,h=!0)}h&&this._finishRenderingNewLines(g,p,t.build(),d)}{t.reset();let h=!1;const o=[];for(let c=0;c<i;c++){const l=s[c];o[c]=!1,!(d[c]||!l.renderLine(c+r,n[c],this.viewportData,t))&&(o[c]=!0,h=!0)}h&&this._finishRenderingInvalidLines(g,t.build(),o)}}}b._ttPolicy=(y=window.trustedTypes)===null||y===void 0?void 0:y.createPolicy("editorViewLayer",{createHTML:S=>S}),b._sb=new k.StringBuilder(1e5)}),define(X[568],ee([1,0,36,75,221,54]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class w extends E.ViewPart{constructor(n){super(n),this._visibleLines=new y.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration.options.get(48);(0,k.applyFontInfo)(this.domNode,i),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let n=0,t=this._dynamicOverlays.length;n<t;n++)if(this._dynamicOverlays[n].shouldRender())return!0;return!1}dispose(){super.dispose();for(let n=0,t=this._dynamicOverlays.length;n<t;n++)this._dynamicOverlays[n].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new b(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(n){this._dynamicOverlays.push(n)}onConfigurationChanged(n){this._visibleLines.onConfigurationChanged(n);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let d=t;d<=i;d++)this._visibleLines.getVisibleLine(d).onConfigurationChanged(n);const r=this._context.configuration.options.get(48);return(0,k.applyFontInfo)(this.domNode,r),!0}onFlushed(n){return this._visibleLines.onFlushed(n)}onFocusChanged(n){return this._isFocused=n.isFocused,!0}onLinesChanged(n){return this._visibleLines.onLinesChanged(n)}onLinesDeleted(n){return this._visibleLines.onLinesDeleted(n)}onLinesInserted(n){return this._visibleLines.onLinesInserted(n)}onScrollChanged(n){return this._visibleLines.onScrollChanged(n)||!0}onTokensChanged(n){return this._visibleLines.onTokensChanged(n)}onZonesChanged(n){return this._visibleLines.onZonesChanged(n)}prepareRender(n){const t=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,s=t.length;i<s;i++){const r=t[i];r.prepareRender(n),r.onDidRender()}}render(n){this._viewOverlaysRender(n),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(n){this._visibleLines.renderLines(n.viewportData)}}e.ViewOverlays=w;class b{constructor(n,t){this._configuration=n,this._lineHeight=this._configuration.options.get(64),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(n){this._domNode=(0,_.createFastDomNode)(n)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(n){this._lineHeight=this._configuration.options.get(64)}renderLine(n,t,i,s){let r="";for(let d=0,h=this._dynamicOverlays.length;d<h;d++){const o=this._dynamicOverlays[d];r+=o.render(i.startLineNumber,n)}return this._renderedContent===r?!1:(this._renderedContent=r,s.appendString('<div style="position:absolute;top:'),s.appendString(String(t)),s.appendString("px;width:100%;height:"),s.appendString(String(this._lineHeight)),s.appendString('px;">'),s.appendString(r),s.appendString("</div>"),!0)}layoutLine(n,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=b;class S extends w{constructor(n){super(n);const i=this._context.configuration.options.get(139);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(n){const i=this._context.configuration.options.get(139);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(n)||!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollWidthChanged}_viewOverlaysRender(n){super._viewOverlaysRender(n),this.domNode.setWidth(Math.max(n.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=S;class g extends w{constructor(n){super(n);const t=this._context.configuration.options,i=t.get(139);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,k.applyFontInfo)(this.domNode,t.get(48))}onConfigurationChanged(n){const t=this._context.configuration.options;(0,k.applyFontInfo)(this.domNode,t.get(48));const i=t.get(139);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(n)||!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollHeightChanged}_viewOverlaysRender(n){super._viewOverlaysRender(n);const t=Math.min(n.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=g}),define(X[304],ee([1,0,132,96]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function y(S){return S.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class E{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,p,n,t){this.oldPosition=g,this.oldText=p,this.newPosition=n,this.newText=t}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${y(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${y(this.oldText)}")`:`(replace@${this.oldPosition} "${y(this.oldText)}" with "${y(this.newText)}")`}static _writeStringSize(g){return 4+2*g.length}static _writeString(g,p,n){const t=p.length;_.writeUInt32BE(g,t,n),n+=4;for(let i=0;i<t;i++)_.writeUInt16LE(g,p.charCodeAt(i),n),n+=2;return n}static _readString(g,p){const n=_.readUInt32BE(g,p);return p+=4,(0,k.decodeUTF16LE)(g,p,n)}writeSize(){return 4+4+E._writeStringSize(this.oldText)+E._writeStringSize(this.newText)}write(g,p){return _.writeUInt32BE(g,this.oldPosition,p),p+=4,_.writeUInt32BE(g,this.newPosition,p),p+=4,p=E._writeString(g,this.oldText,p),p=E._writeString(g,this.newText,p),p}static read(g,p,n){const t=_.readUInt32BE(g,p);p+=4;const i=_.readUInt32BE(g,p);p+=4;const s=E._readString(g,p);p+=E._writeStringSize(s);const r=E._readString(g,p);return p+=E._writeStringSize(r),n.push(new E(t,s,i,r)),p}}e.TextChange=E;function w(S,g){return S===null||S.length===0?g:new b(S,g).compress()}e.compressConsecutiveTextChanges=w;class b{constructor(g,p){this._prevEdits=g,this._currEdits=p,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let g=0,p=0,n=this._getPrev(g),t=this._getCurr(p);for(;g<this._prevLen||p<this._currLen;){if(n===null){this._acceptCurr(t),t=this._getCurr(++p);continue}if(t===null){this._acceptPrev(n),n=this._getPrev(++g);continue}if(t.oldEnd<=n.newPosition){this._acceptCurr(t),t=this._getCurr(++p);continue}if(n.newEnd<=t.oldPosition){this._acceptPrev(n),n=this._getPrev(++g);continue}if(t.oldPosition<n.newPosition){const[h,o]=b._splitCurr(t,n.newPosition-t.oldPosition);this._acceptCurr(h),t=o;continue}if(n.newPosition<t.oldPosition){const[h,o]=b._splitPrev(n,t.oldPosition-n.newPosition);this._acceptPrev(h),n=o;continue}let r,d;if(t.oldEnd===n.newEnd)r=n,d=t,n=this._getPrev(++g),t=this._getCurr(++p);else if(t.oldEnd<n.newEnd){const[h,o]=b._splitPrev(n,t.oldLength);r=h,d=t,n=o,t=this._getCurr(++p)}else{const[h,o]=b._splitCurr(t,n.newLength);r=n,d=h,n=this._getPrev(++g),t=o}this._result[this._resultLen++]=new E(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,p){return new E(p.oldPosition-g,p.oldText,p.newPosition,p.newText)}static _rebasePrev(g,p){return new E(p.oldPosition,p.oldText,p.newPosition+g,p.newText)}static _splitPrev(g,p){const n=g.newText.substr(0,p),t=g.newText.substr(p);return[new E(g.oldPosition,g.oldText,g.newPosition,n),new E(g.oldEnd,"",g.newPosition+p,t)]}static _splitCurr(g,p){const n=g.oldText.substr(0,p),t=g.oldText.substr(p);return[new E(g.oldPosition,n,g.newPosition,g.newText),new E(g.oldPosition+p,t,g.newEnd,"")]}static _merge(g){if(g.length===0)return g;const p=[];let n=0,t=g[0];for(let i=1;i<g.length;i++){const s=g[i];t.oldEnd===s.oldPosition?t=new E(t.oldPosition,t.oldText+s.oldText,t.newPosition,t.newText+s.newText):(p[n++]=t,t=s)}return p[n++]=t,p}static _removeNoOps(g){if(g.length===0)return g;const p=[];let n=0;for(let t=0;t<g.length;t++){const i=g[t];i.oldText!==i.newText&&(p[n++]=i)}return p}}}),define(X[569],ee([1,0,286,88]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function y(E,w,b,S,g,p){if(Array.isArray(E)){let n=0;for(const t of E){const i=y(t,w,b,S,g,p);if(i===10)return i;i>n&&(n=i)}return n}else{if(typeof E=="string")return S?E==="*"?5:E===b?10:0:0;if(E){const{language:n,pattern:t,scheme:i,hasAccessToAllModels:s,notebookType:r}=E;if(!S&&!s)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(n)if(n===b)d=10;else if(n==="*")d=Math.max(d,5);else return 0;if(r)if(r===p)d=10;else if(r==="*"&&p!==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=y}),define(X[570],ee([1,0,6,2,46,569]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function w(p){return typeof p=="string"?!1:Array.isArray(p)?p.every(w):!!p.exclusive}class b{constructor(n,t,i,s){this.uri=n,this.languageId=t,this.notebookUri=i,this.notebookType=s}equals(n){var t,i;return this.notebookType===n.notebookType&&this.languageId===n.languageId&&this.uri.toString()===n.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((i=n.notebookUri)===null||i===void 0?void 0:i.toString())}}class S{constructor(n){this._notebookInfoResolver=n,this._clock=0,this._entries=[],this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event}register(n,t){let i={selector:n,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 s=this._entries.indexOf(i);s>=0&&(this._entries.splice(s,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(n){return this.all(n).length>0}all(n){if(!n)return[];this._updateScores(n);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(n){const t=[];return this._orderedForEach(n,i=>t.push(i.provider)),t}orderedGroups(n){const t=[];let i,s;return this._orderedForEach(n,r=>{i&&s===r._score?i.push(r.provider):(s=r._score,i=[r.provider],t.push(i))}),t}_orderedForEach(n,t){this._updateScores(n);for(const i of this._entries)i._score>0&&t(i)}_updateScores(n){var t,i;const s=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,n.uri),r=s?new b(n.uri,n.getLanguageId(),s.uri,s.type):new b(n.uri,n.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,E.score)(d.selector,r.uri,r.languageId,(0,y.shouldSynchronizeModel)(n),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(n,t){return n._score<t._score?1:n._score>t._score?-1:g(n.selector)&&!g(t.selector)?1:!g(n.selector)&&g(t.selector)?-1:n._time<t._time?1:n._time>t._time?-1:0}}e.LanguageFeatureRegistry=S;function g(p){return typeof p=="string"?!1:Array.isArray(p)?p.some(g):!!p.isBuiltin}}),define(X[222],ee([1,0,9,96,5]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class E{constructor(l,a,u,v,f,m){this._richEditBracketBrand=void 0,this.languageId=l,this.index=a,this.open=u,this.close=v,this.forwardRegex=f,this.reversedRegex=m,this._openSet=E._toSet(this.open),this._closeSet=E._toSet(this.close)}isOpen(l){return this._openSet.has(l)}isClose(l){return this._closeSet.has(l)}static _toSet(l){const a=new Set;for(const u of l)a.add(u);return a}}e.RichEditBracket=E;function w(c){const l=c.length;c=c.map(m=>[m[0].toLowerCase(),m[1].toLowerCase()]);const a=[];for(let m=0;m<l;m++)a[m]=m;const u=(m,C)=>{const[L,D]=m,[I,T]=C;return L===I||L===T||D===I||D===T},v=(m,C)=>{const L=Math.min(m,C),D=Math.max(m,C);for(let I=0;I<l;I++)a[I]===D&&(a[I]=L)};for(let m=0;m<l;m++){const C=c[m];for(let L=m+1;L<l;L++){const D=c[L];u(C,D)&&v(a[m],a[L])}}const f=[];for(let m=0;m<l;m++){const C=[],L=[];for(let D=0;D<l;D++)if(a[D]===m){const[I,T]=c[D];C.push(I),L.push(T)}C.length>0&&f.push({open:C,close:L})}return f}class b{constructor(l,a){this._richEditBracketsBrand=void 0;const u=w(a);this.brackets=u.map((v,f)=>new E(l,f,v.open,v.close,n(v.open,v.close,u,f),t(v.open,v.close,u,f))),this.forwardRegex=i(this.brackets),this.reversedRegex=s(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,l,a,u){for(let v=0,f=l.length;v<f;v++){if(v===a)continue;const m=l[v];for(const C of m.open)C.indexOf(c)>=0&&u.push(C);for(const C of m.close)C.indexOf(c)>=0&&u.push(C)}}function g(c,l){return c.length-l.length}function p(c){if(c.length<=1)return c;const l=[],a=new Set;for(const u of c)a.has(u)||(l.push(u),a.add(u));return l}function n(c,l,a,u){let v=[];v=v.concat(c),v=v.concat(l);for(let f=0,m=v.length;f<m;f++)S(v[f],a,u,v);return v=p(v),v.sort(g),v.reverse(),d(v)}function t(c,l,a,u){let v=[];v=v.concat(c),v=v.concat(l);for(let f=0,m=v.length;f<m;f++)S(v[f],a,u,v);return v=p(v),v.sort(g),v.reverse(),d(v.map(h))}function i(c){let l=[];for(const a of c){for(const u of a.open)l.push(u);for(const u of a.close)l.push(u)}return l=p(l),d(l)}function s(c){let l=[];for(const a of c){for(const u of a.open)l.push(u);for(const u of a.close)l.push(u)}return l=p(l),d(l.map(h))}function r(c){const l=/^[\w ]+$/.test(c);return c=_.escapeRegExpCharacters(c),l?`\\b${c}\\b`:c}function d(c){const l=`(${c.map(r).join(")|(")})`;return _.createRegExp(l,!0)}const h=function(){function c(u){const v=new Uint16Array(u.length);let f=0;for(let m=u.length-1;m>=0;m--)v[f++]=u.charCodeAt(m);return k.getPlatformTextDecoder().decode(v)}let l=null,a=null;return function(v){return l!==v&&(l=v,a=c(l)),a}}();class o{static _findPrevBracketInText(l,a,u,v){const f=u.match(l);if(!f)return null;const m=u.length-(f.index||0),C=f[0].length,L=v+m;return new y.Range(a,L-C+1,a,L+1)}static findPrevBracketInRange(l,a,u,v,f){const C=h(u).substring(u.length-f,u.length-v);return this._findPrevBracketInText(l,a,C,v)}static findNextBracketInText(l,a,u,v){const f=u.match(l);if(!f)return null;const m=f.index||0,C=f[0].length;if(C===0)return null;const L=v+m;return new y.Range(a,L+1,a,L+1+C)}static findNextBracketInRange(l,a,u,v,f){const m=u.substring(v,f);return this.findNextBracketInText(l,a,m,v)}}e.BracketsUtils=o}),define(X[571],ee([1,0,16,121,222]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class E{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 p=g.charAt(g.length-1);b.push(p)}return(0,_.distinct)(b)}onElectricCharacter(b,S,g){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const p=S.findTokenIndexAtOffset(g-1);if((0,k.ignoreBracketsInToken)(S.getStandardTokenType(p)))return null;const n=this._richEditBrackets.reversedRegex,t=S.getLineContent().substring(0,g-1)+b,i=y.BracketsUtils.findPrevBracketInRange(n,1,t,0,t.length);if(!i)return null;const s=t.substring(i.startColumn-1,i.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;const d=S.getActualLineContentBefore(i.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:s}:null}}e.BracketElectricCharacterSupport=E}),define(X[572],ee([1,0,6,2,5,495,196,264,86,263,122,197,16,486]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class s extends k.Disposable{didLanguageChange(a){return this.brackets.didLanguageChange(a)}constructor(a,u){if(super(),this.textModel=a,this.getLanguageConfiguration=u,this.didChangeEmitter=new _.Emitter,this.denseKeyProvider=new p.DenseKeyProvider,this.brackets=new b.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 v=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),f=new n.FastTokenizer(this.textModel.getValue(),v);this.initialAstWithoutTokens=(0,g.parseDocument)(f,[],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 u=a.map(v=>new w.TextEditInfo((0,S.toLength)(v.fromLineNumber-1,0),(0,S.toLength)(v.toLineNumber,0),(0,S.toLength)(v.toLineNumber-v.fromLineNumber+1,0)));this.handleEdits(u,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(a){const u=a.changes.map(v=>{const f=y.Range.lift(v.range);return new w.TextEditInfo((0,S.positionToLength)(f.getStartPosition()),(0,S.positionToLength)(f.getEndPosition()),(0,S.lengthOfString)(v.text))}).reverse();this.handleEdits(u,!1)}handleEdits(a,u){const v=(0,i.combineTextEditInfos)(this.queuedTextEdits,a);this.queuedTextEdits=v,this.initialAstWithoutTokens&&!u&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,i.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,u,v){const m=u,C=new n.TextBufferTokenizer(this.textModel,this.brackets);return(0,g.parseDocument)(C,a,m,v)}getBracketsInRange(a,u){this.flushQueue();const v=(0,S.toLength)(a.startLineNumber-1,a.startColumn-1),f=(0,S.toLength)(a.endLineNumber-1,a.endColumn-1);return new t.CallbackIterable(m=>{const C=this.initialAstWithoutTokens||this.astWithTokens;h(C,S.lengthZero,C.length,v,f,m,0,0,new Map,u)})}getBracketPairsInRange(a,u){this.flushQueue();const v=(0,S.positionToLength)(a.getStartPosition()),f=(0,S.positionToLength)(a.getEndPosition());return new t.CallbackIterable(m=>{const C=this.initialAstWithoutTokens||this.astWithTokens,L=new o(m,u,this.textModel);c(C,S.lengthZero,C.length,v,f,L,0,new Map)})}getFirstBracketAfter(a){this.flushQueue();const u=this.initialAstWithoutTokens||this.astWithTokens;return d(u,S.lengthZero,u.length,(0,S.positionToLength)(a))}getFirstBracketBefore(a){this.flushQueue();const u=this.initialAstWithoutTokens||this.astWithTokens;return r(u,S.lengthZero,u.length,(0,S.positionToLength)(a))}}e.BracketPairsTree=s;function r(l,a,u,v){if(l.kind===4||l.kind===2){const f=[];for(const m of l.children)u=(0,S.lengthAdd)(a,m.length),f.push({nodeOffsetStart:a,nodeOffsetEnd:u}),a=u;for(let m=f.length-1;m>=0;m--){const{nodeOffsetStart:C,nodeOffsetEnd:L}=f[m];if((0,S.lengthLessThan)(C,v)){const D=r(l.children[m],C,L,v);if(D)return D}}return null}else{if(l.kind===3)return null;if(l.kind===1){const f=(0,S.lengthsToRange)(a,u);return{bracketInfo:l.bracketInfo,range:f}}}return null}function d(l,a,u,v){if(l.kind===4||l.kind===2){for(const f of l.children){if(u=(0,S.lengthAdd)(a,f.length),(0,S.lengthLessThan)(v,u)){const m=d(f,a,u,v);if(m)return m}a=u}return null}else{if(l.kind===3)return null;if(l.kind===1){const f=(0,S.lengthsToRange)(a,u);return{bracketInfo:l.bracketInfo,range:f}}}return null}function h(l,a,u,v,f,m,C,L,D,I,T=!1){if(C>200)return!0;e:for(;;)switch(l.kind){case 4:{const O=l.childrenLength;for(let R=0;R<O;R++){const A=l.getChild(R);if(A){if(u=(0,S.lengthAdd)(a,A.length),(0,S.lengthLessThanEqual)(a,f)&&(0,S.lengthGreaterThanEqual)(u,v)){if((0,S.lengthGreaterThanEqual)(u,f)){l=A;continue e}if(!h(A,a,u,v,f,m,C,0,D,I))return!1}a=u}}return!0}case 2:{const O=!I||!l.closingBracket||l.closingBracket.bracketInfo.closesColorized(l.openingBracket.bracketInfo);let R=0;if(D){let N=D.get(l.openingBracket.text);N===void 0&&(N=0),R=N,O&&(N++,D.set(l.openingBracket.text,N))}const A=l.childrenLength;for(let N=0;N<A;N++){const P=l.getChild(N);if(P){if(u=(0,S.lengthAdd)(a,P.length),(0,S.lengthLessThanEqual)(a,f)&&(0,S.lengthGreaterThanEqual)(u,v)){if((0,S.lengthGreaterThanEqual)(u,f)&&P.kind!==1){l=P,O?(C++,L=R+1):L=R;continue e}if((O||P.kind!==1||!l.closingBracket)&&!h(P,a,u,v,f,m,O?C+1:C,O?R+1:R,D,I,!l.closingBracket))return!1}a=u}}return D?.set(l.openingBracket.text,R),!0}case 3:{const O=(0,S.lengthsToRange)(a,u);return m(new E.BracketInfo(O,C-1,0,!0))}case 1:{const O=(0,S.lengthsToRange)(a,u);return m(new E.BracketInfo(O,C-1,L-1,T))}case 0:return!0}}class o{constructor(a,u,v){this.push=a,this.includeMinIndentation=u,this.textModel=v}}function c(l,a,u,v,f,m,C,L){var D;if(C>200)return!0;let I=!0;if(l.kind===2){let T=0;if(L){let A=L.get(l.openingBracket.text);A===void 0&&(A=0),T=A,A++,L.set(l.openingBracket.text,A)}const O=(0,S.lengthAdd)(a,l.openingBracket.length);let R=-1;if(m.includeMinIndentation&&(R=l.computeMinIndentation(a,m.textModel)),I=m.push(new E.BracketPairWithMinIndentationInfo((0,S.lengthsToRange)(a,u),(0,S.lengthsToRange)(a,O),l.closingBracket?(0,S.lengthsToRange)((0,S.lengthAdd)(O,((D=l.child)===null||D===void 0?void 0:D.length)||S.lengthZero),u):void 0,C,T,l,R)),a=O,I&&l.child){const A=l.child;if(u=(0,S.lengthAdd)(a,A.length),(0,S.lengthLessThanEqual)(a,f)&&(0,S.lengthGreaterThanEqual)(u,v)&&(I=c(A,a,u,v,f,m,C+1,L),!I))return!1}L?.set(l.openingBracket.text,T)}else{let T=a;for(const O of l.children){const R=T;if(T=(0,S.lengthAdd)(T,O.length),(0,S.lengthLessThanEqual)(R,f)&&(0,S.lengthLessThanEqual)(v,T)&&(I=c(O,R,T,v,f,m,C,L),!I))return!1}}return I}}),define(X[573],ee([1,0,16,6,2,5,121,222,572]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class g extends y.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(r,d){super(),this.textModel=r,this.languageConfigurationService=d,this.bracketPairsTree=this._register(new y.MutableDisposable),this.onDidChangeEmitter=new k.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(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 y.DisposableStore;this.bracketPairsTree.value=p(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 l=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew.getClosingBracketInfo(r);if(!l)return null;const a=this.getBracketPairsInRange(E.Range.fromPositions(d,d)).findLast(u=>l.closes(u.openingBracketInfo));return a?a.openingBracketRange:null}else{const l=r.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(c).brackets;if(!a)return null;const u=a.textIsBracket[l];return u?i(this._findMatchingBracketUp(u,o,n(h))):null}}matchBracket(r,d){if(this.canBuildAST){const h=this.getBracketPairsInRange(E.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,E.Range.compareRangesUsingStarts));return h?[h.openingBracketRange,h.closingBracketRange]:null}else{const h=n(d);return this._matchBracket(this.textModel.validatePosition(r),h)}}_establishBracketSearchOffsets(r,d,h,o){const c=d.getCount(),l=d.getLanguageId(o);let a=Math.max(0,r.column-1-h.maxBracketLength);for(let v=o-1;v>=0;v--){const f=d.getEndOffset(v);if(f<=a)break;if((0,w.ignoreBracketsInToken)(d.getStandardTokenType(v))||d.getLanguageId(v)!==l){a=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)!==l){u=f;break}}return{searchStartOffset:a,searchEndOffset:u}}_matchBracket(r,d){const h=r.lineNumber,o=this.textModel.tokenization.getLineTokens(h),c=this.textModel.getLineContent(h),l=o.findTokenIndexAtOffset(r.column-1);if(l<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(l)).brackets;if(a&&!(0,w.ignoreBracketsInToken)(o.getStandardTokenType(l))){let{searchStartOffset:u,searchEndOffset:v}=this._establishBracketSearchOffsets(r,o,a,l),f=null;for(;;){const m=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,h,c,u,v);if(!m)break;if(m.startColumn<=r.column&&r.column<=m.endColumn){const C=c.substring(m.startColumn-1,m.endColumn-1).toLowerCase(),L=this._matchFoundBracket(m,a.textIsBracket[C],a.textIsOpenBracket[C],d);if(L){if(L instanceof t)return null;f=L}}u=m.endColumn-1}if(f)return f}if(l>0&&o.getStartOffset(l)===r.column-1){const u=l-1,v=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(u)).brackets;if(v&&!(0,w.ignoreBracketsInToken)(o.getStandardTokenType(u))){const{searchStartOffset:f,searchEndOffset:m}=this._establishBracketSearchOffsets(r,o,v,u),C=b.BracketsUtils.findPrevBracketInRange(v.reversedRegex,h,c,f,m);if(C&&C.startColumn<=r.column&&r.column<=C.endColumn){const L=c.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),D=this._matchFoundBracket(C,v.textIsBracket[L],v.textIsOpenBracket[L],d);if(D)return D instanceof t?null:D}}}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 l=-1,a=0;const u=(v,f,m,C)=>{for(;;){if(h&&++a%100===0&&!h())return t.INSTANCE;const L=b.BracketsUtils.findPrevBracketInRange(c,v,f,m,C);if(!L)break;const D=f.substring(L.startColumn-1,L.endColumn-1).toLowerCase();if(r.isOpen(D)?l++:r.isClose(D)&&l--,l===0)return L;C=L.startColumn-1}return null};for(let v=d.lineNumber;v>=1;v--){const f=this.textModel.tokenization.getLineTokens(v),m=f.getCount(),C=this.textModel.getLineContent(v);let L=m-1,D=C.length,I=C.length;v===d.lineNumber&&(L=f.findTokenIndexAtOffset(d.column-1),D=d.column-1,I=d.column-1);let T=!0;for(;L>=0;L--){const O=f.getLanguageId(L)===o&&!(0,w.ignoreBracketsInToken)(f.getStandardTokenType(L));if(O)T?D=f.getStartOffset(L):(D=f.getStartOffset(L),I=f.getEndOffset(L));else if(T&&D!==I){const R=u(v,C,D,I);if(R)return R}T=O}if(T&&D!==I){const O=u(v,C,D,I);if(O)return O}}return null}_findMatchingBracketDown(r,d,h){const o=r.languageId,c=r.forwardRegex;let l=1,a=0;const u=(f,m,C,L)=>{for(;;){if(h&&++a%100===0&&!h())return t.INSTANCE;const D=b.BracketsUtils.findNextBracketInRange(c,f,m,C,L);if(!D)break;const I=m.substring(D.startColumn-1,D.endColumn-1).toLowerCase();if(r.isOpen(I)?l++:r.isClose(I)&&l--,l===0)return D;C=D.endColumn-1}return null},v=this.textModel.getLineCount();for(let f=d.lineNumber;f<=v;f++){const m=this.textModel.tokenization.getLineTokens(f),C=m.getCount(),L=this.textModel.getLineContent(f);let D=0,I=0,T=0;f===d.lineNumber&&(D=m.findTokenIndexAtOffset(d.column-1),I=d.column-1,T=d.column-1);let O=!0;for(;D<C;D++){const R=m.getLanguageId(D)===o&&!(0,w.ignoreBracketsInToken)(m.getStandardTokenType(D));if(R)O||(I=m.getStartOffset(D)),T=m.getEndOffset(D);else if(O&&I!==T){const A=u(f,L,I,T);if(A)return A}O=R}if(O&&I!==T){const R=u(f,L,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,l=null;for(let a=h.lineNumber;a>=1;a--){const u=this.textModel.tokenization.getLineTokens(a),v=u.getCount(),f=this.textModel.getLineContent(a);let m=v-1,C=f.length,L=f.length;if(a===h.lineNumber){m=u.findTokenIndexAtOffset(h.column-1),C=h.column-1,L=h.column-1;const I=u.getLanguageId(m);o!==I&&(o=I,c=this.languageConfigurationService.getLanguageConfiguration(o).brackets,l=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let D=!0;for(;m>=0;m--){const I=u.getLanguageId(m);if(o!==I){if(c&&l&&D&&C!==L){const O=b.BracketsUtils.findPrevBracketInRange(c.reversedRegex,a,f,C,L);if(O)return this._toFoundBracket(l,O);D=!1}o=I,c=this.languageConfigurationService.getLanguageConfiguration(o).brackets,l=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}const T=!!c&&!(0,w.ignoreBracketsInToken)(u.getStandardTokenType(m));if(T)D?C=u.getStartOffset(m):(C=u.getStartOffset(m),L=u.getEndOffset(m));else if(l&&c&&D&&C!==L){const O=b.BracketsUtils.findPrevBracketInRange(c.reversedRegex,a,f,C,L);if(O)return this._toFoundBracket(l,O)}D=T}if(l&&c&&D&&C!==L){const I=b.BracketsUtils.findPrevBracketInRange(c.reversedRegex,a,f,C,L);if(I)return this._toFoundBracket(l,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,l=null,a=null;for(let u=h.lineNumber;u<=o;u++){const v=this.textModel.tokenization.getLineTokens(u),f=v.getCount(),m=this.textModel.getLineContent(u);let C=0,L=0,D=0;if(u===h.lineNumber){C=v.findTokenIndexAtOffset(h.column-1),L=h.column-1,D=h.column-1;const T=v.getLanguageId(C);c!==T&&(c=T,l=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew)}let I=!0;for(;C<f;C++){const T=v.getLanguageId(C);if(c!==T){if(a&&l&&I&&L!==D){const R=b.BracketsUtils.findNextBracketInRange(l.forwardRegex,u,m,L,D);if(R)return this._toFoundBracket(a,R);I=!1}c=T,l=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew}const O=!!l&&!(0,w.ignoreBracketsInToken)(v.getStandardTokenType(C));if(O)I||(L=v.getStartOffset(C)),D=v.getEndOffset(C);else if(a&&l&&I&&L!==D){const R=b.BracketsUtils.findNextBracketInRange(l.forwardRegex,u,m,L,D);if(R)return this._toFoundBracket(a,R)}I=O}if(a&&l&&I&&L!==D){const T=b.BracketsUtils.findNextBracketInRange(l.forwardRegex,u,m,L,D);if(T)return this._toFoundBracket(a,T)}}return null}findEnclosingBrackets(r,d){const h=this.textModel.validatePosition(r);if(this.canBuildAST){const L=E.Range.fromPositions(h),D=this.getBracketPairsInRange(E.Range.fromPositions(h,h)).findLast(I=>I.closingBracketRange!==void 0&&I.range.strictContainsRange(L));return D?[D.openingBracketRange,D.closingBracketRange]:null}const o=n(d),c=this.textModel.getLineCount(),l=new Map;let a=[];const u=(L,D)=>{if(!l.has(L)){const I=[];for(let T=0,O=D?D.brackets.length:0;T<O;T++)I[T]=0;l.set(L,I)}a=l.get(L)};let v=0;const f=(L,D,I,T,O)=>{for(;;){if(o&&++v%100===0&&!o())return t.INSTANCE;const R=b.BracketsUtils.findNextBracketInRange(L.forwardRegex,D,I,T,O);if(!R)break;const A=I.substring(R.startColumn-1,R.endColumn-1).toLowerCase(),N=L.textIsBracket[A];if(N&&(N.isOpen(A)?a[N.index]++:N.isClose(A)&&a[N.index]--,a[N.index]===-1))return this._matchFoundBracket(R,N,!1,o);T=R.endColumn-1}return null};let m=null,C=null;for(let L=h.lineNumber;L<=c;L++){const D=this.textModel.tokenization.getLineTokens(L),I=D.getCount(),T=this.textModel.getLineContent(L);let O=0,R=0,A=0;if(L===h.lineNumber){O=D.findTokenIndexAtOffset(h.column-1),R=h.column-1,A=h.column-1;const P=D.getLanguageId(O);m!==P&&(m=P,C=this.languageConfigurationService.getLanguageConfiguration(m).brackets,u(m,C))}let N=!0;for(;O<I;O++){const P=D.getLanguageId(O);if(m!==P){if(C&&N&&R!==A){const F=f(C,L,T,R,A);if(F)return i(F);N=!1}m=P,C=this.languageConfigurationService.getLanguageConfiguration(m).brackets,u(m,C)}const x=!!C&&!(0,w.ignoreBracketsInToken)(D.getStandardTokenType(O));if(x)N||(R=D.getStartOffset(O)),A=D.getEndOffset(O);else if(C&&N&&R!==A){const F=f(C,L,T,R,A);if(F)return i(F)}N=x}if(C&&N&&R!==A){const P=f(C,L,T,R,A);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 p(s,r){return{object:s,dispose:()=>r?.dispose()}}function n(s){if(typeof s>"u")return()=>!0;{const r=Date.now();return()=>Date.now()-r<=s}}class t{constructor(){this._searchCanceledBrand=void 0}}t.INSTANCE=new t;function i(s){return s instanceof t?null:s}}),define(X[305],ee([1,0,6,9,5,46,267,117,304,2]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class p extends g.Disposable{constructor(t,i,s,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,s,o)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(t){return this._pieceTree.createSnapshot(t?this._BOM:"")}getOffsetAt(t,i){return this._pieceTree.getOffsetAt(t,i)}getPositionAt(t){return this._pieceTree.getPositionAt(t)}getRangeAt(t,i){const s=t+i,r=this.getPositionAt(t),d=this.getPositionAt(s);return new y.Range(r.lineNumber,r.column,d.lineNumber,d.column)}getValueInRange(t,i=0){if(t.isEmpty())return"";const s=this._getEndOfLine(i);return this._pieceTree.getValueInRange(t,s)}getValueLengthInRange(t,i=0){if(t.isEmpty())return 0;if(t.startLineNumber===t.endLineNumber)return t.endColumn-t.startColumn;const s=this.getOffsetAt(t.startLineNumber,t.startColumn),r=this.getOffsetAt(t.endLineNumber,t.endColumn);let d=0;const h=this._getEndOfLine(i),o=this.getEOL();if(h.length!==o.length){const c=h.length-o.length,l=t.endLineNumber-t.startLineNumber;d=c*l}return r-s+d}getCharacterCountInRange(t,i=0){if(this._mightContainNonBasicASCII){let s=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,l=h===d?t.endColumn-1:o.length;for(let a=c;a<l;a++)k.isHighSurrogate(o.charCodeAt(a))?(s=s+1,a=a+1):s=s+1}return s+=this._getEndOfLine(i).length*(d-r),s}return this.getValueLengthInRange(t,i)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(t){return this._pieceTree.getLineContent(t)}getLineCharCode(t,i){return this._pieceTree.getLineCharCode(t,i)}getLineLength(t){return this._pieceTree.getLineLength(t)}getLineFirstNonWhitespaceColumn(t){const i=k.firstNonWhitespaceIndex(this.getLineContent(t));return i===-1?0:i+1}getLineLastNonWhitespaceColumn(t){const i=k.lastNonWhitespaceIndex(this.getLineContent(t));return i===-1?0:i+2}_getEndOfLine(t){switch(t){case 1:return`
- `;case 2:return`\r
- `;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(t){this._pieceTree.setEOL(t)}applyEdits(t,i,s){let r=this._mightContainRTL,d=this._mightContainUnusualLineTerminators,h=this._mightContainNonBasicASCII,o=!0,c=[];for(let C=0;C<t.length;C++){const L=t[C];o&&L._isTracked&&(o=!1);const D=L.range;if(L.text){let A=!0;h||(A=!k.isBasicASCII(L.text),h=A),!r&&A&&(r=k.containsRTL(L.text)),!d&&A&&(d=k.containsUnusualLineTerminators(L.text))}let I="",T=0,O=0,R=0;if(L.text){let A;[T,O,R,A]=(0,b.countEOL)(L.text);const N=this.getEOL();A===0||A===(N===`\r
- `?2:1)?I=L.text:I=L.text.replace(/\r\n|\r|\n/g,N)}c[C]={sortIndex:C,identifier:L.identifier||null,range:D,rangeOffset:this.getOffsetAt(D.startLineNumber,D.startColumn),rangeLength:this.getValueLengthInRange(D),text:I,eolCount:T,firstLineLength:O,lastLineLength:R,forceMoveMarkers:!!L.forceMoveMarkers,isAutoWhitespaceEdit:L.isAutoWhitespaceEdit||!1}}c.sort(p._sortOpsAscending);let l=!1;for(let C=0,L=c.length-1;C<L;C++){const D=c[C].range.getEndPosition(),I=c[C+1].range.getStartPosition();if(I.isBeforeOrEqual(D)){if(I.isBefore(D))throw new Error("Overlapping ranges are not allowed!");l=!0}}o&&(c=this._reduceOperations(c));const a=s||i?p._getInverseEditRanges(c):[],u=[];if(i)for(let C=0;C<c.length;C++){const L=c[C],D=a[C];if(L.isAutoWhitespaceEdit&&L.range.isEmpty())for(let I=D.startLineNumber;I<=D.endLineNumber;I++){let T="";I===D.startLineNumber&&(T=this.getLineContent(L.range.startLineNumber),k.firstNonWhitespaceIndex(T)!==-1)||u.push({lineNumber:I,oldContent:T})}}let v=null;if(s){let C=0;v=[];for(let L=0;L<c.length;L++){const D=c[L],I=a[L],T=this.getValueInRange(D.range),O=D.rangeOffset+C;C+=D.text.length-T.length,v[L]={sortIndex:D.sortIndex,identifier:D.identifier,range:I,text:T,textChange:new S.TextChange(D.rangeOffset,T,O,D.text)}}l||v.sort((L,D)=>L.sortIndex-D.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=d,this._mightContainNonBasicASCII=h;const f=this._doApplyEdits(c);let m=null;if(i&&u.length>0){u.sort((C,L)=>L.lineNumber-C.lineNumber),m=[];for(let C=0,L=u.length;C<L;C++){const D=u[C].lineNumber;if(C>0&&u[C-1].lineNumber===D)continue;const I=u[C].oldContent,T=this.getLineContent(D);T.length===0||T===I||k.firstNonWhitespaceIndex(T)!==-1||m.push(D)}}return this._onDidChangeContent.fire(),new E.ApplyEditsResult(v,f,m)}_reduceOperations(t){return t.length<1e3?t:[this._toSingleEditOperation(t)]}_toSingleEditOperation(t){let i=!1;const s=t[0].range,r=t[t.length-1].range,d=new y.Range(s.startLineNumber,s.startColumn,r.endLineNumber,r.endColumn);let h=s.startLineNumber,o=s.startColumn;const c=[];for(let f=0,m=t.length;f<m;f++){const C=t[f],L=C.range;i=i||C.forceMoveMarkers,c.push(this.getValueInRange(new y.Range(h,o,L.startLineNumber,L.startColumn))),C.text.length>0&&c.push(C.text),h=L.endLineNumber,o=L.endColumn}const l=c.join(""),[a,u,v]=(0,b.countEOL)(l);return{sortIndex:0,identifier:t[0].identifier,range:d,rangeOffset:this.getOffsetAt(d.startLineNumber,d.startColumn),rangeLength:this.getValueLengthInRange(d,0),text:l,eolCount:a,firstLineLength:u,lastLineLength:v,forceMoveMarkers:i,isAutoWhitespaceEdit:!1}}_doApplyEdits(t){t.sort(p._sortOpsDescending);const i=[];for(let s=0;s<t.length;s++){const r=t[s],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 l=new y.Range(d,h,o,c);i.push({range:l,rangeLength:r.rangeLength,text:r.text,rangeOffset:r.rangeOffset,forceMoveMarkers:r.forceMoveMarkers})}return i}findMatchesLineByLine(t,i,s,r){return this._pieceTree.findMatchesLineByLine(t,i,s,r)}static _getInverseEditRanges(t){const i=[];let s=0,r=0,d=null;for(let h=0,o=t.length;h<o;h++){const c=t[h];let l,a;d?d.range.endLineNumber===c.range.startLineNumber?(l=s,a=r+(c.range.startColumn-d.range.endColumn)):(l=s+(c.range.startLineNumber-d.range.endLineNumber),a=c.range.startColumn):(l=c.range.startLineNumber,a=c.range.startColumn);let u;if(c.text.length>0){const v=c.eolCount+1;v===1?u=new y.Range(l,a,l,a+c.firstLineLength):u=new y.Range(l,a,l+v-1,c.lastLineLength+1)}else u=new y.Range(l,a,l,a);s=u.endLineNumber,r=u.endColumn,i.push(u),d=c}return i}static _sortOpsAscending(t,i){const s=y.Range.compareRangesUsingEnds(t.range,i.range);return s===0?t.sortIndex-i.sortIndex:s}static _sortOpsDescending(t,i){const s=y.Range.compareRangesUsingEnds(t.range,i.range);return s===0?i.sortIndex-t.sortIndex:-s}}e.PieceTreeTextBuffer=p}),define(X[574],ee([1,0,9,267,305]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class E{constructor(S,g,p,n,t,i,s,r,d){this._chunks=S,this._bom=g,this._cr=p,this._lf=n,this._crlf=t,this._containsRTL=i,this._containsUnusualLineTerminators=s,this._isBasicASCII=r,this._normalizeEOL=d}_getEOL(S){const g=this._cr+this._lf+this._crlf,p=this._cr+this._crlf;return g===0?S===1?`
- `:`\r
- `:p>g/2?`\r
- `:`
- `}create(S){const g=this._getEOL(S),p=this._chunks;if(this._normalizeEOL&&(g===`\r
- `&&(this._cr>0||this._lf>0)||g===`
- `&&(this._cr>0||this._crlf>0)))for(let t=0,i=p.length;t<i;t++){const s=p[t].buffer.replace(/\r\n|\r|\n/g,g),r=(0,k.createLineStartsFast)(s);p[t]=new k.StringBuffer(s,r)}const n=new y.PieceTreeTextBuffer(p,this._bom,g,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class w{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(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 E(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(X[575],ee([1,0,132,17]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function y(S){for(let g=0,p=S.length;g<p;g+=4){const n=S[g+0],t=S[g+1],i=S[g+2],s=S[g+3];S[g+0]=s,S[g+1]=i,S[g+2]=t,S[g+3]=n}}function E(S){const g=new Uint8Array(S.buffer,S.byteOffset,S.length*4);return k.isLittleEndian()||y(g),_.VSBuffer.wrap(g)}function w(S){const g=new Uint32Array(b(S));let p=0;if(g[p++]=S.id,S.type==="full")g[p++]=1,g[p++]=S.data.length,g.set(S.data,p),p+=S.data.length;else{g[p++]=2,g[p++]=S.deltas.length;for(const n of S.deltas)g[p++]=n.start,g[p++]=n.deleteCount,n.data?(g[p++]=n.data.length,g.set(n.data,p),p+=n.data.length):g[p++]=0}return E(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 p of S.deltas)p.data&&(g+=p.data.length)}return g}}),define(X[576],ee([1,0,6,2]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class y{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new _.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 p=new E(this,b,S);return this._factories.set(b,p),(0,k.toDisposable)(()=>{const n=this._factories.get(b);!n||n!==p||(this._factories.delete(b),n.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=y;class E 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(X[31],ee([1,0,27,20,5,576]),function(K,e,_,k,y,E){"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(a,u,v){this.offset=a,this.type=u,this.language=v,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=w;class b{constructor(a,u){this.tokens=a,this.endState=u,this._tokenizationResultBrand=void 0}}e.TokenizationResult=b;class S{constructor(a,u){this.tokens=a,this.endState=u,this._encodedTokenizationResultBrand=void 0}}e.EncodedTokenizationResult=S;var g;(function(l){const a=new Map;a.set(0,_.Codicon.symbolMethod),a.set(1,_.Codicon.symbolFunction),a.set(2,_.Codicon.symbolConstructor),a.set(3,_.Codicon.symbolField),a.set(4,_.Codicon.symbolVariable),a.set(5,_.Codicon.symbolClass),a.set(6,_.Codicon.symbolStruct),a.set(7,_.Codicon.symbolInterface),a.set(8,_.Codicon.symbolModule),a.set(9,_.Codicon.symbolProperty),a.set(10,_.Codicon.symbolEvent),a.set(11,_.Codicon.symbolOperator),a.set(12,_.Codicon.symbolUnit),a.set(13,_.Codicon.symbolValue),a.set(15,_.Codicon.symbolEnum),a.set(14,_.Codicon.symbolConstant),a.set(15,_.Codicon.symbolEnum),a.set(16,_.Codicon.symbolEnumMember),a.set(17,_.Codicon.symbolKeyword),a.set(27,_.Codicon.symbolSnippet),a.set(18,_.Codicon.symbolText),a.set(19,_.Codicon.symbolColor),a.set(20,_.Codicon.symbolFile),a.set(21,_.Codicon.symbolReference),a.set(22,_.Codicon.symbolCustomColor),a.set(23,_.Codicon.symbolFolder),a.set(24,_.Codicon.symbolTypeParameter),a.set(25,_.Codicon.account),a.set(26,_.Codicon.issues);function u(m){let C=a.get(m);return C||(console.info("No codicon found for CompletionItemKind "+m),C=_.Codicon.symbolProperty),C}l.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(m,C){let L=v.get(m);return typeof L>"u"&&!C&&(L=9),L}l.fromString=f})(g||(e.CompletionItemKinds=g={}));var p;(function(l){l[l.Automatic=0]="Automatic",l[l.Explicit=1]="Explicit"})(p||(e.InlineCompletionTriggerKind=p={}));class n{constructor(a,u,v,f){this.range=a,this.text=u,this.completionKind=v,this.isSnippetText=f}equals(a){return y.Range.lift(this.range).equalsRange(a.range)&&this.text===a.text&&this.completionKind===a.completionKind&&this.isSnippetText===a.isSnippetText}}e.SelectedSuggestionInfo=n;var t;(function(l){l[l.Invoke=1]="Invoke",l[l.TriggerCharacter=2]="TriggerCharacter",l[l.ContentChange=3]="ContentChange"})(t||(e.SignatureHelpTriggerKind=t={}));var i;(function(l){l[l.Text=0]="Text",l[l.Read=1]="Read",l[l.Write=2]="Write"})(i||(e.DocumentHighlightKind=i={}));function s(l){return l&&k.URI.isUri(l.uri)&&y.Range.isIRange(l.range)&&(y.Range.isIRange(l.originSelectionRange)||y.Range.isIRange(l.targetSelectionRange))}e.isLocationLink=s;var r;(function(l){const a=new Map;a.set(0,_.Codicon.symbolFile),a.set(1,_.Codicon.symbolModule),a.set(2,_.Codicon.symbolNamespace),a.set(3,_.Codicon.symbolPackage),a.set(4,_.Codicon.symbolClass),a.set(5,_.Codicon.symbolMethod),a.set(6,_.Codicon.symbolProperty),a.set(7,_.Codicon.symbolField),a.set(8,_.Codicon.symbolConstructor),a.set(9,_.Codicon.symbolEnum),a.set(10,_.Codicon.symbolInterface),a.set(11,_.Codicon.symbolFunction),a.set(12,_.Codicon.symbolVariable),a.set(13,_.Codicon.symbolConstant),a.set(14,_.Codicon.symbolString),a.set(15,_.Codicon.symbolNumber),a.set(16,_.Codicon.symbolBoolean),a.set(17,_.Codicon.symbolArray),a.set(18,_.Codicon.symbolObject),a.set(19,_.Codicon.symbolKey),a.set(20,_.Codicon.symbolNull),a.set(21,_.Codicon.symbolEnumMember),a.set(22,_.Codicon.symbolStruct),a.set(23,_.Codicon.symbolEvent),a.set(24,_.Codicon.symbolOperator),a.set(25,_.Codicon.symbolTypeParameter);function u(v){let f=a.get(v);return f||(console.info("No codicon found for SymbolKind "+v),f=_.Codicon.symbolProperty),f}l.toIcon=u})(r||(e.SymbolKinds=r={}));class d{static fromValue(a){switch(a){case"comment":return d.Comment;case"imports":return d.Imports;case"region":return d.Region}return new d(a)}constructor(a){this.value=a}}e.FoldingRangeKind=d,d.Comment=new d("comment"),d.Imports=new d("imports"),d.Region=new d("region");var h;(function(l){function a(u){return!u||typeof u!="object"?!1:typeof u.id=="string"&&typeof u.title=="string"}l.is=a})(h||(e.Command=h={}));var o;(function(l){l[l.Type=1]="Type",l[l.Parameter=2]="Parameter"})(o||(e.InlayHintKind=o={}));class c{constructor(a){this.createSupport=a,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(a=>{a&&a.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}e.LazyTokenizationSupport=c,e.TokenizationRegistry=new E.TokenizationRegistry}),define(X[149],ee([1,0,31]),function(K,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(E){return this===E}};function k(E,w){return new _.TokenizationResult([new _.Token(0,"",E)],w)}e.nullTokenize=k;function y(E,w){const b=new Uint32Array(2);return b[0]=0,b[1]=(E<<0|0<<8|0<<11|1<<15|2<<24)>>>0,new _.EncodedTokenizationResult(b,w===null?e.NullState:w)}e.nullTokenizeEncoded=y}),define(X[306],ee([1,0,9,87,31,149]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const w={getInitialState:()=>E.NullState,tokenizeEncoded:(p,n,t)=>(0,E.nullTokenizeEncoded)(0,t)};function b(p,n,t){return we(this,void 0,void 0,function*(){if(!t)return g(n,p.languageIdCodec,w);const i=yield y.TokenizationRegistry.getOrCreate(t);return g(n,p.languageIdCodec,i||w)})}e.tokenizeToString=b;function S(p,n,t,i,s,r,d){let h="<div>",o=i,c=0,l=!0;for(let a=0,u=n.getCount();a<u;a++){const v=n.getEndOffset(a);if(v<=i)continue;let f="";for(;o<v&&o<s;o++){const m=p.charCodeAt(o);switch(m){case 9:{let C=r-(o+c)%r;for(c+=C-1;C>0;)d&&l?(f+=" ",l=!1):(f+=" ",l=!0),C--;break}case 60:f+="<",l=!1;break;case 62:f+=">",l=!1;break;case 38:f+="&",l=!1;break;case 0:f+="�",l=!1;break;case 65279:case 8232:case 8233:case 133:f+="\uFFFD",l=!1;break;case 13:f+="​",l=!1;break;case 32:d&&l?(f+=" ",l=!1):(f+=" ",l=!0);break;default:f+=String.fromCharCode(m),l=!1}}if(h+=`<span style="${n.getInlineStyle(a,t)}">${f}</span>`,v>s||o>=s)break}return h+="</div>",h}e.tokenizeLineToHTML=S;function g(p,n,t){let i='<div class="monaco-tokenized-source">';const s=_.splitLines(p);let r=t.getInitialState();for(let d=0,h=s.length;d<h;d++){const o=s[d];d>0&&(i+="<br/>");const c=t.tokenizeEncoded(o,!0,r);k.LineTokens.convertToEndOffset(c.tokens,o.length);const a=new k.LineTokens(c.tokens,o,n).inflate();let u=0;for(let v=0,f=a.getCount();v<f;v++){const m=a.getClassName(v),C=a.getEndOffset(v);i+=`<span class="${m}">${_.escape(o.substring(u,C))}</span>`,u=C}r=c.endState}return i+="</div>",i}e._tokenizeToString=g}),define(X[577],ee([1,0,13,11,17,57,117,104,118,149,490,272,87]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultBackgroundTokenizer=e.RangePriorityQueueImpl=e.TokenizationStateStore=e.TrackingTokenizationStateStore=e.TokenizerWithStateStoreAndTextModel=e.TokenizerWithStateStore=void 0;class i{constructor(a,u){this.tokenizationSupport=u,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new r(a)}getStartState(a){return a===1?this.initialState:this.store.getEndState(a-1)}}e.TokenizerWithStateStore=i;class s extends i{constructor(a,u,v,f){super(a,u),this._textModel=v,this._languageIdCodec=f}updateTokensUntilLine(a,u){const v=this._textModel.getLanguageId();for(;;){const f=this.store.getFirstInvalidEndStateLineNumber();if(!f||f>u)break;const m=this._textModel.getLineContent(f),C=this.getStartState(f),L=o(this._languageIdCodec,v,this.tokenizationSupport,m,!0,C);a.add(f,L.tokens),this.store.setEndState(f,L.endState)}}getTokenTypeIfInsertingCharacter(a,u){const v=this.getStartState(a.lineNumber);if(!v)return 0;const f=this._textModel.getLanguageId(),m=this._textModel.getLineContent(a.lineNumber),C=m.substring(0,a.column-1)+u+m.substring(a.column-1),L=o(this._languageIdCodec,f,this.tokenizationSupport,C,!0,v),D=new t.LineTokens(L.tokens,C,this._languageIdCodec);if(D.getCount()===0)return 0;const I=D.findTokenIndexAtOffset(a.column-1);return D.getStandardTokenType(I)}tokenizeLineWithEdit(a,u,v){const f=a.lineNumber,m=a.column,C=this.getStartState(f);if(!C)return null;const L=this._textModel.getLineContent(f),D=L.substring(0,m-1)+v+L.substring(m-1+u),I=this._textModel.getLanguageIdAtPosition(f,0),T=o(this._languageIdCodec,I,this.tokenizationSupport,D,!0,C);return new t.LineTokens(T.tokens,D,this._languageIdCodec)}isCheapToTokenize(a){const u=this.store.getFirstInvalidEndStateLineNumberOrMax();return a<u||a===u&&this._textModel.getLineLength(a)<2048}tokenizeHeuristically(a,u,v){if(v<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(u<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(a,v),{heuristicTokens:!1};let f=this.guessStartState(u);const m=this._textModel.getLanguageId();for(let C=u;C<=v;C++){const L=this._textModel.getLineContent(C),D=o(this._languageIdCodec,m,this.tokenizationSupport,L,!0,f);a.add(C,D.tokens),f=D.endState}return{heuristicTokens:!0}}guessStartState(a){let u=this._textModel.getLineFirstNonWhitespaceColumn(a);const v=[];let f=null;for(let L=a-1;u>1&&L>=1;L--){const D=this._textModel.getLineFirstNonWhitespaceColumn(L);if(D!==0&&D<u&&(v.push(this._textModel.getLineContent(L)),u=D,f=this.getStartState(L),f))break}f||(f=this.tokenizationSupport.getInitialState()),v.reverse();const m=this._textModel.getLanguageId();let C=f;for(const L of v)C=o(this._languageIdCodec,m,this.tokenizationSupport,L,!1,C).endState;return C}}e.TokenizerWithStateStoreAndTextModel=s;class r{constructor(a){this.lineCount=a,this.tokenizationStateStore=new d,this._invalidEndStatesLineNumbers=new h,this._invalidEndStatesLineNumbers.addRange(new S.OffsetRange(1,a+1))}getEndState(a){return this.tokenizationStateStore.getEndState(a)}setEndState(a,u){for(;;){const f=this._invalidEndStatesLineNumbers.min;if(f!==null&&f<=a)this._invalidEndStatesLineNumbers.removeMin();else break}const v=this.tokenizationStateStore.setEndState(a,u);return v&&a<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new S.OffsetRange(a+1,a+2)),v}acceptChange(a,u){this.lineCount+=u-a.length,this.tokenizationStateStore.acceptChange(a,u),this._invalidEndStatesLineNumbers.addRangeAndResize(new S.OffsetRange(a.startLineNumber,a.endLineNumberExclusive),u)}acceptChanges(a){for(const u of a){const[v]=(0,w.countEOL)(u.text);this.acceptChange(new b.LineRange(u.range.startLineNumber,u.range.endLineNumber+1),v+1)}}invalidateEndStateRange(a){this._invalidEndStatesLineNumbers.addRange(new S.OffsetRange(a.startLineNumber,a.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 p.FixedArray(null)}getEndState(a){return this._lineEndStates.get(a)}setEndState(a,u){const v=this._lineEndStates.get(a);return v&&v.equals(u)?!1:(this._lineEndStates.set(a,u),!0)}acceptChange(a,u){let v=a.length;u>0&&v>0&&(v--,u--),this._lineEndStates.replace(a.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 a=this._ranges[0];return a.start+1===a.endExclusive?this._ranges.shift():this._ranges[0]=new S.OffsetRange(a.start+1,a.endExclusive),a.start}addRange(a){S.OffsetRange.addRange(a,this._ranges)}addRangeAndResize(a,u){let v=0;for(;!(v>=this._ranges.length||a.start<=this._ranges[v].endExclusive);)v++;let f=v;for(;!(f>=this._ranges.length||a.endExclusive<this._ranges[f].start);)f++;const m=u-a.length;for(let C=f;C<this._ranges.length;C++)this._ranges[C]=this._ranges[C].delta(m);if(v===f){const C=new S.OffsetRange(a.start,a.start+u);C.isEmpty||this._ranges.splice(v,0,C)}else{const C=Math.min(a.start,this._ranges[v].start),L=Math.max(a.endExclusive,this._ranges[f-1].endExclusive),D=new S.OffsetRange(C,L+m);D.isEmpty?this._ranges.splice(v,f-v):this._ranges.splice(v,f-v,D)}}toString(){return this._ranges.map(a=>a.toString()).join(" + ")}}e.RangePriorityQueueImpl=h;function o(l,a,u,v,f,m){let C=null;if(u)try{C=u.tokenizeEncoded(v,f,m.clone())}catch(L){(0,k.onUnexpectedError)(L)}return C||(C=(0,g.nullTokenizeEncoded)(l.encodeLanguageId(a),m)),t.LineTokens.convertToEndOffset(C.tokens,v.length),C}class c{constructor(a,u){this._tokenizerWithStateStore=a,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)(a=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(a)}))}_backgroundTokenizeWithDeadline(a){const u=Date.now()+a.timeRemaining(),v=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<u?(0,y.setTimeout0)(v):this._beginBackgroundTokenization())};v()}_backgroundTokenizeForAtLeast1ms(){const a=this._tokenizerWithStateStore._textModel.getLineCount(),u=new n.ContiguousMultilineTokensBuilder,v=E.StopWatch.create(!1);do if(v.elapsed()>1||this._tokenizeOneInvalidLine(u)>=a)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(u.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.isTokenizationComplete():!1}_tokenizeOneInvalidLine(a){if(!this._tokenizerWithStateStore||!this._hasLinesToTokenize())return this._tokenizerWithStateStore._textModel.getLineCount()+1;const u=this._tokenizerWithStateStore.store.getFirstInvalidEndStateLineNumber();return this._tokenizerWithStateStore.updateTokensUntilLine(a,u),u}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.isTokenizationComplete()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(a,u){this._tokenizerWithStateStore.store.invalidateEndStateRange(new b.LineRange(a,u))}}e.DefaultBackgroundTokenizer=c}),define(X[578],ee([1,0,16,13,11,6,2,117,104,12,139,31,266,577,272,498,500]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class h extends t.TextModelPart{constructor(a,u,v,f,m,C){super(),this._languageService=a,this._languageConfigurationService=u,this._textModel=v,this._bracketPairsTextModelPart=f,this._languageId=m,this._attachedViews=C,this._semanticTokens=new d.SparseTokensStore(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new E.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new E.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new E.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new o(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(L=>{L.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(L=>{this._emitModelTokensChangedEvent(L)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(L=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(a){if(a.isFlush)this._semanticTokens.flush();else if(!a.isEolChange)for(const u of a.changes){const[v,f,m]=(0,b.countEOL)(u.text);this._semanticTokens.acceptEdit(u.range,v,f,m,u.text.length>0?u.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(a)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(a){this.validateLineNumber(a);const u=this.grammarTokens.getLineTokens(a);return this._semanticTokens.addSparseTokens(a,u)}_emitModelTokensChangedEvent(a){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(a),this._onDidChangeTokens.fire(a))}validateLineNumber(a){if(a<1||a>this._textModel.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(a){this.validateLineNumber(a),this.grammarTokens.forceTokenization(a)}isCheapToTokenize(a){return this.validateLineNumber(a),this.grammarTokens.isCheapToTokenize(a)}tokenizeIfCheap(a){this.validateLineNumber(a),this.grammarTokens.tokenizeIfCheap(a)}getTokenTypeIfInsertingCharacter(a,u,v){return this.grammarTokens.getTokenTypeIfInsertingCharacter(a,u,v)}tokenizeLineWithEdit(a,u,v){return this.grammarTokens.tokenizeLineWithEdit(a,u,v)}setSemanticTokens(a,u){this._semanticTokens.set(a,u),this._emitModelTokensChangedEvent({semanticTokensApplied:a!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(a,u){if(this.hasCompleteSemanticTokens())return;const v=this._textModel.validateRange(this._semanticTokens.setPartial(a,u));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:v.startLineNumber,toLineNumber:v.endLineNumber}]})}getWordAtPosition(a){this.assertNotDisposed();const u=this._textModel.validatePosition(a),v=this._textModel.getLineContent(u.lineNumber),f=this.getLineTokens(u.lineNumber),m=f.findTokenIndexAtOffset(u.column-1),[C,L]=h._findLanguageBoundaries(f,m),D=(0,p.getWordAtText)(u.column,this.getLanguageConfiguration(f.getLanguageId(m)).getWordDefinition(),v.substring(C,L),C);if(D&&D.startColumn<=a.column&&a.column<=D.endColumn)return D;if(m>0&&C===u.column-1){const[I,T]=h._findLanguageBoundaries(f,m-1),O=(0,p.getWordAtText)(u.column,this.getLanguageConfiguration(f.getLanguageId(m-1)).getWordDefinition(),v.substring(I,T),I);if(O&&O.startColumn<=a.column&&a.column<=O.endColumn)return O}return null}getLanguageConfiguration(a){return this._languageConfigurationService.getLanguageConfiguration(a)}static _findLanguageBoundaries(a,u){const v=a.getLanguageId(u);let f=0;for(let C=u;C>=0&&a.getLanguageId(C)===v;C--)f=a.getStartOffset(C);let m=a.getLineContent().length;for(let C=u,L=a.getCount();C<L&&a.getLanguageId(C)===v;C++)m=a.getEndOffset(C);return[f,m]}getWordUntilPosition(a){const u=this.getWordAtPosition(a);return u?{word:u.word.substr(0,a.column-u.startColumn),startColumn:u.startColumn,endColumn:a.column}:{word:"",startColumn:a.column,endColumn:a.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(a,u){const v=this._textModel.validatePosition(new g.Position(a,u)),f=this.getLineTokens(v.lineNumber);return f.getLanguageId(f.findTokenIndexAtOffset(v.column-1))}setLanguageId(a,u="api"){if(this._languageId===a)return;const v={oldLanguage:this._languageId,newLanguage:a,source:u};this._languageId=a,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(a,u,v,f){super(),this._languageIdCodec=a,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 E.Emitter),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new E.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._attachedViewStates=this._register(new w.DisposableMap),this._register(n.TokenizationRegistry.onDidChange(m=>{const C=this.getLanguageId();m.changedLanguages.indexOf(C)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(f.onDidChangeVisibleRanges(({view:m,state:C})=>{if(C){let L=this._attachedViewStates.get(m);L||(L=new c(()=>this.refreshRanges(L.lineRanges)),this._attachedViewStates.set(m,L)),L.handleStateChange(C)}else this._attachedViewStates.deleteAndDispose(m)}))}resetTokenization(a=!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())),a&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const v=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const C=n.TokenizationRegistry.get(this.getLanguageId());if(!C)return[null,null];let L;try{L=C.getInitialState()}catch(D){return(0,y.onUnexpectedError)(D),[null,null]}return[C,L]},[f,m]=v();if(f&&m?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:L=>{this.setTokens(L)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const L=2;this._backgroundTokenizationState=L,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(L,D)=>{var I,T,O;if(!D)throw new y.BugIndicatingError;const R=(T=(I=this._tokenizer)===null||I===void 0?void 0:I.store.getFirstInvalidEndStateLineNumber())!==null&&T!==void 0?T:void 0;R!==void 0&&L>=R&&((O=this._tokenizer)===null||O===void 0||O.store.setEndState(L,D))}};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:L=>{var D;(D=this._debugBackgroundTokens)===null||D===void 0||D.setMultilineTokens(L,this._textModel)},backgroundTokenizationFinished(){},setEndState:(L,D)=>{var I;(I=this._debugBackgroundStates)===null||I===void 0||I.setEndState(L,D)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var a;(a=this._defaultBackgroundTokenizer)===null||a===void 0||a.handleChanges()}handleDidChangeContent(a){var u,v,f;if(a.isFlush)this.resetTokenization(!1);else if(!a.isEolChange){for(const m of a.changes){const[C,L]=(0,b.countEOL)(m.text);this._tokens.acceptEdit(m.range,C,L),(u=this._debugBackgroundTokens)===null||u===void 0||u.acceptEdit(m.range,C,L)}(v=this._debugBackgroundStates)===null||v===void 0||v.acceptChanges(a.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(a.changes),(f=this._defaultBackgroundTokenizer)===null||f===void 0||f.handleChanges()}}setTokens(a){const{changes:u}=this._tokens.setMultilineTokens(a,this._textModel);return u.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:u}),{changes:u}}refreshAllVisibleLineTokens(){const a=S.LineRange.joinMany([...this._attachedViewStates].map(([u,v])=>v.lineRanges));this.refreshRanges(a)}refreshRanges(a){for(const u of a)this.refreshRange(u.startLineNumber,u.endLineNumberExclusive-1)}refreshRange(a,u){var v,f;if(!this._tokenizer)return;a=Math.max(1,a),u=Math.min(this._textModel.getLineCount(),u);const m=new s.ContiguousMultilineTokensBuilder,{heuristicTokens:C}=this._tokenizer.tokenizeHeuristically(m,a,u),L=this.setTokens(m.finalize());if(C)for(const D of L.changes)(v=this._backgroundTokenizer.value)===null||v===void 0||v.requestTokens(D.fromLineNumber,D.toLineNumber+1);(f=this._defaultBackgroundTokenizer)===null||f===void 0||f.checkFinished()}forceTokenization(a){var u,v;const f=new s.ContiguousMultilineTokensBuilder;(u=this._tokenizer)===null||u===void 0||u.updateTokensUntilLine(f,a),this.setTokens(f.finalize()),(v=this._defaultBackgroundTokenizer)===null||v===void 0||v.checkFinished()}isCheapToTokenize(a){return this._tokenizer?this._tokenizer.isCheapToTokenize(a):!0}tokenizeIfCheap(a){this.isCheapToTokenize(a)&&this.forceTokenization(a)}getLineTokens(a){var u;const v=this._textModel.getLineContent(a),f=this._tokens.getTokens(this._textModel.getLanguageId(),a-1,v);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>a&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>a){const m=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),a-1,v);!f.equals(m)&&(!((u=this._debugBackgroundTokenizer.value)===null||u===void 0)&&u.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(a)}return f}getTokenTypeIfInsertingCharacter(a,u,v){if(!this._tokenizer)return 0;const f=this._textModel.validatePosition(new g.Position(a,u));return this.forceTokenization(f.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(f,v)}tokenizeLineWithEdit(a,u,v){if(!this._tokenizer)return null;const f=this._textModel.validatePosition(a);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(a){super(),this._refreshTokens=a,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(a){this._lineRanges=a.visibleLineRanges,a.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(X[307],ee([1,0,21,6,59,20,12,5,23,31,199]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class n{static chord(s,r){return(0,y.KeyChord)(s,r)}}e.KeyMod=n,n.CtrlCmd=2048,n.Shift=1024,n.Alt=512,n.WinCtrl=256;function t(){return{editor:void 0,languages:void 0,CancellationTokenSource:_.CancellationTokenSource,Emitter:k.Emitter,KeyCode:p.KeyCode,KeyMod:n,Position:w.Position,Range:b.Range,Selection:S.Selection,SelectionDirection:p.SelectionDirection,MarkerSeverity:p.MarkerSeverity,MarkerTag:p.MarkerTag,Uri:E.URI,Token:g.Token}}e.createMonacoBaseAPI=t}),define(X[579],ee([1,0,161,20,12,5,494,139,476,482,307,57,270,473,45,475]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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(l){const a=[];for(let u=0;u<this._lines.length;u++){const v=this._lines[u],f=this.offsetAt(new y.Position(u+1,1)),m=v.matchAll(l);for(const C of m)(C.index||C.index===0)&&(C.index=C.index+f),a.push(C)}return a}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(l){return this._lines[l-1]}getWordAtPosition(l,a){const u=(0,b.getWordAtText)(l.column,(0,b.ensureValidWordDefinition)(a),this._lines[l.lineNumber-1],0);return u?new E.Range(l.lineNumber,u.startColumn,l.lineNumber,u.endColumn):null}words(l){const a=this._lines,u=this._wordenize.bind(this);let v=0,f="",m=0,C=[];return{*[Symbol.iterator](){for(;;)if(m<C.length){const L=f.substring(C[m].start,C[m].end);m+=1,yield L}else if(v<a.length)f=a[v],C=u(f,l),m=0,v+=1;else break}}}getLineWords(l,a){const u=this._lines[l-1],v=this._wordenize(u,a),f=[];for(const m of v)f.push({word:u.substring(m.start,m.end),startColumn:m.start+1,endColumn:m.end+1});return f}_wordenize(l,a){const u=[];let v;for(a.lastIndex=0;(v=a.exec(l))&&v[0].length!==0;)u.push({start:v.index,end:v.index+v[0].length});return u}getValueInRange(l){if(l=this._validateRange(l),l.startLineNumber===l.endLineNumber)return this._lines[l.startLineNumber-1].substring(l.startColumn-1,l.endColumn-1);const a=this._eol,u=l.startLineNumber-1,v=l.endLineNumber-1,f=[];f.push(this._lines[u].substring(l.startColumn-1));for(let m=u+1;m<v;m++)f.push(this._lines[m]);return f.push(this._lines[v].substring(0,l.endColumn-1)),f.join(a)}offsetAt(l){return l=this._validatePosition(l),this._ensureLineStarts(),this._lineStarts.getPrefixSum(l.lineNumber-2)+(l.column-1)}positionAt(l){l=Math.floor(l),l=Math.max(0,l),this._ensureLineStarts();const a=this._lineStarts.getIndexOf(l),u=this._lines[a.index].length;return{lineNumber:1+a.index,column:1+Math.min(a.remainder,u)}}_validateRange(l){const a=this._validatePosition({lineNumber:l.startLineNumber,column:l.startColumn}),u=this._validatePosition({lineNumber:l.endLineNumber,column:l.endColumn});return a.lineNumber!==l.startLineNumber||a.column!==l.startColumn||u.lineNumber!==l.endLineNumber||u.column!==l.endColumn?{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:u.lineNumber,endColumn:u.column}:l}_validatePosition(l){if(!y.Position.isIPosition(l))throw new Error("bad position");let{lineNumber:a,column:u}=l,v=!1;if(a<1)a=1,u=1,v=!0;else if(a>this._lines.length)a=this._lines.length,u=this._lines[a-1].length+1,v=!0;else{const f=this._lines[a-1].length+1;u<1?(u=1,v=!0):u>f&&(u=f,v=!0)}return v?{lineNumber:a,column:u}:l}}class h{constructor(l,a){this._host=l,this._models=Object.create(null),this._foreignModuleFactory=a,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(l){return this._models[l]}_getModels(){const l=[];return Object.keys(this._models).forEach(a=>l.push(this._models[a])),l}acceptNewModel(l){this._models[l.url]=new d(k.URI.parse(l.url),l.lines,l.EOL,l.versionId)}acceptModelChanged(l,a){if(!this._models[l])return;this._models[l].onEvents(a)}acceptRemovedModel(l){this._models[l]&&delete this._models[l]}computeUnicodeHighlights(l,a,u){return we(this,void 0,void 0,function*(){const v=this._getModel(l);return v?t.UnicodeTextModelHighlighter.computeUnicodeHighlights(v,a,u):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(l,a,u,v){return we(this,void 0,void 0,function*(){const f=this._getModel(l),m=this._getModel(a);return!f||!m?null:h.computeDiff(f,m,u,v)})}static computeDiff(l,a,u,v){const f=v==="advanced"?i.linesDiffComputers.advanced:i.linesDiffComputers.legacy,m=l.getLinesContent(),C=a.getLinesContent(),L=f.computeDiff(m,C,u);return{identical:L.changes.length>0?!1:this._modelsAreIdentical(l,a),quitEarly:L.hitTimeout,changes:L.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(l,a){const u=l.getLineCount(),v=a.getLineCount();if(u!==v)return!1;for(let f=1;f<=u;f++){const m=l.getLineContent(f),C=a.getLineContent(f);if(m!==C)return!1}return!0}computeMoreMinimalEdits(l,a,u){return we(this,void 0,void 0,function*(){const v=this._getModel(l);if(!v)return a;const f=[];let m;a=a.slice(0).sort((C,L)=>{if(C.range&&L.range)return E.Range.compareRangesUsingStarts(C.range,L.range);const D=C.range?0:1,I=L.range?0:1;return D-I});for(let{range:C,text:L,eol:D}of a){if(typeof D=="number"&&(m=D),E.Range.isEmpty(C)&&!L)continue;const I=v.getValueInRange(C);if(L=L.replace(/\r\n|\n|\r/g,v.eol),I===L)continue;if(Math.max(L.length,I.length)>h._diffLimit){f.push({range:C,text:L});continue}const T=(0,_.stringDiff)(I,L,u),O=v.offsetAt(E.Range.lift(C).getStartPosition());for(const R of T){const A=v.positionAt(O+R.originalStart),N=v.positionAt(O+R.originalStart+R.originalLength),P={text:L.substr(R.modifiedStart,R.modifiedLength),range:{startLineNumber:A.lineNumber,startColumn:A.column,endLineNumber:N.lineNumber,endColumn:N.column}};v.getValueInRange(P.range)!==P.text&&f.push(P)}}return typeof m=="number"&&f.push({eol:m,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),f})}computeLinks(l){return we(this,void 0,void 0,function*(){const a=this._getModel(l);return a?(0,S.computeLinks)(a):null})}computeDefaultDocumentColors(l){return we(this,void 0,void 0,function*(){const a=this._getModel(l);return a?(0,r.computeDefaultDocumentColors)(a):null})}textualSuggest(l,a,u,v){return we(this,void 0,void 0,function*(){const f=new n.StopWatch(!0),m=new RegExp(u,v),C=new Set;e:for(const L of l){const D=this._getModel(L);if(D){for(const I of D.words(m))if(!(I===a||!isNaN(Number(I)))&&(C.add(I),C.size>h._suggestionsLimit))break e}}return{words:Array.from(C),duration:f.elapsed()}})}computeWordRanges(l,a,u,v){return we(this,void 0,void 0,function*(){const f=this._getModel(l);if(!f)return Object.create(null);const m=new RegExp(u,v),C=Object.create(null);for(let L=a.startLineNumber;L<a.endLineNumber;L++){const D=f.getLineWords(L,m);for(const I of D){if(!isNaN(Number(I.word)))continue;let T=C[I.word];T||(T=[],C[I.word]=T),T.push({startLineNumber:L,startColumn:I.startColumn,endLineNumber:L,endColumn:I.endColumn})}}return C})}navigateValueSet(l,a,u,v,f){return we(this,void 0,void 0,function*(){const m=this._getModel(l);if(!m)return null;const C=new RegExp(v,f);a.startColumn===a.endColumn&&(a={startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn+1});const L=m.getValueInRange(a),D=m.getWordAtPosition({lineNumber:a.startLineNumber,column:a.startColumn},C);if(!D)return null;const I=m.getValueInRange(D);return g.BasicInplaceReplace.INSTANCE.navigateValueSet(a,L,D,I,u)})}loadForeignModule(l,a,u){const v=(C,L)=>this._host.fhr(C,L),m={host:(0,s.createProxyObject)(u,v),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(m,a),Promise.resolve((0,s.getAllMethodNames)(this._foreignModule))):new Promise((C,L)=>{K([l],D=>{this._foreignModule=D.create(m,a),C((0,s.getAllMethodNames)(this._foreignModule))},L)})}fmr(l,a){if(!this._foreignModule||typeof this._foreignModule[l]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+l));try{return Promise.resolve(this._foreignModule[l].apply(this._foreignModule,a))}catch(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,p.createMonacoBaseAPI)())}),define(X[308],ee([1,0,6,2,260,31]),function(K,e,_,k,y,E){"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(E.TokenizationRegistry.onDidChange(S=>{S.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const S=E.TokenizationRegistry.getColorMap();if(!S){this._colors=[y.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[y.RGBA8.Empty];for(let p=1;p<S.length;p++){const n=S[p].rgba;this._colors[p]=new y.RGBA8(n.r,n.g,n.b,Math.round(n.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(X[223],ee([1,0,6,2]),function(K,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 y 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(l){this._addOutgoingEvent(l),this._emitOutgoingEvents()}_addOutgoingEvent(l){for(let a=0,u=this._outgoingEvents.length;a<u;a++){const v=this._outgoingEvents[a].kind===l.kind?this._outgoingEvents[a].attemptToMerge(l):null;if(v){this._outgoingEvents[a]=v;return}}this._outgoingEvents.push(l)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const l=this._outgoingEvents.shift();l.isNoOp()||this._onEvent.fire(l)}}addViewEventHandler(l){for(let a=0,u=this._eventHandlers.length;a<u;a++)this._eventHandlers[a]===l&&console.warn("Detected duplicate listener in ViewEventDispatcher",l);this._eventHandlers.push(l)}removeViewEventHandler(l){for(let a=0;a<this._eventHandlers.length;a++)if(this._eventHandlers[a]===l){this._eventHandlers.splice(a,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new E),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const l=this._collector.outgoingEvents,a=this._collector.viewEvents;this._collector=null;for(const u of l)this._addOutgoingEvent(u);a.length>0&&this._emitMany(a)}this._emitOutgoingEvents()}emitSingleViewEvent(l){try{this.beginEmitViewEvents().emitViewEvent(l)}finally{this.endEmitViewEvents()}}_emitMany(l){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(l):this._viewEventQueue=l,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const l=this._viewEventQueue;this._viewEventQueue=null;const a=this._eventHandlers.slice(0);for(const u of a)u.handleEvents(l)}}}e.ViewModelEventDispatcher=y;class E{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(l){this.viewEvents.push(l)}emitOutgoingEvent(l){this.outgoingEvents.push(l)}}e.ViewModelEventsCollector=E;class w{constructor(l,a,u,v){this.kind=0,this._oldContentWidth=l,this._oldContentHeight=a,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(l){return l.kind!==this.kind?null:new w(this._oldContentWidth,this._oldContentHeight,l.contentWidth,l.contentHeight)}}e.ContentSizeChangedEvent=w;class b{constructor(l,a){this.kind=1,this.oldHasFocus=l,this.hasFocus=a}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(l){return l.kind!==this.kind?null:new b(this.oldHasFocus,l.hasFocus)}}e.FocusChangedEvent=b;class S{constructor(l,a,u,v,f,m,C,L){this.kind=2,this._oldScrollWidth=l,this._oldScrollLeft=a,this._oldScrollHeight=u,this._oldScrollTop=v,this.scrollWidth=f,this.scrollLeft=m,this.scrollHeight=C,this.scrollTop=L,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(l){return l.kind!==this.kind?null:new S(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,l.scrollWidth,l.scrollLeft,l.scrollHeight,l.scrollTop)}}e.ScrollChangedEvent=S;class g{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(l){return l.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=g;class p{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(l){return l.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=p;class n{constructor(l,a,u,v,f,m,C){this.kind=6,this.oldSelections=l,this.selections=a,this.oldModelVersionId=u,this.modelVersionId=v,this.source=f,this.reason=m,this.reachedMaxCursorCount=C}static _selectionsAreEqual(l,a){if(!l&&!a)return!0;if(!l||!a)return!1;const u=l.length,v=a.length;if(u!==v)return!1;for(let f=0;f<u;f++)if(!l[f].equalsSelection(a[f]))return!1;return!0}isNoOp(){return n._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(l){return l.kind!==this.kind?null:new n(this.oldSelections,l.selections,this.oldModelVersionId,l.modelVersionId,l.source,l.reason,this.reachedMaxCursorCount||l.reachedMaxCursorCount)}}e.CursorStateChangedEvent=n;class t{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(l){return l.kind!==this.kind?null:this}}e.ReadOnlyEditAttemptEvent=t;class i{constructor(l){this.event=l,this.kind=7}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelDecorationsChangedEvent=i;class s{constructor(l){this.event=l,this.kind=8}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelLanguageChangedEvent=s;class r{constructor(l){this.event=l,this.kind=9}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelLanguageConfigurationChangedEvent=r;class d{constructor(l){this.event=l,this.kind=10}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelContentChangedEvent=d;class h{constructor(l){this.event=l,this.kind=11}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelOptionsChangedEvent=h;class o{constructor(l){this.event=l,this.kind=12}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelTokensChangedEvent=o}),define(X[580],ee([1,0,6,2,177,510,81,223]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const S=125;class g{constructor(i,s,r,d){i=i|0,s=s|0,r=r|0,d=d|0,i<0&&(i=0),s<0&&(s=0),r<0&&(r=0),d<0&&(d=0),this.width=i,this.contentWidth=s,this.scrollWidth=Math.max(i,s),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 p extends k.Disposable{constructor(i,s){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 y.Scrollable({forceIntegerValues:!0,smoothScrollDuration:i,scheduleAtNextAnimationFrame:s})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(i){this._scrollable.setSmoothScrollDuration(i)}validateScrollPosition(i){return this._scrollable.validateScrollPosition(i)}getScrollDimensions(){return this._dimensions}setScrollDimensions(i){if(this._dimensions.equals(i))return;const s=this._dimensions;this._dimensions=i,this._scrollable.setScrollDimensions({width:i.width,scrollWidth:i.scrollWidth,height:i.height,scrollHeight:i.scrollHeight},!0);const r=s.contentWidth!==i.contentWidth,d=s.contentHeight!==i.contentHeight;(r||d)&&this._onDidContentSizeChange.fire(new b.ContentSizeChangedEvent(s.contentWidth,s.contentHeight,i.contentWidth,i.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(i){this._scrollable.setScrollPositionNow(i)}setScrollPositionSmooth(i){this._scrollable.setScrollPositionSmooth(i)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class n extends k.Disposable{constructor(i,s,r){super(),this._configuration=i;const d=this._configuration.options,h=d.get(139),o=d.get(81);this._linesLayout=new E.LinesLayout(s,d.get(64),o.top,o.bottom),this._scrollable=this._register(new p(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(109)?S:0)}onConfigurationChanged(i){const s=this._configuration.options;if(i.hasChanged(64)&&this._linesLayout.setLineHeight(s.get(64)),i.hasChanged(81)){const r=s.get(81);this._linesLayout.setPadding(r.top,r.bottom)}if(i.hasChanged(139)){const r=s.get(139),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(109)&&this._configureSmoothScrollDuration()}onFlushed(i){this._linesLayout.onFlushed(i)}onLinesDeleted(i,s){this._linesLayout.onLinesDeleted(i,s)}onLinesInserted(i,s){this._linesLayout.onLinesInserted(i,s)}_getHorizontalScrollbarHeight(i,s){const d=this._configuration.options.get(98);return d.horizontal===2||i>=s?0:d.horizontalScrollbarSize}_getContentHeight(i,s,r){const d=this._configuration.options;let h=this._linesLayout.getLinesTotalHeight();return d.get(100)?h+=Math.max(0,s-d.get(64)-d.get(81).bottom):h+=this._getHorizontalScrollbarHeight(i,r),h}_updateHeight(){const i=this._scrollable.getScrollDimensions(),s=i.width,r=i.height,d=i.contentWidth;this._scrollable.setScrollDimensions(new g(s,i.contentWidth,r,this._getContentHeight(s,r,d)))}getCurrentViewport(){const i=this._scrollable.getScrollDimensions(),s=this._scrollable.getCurrentScrollPosition();return new w.Viewport(s.scrollTop,s.scrollLeft,i.width,i.height)}getFutureViewport(){const i=this._scrollable.getScrollDimensions(),s=this._scrollable.getFutureScrollPosition();return new w.Viewport(s.scrollTop,s.scrollLeft,i.width,i.height)}_computeContentWidth(i){const s=this._configuration.options,r=s.get(140),d=s.get(48),h=s.get(139);if(r.isViewportWrapping){const o=s.get(70);return i>h.contentWidth+d.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?i+h.verticalScrollbarWidth:i}else{const o=s.get(99)*d.typicalHalfwidthCharacterWidth,c=this._linesLayout.getWhitespaceMinWidth();return Math.max(i+o+h.verticalScrollbarWidth,c)}}setMaxLineWidth(i){const s=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new g(s.width,this._computeContentWidth(i),s.height,s.contentHeight)),this._updateHeight()}saveState(){const i=this._scrollable.getFutureScrollPosition(),s=i.scrollTop,r=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(s),d=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(r);return{scrollTop:s,scrollTopWithoutViewZones:s-d,scrollLeft:i.scrollLeft}}changeWhitespace(i){const s=this._linesLayout.changeWhitespace(i);return s&&this.onHeightMaybeChanged(),s}getVerticalOffsetForLineNumber(i,s=!1){return this._linesLayout.getVerticalOffsetForLineNumber(i,s)}getVerticalOffsetAfterLineNumber(i,s=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(i,s)}isAfterLines(i){return this._linesLayout.isAfterLines(i)}isInTopPadding(i){return this._linesLayout.isInTopPadding(i)}isInBottomPadding(i){return this._linesLayout.isInBottomPadding(i)}getLineNumberAtVerticalOffset(i){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i)}getWhitespaceAtVerticalOffset(i){return this._linesLayout.getWhitespaceAtVerticalOffset(i)}getLinesViewportData(){const i=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(i.top,i.top+i.height)}getLinesViewportDataAtScrollTop(i){const s=this._scrollable.getScrollDimensions();return i+s.height>s.scrollHeight&&(i=s.scrollHeight-s.height),i<0&&(i=0),this._linesLayout.getLinesViewportData(i,i+s.height)}getWhitespaceViewportData(){const i=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(i.top,i.top+i.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(i){return this._scrollable.validateScrollPosition(i)}setScrollPosition(i,s){s===1?this._scrollable.setScrollPositionNow(i):this._scrollable.setScrollPositionSmooth(i)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(i,s){const r=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:r.scrollLeft+i,scrollTop:r.scrollTop+s})}}e.ViewLayout=n}),define(X[581],ee([1,0,6]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class k{get color(){return this._color}set color(E){this._color.equals(E)||(this._color=E,this._onDidChangeColor.fire(E))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(E){this._colorPresentations=E,this.presentationIndex>E.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(E,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=E,this._color=E,this._colorPresentations=w}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(E,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(X[582],ee([1,0,6,176,136]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class E{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((l,a)=>l.regionIndex-a.regionIndex);const c={};this._decorationProvider.changeDecorations(l=>{let a=0,u=-1,v=-1;const f=m=>{for(;a<m;){const C=this._regions.getEndLineNumber(a),L=this._regions.isCollapsed(a);if(C<=u){const D=this.regions.getSource(a)!==0;l.changeDecorationOptions(this._editorDecorationIds[a],this._decorationProvider.getDecorationOption(L,C<=v,D))}L&&C>v&&(v=C),a++}};for(const m of o){const C=m.regionIndex,L=this._editorDecorationIds[C];if(L&&!c[L]){c[L]=!0,f(C);const D=!this._regions.isCollapsed(C);this._regions.setCollapsed(C,D),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,l=a=>{for(const u of o)if(!(u.startLineNumber>a.endLineNumber||a.startLineNumber>u.endLineNumber))return!0;return!1};for(let a=0;a<this._regions.length;a++){const u=this._regions.toFoldRange(a);(u.source===0||!l(u))&&c.push(u)}this.updatePost(k.FoldingRegions.fromFoldRanges(c))}update(o,c=[]){const l=this._currentFoldedOrManualRanges(c),a=k.FoldingRegions.sanitizeAndMerge(o,l,this._textModel.getLineCount());this.updatePost(k.FoldingRegions.fromFoldRanges(a))}updatePost(o){const c=[];let l=-1;for(let a=0,u=o.length;a<u;a++){const v=o.getStartLineNumber(a),f=o.getEndLineNumber(a),m=o.isCollapsed(a),C=o.getSource(a)!==0,L={startLineNumber:v,startColumn:this._textModel.getLineMaxColumn(v),endLineNumber:f,endColumn:this._textModel.getLineMaxColumn(f)+1};c.push({range:L,options:this._decorationProvider.getDecorationOption(m,f<=l,C)}),m&&f>l&&(l=f)}this._decorationProvider.changeDecorations(a=>this._editorDecorationIds=a.deltaDecorations(this._editorDecorationIds,c)),this._regions=o,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(o=[]){const c=(a,u)=>{for(const v of o)if(a<v&&v<=u)return!0;return!1},l=[];for(let a=0,u=this._regions.length;a<u;a++){let v=this.regions.isCollapsed(a);const f=this.regions.getSource(a);if(v||f!==0){const m=this._regions.toFoldRange(a),C=this._textModel.getDecorationRange(this._editorDecorationIds[a]);C&&(v&&c(C.startLineNumber,C.endLineNumber)&&(v=!1),l.push({startLineNumber:C.startLineNumber,endLineNumber:C.endLineNumber,type:m.type,isCollapsed:v,source:f}))}}return l}getMemento(){const o=this._currentFoldedOrManualRanges(),c=[],l=this._textModel.getLineCount();for(let a=0,u=o.length;a<u;a++){const v=o[a];if(v.startLineNumber>=v.endLineNumber||v.startLineNumber<1||v.endLineNumber>l)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,l;if(!Array.isArray(o))return;const a=[],u=this._textModel.getLineCount();for(const f of o){if(f.startLineNumber>=f.endLineNumber||f.startLineNumber<1||f.endLineNumber>u)continue;const m=this._getLinesChecksum(f.startLineNumber+1,f.endLineNumber);(!f.checksum||m===f.checksum)&&a.push({startLineNumber:f.startLineNumber,endLineNumber:f.endLineNumber,type:void 0,isCollapsed:(c=f.isCollapsed)!==null&&c!==void 0?c:!0,source:(l=f.source)!==null&&l!==void 0?l:0})}const v=k.FoldingRegions.sanitizeAndMerge(this._regions,a,u);this.updatePost(k.FoldingRegions.fromFoldRanges(v))}_getLinesChecksum(o,c){return(0,y.hash)(this._textModel.getLineContent(o)+this._textModel.getLineContent(c))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(o,c){const l=[];if(this._regions){let a=this._regions.findRange(o),u=1;for(;a>=0;){const v=this._regions.toRegion(a);(!c||c(v,u))&&l.push(v),u++,a=v.parentIndex}}return l}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 l=[],a=o?o.regionIndex+1:0,u=o?o.endLineNumber:Number.MAX_VALUE;if(c&&c.length===2){const v=[];for(let f=a,m=this._regions.length;f<m;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)&&l.push(C)}else break}}else for(let v=a,f=this._regions.length;v<f;v++){const m=this._regions.toRegion(v);if(this._regions.getStartLineNumber(v)<u)(!c||c(m))&&l.push(m);else break}return l}}e.FoldingModel=E;function w(h,o,c){const l=[];for(const a of c){const u=h.getRegionAtLine(a);if(u){const v=!u.isCollapsed;if(l.push(u),o>1){const f=h.getRegionsInside(u,(m,C)=>m.isCollapsed!==v&&C<o);l.push(...f)}}}h.toggleCollapseState(l)}e.toggleCollapseState=w;function b(h,o,c=Number.MAX_VALUE,l){const a=[];if(l&&l.length>0)for(const u of l){const v=h.getRegionAtLine(u);if(v&&(v.isCollapsed!==o&&a.push(v),c>1)){const f=h.getRegionsInside(v,(m,C)=>m.isCollapsed!==o&&C<c);a.push(...f)}}else{const u=h.getRegionsInside(null,(v,f)=>v.isCollapsed!==o&&f<c);a.push(...u)}h.toggleCollapseState(a)}e.setCollapseStateLevelsDown=b;function S(h,o,c,l){const a=[];for(const u of l){const v=h.getAllRegionsAtLine(u,(f,m)=>f.isCollapsed!==o&&m<=c);a.push(...v)}h.toggleCollapseState(a)}e.setCollapseStateLevelsUp=S;function g(h,o,c){const l=[];for(const a of c){const u=h.getAllRegionsAtLine(a,v=>v.isCollapsed!==o);u.length>0&&l.push(u[0])}h.toggleCollapseState(l)}e.setCollapseStateUp=g;function p(h,o,c,l){const a=(v,f)=>f===o&&v.isCollapsed!==c&&!l.some(m=>v.containsLine(m)),u=h.getRegionsInside(null,a);h.toggleCollapseState(u)}e.setCollapseStateAtLevel=p;function n(h,o,c){const l=[];for(const v of c){const f=h.getAllRegionsAtLine(v,void 0);f.length>0&&l.push(f[0])}const a=v=>l.every(f=>!f.containedBy(v)&&!v.containedBy(f))&&v.isCollapsed!==o,u=h.getRegionsInside(null,a);h.toggleCollapseState(u)}e.setCollapseStateForRest=n;function t(h,o,c){const l=h.textModel,a=h.regions,u=[];for(let v=a.length-1;v>=0;v--)if(c!==a.isCollapsed(v)){const f=a.getStartLineNumber(v);o.test(l.getLineContent(f))&&u.push(a.toRegion(v))}h.toggleCollapseState(u)}e.setCollapseStateForMatchingLines=t;function i(h,o,c){const l=h.regions,a=[];for(let u=l.length-1;u>=0;u--)c!==l.isCollapsed(u)&&o===l.getType(u)&&a.push(l.toRegion(u));h.toggleCollapseState(a)}e.setCollapseStateForType=i;function s(h,o){let c=null;const l=o.getRegionAtLine(h);if(l!==null&&(c=l.startLineNumber,h===c)){const a=l.parentIndex;a!==-1?c=o.regions.getStartLineNumber(a):c=null}return c}e.getParentFoldLine=s;function r(h,o){let c=o.getRegionAtLine(h);if(c!==null&&c.startLineNumber===h){if(h!==c.startLineNumber)return c.startLineNumber;{const l=c.parentIndex;let a=0;for(l!==-1&&(a=o.regions.getStartLineNumber(c.parentIndex));c!==null;)if(c.regionIndex>0){if(c=o.regions.toRegion(c.regionIndex-1),c.startLineNumber<=a)return null;if(c.parentIndex===l)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 l=c.parentIndex;let a=0;if(l!==-1)a=o.regions.getEndLineNumber(c.parentIndex);else{if(o.regions.length===0)return null;a=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>=a)return null;if(c.parentIndex===l)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(X[583],ee([1,0,16,6,5,117]),function(K,e,_,k,y,E){"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(p){this._updateEventEmitter=new k.Emitter,this._hasLineChanges=!1,this._foldingModel=p,this._foldingModelListener=p.onDidChange(n=>this.updateHiddenRanges()),this._hiddenRanges=[],p.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(p){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=p.changes.some(n=>n.range.endLineNumber!==n.range.startLineNumber||(0,E.countEOL)(n.text)[0]!==0))}updateHiddenRanges(){let p=!1;const n=[];let t=0,i=0,s=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);s<=h&&o<=r||(!p&&i<this._hiddenRanges.length&&this._hiddenRanges[i].startLineNumber===h&&this._hiddenRanges[i].endLineNumber===o?(n.push(this._hiddenRanges[i]),i++):(p=!0,n.push(new y.Range(h,1,o,1))),s=h,r=o)}(this._hasLineChanges||p||i<this._hiddenRanges.length)&&this.applyHiddenRanges(n)}applyHiddenRanges(p){this._hiddenRanges=p,this._hasLineChanges=!1,this._updateEventEmitter.fire(p)}hasRanges(){return this._hiddenRanges.length>0}isHidden(p){return S(this._hiddenRanges,p)!==null}adjustSelections(p){let n=!1;const t=this._foldingModel.textModel;let i=null;const s=r=>((!i||!b(r,i))&&(i=S(this._hiddenRanges,r)),i?i.startLineNumber-1:null);for(let r=0,d=p.length;r<d;r++){let h=p[r];const o=s(h.startLineNumber);o&&(h=h.setStartPosition(o,t.getLineMaxColumn(o)),n=!0);const c=s(h.endLineNumber);c&&(h=h.setEndPosition(c,t.getLineMaxColumn(c)),n=!0),p[r]=h}return n}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=w;function b(g,p){return g>=p.startLineNumber&&g<=p.endLineNumber}function S(g,p){const n=(0,_.findFirstInSorted)(g,t=>p<t.startLineNumber)-1;return n>=0&&g[n].endLineNumber>=p?g[n]:null}}),define(X[179],ee([1,0,6,2,17]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function E(n,t){return!!n[t]}class w{constructor(t,i){this.target=t.target,this.isLeftClick=t.event.leftButton,this.isMiddleClick=t.event.middleButton,this.isRightClick=t.event.rightButton,this.hasTriggerModifier=E(t.event,i.triggerModifier),this.hasSideBySideModifier=E(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=E(t,i.triggerModifier)}}e.ClickLinkKeyboardEvent=b;class S{constructor(t,i,s,r){this.triggerKey=t,this.triggerModifier=i,this.triggerSideBySideKey=s,this.triggerSideBySideModifier=r}equals(t){return this.triggerKey===t.triggerKey&&this.triggerModifier===t.triggerModifier&&this.triggerSideBySideKey===t.triggerSideBySideKey&&this.triggerSideBySideModifier===t.triggerSideBySideModifier}}e.ClickLinkOptions=S;function g(n){return n==="altKey"?y.isMacintosh?new S(57,"metaKey",6,"altKey"):new S(5,"ctrlKey",6,"altKey"):y.isMacintosh?new S(6,"altKey",57,"metaKey"):new S(6,"altKey",5,"ctrlKey")}class p 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(s=>{if(s.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(s=>this._onEditorMouseMove(new w(s,this._opts)))),this._register(this._editor.onMouseDown(s=>this._onEditorMouseDown(new w(s,this._opts)))),this._register(this._editor.onMouseUp(s=>this._onEditorMouseUp(new w(s,this._opts)))),this._register(this._editor.onKeyDown(s=>this._onEditorKeyDown(new b(s,this._opts)))),this._register(this._editor.onKeyUp(s=>this._onEditorKeyUp(new b(s,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(s=>this._onDidChangeCursorSelection(s))),this._register(this._editor.onDidChangeModel(s=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(s=>{(s.scrollTopChanged||s.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(t){t.selection&&t.selection.startColumn!==t.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(t){this._lastMouseMoveEvent=t,this._onMouseMoveOrRelevantKeyDown.fire([t,null])}_onEditorMouseDown(t){this._hasTriggerKeyOnMouseDown=t.hasTriggerModifier,this._lineNumberOnMouseDown=t.target.position?t.target.position.lineNumber:0}_onEditorMouseUp(t){const i=t.target.position?t.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===i||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(t)}_onEditorKeyDown(t){this._lastMouseMoveEvent&&(t.keyCodeIsTriggerKey||t.keyCodeIsSideBySideKey&&t.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,t]):t.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(t){t.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=p});var wt=this&&this.__asyncValues||function(K){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=K[Symbol.asyncIterator],_;return e?e.call(K):(K=typeof __values=="function"?__values(K):K[Symbol.iterator](),_={},k("next"),k("throw"),k("return"),_[Symbol.asyncIterator]=function(){return this},_);function k(E){_[E]=K[E]&&function(w){return new Promise(function(b,S){w=K[E](w),y(b,S,w.done,w.value)})}}function y(E,w,b,S){Promise.resolve(S).then(function(g){E({value:g,done:b})},w)}};define(X[309],ee([1,0,13,11,6,2]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class w{constructor(g,p,n){this.value=g,this.isComplete=p,this.hasLoadingMessage=n}}e.HoverResult=w;class b extends E.Disposable{constructor(g,p){super(),this._editor=g,this._computer=p,this._onResult=this._register(new y.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,p=!0){this._state=g,p&&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,p,n,t;try{try{for(var i=!0,s=wt(this._asyncIterable),r;r=yield s.next(),g=r.done,!g;){t=r.value,i=!1;try{const d=t;d&&(this._result.push(d),this._fireResult())}finally{i=!0}}}catch(d){p={error:d}}finally{try{!i&&!g&&(n=s.return)&&(yield n.call(s))}finally{if(p)throw p.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,p=this._state===4;this._onResult.fire(new w(this._result.slice(0),g,p))}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(X[310],ee([1,0,11,2,12,5,48,20]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class S{constructor(i,s){this.range=i,this.direction=s}}e.InlayHintAnchor=S;class g{constructor(i,s,r){this.hint=i,this.anchor=s,this.provider=r,this._isResolved=!1}with(i){const s=new g(this.hint,i.anchor,this.provider);return s._isResolved=this._isResolved,s._currentResolve=this._currentResolve,s}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 s,r;return we(this,void 0,void 0,function*(){try{const d=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,i));this.hint.tooltip=(s=d?.tooltip)!==null&&s!==void 0?s: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 p{static create(i,s,r,d){return we(this,void 0,void 0,function*(){const h=[],o=i.ordered(s).reverse().map(c=>r.map(l=>we(this,void 0,void 0,function*(){try{const a=yield c.provideInlayHints(s,l,d);a?.hints.length&&h.push([a,c])}catch(a){(0,_.onUnexpectedExternalError)(a)}})));if(yield Promise.all(o.flat()),d.isCancellationRequested||s.isDisposed())throw new _.CancellationError;return new p(r,h,s)})}constructor(i,s,r){this._disposables=new k.DisposableStore,this.ranges=i,this.provider=new Set;const d=[];for(const[h,o]of s){this._disposables.add(h),this.provider.add(o);for(const c of h.hints){const l=r.validatePosition(c.position);let a="before";const u=p._getRangeAtPosition(r,l);let v;u.getStartPosition().isBefore(l)?(v=E.Range.fromPositions(u.getStartPosition(),l),a="after"):(v=E.Range.fromPositions(l,u.getEndPosition()),a="before"),d.push(new g(c,new S(v,a),o))}}this.items=d.sort((h,o)=>y.Position.compare(h.hint.position,o.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(i,s){const r=s.lineNumber,d=i.getWordAtPosition(s);if(d)return new E.Range(r,d.startColumn,r,d.endColumn);i.tokenization.tokenizeIfCheap(r);const h=i.tokenization.getLineTokens(r),o=s.column-1,c=h.findTokenIndexAtOffset(o);let l=h.getStartOffset(c),a=h.getEndOffset(c);return a-l===1&&(l===o&&c>1?(l=h.getStartOffset(c-1),a=h.getEndOffset(c-1)):a===o&&c<h.getCount()-1&&(l=h.getStartOffset(c+1),a=h.getEndOffset(c+1))),new E.Range(r,l+1,r,a+1)}}e.InlayHintsFragments=p;function n(t){return b.URI.from({scheme:w.Schemas.command,path:t.id,query:t.arguments&&encodeURIComponent(JSON.stringify(t.arguments))}).toString()}e.asCommandLink=n}),define(X[584],ee([1,0,85,21,11,5,489,142,95]),function(K,e,_,k,y,E,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,l){return we(this,void 0,void 0,function*(){const a=i(d,h),u=r.all(h),v=yield Promise.all(u.map(C=>we(this,void 0,void 0,function*(){try{const L=yield C.provideInlineCompletions(h,d,o,c);return{provider:C,completions:L}}catch(L){(0,y.onUnexpectedExternalError)(L)}return{provider:C,completions:void 0}}))),f=new Map,m=[];for(const C of v){const L=C.completions;if(!L)continue;const D=new n(L,C.provider);m.push(D);for(const I of L.items){const T=t.from(I,D,a,h,l);f.set(T.hash(),T)}}return new p(Array.from(f.values()),new Set(f.keys()),m)})}e.provideInlineCompletions=g;class p{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=p;class n{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=n;class t{static from(d,h,o,c,l){let a,u,v=d.range?E.Range.lift(d.range):o;if(typeof d.insertText=="string"){if(a=d.insertText,l&&d.completeBracketPairs){a=s(a,v.getStartPosition(),c,l);const f=a.length-d.insertText.length;f!==0&&(v=new E.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(l&&d.completeBracketPairs){d.insertText.snippet=s(d.insertText.snippet,v.getStartPosition(),c,l);const C=d.insertText.snippet.length-f;C!==0&&(v=new E.Range(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn+C))}const m=new S.SnippetParser().parse(d.insertText.snippet);m.children.length===1&&m.children[0]instanceof S.Text?(a=m.children[0].value,u=void 0):(a=m.toString(),u={snippet:d.insertText.snippet,range:v})}else(0,_.assertNever)(d.insertText);return new t(a,d.command,v,a,u,d.additionalTextEdits||(0,b.getReadonlyEmptyArray)(),d,h)}constructor(d,h,o,c,l,a,u,v){this.filterText=d,this.command=h,this.range=o,this.insertText=c,this.snippetInfo=l,this.additionalTextEdits=a,this.sourceInlineCompletion=u,this.source=v,d=d.replace(/\r\n|\r/g,`
- `),c=d.replace(/\r\n|\r/g,`
- `)}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 E.Range(r.lineNumber,h.startColumn,r.lineNumber,o):E.Range.fromPositions(r,r.with(void 0,o))}function s(r,d,h,o){const l=h.getLineContent(d.lineNumber).substring(0,d.column-1)+r,a=h.tokenization.tokenizeLineWithEdit(d,l.length-(d.column-1),r),u=a?.sliceAndInflate(d.column-1,l.length,0);return u?(0,w.fixBracketsInLine)(u,o):r}}),define(X[585],ee([3,4]),function(K,e){return K.create("vs/editor/browser/controller/textAreaHandler",e)}),define(X[586],ee([3,4]),function(K,e){return K.create("vs/editor/browser/coreCommands",e)}),define(X[587],ee([3,4]),function(K,e){return K.create("vs/editor/browser/editorExtensions",e)}),define(X[588],ee([3,4]),function(K,e){return K.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(X[589],ee([3,4]),function(K,e){return K.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(X[590],ee([3,4]),function(K,e){return K.create("vs/editor/browser/widget/diffReview",e)}),define(X[591],ee([3,4]),function(K,e){return K.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(X[592],ee([1,0,591,7,40,2,5,27,30]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class g extends E.Disposable{get visibility(){return this._visibility}set visibility(n){this._visibility!==n&&(this._visibility=n,n?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}constructor(n,t,i,s,r,d){super(),this._viewZoneId=n,this._marginDomNode=t,this.editor=i,this.diff=s,this._contextMenuService=r,this._clipboardService=d,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 h=i.getOption(64),o=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${h}px`,this._diffActions.style.lineHeight=`${h}px`,this._marginDomNode.appendChild(this._diffActions);const c=[],l=s.modifiedEndLineNumber===0;c.push(new y.Action("diff.clipboard.copyDeletedContent",l?s.originalEndLineNumber>s.modifiedStartLineNumber?_.localize(0,null):_.localize(1,null):s.originalEndLineNumber>s.modifiedStartLineNumber?_.localize(2,null):_.localize(3,null),void 0,!0,()=>we(this,void 0,void 0,function*(){const m=new w.Range(s.originalStartLineNumber,1,s.originalEndLineNumber+1,1),C=s.originalModel.getValueInRange(m);yield this._clipboardService.writeText(C)})));let a=0,u;s.originalEndLineNumber>s.modifiedStartLineNumber&&(u=new y.Action("diff.clipboard.copyDeletedLineContent",l?_.localize(4,null,s.originalStartLineNumber):_.localize(5,null,s.originalStartLineNumber),void 0,!0,()=>we(this,void 0,void 0,function*(){const m=s.originalModel.getLineContent(s.originalStartLineNumber+a);if(m===""){const C=s.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(C===0?`
- `:`\r
- `)}else yield this._clipboardService.writeText(m)})),c.push(u)),i.getOption(87)||c.push(new y.Action("diff.inline.revertChange",_.localize(6,null),void 0,!0,()=>we(this,void 0,void 0,function*(){const m=new w.Range(s.originalStartLineNumber,1,s.originalEndLineNumber,s.originalModel.getLineMaxColumn(s.originalEndLineNumber)),C=s.originalModel.getValueInRange(m);if(s.modifiedEndLineNumber===0){const L=i.getModel().getLineMaxColumn(s.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new w.Range(s.modifiedStartLineNumber,L,s.modifiedStartLineNumber,L),text:o+C}])}else{const L=i.getModel().getLineMaxColumn(s.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new w.Range(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,L),text:C}])}})));const f=(m,C)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:m,y:C}),getActions:()=>(u&&(u.label=l?_.localize(7,null,s.originalStartLineNumber+a):_.localize(8,null,s.originalStartLineNumber+a)),c),autoSelectFirstItem:!0})};this._register(k.addStandardDisposableListener(this._diffActions,"mousedown",m=>{const{top:C,height:L}=k.getDomNodePagePosition(this._diffActions),D=Math.floor(h/3);m.preventDefault(),f(m.posx,C+L+D)})),this._register(i.onMouseMove(m=>{m.target.type===8||m.target.type===5?m.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,a=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,h)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(m=>{m.event.rightButton&&(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._viewZoneId&&(m.event.preventDefault(),a=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,h),f(m.event.posx,m.event.posy+h))}))}_updateLightBulbPosition(n,t,i){const{top:s}=k.getDomNodePagePosition(n),r=t-s,d=Math.floor(r/i),h=d*i;if(this._diffActions.style.top=`${h}px`,this.diff.viewLineCounts){let o=0;for(let c=0;c<this.diff.viewLineCounts.length;c++)if(o+=this.diff.viewLineCounts[c],d<o)return c}return d}}e.InlineDiffMargin=g}),define(X[593],ee([3,4]),function(K,e){return K.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(X[594],ee([3,4]),function(K,e){return K.create("vs/editor/common/config/editorOptions",e)}),define(X[41],ee([1,0,594,17,139,16,45,168]),function(K,e,_,k,y,E,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(de){this._values=de}hasChanged(de){return this._values[de]}}e.ConfigurationChangedEvent=S;class g{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=g;class p{constructor(de,pe,Le,Ne){this.id=de,this.name=pe,this.defaultValue=Le,this.schema=Ne}applyUpdate(de,pe){return t(de,pe)}compute(de,pe,Le){return Le}}class n{constructor(de,pe){this.newValue=de,this.didChange=pe}}e.ApplyUpdateResult=n;function t(ve,de){if(typeof ve!="object"||typeof de!="object"||!ve||!de)return new n(de,ve!==de);if(Array.isArray(ve)||Array.isArray(de)){const Le=Array.isArray(ve)&&Array.isArray(de)&&E.equals(ve,de);return new n(de,!Le)}let pe=!1;for(const Le in de)if(de.hasOwnProperty(Le)){const Ne=t(ve[Le],de[Le]);Ne.didChange&&(ve[Le]=Ne.newValue,pe=!0)}return new n(ve,pe)}class i{constructor(de){this.schema=void 0,this.id=de,this.name="_never_",this.defaultValue=void 0}applyUpdate(de,pe){return t(de,pe)}validate(de){return this.defaultValue}}class s{constructor(de,pe,Le,Ne){this.id=de,this.name=pe,this.defaultValue=Le,this.schema=Ne}applyUpdate(de,pe){return t(de,pe)}validate(de){return typeof de>"u"?this.defaultValue:de}compute(de,pe,Le){return Le}}function r(ve,de){return typeof ve>"u"?de:ve==="false"?!1:!!ve}e.boolean=r;class d extends s{constructor(de,pe,Le,Ne=void 0){typeof Ne<"u"&&(Ne.type="boolean",Ne.default=Le),super(de,pe,Le,Ne)}validate(de){return r(de,this.defaultValue)}}function h(ve,de,pe,Le){if(typeof ve>"u")return de;let Ne=parseInt(ve,10);return isNaN(Ne)?de:(Ne=Math.max(pe,Ne),Ne=Math.min(Le,Ne),Ne|0)}e.clampedInt=h;class o extends s{static clampedInt(de,pe,Le,Ne){return h(de,pe,Le,Ne)}constructor(de,pe,Le,Ne,be,_e=void 0){typeof _e<"u"&&(_e.type="integer",_e.default=Le,_e.minimum=Ne,_e.maximum=be),super(de,pe,Le,_e),this.minimum=Ne,this.maximum=be}validate(de){return o.clampedInt(de,this.defaultValue,this.minimum,this.maximum)}}function c(ve,de,pe,Le){if(typeof ve>"u")return de;const Ne=l.float(ve,de);return l.clamp(Ne,pe,Le)}e.clampedFloat=c;class l extends s{static clamp(de,pe,Le){return de<pe?pe:de>Le?Le:de}static float(de,pe){if(typeof de=="number")return de;if(typeof de>"u")return pe;const Le=parseFloat(de);return isNaN(Le)?pe:Le}constructor(de,pe,Le,Ne,be){typeof be<"u"&&(be.type="number",be.default=Le),super(de,pe,Le,be),this.validationFn=Ne}validate(de){return this.validationFn(l.float(de,this.defaultValue))}}class a extends s{static string(de,pe){return typeof de!="string"?pe:de}constructor(de,pe,Le,Ne=void 0){typeof Ne<"u"&&(Ne.type="string",Ne.default=Le),super(de,pe,Le,Ne)}validate(de){return a.string(de,this.defaultValue)}}function u(ve,de,pe,Le){return typeof ve!="string"?de:Le&&ve in Le?Le[ve]:pe.indexOf(ve)===-1?de:ve}e.stringSet=u;class v extends s{constructor(de,pe,Le,Ne,be=void 0){typeof be<"u"&&(be.type="string",be.enum=Ne,be.default=Le),super(de,pe,Le,be),this._allowedValues=Ne}validate(de){return u(de,this.defaultValue,this._allowedValues)}}class f extends p{constructor(de,pe,Le,Ne,be,_e,Te=void 0){typeof Te<"u"&&(Te.type="string",Te.enum=be,Te.default=Ne),super(de,pe,Le,Te),this._allowedValues=be,this._convert=_e}validate(de){return typeof de!="string"?this.defaultValue:this._allowedValues.indexOf(de)===-1?this.defaultValue:this._convert(de)}}function m(ve){switch(ve){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class C extends p{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(de){switch(de){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(de,pe,Le){return Le===0?de.accessibilitySupport:Le}}class L extends p{constructor(){const de={insertSpace:!0,ignoreEmptyLines:!0};super(21,"comments",de,{"editor.comments.insertSpace":{type:"boolean",default:de.insertSpace,description:_.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:de.ignoreEmptyLines,description:_.localize(5,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;return{insertSpace:r(pe.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:r(pe.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function D(ve){switch(ve){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var I;(function(ve){ve[ve.Line=1]="Line",ve[ve.Block=2]="Block",ve[ve.Underline=3]="Underline",ve[ve.LineThin=4]="LineThin",ve[ve.BlockOutline=5]="BlockOutline",ve[ve.UnderlineThin=6]="UnderlineThin"})(I||(e.TextEditorCursorStyle=I={}));function T(ve){switch(ve){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(136)}compute(de,pe,Le){const Ne=["monaco-editor"];return pe.get(37)&&Ne.push(pe.get(37)),de.extraEditorClassName&&Ne.push(de.extraEditorClassName),pe.get(71)==="default"?Ne.push("mouse-default"):pe.get(71)==="copy"&&Ne.push("mouse-copy"),pe.get(106)&&Ne.push("showUnused"),pe.get(134)&&Ne.push("showDeprecated"),Ne.join(" ")}}class R extends d{constructor(){super(35,"emptySelectionClipboard",!0,{description:_.localize(6,null)})}compute(de,pe,Le){return Le&&de.emptySelectionClipboard}}class A extends p{constructor(){const de={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(39,"find",de,{"editor.find.cursorMoveOnType":{type:"boolean",default:de.cursorMoveOnType,description:_.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:de.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:de.autoFindInSelection,enumDescriptions:[_.localize(12,null),_.localize(13,null),_.localize(14,null)],description:_.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:de.globalFindClipboard,description:_.localize(16,null),included:k.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:de.addExtraSpaceOnTop,description:_.localize(17,null)},"editor.find.loop":{type:"boolean",default:de.loop,description:_.localize(18,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;return{cursorMoveOnType:r(pe.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof de.seedSearchStringFromSelection=="boolean"?de.seedSearchStringFromSelection?"always":"never":u(pe.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof de.autoFindInSelection=="boolean"?de.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 p{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(de){return typeof de>"u"?this.defaultValue:typeof de=="string"?de==="false"?N.OFF:de==="true"?N.ON:de:de?N.ON:N.OFF}}e.EditorFontLigatures=N,N.OFF='"liga" off, "calt" off',N.ON='"liga" on, "calt" on';class P extends p{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(de){return typeof de>"u"?this.defaultValue:typeof de=="string"?de==="false"?P.OFF:de==="true"?P.TRANSLATE:de:de?P.TRANSLATE:P.OFF}compute(de,pe,Le){return de.fontInfo.fontVariationSettings}}e.EditorFontVariations=P,P.OFF="normal",P.TRANSLATE="translate";class x extends i{constructor(){super(48)}compute(de,pe,Le){return de.fontInfo}}class F extends s{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(de){const pe=l.float(de,this.defaultValue);return pe===0?e.EDITOR_FONT_DEFAULTS.fontSize:l.clamp(pe,6,100)}compute(de,pe,Le){return de.fontInfo.fontSize}}class B extends p{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(de){return de==="normal"||de==="bold"?de:String(o.clampedInt(de,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 p{constructor(){const de={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:de.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",de,{"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:de.alternativeDefinitionCommand,enum:Le,description:_.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:de.alternativeTypeDefinitionCommand,enum:Le,description:_.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:de.alternativeDeclarationCommand,enum:Le,description:_.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:de.alternativeImplementationCommand,enum:Le,description:_.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:de.alternativeReferenceCommand,enum:Le,description:_.localize(41,null)}})}validate(de){var pe,Le,Ne,be,_e;if(!de||typeof de!="object")return this.defaultValue;const Te=de;return{multiple:u(Te.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(pe=Te.multipleDefinitions)!==null&&pe!==void 0?pe:u(Te.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Le=Te.multipleTypeDefinitions)!==null&&Le!==void 0?Le:u(Te.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Ne=Te.multipleDeclarations)!==null&&Ne!==void 0?Ne:u(Te.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(be=Te.multipleImplementations)!==null&&be!==void 0?be:u(Te.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(_e=Te.multipleReferences)!==null&&_e!==void 0?_e:u(Te.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:a.string(Te.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:a.string(Te.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:a.string(Te.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:a.string(Te.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:a.string(Te.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class $ extends p{constructor(){const de={enabled:!0,delay:300,sticky:!0,above:!0};super(58,"hover",de,{"editor.hover.enabled":{type:"boolean",default:de.enabled,description:_.localize(42,null)},"editor.hover.delay":{type:"number",default:de.delay,minimum:0,maximum:1e4,description:_.localize(43,null)},"editor.hover.sticky":{type:"boolean",default:de.sticky,description:_.localize(44,null)},"editor.hover.above":{type:"boolean",default:de.above,description:_.localize(45,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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 M extends i{constructor(){super(139)}compute(de,pe,Le){return M.computeLayout(pe,{memory:de.memory,outerWidth:de.outerWidth,outerHeight:de.outerHeight,isDominatedByLongLines:de.isDominatedByLongLines,lineHeight:de.fontInfo.lineHeight,viewLineCount:de.viewLineCount,lineNumbersDigitCount:de.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:de.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:de.fontInfo.maxDigitWidth,pixelRatio:de.pixelRatio,glyphMarginDecorationLaneCount:de.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(de){const pe=de.height/de.lineHeight,Le=Math.floor(de.paddingTop/de.lineHeight);let Ne=Math.floor(de.paddingBottom/de.lineHeight);de.scrollBeyondLastLine&&(Ne=Math.max(Ne,pe-1));const be=(Le+de.viewLineCount+Ne)/(de.pixelRatio*de.height),_e=Math.floor(de.viewLineCount/be);return{typicalViewportLineCount:pe,extraLinesBeforeFirstLine:Le,extraLinesBeyondLastLine:Ne,desiredRatio:be,minimapLineCount:_e}}static _computeMinimapLayout(de,pe){const Le=de.outerWidth,Ne=de.outerHeight,be=de.pixelRatio;if(!de.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(be*Ne),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Ne};const _e=pe.stableMinimapLayoutInput,Te=_e&&de.outerHeight===_e.outerHeight&&de.lineHeight===_e.lineHeight&&de.typicalHalfwidthCharacterWidth===_e.typicalHalfwidthCharacterWidth&&de.pixelRatio===_e.pixelRatio&&de.scrollBeyondLastLine===_e.scrollBeyondLastLine&&de.paddingTop===_e.paddingTop&&de.paddingBottom===_e.paddingBottom&&de.minimap.enabled===_e.minimap.enabled&&de.minimap.side===_e.minimap.side&&de.minimap.size===_e.minimap.size&&de.minimap.showSlider===_e.minimap.showSlider&&de.minimap.renderCharacters===_e.minimap.renderCharacters&&de.minimap.maxColumn===_e.minimap.maxColumn&&de.minimap.scale===_e.minimap.scale&&de.verticalScrollbarWidth===_e.verticalScrollbarWidth&&de.isViewportWrapping===_e.isViewportWrapping,Oe=de.lineHeight,Pe=de.typicalHalfwidthCharacterWidth,Be=de.scrollBeyondLastLine,Fe=de.minimap.renderCharacters;let ze=be>=2?Math.round(de.minimap.scale*2):de.minimap.scale;const Ze=de.minimap.maxColumn,Ge=de.minimap.size,tt=de.minimap.side,He=de.verticalScrollbarWidth,Ae=de.viewLineCount,xe=de.remainingWidth,Ve=de.isViewportWrapping,$e=Fe?2:3;let Je=Math.floor(be*Ne);const Ke=Je/be;let Xe=!1,rt=!1,st=$e*ze,dt=ze/be,Ye=1;if(Ge==="fill"||Ge==="fit"){const{typicalViewportLineCount:je,extraLinesBeforeFirstLine:nt,extraLinesBeyondLastLine:Qe,desiredRatio:ot,minimapLineCount:it}=M.computeContainedMinimapLineCount({viewLineCount:Ae,scrollBeyondLastLine:Be,paddingTop:de.paddingTop,paddingBottom:de.paddingBottom,height:Ne,lineHeight:Oe,pixelRatio:be});if(Ae/it>1)Xe=!0,rt=!0,ze=1,st=1,dt=ze/be;else{let ft=!1,Lt=ze+1;if(Ge==="fit"){const yt=Math.ceil((nt+Ae+Qe)*st);Ve&&Te&&xe<=pe.stableFitRemainingWidth?(ft=!0,Lt=pe.stableFitMaxMinimapScale):ft=yt>Je}if(Ge==="fill"||ft){Xe=!0;const yt=ze;st=Math.min(Oe*be,Math.max(1,Math.floor(1/ot))),Ve&&Te&&xe<=pe.stableFitRemainingWidth&&(Lt=pe.stableFitMaxMinimapScale),ze=Math.min(Lt,Math.max(1,Math.floor(st/$e))),ze>yt&&(Ye=Math.min(2,ze/yt)),dt=ze/be/Ye,Je=Math.ceil(Math.max(je,nt+Ae+Qe)*st),Ve?(pe.stableMinimapLayoutInput=de,pe.stableFitRemainingWidth=xe,pe.stableFitMaxMinimapScale=ze):(pe.stableMinimapLayoutInput=null,pe.stableFitRemainingWidth=0)}}}const at=Math.floor(Ze*dt),ut=Math.min(at,Math.max(0,Math.floor((xe-He-2)*dt/(Pe+dt)))+e.MINIMAP_GUTTER_WIDTH);let qe=Math.floor(be*ut);const Re=qe/be;qe=Math.floor(qe*Ye);const We=Fe?1:2,Ue=tt==="left"?0:Le-ut-He;return{renderMinimap:We,minimapLeft:Ue,minimapWidth:ut,minimapHeightIsEditorHeight:Xe,minimapIsSampling:rt,minimapScale:ze,minimapLineHeight:st,minimapCanvasInnerWidth:qe,minimapCanvasInnerHeight:Je,minimapCanvasOuterWidth:Re,minimapCanvasOuterHeight:Ke}}static computeLayout(de,pe){const Le=pe.outerWidth|0,Ne=pe.outerHeight|0,be=pe.lineHeight|0,_e=pe.lineNumbersDigitCount|0,Te=pe.typicalHalfwidthCharacterWidth,Oe=pe.maxDigitWidth,Pe=pe.pixelRatio,Be=pe.viewLineCount,Fe=de.get(131),ze=Fe==="inherit"?de.get(130):Fe,Ze=ze==="inherit"?de.get(126):ze,Ge=de.get(129),tt=pe.isDominatedByLongLines,He=de.get(55),Ae=de.get(65).renderType!==0,xe=de.get(66),Ve=de.get(100),$e=de.get(81),Je=de.get(70),Ke=de.get(98),Xe=Ke.verticalScrollbarSize,rt=Ke.verticalHasArrows,st=Ke.arrowSize,dt=Ke.horizontalScrollbarSize,Ye=de.get(41),at=de.get(105)!=="never";let ut=de.get(63);Ye&&at&&(ut+=16);let qe=0;if(Ae){const Ct=Math.max(_e,xe);qe=Math.round(Ct*Oe)}let Re=0;He&&(Re=be*pe.glyphMarginDecorationLaneCount);let We=0,Ue=We+Re,je=Ue+qe,nt=je+ut;const Qe=Le-Re-qe-ut;let ot=!1,it=!1,lt=-1;ze==="inherit"&&tt?(ot=!0,it=!0):Ze==="on"||Ze==="bounded"?it=!0:Ze==="wordWrapColumn"&&(lt=Ge);const ft=M._computeMinimapLayout({outerWidth:Le,outerHeight:Ne,lineHeight:be,typicalHalfwidthCharacterWidth:Te,pixelRatio:Pe,scrollBeyondLastLine:Ve,paddingTop:$e.top,paddingBottom:$e.bottom,minimap:Je,verticalScrollbarWidth:Xe,viewLineCount:Be,remainingWidth:Qe,isViewportWrapping:it},pe.memory||new g);ft.renderMinimap!==0&&ft.minimapLeft===0&&(We+=ft.minimapWidth,Ue+=ft.minimapWidth,je+=ft.minimapWidth,nt+=ft.minimapWidth);const Lt=Qe-ft.minimapWidth,yt=Math.max(1,Math.floor((Lt-Xe-2)/Te)),gt=rt?st:0;return it&&(lt=Math.max(1,yt),Ze==="bounded"&&(lt=Math.min(lt,Ge))),{width:Le,height:Ne,glyphMarginLeft:We,glyphMarginWidth:Re,glyphMarginDecorationLaneCount:pe.glyphMarginDecorationLaneCount,lineNumbersLeft:Ue,lineNumbersWidth:qe,decorationsLeft:je,decorationsWidth:ut,contentLeft:nt,contentWidth:Lt,minimap:ft,viewportColumn:yt,isWordWrapMinified:ot,isViewportWrapping:it,wrappingColumn:lt,verticalScrollbarWidth:Xe,horizontalScrollbarHeight:dt,overviewRuler:{top:gt,width:Xe,height:Ne-2*gt,right:0}}}}e.EditorLayoutInfoComputer=M;class Q extends p{constructor(){super(133,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[_.localize(46,null),_.localize(47,null)],type:"string",enum:["simple","advanced"],default:"simple",description:_.localize(48,null)}})}validate(de){return u(de,"simple",["simple","advanced"])}compute(de,pe,Le){return pe.get(2)===2?"advanced":Le}}class ie extends p{constructor(){const de={enabled:!0};super(62,"lightbulb",de,{"editor.lightbulb.enabled":{type:"boolean",default:de.enabled,description:_.localize(49,null)}})}validate(de){return!de||typeof de!="object"?this.defaultValue:{enabled:r(de.enabled,this.defaultValue.enabled)}}}class re extends p{constructor(){const de={enabled:!1,maxLineCount:5,defaultModel:"outlineModel"};super(110,"stickyScroll",de,{"editor.stickyScroll.enabled":{type:"boolean",default:de.enabled,description:_.localize(50,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:de.maxLineCount,minimum:1,maximum:10,description:_.localize(51,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:de.defaultModel,description:_.localize(52,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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 p{constructor(){const de={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(135,"inlayHints",de,{"editor.inlayHints.enabled":{type:"string",default:de.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:de.fontSize,markdownDescription:_.localize(58,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:de.fontFamily,markdownDescription:_.localize(59,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:de.padding,description:_.localize(60,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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:a.string(pe.fontFamily,this.defaultValue.fontFamily),padding:r(pe.padding,this.defaultValue.padding)}}}class se extends p{constructor(){super(63,"lineDecorationsWidth",10)}validate(de){return typeof de=="string"&&/^\d+(\.\d+)?ch$/.test(de)?-parseFloat(de.substring(0,de.length-2)):o.clampedInt(de,this.defaultValue,0,1e3)}compute(de,pe,Le){return Le<0?o.clampedInt(-Le*de.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Le}}class H extends l{constructor(){super(64,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,de=>l.clamp(de,0,150),{markdownDescription:_.localize(61,null)})}compute(de,pe,Le){return de.fontInfo.lineHeight}}class W extends p{constructor(){const de={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(70,"minimap",de,{"editor.minimap.enabled":{type:"boolean",default:de.enabled,description:_.localize(62,null)},"editor.minimap.autohide":{type:"boolean",default:de.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:de.size,description:_.localize(67,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:de.side,description:_.localize(68,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:de.showSlider,description:_.localize(69,null)},"editor.minimap.scale":{type:"number",default:de.scale,minimum:1,maximum:3,enum:[1,2,3],description:_.localize(70,null)},"editor.minimap.renderCharacters":{type:"boolean",default:de.renderCharacters,description:_.localize(71,null)},"editor.minimap.maxColumn":{type:"number",default:de.maxColumn,description:_.localize(72,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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 q(ve){return ve==="ctrlCmd"?k.isMacintosh?"metaKey":"ctrlKey":"altKey"}class Z extends p{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(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;return{top:o.clampedInt(pe.top,0,0,1e3),bottom:o.clampedInt(pe.bottom,0,0,1e3)}}}class Y extends p{constructor(){const de={enabled:!0,cycle:!0};super(82,"parameterHints",de,{"editor.parameterHints.enabled":{type:"boolean",default:de.enabled,description:_.localize(75,null)},"editor.parameterHints.cycle":{type:"boolean",default:de.cycle,description:_.localize(76,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;return{enabled:r(pe.enabled,this.defaultValue.enabled),cycle:r(pe.cycle,this.defaultValue.cycle)}}}class oe extends i{constructor(){super(137)}compute(de,pe,Le){return de.pixelRatio}}class ce extends p{constructor(){const de={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(85,"quickSuggestions",de,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:pe,default:de.strings,description:_.localize(80,null)},comments:{anyOf:pe,default:de.comments,description:_.localize(81,null)},other:{anyOf:pe,default:de.other,description:_.localize(82,null)}},default:de,markdownDescription:_.localize(83,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=de}validate(de){if(typeof de=="boolean"){const Pe=de?"on":"off";return{comments:Pe,strings:Pe,other:Pe}}if(!de||typeof de!="object")return this.defaultValue;const{other:pe,comments:Le,strings:Ne}=de,be=["on","inline","off"];let _e,Te,Oe;return typeof pe=="boolean"?_e=pe?"on":"off":_e=u(pe,this.defaultValue.other,be),typeof Le=="boolean"?Te=Le?"on":"off":Te=u(Le,this.defaultValue.comments,be),typeof Ne=="boolean"?Oe=Ne?"on":"off":Oe=u(Ne,this.defaultValue.strings,be),{other:_e,comments:Te,strings:Oe}}}class ge extends p{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(de){let pe=this.defaultValue.renderType,Le=this.defaultValue.renderFn;return typeof de<"u"&&(typeof de=="function"?(pe=4,Le=de):de==="interval"?pe=3:de==="relative"?pe=2:de==="on"?pe=1:pe=0),{renderType:pe,renderFn:Le}}}function le(ve){const de=ve.get(93);return de==="editable"?ve.get(87):de!=="on"}e.filterValidationDecorations=le;class ue extends p{constructor(){const de=[],pe={type:"number",description:_.localize(89,null)};super(97,"rulers",de,{type:"array",items:{anyOf:[pe,{type:["object"],properties:{column:pe,color:{type:"string",description:_.localize(90,null),format:"color-hex"}}}]},default:de,description:_.localize(91,null)})}validate(de){if(Array.isArray(de)){const pe=[];for(const Le of de)if(typeof Le=="number")pe.push({column:o.clampedInt(Le,0,0,1e4),color:null});else if(Le&&typeof Le=="object"){const Ne=Le;pe.push({column:o.clampedInt(Ne.column,0,0,1e4),color:Ne.color})}return pe.sort((Le,Ne)=>Le.column-Ne.column),pe}return this.defaultValue}}function j(ve,de){if(typeof ve!="string")return de;switch(ve){case"hidden":return 2;case"visible":return 3;default:return 1}}class z extends p{constructor(){const de={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(98,"scrollbar",de,{"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:de.verticalScrollbarSize,description:_.localize(100,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:de.horizontalScrollbarSize,description:_.localize(101,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:de.scrollByPage,description:_.localize(102,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de,Le=o.clampedInt(pe.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Ne=o.clampedInt(pe.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:o.clampedInt(pe.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:j(pe.vertical,this.defaultValue.vertical),horizontal:j(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:Ne,verticalSliderSize:o.clampedInt(pe.verticalSliderSize,Ne,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 p{constructor(){const de={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(120,"unicodeHighlight",de,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:de.nonBasicASCII,description:_.localize(103,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:de.invisibleCharacters,description:_.localize(104,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:de.ambiguousCharacters,description:_.localize(105,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:de.includeComments,description:_.localize(106,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:de.includeStrings,description:_.localize(107,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:de.allowedCharacters,description:_.localize(108,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:de.allowedLocales,description:_.localize(109,null)}})}applyUpdate(de,pe){let Le=!1;pe.allowedCharacters&&de&&(w.equals(de.allowedCharacters,pe.allowedCharacters)||(de=Object.assign(Object.assign({},de),{allowedCharacters:pe.allowedCharacters}),Le=!0)),pe.allowedLocales&&de&&(w.equals(de.allowedLocales,pe.allowedLocales)||(de=Object.assign(Object.assign({},de),{allowedLocales:pe.allowedLocales}),Le=!0));const Ne=super.applyUpdate(de,pe);return Le?new n(Ne.newValue,!0):Ne}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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(de.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(de.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(de,pe){if(typeof de!="object"||!de)return pe;const Le={};for(const[Ne,be]of Object.entries(de))be===!0&&(Le[Ne]=!0);return Le}}class J extends p{constructor(){const de={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(60,"inlineSuggest",de,{"editor.inlineSuggest.enabled":{type:"boolean",default:de.enabled,description:_.localize(110,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:de.showToolbar,enum:["always","onHover"],enumDescriptions:[_.localize(111,null),_.localize(112,null)],description:_.localize(113,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:de.suppressSuggestions,description:_.localize(114,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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 p{constructor(){const de={enabled:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(13,"bracketPairColorization",de,{"editor.bracketPairColorization.enabled":{type:"boolean",default:de.enabled,markdownDescription:_.localize(115,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:de.independentColorPoolPerBracketType,description:_.localize(116,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;return{enabled:r(pe.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:r(pe.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class G extends p{constructor(){const de={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(14,"guides",de,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[_.localize(117,null),_.localize(118,null),_.localize(119,null)],default:de.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:de.bracketPairsHorizontal,description:_.localize(124,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:de.highlightActiveBracketPair,description:_.localize(125,null)},"editor.guides.indentation":{type:"boolean",default:de.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:de.highlightActiveIndentation,description:_.localize(130,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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(ve,de,pe){const Le=pe.indexOf(ve);return Le===-1?de:pe[Le]}class me extends p{constructor(){const de={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(113,"suggest",de,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[_.localize(131,null),_.localize(132,null)],default:de.insertMode,description:_.localize(133,null)},"editor.suggest.filterGraceful":{type:"boolean",default:de.filterGraceful,description:_.localize(134,null)},"editor.suggest.localityBonus":{type:"boolean",default:de.localityBonus,description:_.localize(135,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:de.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:de.selectionMode,markdownDescription:_.localize(141,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:de.snippetsPreventQuickSuggestions,description:_.localize(142,null)},"editor.suggest.showIcons":{type:"boolean",default:de.showIcons,description:_.localize(143,null)},"editor.suggest.showStatusBar":{type:"boolean",default:de.showStatusBar,description:_.localize(144,null)},"editor.suggest.preview":{type:"boolean",default:de.preview,description:_.localize(145,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:de.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(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;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 p{constructor(){super(108,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:_.localize(179,null),default:!0,type:"boolean"}})}validate(de){return!de||typeof de!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:r(de.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class Se extends p{constructor(){super(132,"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(de){switch(de){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(de,pe,Le){return pe.get(2)===2?0:Le}}class ye extends i{constructor(){super(140)}compute(de,pe,Le){const Ne=pe.get(139);return{isDominatedByLongLines:de.isDominatedByLongLines,isWordWrapMinified:Ne.isWordWrapMinified,isViewportWrapping:Ne.isViewportWrapping,wrappingColumn:Ne.wrappingColumn}}}class Ee extends p{constructor(){const de={enabled:!0,showDropSelector:"afterDrop"};super(34,"dropIntoEditor",de,{"editor.dropIntoEditor.enabled":{type:"boolean",default:de.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(de){if(!de||typeof de!="object")return this.defaultValue;const pe=de;return{enabled:r(pe.enabled,this.defaultValue.enabled),showDropSelector:u(pe.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}const De="Consolas, 'Courier New', monospace",ke="Menlo, Monaco, 'Courier New', monospace",Ie="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:k.isMacintosh?ke:k.isLinux?Ie:De,fontWeight:"normal",fontSize:k.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function he(ve){return e.editorOptionsRegistry[ve.id]=ve,ve}e.EditorOptions={acceptSuggestionOnCommitCharacter:he(new d(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:_.localize(189,null)})),acceptSuggestionOnEnter:he(new v(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",_.localize(190,null),""],markdownDescription:_.localize(191,null)})),accessibilitySupport:he(new C),accessibilityPageSize:he(new o(3,"accessibilityPageSize",10,1,1073741824,{description:_.localize(192,null),tags:["accessibility"]})),ariaLabel:he(new a(4,"ariaLabel",_.localize(193,null))),screenReaderAnnounceInlineSuggestion:he(new d(6,"screenReaderAnnounceInlineSuggestion",!1,{description:_.localize(194,null),tags:["accessibility"]})),autoClosingBrackets:he(new v(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",_.localize(195,null),_.localize(196,null),""],description:_.localize(197,null)})),autoClosingDelete:he(new v(7,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",_.localize(198,null),""],description:_.localize(199,null)})),autoClosingOvertype:he(new v(8,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",_.localize(200,null),""],description:_.localize(201,null)})),autoClosingQuotes:he(new v(9,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",_.localize(202,null),_.localize(203,null),""],description:_.localize(204,null)})),autoIndent:he(new f(10,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],m,{enumDescriptions:[_.localize(205,null),_.localize(206,null),_.localize(207,null),_.localize(208,null),_.localize(209,null)],description:_.localize(210,null)})),automaticLayout:he(new d(11,"automaticLayout",!1)),autoSurround:he(new v(12,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[_.localize(211,null),_.localize(212,null),_.localize(213,null),""],description:_.localize(214,null)})),bracketPairColorization:he(new te),bracketPairGuides:he(new G),stickyTabStops:he(new d(111,"stickyTabStops",!1,{description:_.localize(215,null)})),codeLens:he(new d(15,"codeLens",!0,{description:_.localize(216,null)})),codeLensFontFamily:he(new a(16,"codeLensFontFamily","",{description:_.localize(217,null)})),codeLensFontSize:he(new o(17,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:_.localize(218,null)})),colorDecorators:he(new d(18,"colorDecorators",!0,{description:_.localize(219,null)})),colorDecoratorsLimit:he(new o(19,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:_.localize(220,null)})),columnSelection:he(new d(20,"columnSelection",!1,{description:_.localize(221,null)})),comments:he(new L),contextmenu:he(new d(22,"contextmenu",!0)),copyWithSyntaxHighlighting:he(new d(23,"copyWithSyntaxHighlighting",!0,{description:_.localize(222,null)})),cursorBlinking:he(new f(24,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],D,{description:_.localize(223,null)})),cursorSmoothCaretAnimation:he(new v(25,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[_.localize(224,null),_.localize(225,null),_.localize(226,null)],description:_.localize(227,null)})),cursorStyle:he(new f(26,"cursorStyle",I.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],T,{description:_.localize(228,null)})),cursorSurroundingLines:he(new o(27,"cursorSurroundingLines",0,0,1073741824,{description:_.localize(229,null)})),cursorSurroundingLinesStyle:he(new v(28,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[_.localize(230,null),_.localize(231,null)],description:_.localize(232,null)})),cursorWidth:he(new o(29,"cursorWidth",0,0,1073741824,{markdownDescription:_.localize(233,null)})),disableLayerHinting:he(new d(30,"disableLayerHinting",!1)),disableMonospaceOptimizations:he(new d(31,"disableMonospaceOptimizations",!1)),domReadOnly:he(new d(32,"domReadOnly",!1)),dragAndDrop:he(new d(33,"dragAndDrop",!0,{description:_.localize(234,null)})),emptySelectionClipboard:he(new R),dropIntoEditor:he(new Ee),stickyScroll:he(new re),experimentalWhitespaceRendering:he(new v(36,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[_.localize(235,null),_.localize(236,null),_.localize(237,null)],description:_.localize(238,null)})),extraEditorClassName:he(new a(37,"extraEditorClassName","")),fastScrollSensitivity:he(new l(38,"fastScrollSensitivity",5,ve=>ve<=0?5:ve,{markdownDescription:_.localize(239,null)})),find:he(new A),fixedOverflowWidgets:he(new d(40,"fixedOverflowWidgets",!1)),folding:he(new d(41,"folding",!0,{description:_.localize(240,null)})),foldingStrategy:he(new v(42,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[_.localize(241,null),_.localize(242,null)],description:_.localize(243,null)})),foldingHighlight:he(new d(43,"foldingHighlight",!0,{description:_.localize(244,null)})),foldingImportsByDefault:he(new d(44,"foldingImportsByDefault",!1,{description:_.localize(245,null)})),foldingMaximumRegions:he(new o(45,"foldingMaximumRegions",5e3,10,65e3,{description:_.localize(246,null)})),unfoldOnClickAfterEndOfLine:he(new d(46,"unfoldOnClickAfterEndOfLine",!1,{description:_.localize(247,null)})),fontFamily:he(new a(47,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:_.localize(248,null)})),fontInfo:he(new x),fontLigatures2:he(new N),fontSize:he(new F),fontWeight:he(new B),fontVariations:he(new P),formatOnPaste:he(new d(53,"formatOnPaste",!1,{description:_.localize(249,null)})),formatOnType:he(new d(54,"formatOnType",!1,{description:_.localize(250,null)})),glyphMargin:he(new d(55,"glyphMargin",!0,{description:_.localize(251,null)})),gotoLocation:he(new V),hideCursorInOverviewRuler:he(new d(57,"hideCursorInOverviewRuler",!1,{description:_.localize(252,null)})),hover:he(new $),inDiffEditor:he(new d(59,"inDiffEditor",!1)),letterSpacing:he(new l(61,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,ve=>l.clamp(ve,-5,20),{description:_.localize(253,null)})),lightbulb:he(new ie),lineDecorationsWidth:he(new se),lineHeight:he(new H),lineNumbers:he(new ge),lineNumbersMinChars:he(new o(66,"lineNumbersMinChars",5,1,300)),linkedEditing:he(new d(67,"linkedEditing",!1,{description:_.localize(254,null)})),links:he(new d(68,"links",!0,{description:_.localize(255,null)})),matchBrackets:he(new v(69,"matchBrackets","always",["always","near","never"],{description:_.localize(256,null)})),minimap:he(new W),mouseStyle:he(new v(71,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:he(new l(72,"mouseWheelScrollSensitivity",1,ve=>ve===0?1:ve,{markdownDescription:_.localize(257,null)})),mouseWheelZoom:he(new d(73,"mouseWheelZoom",!1,{markdownDescription:_.localize(258,null)})),multiCursorMergeOverlapping:he(new d(74,"multiCursorMergeOverlapping",!0,{description:_.localize(259,null)})),multiCursorModifier:he(new f(75,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],q,{markdownEnumDescriptions:[_.localize(260,null),_.localize(261,null)],markdownDescription:_.localize(262,null)})),multiCursorPaste:he(new v(76,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[_.localize(263,null),_.localize(264,null)],markdownDescription:_.localize(265,null)})),multiCursorLimit:he(new o(77,"multiCursorLimit",1e4,1,1e5,{markdownDescription:_.localize(266,null)})),occurrencesHighlight:he(new d(78,"occurrencesHighlight",!0,{description:_.localize(267,null)})),overviewRulerBorder:he(new d(79,"overviewRulerBorder",!0,{description:_.localize(268,null)})),overviewRulerLanes:he(new o(80,"overviewRulerLanes",3,0,3)),padding:he(new Z),parameterHints:he(new Y),peekWidgetDefaultFocus:he(new v(83,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[_.localize(269,null),_.localize(270,null)],description:_.localize(271,null)})),definitionLinkOpensInPeek:he(new d(84,"definitionLinkOpensInPeek",!1,{description:_.localize(272,null)})),quickSuggestions:he(new ce),quickSuggestionsDelay:he(new o(86,"quickSuggestionsDelay",10,0,1073741824,{description:_.localize(273,null)})),readOnly:he(new d(87,"readOnly",!1)),renameOnType:he(new d(88,"renameOnType",!1,{description:_.localize(274,null),markdownDeprecationMessage:_.localize(275,null)})),renderControlCharacters:he(new d(89,"renderControlCharacters",!0,{description:_.localize(276,null),restricted:!0})),renderFinalNewline:he(new v(90,"renderFinalNewline",k.isLinux?"dimmed":"on",["off","on","dimmed"],{description:_.localize(277,null)})),renderLineHighlight:he(new v(91,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",_.localize(278,null)],description:_.localize(279,null)})),renderLineHighlightOnlyWhenFocus:he(new d(92,"renderLineHighlightOnlyWhenFocus",!1,{description:_.localize(280,null)})),renderValidationDecorations:he(new v(93,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:he(new v(94,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",_.localize(281,null),_.localize(282,null),_.localize(283,null),""],description:_.localize(284,null)})),revealHorizontalRightPadding:he(new o(95,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:he(new d(96,"roundedSelection",!0,{description:_.localize(285,null)})),rulers:he(new ue),scrollbar:he(new z),scrollBeyondLastColumn:he(new o(99,"scrollBeyondLastColumn",4,0,1073741824,{description:_.localize(286,null)})),scrollBeyondLastLine:he(new d(100,"scrollBeyondLastLine",!0,{description:_.localize(287,null)})),scrollPredominantAxis:he(new d(101,"scrollPredominantAxis",!0,{description:_.localize(288,null)})),selectionClipboard:he(new d(102,"selectionClipboard",!0,{description:_.localize(289,null),included:k.isLinux})),selectionHighlight:he(new d(103,"selectionHighlight",!0,{description:_.localize(290,null)})),selectOnLineNumbers:he(new d(104,"selectOnLineNumbers",!0)),showFoldingControls:he(new v(105,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[_.localize(291,null),_.localize(292,null),_.localize(293,null)],description:_.localize(294,null)})),showUnused:he(new d(106,"showUnused",!0,{description:_.localize(295,null)})),showDeprecated:he(new d(134,"showDeprecated",!0,{description:_.localize(296,null)})),inlayHints:he(new ne),snippetSuggestions:he(new v(107,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[_.localize(297,null),_.localize(298,null),_.localize(299,null),_.localize(300,null)],description:_.localize(301,null)})),smartSelect:he(new Ce),smoothScrolling:he(new d(109,"smoothScrolling",!1,{description:_.localize(302,null)})),stopRenderingLineAfter:he(new o(112,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:he(new me),inlineSuggest:he(new J),suggestFontSize:he(new o(114,"suggestFontSize",0,0,1e3,{markdownDescription:_.localize(303,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:he(new o(115,"suggestLineHeight",0,0,1e3,{markdownDescription:_.localize(304,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:he(new d(116,"suggestOnTriggerCharacters",!0,{description:_.localize(305,null)})),suggestSelection:he(new v(117,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[_.localize(306,null),_.localize(307,null),_.localize(308,null)],description:_.localize(309,null)})),tabCompletion:he(new v(118,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[_.localize(310,null),_.localize(311,null),_.localize(312,null)],description:_.localize(313,null)})),tabIndex:he(new o(119,"tabIndex",0,-1,1073741824)),unicodeHighlight:he(new U),unusualLineTerminators:he(new v(121,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[_.localize(314,null),_.localize(315,null),_.localize(316,null)],description:_.localize(317,null)})),useShadowDOM:he(new d(122,"useShadowDOM",!0)),useTabStops:he(new d(123,"useTabStops",!0,{description:_.localize(318,null)})),wordBreak:he(new v(124,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[_.localize(319,null),_.localize(320,null)],description:_.localize(321,null)})),wordSeparators:he(new a(125,"wordSeparators",y.USUAL_WORD_SEPARATORS,{description:_.localize(322,null)})),wordWrap:he(new v(126,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[_.localize(323,null),_.localize(324,null),_.localize(325,null),_.localize(326,null)],description:_.localize(327,null)})),wordWrapBreakAfterCharacters:he(new a(127,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:he(new a(128,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:he(new o(129,"wordWrapColumn",80,1,1073741824,{markdownDescription:_.localize(328,null)})),wordWrapOverride1:he(new v(130,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:he(new v(131,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:he(new O),defaultColorDecorators:he(new d(141,"defaultColorDecorators",!1,{markdownDescription:_.localize(329,null)})),pixelRatio:he(new oe),tabFocusMode:he(new d(138,"tabFocusMode",!1,{markdownDescription:_.localize(330,null)})),layoutInfo:he(new M),wrappingInfo:he(new ye),wrappingIndent:he(new Se),wrappingStrategy:he(new Q)}}),define(X[595],ee([1,0,7,36,9,75,41,12,5,166]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class p{constructor(i,s,r,d,h,o,c){this.top=i,this.left=s,this.paddingLeft=r,this.width=d,this.height=h,this.textContent=o,this.textContentClassName=c}}class n{constructor(i){this._context=i;const s=this._context.configuration.options,r=s.get(48);this._cursorStyle=s.get(26),this._lineHeight=s.get(64),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(s.get(29),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,k.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${g.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,E.applyFontInfo)(this._domNode,r),this._domNode.setDisplay("none"),this._position=new b.Position(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(i){const s=this._context.configuration.options,r=s.get(48);return this._cursorStyle=s.get(26),this._lineHeight=s.get(64),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(s.get(29),this._typicalHalfwidthCharacterWidth),(0,E.applyFontInfo)(this._domNode,r),!0}onCursorPositionChanged(i,s){return s?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=i,!0}_getGraphemeAwarePosition(){const{lineNumber:i,column:s}=this._position,r=this._context.viewModel.getLineContent(i),[d,h]=y.getCharContainingOffset(r,s-1);return[new b.Position(i,d+1),r.substring(d,h)]}_prepareRender(i){let s="",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 m;this._cursorStyle===w.TextEditorCursorStyle.Line?(m=_.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),m>2&&(s=h,r=this._getTokenClassName(d))):m=_.computeScreenAwareSize(1);let C=f.left,L=0;m>=2&&C>=1&&(L=1,C-=L);const D=i.getVerticalOffsetForLineNumber(d.lineNumber)-i.bigNumbersDelta;return new p(D,C,L,m,this._lineHeight,s,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 l=c.ranges[0],a=h===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===w.TextEditorCursorStyle.Block&&(s=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 p(u,l.left,0,a,v,s,r)}_getTokenClassName(i){const s=this._context.viewModel.getViewLineData(i.lineNumber),r=s.tokens.findTokenIndexAtOffset(i.column-1);return s.tokens.getClassName(r)}prepareRender(i){this._renderData=this._prepareRender(i)}render(i){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${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=n}),define(X[224],ee([1,0,17,41,148]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const E=_.isMacintosh?1.5:1.35,w=8;class b{static createFromValidatedSettings(p,n,t){const i=p.get(47),s=p.get(51),r=p.get(50),d=p.get(49),h=p.get(52),o=p.get(64),c=p.get(61);return b._create(i,s,r,d,h,o,c,n,t)}static _create(p,n,t,i,s,r,d,h,o){r===0?r=E*t:r<w&&(r=r*t),r=Math.round(r),r<w&&(r=w);const c=1+(o?0:y.EditorZoom.getZoomLevel()*.1);return t*=c,r*=c,s===k.EditorFontVariations.TRANSLATE&&(n==="normal"||n==="bold"?s=k.EditorFontVariations.OFF:(s=`'wght' ${parseInt(n,10)}`,n="normal")),new b({pixelRatio:h,fontFamily:p,fontWeight:n,fontSize:t,fontFeatureSettings:i,fontVariationSettings:s,lineHeight:r,letterSpacing:d})}constructor(p){this._bareFontInfoBrand=void 0,this.pixelRatio=p.pixelRatio,this.fontFamily=String(p.fontFamily),this.fontWeight=String(p.fontWeight),this.fontSize=p.fontSize,this.fontFeatureSettings=p.fontFeatureSettings,this.fontVariationSettings=p.fontVariationSettings,this.lineHeight=p.lineHeight|0,this.letterSpacing=p.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const p=k.EDITOR_FONT_DEFAULTS.fontFamily,n=b._wrapInQuotes(this.fontFamily);return p&&this.fontFamily!==p?`${n}, ${p}`:n}static _wrapInQuotes(p){return/[,"']/.test(p)?p:/[+ ]/.test(p)?`"${p}"`:p}}e.BareFontInfo=b,e.SERIALIZED_FONT_INFO_VERSION=2;class S extends b{constructor(p,n){super(p),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=n,this.isMonospace=p.isMonospace,this.typicalHalfwidthCharacterWidth=p.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=p.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=p.canUseHalfwidthRightwardsArrow,this.spaceWidth=p.spaceWidth,this.middotWidth=p.middotWidth,this.wsmiddotWidth=p.wsmiddotWidth,this.maxDigitWidth=p.maxDigitWidth}equals(p){return this.fontFamily===p.fontFamily&&this.fontWeight===p.fontWeight&&this.fontSize===p.fontSize&&this.fontFeatureSettings===p.fontFeatureSettings&&this.fontVariationSettings===p.fontVariationSettings&&this.lineHeight===p.lineHeight&&this.letterSpacing===p.letterSpacing&&this.typicalHalfwidthCharacterWidth===p.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===p.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===p.canUseHalfwidthRightwardsArrow&&this.spaceWidth===p.spaceWidth&&this.middotWidth===p.middotWidth&&this.wsmiddotWidth===p.wsmiddotWidth&&this.maxDigitWidth===p.maxDigitWidth}}e.FontInfo=S}),define(X[311],ee([1,0,47,6,2,457,41,224]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=e.FontMeasurementsImpl=void 0;class S extends y.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(n,t){this._cache.put(n,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const n=this._cache.getValues();let t=!1;for(const i of n)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(n){if(!this._cache.has(n)){let t=this._actualReadFontInfo(n);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new b.FontInfo({pixelRatio:_.PixelRatio.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(n,t)}return this._cache.get(n)}_createRequest(n,t,i,s){const r=new E.CharWidthRequest(n,t);return i.push(r),s?.push(r),r}_actualReadFontInfo(n){const t=[],i=[],s=this._createRequest("n",0,t,i),r=this._createRequest("\uFF4D",0,t,null),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),l=this._createRequest("3",0,t,i),a=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),m=this._createRequest("8",0,t,i),C=this._createRequest("9",0,t,i),L=this._createRequest("\u2192",0,t,i),D=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,E.readCharWidths)(n,t);const R=Math.max(h.width,o.width,c.width,l.width,a.width,u.width,v.width,f.width,m.width,C.width);let A=n.fontFeatureSettings===w.EditorFontLigatures.OFF;const N=i[0].width;for(let x=1,F=i.length;A&&x<F;x++){const B=N-i[x].width;if(B<-.001||B>.001){A=!1;break}}let P=!0;return A&&D.width!==N&&(P=!1),D.width>L.width&&(P=!1),new b.FontInfo({pixelRatio:_.PixelRatio.value,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFeatureSettings:n.fontFeatureSettings,fontVariationSettings:n.fontVariationSettings,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,isMonospace:A,typicalHalfwidthCharacterWidth:s.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(n){const t=n.getId();return!!this._values[t]}get(n){const t=n.getId();return this._values[t]}put(n,t){const i=n.getId();this._keys[i]=n,this._values[i]=t}remove(n){const t=n.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(n=>this._values[n])}}e.FontMeasurements=new S}),define(X[312],ee([1,0,12,5,81,41]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class w{constructor(t,i,s,r,d){this.editorId=t,this.model=i,this.configuration=s,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 s=this._decorationsCache[i];if(!s){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);s=new y.ViewModelDecoration(h,d),this._decorationsCache[i]=s}return s}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,s=!1){const r=new k.Range(t,this._linesCollection.getViewLineMinColumn(t),t,this._linesCollection.getViewLineMaxColumn(t));return this._getDecorationsInRange(r,i,s).inlineDecorations[0]}_getDecorationsInRange(t,i,s){const r=this._linesCollection.getDecorationsInRange(t,this.editorId,(0,E.filterValidationDecorations)(this.configuration.options),i,s),d=t.startLineNumber,h=t.endLineNumber,o=[];let c=0;const l=[];for(let a=d;a<=h;a++)l[a-d]=[];for(let a=0,u=r.length;a<u;a++){const v=r[a],f=v.options;if(!b(this.model,v))continue;const m=this._getOrCreateViewModelDecoration(v),C=m.range;if(o[c++]=m,f.inlineClassName){const L=new y.InlineDecoration(C,f.inlineClassName,f.inlineClassNameAffectsLetterSpacing?3:0),D=Math.max(d,C.startLineNumber),I=Math.min(h,C.endLineNumber);for(let T=D;T<=I;T++)l[T-d].push(L)}if(f.beforeContentClassName&&d<=C.startLineNumber&&C.startLineNumber<=h){const L=new y.InlineDecoration(new k.Range(C.startLineNumber,C.startColumn,C.startLineNumber,C.startColumn),f.beforeContentClassName,1);l[C.startLineNumber-d].push(L)}if(f.afterContentClassName&&d<=C.endLineNumber&&C.endLineNumber<=h){const L=new y.InlineDecoration(new k.Range(C.endLineNumber,C.endColumn,C.endLineNumber,C.endColumn),f.afterContentClassName,2);l[C.endLineNumber-d].push(L)}}return{decorations:o,inlineDecorations:l}}}e.ViewModelDecorations=w;function b(n,t){return!(t.options.hideInCommentTokens&&S(n,t)||t.options.hideInStringTokens&&g(n,t))}e.isModelDecorationVisible=b;function S(n,t){return p(n,t.range,i=>i===1)}e.isModelDecorationInComment=S;function g(n,t){return p(n,t.range,i=>i===2)}e.isModelDecorationInString=g;function p(n,t,i){for(let s=t.startLineNumber;s<=t.endLineNumber;s++){const r=n.tokenization.getLineTokens(s),d=s===t.startLineNumber,h=s===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(X[596],ee([3,4]),function(K,e){return K.create("vs/editor/common/core/editorColorRegistry",e)}),define(X[597],ee([3,4]),function(K,e){return K.create("vs/editor/common/editorContextKeys",e)}),define(X[598],ee([3,4]),function(K,e){return K.create("vs/editor/common/languages/modesRegistry",e)}),define(X[599],ee([3,4]),function(K,e){return K.create("vs/editor/common/model/editStack",e)}),define(X[313],ee([1,0,599,11,23,20,304,132,42]),function(K,e,_,k,y,E,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 p{static create(h,o){const c=h.getAlternativeVersionId(),l=i(h);return new p(c,c,l,l,o,o,[])}constructor(h,o,c,l,a,u,v){this.beforeVersionId=h,this.afterVersionId=o,this.beforeEOL=c,this.afterEOL=l,this.beforeCursorState=a,this.afterCursorState=u,this.changes=v}append(h,o,c,l,a){o.length>0&&(this.changes=(0,w.compressConsecutiveTextChanges)(this.changes,o)),this.afterEOL=c,this.afterVersionId=l,this.afterCursorState=a}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 l of o)b.writeUInt32BE(h,l.selectionStartLineNumber,c),c+=4,b.writeUInt32BE(h,l.selectionStartColumn,c),c+=4,b.writeUInt32BE(h,l.positionLineNumber,c),c+=4,b.writeUInt32BE(h,l.positionColumn,c),c+=4;return c}static _readSelections(h,o,c){const l=b.readUInt32BE(h,o);o+=4;for(let a=0;a<l;a++){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 m=b.readUInt32BE(h,o);o+=4,c.push(new y.Selection(u,v,f,m))}return o}serialize(){let h=10+p._writeSelectionsSize(this.beforeCursorState)+p._writeSelectionsSize(this.afterCursorState)+4;for(const l of this.changes)h+=l.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=p._writeSelections(o,this.beforeCursorState,c),c=p._writeSelections(o,this.afterCursorState,c),b.writeUInt32BE(o,this.changes.length,c),c+=4;for(const l of this.changes)c=l.write(o,c);return o.buffer}static deserialize(h){const o=new Uint8Array(h);let c=0;const l=b.readUInt32BE(o,c);c+=4;const a=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=p._readSelections(o,c,f);const m=[];c=p._readSelections(o,c,m);const C=b.readUInt32BE(o,c);c+=4;const L=[];for(let D=0;D<C;D++)c=w.TextChange.read(o,c,L);return new p(l,a,u,v,f,m,L)}}e.SingleModelEditStackData=p;class n{get type(){return 0}get resource(){return E.URI.isUri(this.model)?this.model:this.model.uri}constructor(h,o,c,l){this.label=h,this.code=o,this.model=c,this._data=p.create(c,l)}toString(){return(this._data instanceof p?this._data:p.deserialize(this._data)).changes.map(o=>o.toString()).join(", ")}matchesResource(h){return(E.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 p}append(h,o,c,l,a){this._data instanceof p&&this._data.append(h,o,c,l,a)}close(){this._data instanceof p&&(this._data=this._data.serialize())}open(){this._data instanceof p||(this._data=p.deserialize(this._data))}undo(){if(E.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof p&&(this._data=this._data.serialize());const h=p.deserialize(this._data);this.model._applyUndo(h.changes,h.beforeEOL,h.beforeVersionId,h.beforeCursorState)}redo(){if(E.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof p&&(this._data=this._data.serialize());const h=p.deserialize(this._data);this.model._applyRedo(h.changes,h.afterEOL,h.afterVersionId,h.afterCursorState)}heapSize(){return this._data instanceof p&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=n;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 l of this._editStackElementsArr){const a=g(l.resource);this._editStackElementsMap.set(a,l)}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(E.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,l,a){const u=g(h.uri);this._editStackElementsMap.get(u).append(h,o,c,l,a)}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()===`
- `?0:1}function s(d){return d?d instanceof n||d instanceof t:!1}e.isEditStackElement=s;class r{constructor(h,o){this._model=h,this._undoRedoService=o}pushStackElement(){const h=this._undoRedoService.getLastElement(this._model.uri);s(h)&&h.close()}popStackElement(){const h=this._undoRedoService.getLastElement(this._model.uri);s(h)&&h.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(h,o){const c=this._undoRedoService.getLastElement(this._model.uri);if(s(c)&&c.canAppend(this._model))return c;const l=new n(_.localize(0,null),"undoredo.textBufferEdit",this._model,h);return this._undoRedoService.pushElement(l,o),l}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,l){const a=this._getOrCreateEditStackElement(h,l),u=this._model.applyEdits(o,!0),v=r._computeCursorState(c,u),f=u.map((m,C)=>({index:C,textChange:m.textChange}));return f.sort((m,C)=>m.textChange.oldPosition===C.textChange.oldPosition?m.index-C.index:m.textChange.oldPosition-C.textChange.oldPosition),a.append(this._model,f.map(m=>m.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(X[600],ee([3,4]),function(K,e){return K.create("vs/editor/common/standaloneStrings",e)}),define(X[82],ee([1,0,600]),function(K,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 y;(function(t){t.inspectTokensAction=_.localize(24,null)})(y||(e.InspectTokensNLS=y={}));var E;(function(t){t.gotoLineActionLabel=_.localize(25,null)})(E||(e.GoToLineNLS=E={}));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 p;(function(t){t.toggleHighContrast=_.localize(33,null)})(p||(e.ToggleHighContrastNLS=p={}));var n;(function(t){t.bulkEditServiceSummary=_.localize(34,null)})(n||(e.StandaloneServicesNLS=n={}))}),define(X[601],ee([3,4]),function(K,e){return K.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(X[110],ee([1,0,601,9,96,141,509]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=void 0;class b{constructor(L,D){this.startOffset=L,this.endOffset=D}equals(L){return this.startOffset===L.startOffset&&this.endOffset===L.endOffset}}e.LineRange=b;class S{constructor(L,D,I,T,O,R,A,N,P,x,F,B,V,$,M,Q,ie,re,ne){this.useMonospaceOptimizations=L,this.canUseHalfwidthRightwardsArrow=D,this.lineContent=I,this.continuesWithWrappedLine=T,this.isBasicASCII=O,this.containsRTL=R,this.fauxIndentLength=A,this.lineTokens=N,this.lineDecorations=P.sort(E.LineDecoration.compare),this.tabSize=x,this.startVisibleColumn=F,this.spaceWidth=B,this.stopRenderingLineAfter=M,this.renderWhitespace=Q==="all"?4:Q==="boundary"?1:Q==="selection"?2:Q==="trailing"?3:0,this.renderControlCharacters=ie,this.fontLigatures=re,this.selectionsOnLine=ne&&ne.sort((W,q)=>W.startOffset<q.startOffset?-1:1);const se=Math.abs($-B),H=Math.abs(V-B);se<H?(this.renderSpaceWidth=$,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=V,this.renderSpaceCharCode=183)}sameSelection(L){if(this.selectionsOnLine===null)return L===null;if(L===null||L.length!==this.selectionsOnLine.length)return!1;for(let D=0;D<this.selectionsOnLine.length;D++)if(!this.selectionsOnLine[D].equals(L[D]))return!1;return!0}equals(L){return this.useMonospaceOptimizations===L.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===L.canUseHalfwidthRightwardsArrow&&this.lineContent===L.lineContent&&this.continuesWithWrappedLine===L.continuesWithWrappedLine&&this.isBasicASCII===L.isBasicASCII&&this.containsRTL===L.containsRTL&&this.fauxIndentLength===L.fauxIndentLength&&this.tabSize===L.tabSize&&this.startVisibleColumn===L.startVisibleColumn&&this.spaceWidth===L.spaceWidth&&this.renderSpaceWidth===L.renderSpaceWidth&&this.renderSpaceCharCode===L.renderSpaceCharCode&&this.stopRenderingLineAfter===L.stopRenderingLineAfter&&this.renderWhitespace===L.renderWhitespace&&this.renderControlCharacters===L.renderControlCharacters&&this.fontLigatures===L.fontLigatures&&E.LineDecoration.equalsArr(this.lineDecorations,L.lineDecorations)&&this.lineTokens.equals(L.lineTokens)&&this.sameSelection(L.selectionsOnLine)}}e.RenderLineInput=S;class g{constructor(L,D){this.partIndex=L,this.charIndex=D}}e.DomPosition=g;class p{static getPartIndex(L){return(L&4294901760)>>>16}static getCharIndex(L){return(L&65535)>>>0}constructor(L,D){this.length=L,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(L,D,I,T){const O=(D<<16|I<<0)>>>0;this._data[L-1]=O,this._horizontalOffset[L-1]=T}getHorizontalOffset(L){return this._horizontalOffset.length===0?0:this._horizontalOffset[L-1]}charOffsetToPartData(L){return this.length===0?0:L<0?this._data[0]:L>=this.length?this._data[this.length-1]:this._data[L]}getDomPosition(L){const D=this.charOffsetToPartData(L-1),I=p.getPartIndex(D),T=p.getCharIndex(D);return new g(I,T)}getColumn(L,D){return this.partDataToCharOffset(L.partIndex,D,L.charIndex)+1}partDataToCharOffset(L,D,I){if(this.length===0)return 0;const T=(L<<16|I<<0)>>>0;let O=0,R=this.length-1;for(;O+1<R;){const M=O+R>>>1,Q=this._data[M];if(Q===T)return M;Q>T?R=M:O=M}if(O===R)return O;const A=this._data[O],N=this._data[R];if(A===T)return O;if(N===T)return R;const P=p.getPartIndex(A),x=p.getCharIndex(A),F=p.getPartIndex(N);let B;P!==F?B=D:B=p.getCharIndex(N);const V=I-x,$=B-I;return V<=$?O:R}}e.CharacterMapping=p;class n{constructor(L,D,I){this._renderLineOutputBrand=void 0,this.characterMapping=L,this.containsRTL=D,this.containsForeignElements=I}}e.RenderLineOutput=n;function t(C,L){if(C.lineContent.length===0){if(C.lineDecorations.length>0){L.appendString("<span>");let D=0,I=0,T=0;for(const R of C.lineDecorations)(R.type===1||R.type===2)&&(L.appendString('<span class="'),L.appendString(R.className),L.appendString('"></span>'),R.type===1&&(T|=1,D++),R.type===2&&(T|=2,I++));L.appendString("</span>");const O=new p(1,D+I);return O.setColumnInfo(1,D,0,0),new n(O,!1,T)}return L.appendString("<span><span></span></span>"),new n(new p(0,0),!1,0)}return v(d(C),L)}e.renderViewLine=t;class i{constructor(L,D,I,T){this.characterMapping=L,this.html=D,this.containsRTL=I,this.containsForeignElements=T}}e.RenderLineOutput2=i;function s(C){const L=new y.StringBuilder(1e4),D=t(C,L);return new i(D.characterMapping,L.build(),D.containsRTL,D.containsForeignElements)}e.renderViewLine2=s;class r{constructor(L,D,I,T,O,R,A,N,P,x,F,B,V,$,M,Q){this.fontIsMonospace=L,this.canUseHalfwidthRightwardsArrow=D,this.lineContent=I,this.len=T,this.isOverflowing=O,this.overflowingCharCount=R,this.parts=A,this.containsForeignElements=N,this.fauxIndentLength=P,this.tabSize=x,this.startVisibleColumn=F,this.containsRTL=B,this.spaceWidth=V,this.renderSpaceCharCode=$,this.renderWhitespace=M,this.renderControlCharacters=Q}}function d(C){const L=C.lineContent;let D,I,T;C.stopRenderingLineAfter!==-1&&C.stopRenderingLineAfter<L.length?(D=!0,I=L.length-C.stopRenderingLineAfter,T=C.stopRenderingLineAfter):(D=!1,I=0,T=L.length);let O=h(L,C.containsRTL,C.lineTokens,C.fauxIndentLength,T);C.renderControlCharacters&&!C.isBasicASCII&&(O=l(L,O)),(C.renderWhitespace===4||C.renderWhitespace===1||C.renderWhitespace===2&&C.selectionsOnLine||C.renderWhitespace===3&&!C.continuesWithWrappedLine)&&(O=a(C,L,T,O));let R=0;if(C.lineDecorations.length>0){for(let A=0,N=C.lineDecorations.length;A<N;A++){const P=C.lineDecorations[A];P.type===3||P.type===1?R|=1:P.type===2&&(R|=2)}O=u(L,T,O,C.lineDecorations)}return C.containsRTL||(O=o(L,O,!C.isBasicASCII||C.fontLigatures)),new r(C.useMonospaceOptimizations,C.canUseHalfwidthRightwardsArrow,L,T,D,I,O,R,C.fauxIndentLength,C.tabSize,C.startVisibleColumn,C.containsRTL,C.spaceWidth,C.renderSpaceCharCode,C.renderWhitespace,C.renderControlCharacters)}function h(C,L,D,I,T){const O=[];let R=0;I>0&&(O[R++]=new w.LinePart(I,"",0,!1));let A=I;for(let N=0,P=D.getCount();N<P;N++){const x=D.getEndOffset(N);if(x<=I)continue;const F=D.getClassName(N);if(x>=T){const V=L?k.containsRTL(C.substring(A,T)):!1;O[R++]=new w.LinePart(T,F,0,V);break}const B=L?k.containsRTL(C.substring(A,x)):!1;O[R++]=new w.LinePart(x,F,0,B),A=x}return O}function o(C,L,D){let I=0;const T=[];let O=0;if(D)for(let R=0,A=L.length;R<A;R++){const N=L[R],P=N.endIndex;if(I+50<P){const x=N.type,F=N.metadata,B=N.containsRTL;let V=-1,$=I;for(let M=I;M<P;M++)C.charCodeAt(M)===32&&(V=M),V!==-1&&M-$>=50&&(T[O++]=new w.LinePart(V+1,x,F,B),$=V+1,V=-1);$!==P&&(T[O++]=new w.LinePart(P,x,F,B))}else T[O++]=N;I=P}else for(let R=0,A=L.length;R<A;R++){const N=L[R],P=N.endIndex,x=P-I;if(x>50){const F=N.type,B=N.metadata,V=N.containsRTL,$=Math.ceil(x/50);for(let M=1;M<$;M++){const Q=I+M*50;T[O++]=new w.LinePart(Q,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 l(C,L){const D=[];let I=new w.LinePart(0,"",0,!1),T=0;for(const O of L){const R=O.endIndex;for(;T<R;T++){const A=C.charCodeAt(T);c(A)&&(T>I.endIndex&&(I=new w.LinePart(T,O.type,O.metadata,O.containsRTL),D.push(I)),I=new w.LinePart(T+1,"mtkcontrol",O.metadata,!1),D.push(I))}T>I.endIndex&&(I=new w.LinePart(R,O.type,O.metadata,O.containsRTL),D.push(I))}return D}function a(C,L,D,I){const T=C.continuesWithWrappedLine,O=C.fauxIndentLength,R=C.tabSize,A=C.startVisibleColumn,N=C.useMonospaceOptimizations,P=C.selectionsOnLine,x=C.renderWhitespace===1,F=C.renderWhitespace===3,B=C.renderSpaceWidth!==C.spaceWidth,V=[];let $=0,M=0,Q=I[M].type,ie=I[M].containsRTL,re=I[M].endIndex;const ne=I.length;let se=!1,H=k.firstNonWhitespaceIndex(L),W;H===-1?(se=!0,H=D,W=D):W=k.lastNonWhitespaceIndex(L);let q=!1,Z=0,Y=P&&P[Z],oe=A%R;for(let ge=O;ge<D;ge++){const le=L.charCodeAt(ge);Y&&ge>=Y.endOffset&&(Z++,Y=P&&P[Z]);let ue;if(ge<H||ge>W)ue=!0;else if(le===9)ue=!0;else if(le===32)if(x)if(q)ue=!0;else{const j=ge+1<D?L.charCodeAt(ge+1):0;ue=j===32||j===9}else ue=!0;else ue=!1;if(ue&&P&&(ue=!!Y&&Y.startOffset<=ge&&Y.endOffset>ge),ue&&F&&(ue=se||ge>W),ue&&ie&&ge>=H&&ge<=W&&(ue=!1),q){if(!ue||!N&&oe>=R){if(B){const j=$>0?V[$-1].endIndex:O;for(let z=j+1;z<=ge;z++)V[$++]=new w.LinePart(z,"mtkw",1,!1)}else V[$++]=new w.LinePart(ge,"mtkw",1,!1);oe=oe%R}}else(ge===re||ue&&ge>O)&&(V[$++]=new w.LinePart(ge,Q,0,ie),oe=oe%R);for(le===9?oe=R:k.isFullWidthCharacter(le)?oe+=2:oe++,q=ue;ge===re&&(M++,M<ne);)Q=I[M].type,ie=I[M].containsRTL,re=I[M].endIndex}let ce=!1;if(q)if(T&&x){const ge=D>0?L.charCodeAt(D-1):0,le=D>1?L.charCodeAt(D-2):0;ge===32&&le!==32&&le!==9||(ce=!0)}else ce=!0;if(ce)if(B){const ge=$>0?V[$-1].endIndex:O;for(let le=ge+1;le<=D;le++)V[$++]=new w.LinePart(le,"mtkw",1,!1)}else V[$++]=new w.LinePart(D,"mtkw",1,!1);else V[$++]=new w.LinePart(D,Q,0,ie);return V}function u(C,L,D,I){I.sort(E.LineDecoration.compare);const T=E.LineDecorationsNormalizer.normalize(C,I),O=T.length;let R=0;const A=[];let N=0,P=0;for(let F=0,B=D.length;F<B;F++){const V=D[F],$=V.endIndex,M=V.type,Q=V.metadata,ie=V.containsRTL;for(;R<O&&T[R].startOffset<$;){const re=T[R];if(re.startOffset>P&&(P=re.startOffset,A[N++]=new w.LinePart(P,M,Q,ie)),re.endOffset+1<=$)P=re.endOffset+1,A[N++]=new w.LinePart(P,M+" "+re.className,Q|re.metadata,ie),R++;else{P=$,A[N++]=new w.LinePart(P,M+" "+re.className,Q|re.metadata,ie);break}}$>P&&(P=$,A[N++]=new w.LinePart(P,M,Q,ie))}const x=D[D.length-1].endIndex;if(R<O&&T[R].startOffset===x)for(;R<O&&T[R].startOffset===x;){const F=T[R];A[N++]=new w.LinePart(P,F.className,F.metadata,!1),R++}return A}function v(C,L){const D=C.fontIsMonospace,I=C.canUseHalfwidthRightwardsArrow,T=C.containsForeignElements,O=C.lineContent,R=C.len,A=C.isOverflowing,N=C.overflowingCharCount,P=C.parts,x=C.fauxIndentLength,F=C.tabSize,B=C.startVisibleColumn,V=C.containsRTL,$=C.spaceWidth,M=C.renderSpaceCharCode,Q=C.renderWhitespace,ie=C.renderControlCharacters,re=new p(R+1,P.length);let ne=!1,se=0,H=B,W=0,q=0,Z=0;V?L.appendString('<span dir="ltr">'):L.appendString("<span>");for(let Y=0,oe=P.length;Y<oe;Y++){const ce=P[Y],ge=ce.endIndex,le=ce.type,ue=ce.containsRTL,j=Q!==0&&ce.isWhitespace(),z=j&&!D&&(le==="mtkw"||!T),U=se===ge&&ce.isPseudoAfter();if(W=0,L.appendString("<span "),ue&&L.appendString('style="unicode-bidi:isolate" '),L.appendString('class="'),L.appendString(z?"mtkz":le),L.appendASCIICharCode(34),j){let J=0;{let te=se,G=H;for(;te<ge;te++){const me=(O.charCodeAt(te)===9?F-G%F:1)|0;J+=me,te>=x&&(G+=me)}}for(z&&(L.appendString(' style="width:'),L.appendString(String($*J)),L.appendString('px"')),L.appendASCIICharCode(62);se<ge;se++){re.setColumnInfo(se+1,Y-Z,W,q),Z=0;const te=O.charCodeAt(se);let G,ae;if(te===9){G=F-H%F|0,ae=G,!I||ae>1?L.appendCharCode(8594):L.appendCharCode(65515);for(let me=2;me<=ae;me++)L.appendCharCode(160)}else G=2,ae=1,L.appendCharCode(M),L.appendCharCode(8204);W+=G,q+=ae,se>=x&&(H+=ae)}}else for(L.appendASCIICharCode(62);se<ge;se++){re.setColumnInfo(se+1,Y-Z,W,q),Z=0;const J=O.charCodeAt(se);let te=1,G=1;switch(J){case 9:te=F-H%F,G=te;for(let ae=1;ae<=te;ae++)L.appendCharCode(160);break;case 32:L.appendCharCode(160);break;case 60:L.appendString("<");break;case 62:L.appendString(">");break;case 38:L.appendString("&");break;case 0:ie?L.appendCharCode(9216):L.appendString("�");break;case 65279:case 8232:case 8233:case 133:L.appendCharCode(65533);break;default:k.isFullWidthCharacter(J)&&G++,ie&&J<32?L.appendCharCode(9216+J):ie&&J===127?L.appendCharCode(9249):ie&&c(J)?(L.appendString("[U+"),L.appendString(f(J)),L.appendString("]"),te=8,G=te):L.appendCharCode(J)}W+=te,q+=G,se>=x&&(H+=G)}U?Z++:Z=0,se>=R&&!ne&&ce.isPseudoAfter()&&(ne=!0,re.setColumnInfo(se+1,Y,W,q)),L.appendString("</span>")}return ne||re.setColumnInfo(R+1,P.length-1,W,q),A&&(L.appendString('<span class="mtkoverflow">'),L.appendString(_.localize(0,null,m(N))),L.appendString("</span>")),L.appendString("</span>"),new n(re,V,T)}function f(C){return C.toString(16).toUpperCase().padStart(4,"0")}function m(C){return C<1024?_.localize(1,null,C):C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/1024/1024).toFixed(1)} MB`}}),define(X[602],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(X[603],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(X[604],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(X[605],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(X[606],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(X[607],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(X[608],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(X[609],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(X[610],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(X[611],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codeAction/browser/codeActionUi",e)}),define(X[612],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(X[613],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(X[614],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(X[615],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions",e)}),define(X[616],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/comment/browser/comment",e)}),define(X[617],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(X[618],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/copyPaste/browser/copyPasteContribution",e)}),define(X[619],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/copyPaste/browser/copyPasteController",e)}),define(X[620],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(X[621],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/dropIntoEditor/browser/defaultOnDropProviders",e)}),define(X[622],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution",e)}),define(X[623],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/dropIntoEditor/browser/postDropWidget",e)}),define(X[624],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(X[625],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/find/browser/findController",e)}),define(X[626],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/find/browser/findWidget",e)}),define(X[627],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/folding/browser/folding",e)}),define(X[628],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(X[629],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(X[630],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/format/browser/format",e)}),define(X[631],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/format/browser/formatActions",e)}),define(X[632],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(X[633],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(X[634],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(X[635],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(X[636],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(X[637],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(X[638],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(X[639],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(X[150],ee([1,0,11,6,158,2,56,42,9,5,639]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class n{constructor(d,h,o,c){this.isProviderFirst=d,this.parent=h,this.link=o,this._rangeCallback=c,this.id=y.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,p.localize)(1,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn,h.value):(0,p.localize)(0,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=n;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:l,endLineNumber:a,endColumn:u}=d,v=o.getWordUntilPosition({lineNumber:c,column:l-h}),f=new g.Range(c,v.startColumn,c,l),m=new g.Range(a,u,a,1073741824),C=o.getValueInRange(f).replace(/^\s+/,""),L=o.getValueInRange(d),D=o.getValueInRange(m).replace(/\s+$/,"");return{value:C+L+D,highlight:{start:C.length,end:C.length+L.length}}}}e.FilePreview=t;class i{constructor(d,h){this.parent=d,this.uri=h,this.children=[],this._previews=new w.ResourceMap}dispose(){(0,E.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,p.localize)(2,null,(0,b.basename)(this.uri),this.uri.fsPath):(0,p.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 s{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(s._compareReferences);let c;for(const l of d)if((!c||!b.extUri.isEqual(c.uri,l.uri,!0))&&(c=new i(this,l.uri),this.groups.push(c)),c.children.length===0||s._compareReferences(l,c.children[c.children.length-1])!==0){const a=new n(o===l,c,l,u=>this._onDidChangeReferenceRange.fire(u));this.references.push(a),c.children.push(a)}}dispose(){(0,E.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new s(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,p.localize)(4,null):this.references.length===1?(0,p.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,p.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,p.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(d,h){const{parent:o}=d;let c=o.children.indexOf(d);const l=o.children.length,a=o.parent.groups.length;return a===1||h&&c+1<l||!h&&c>0?(h?c=(c+1)%l:c=(c+l-1)%l,o.children[c]):(c=o.parent.groups.indexOf(o),h?(c=(c+1)%a,o.parent.groups[c].children[0]):(c=(c+a-1)%a,o.parent.groups[c].children[o.parent.groups[c].children.length-1]))}nearestReference(d,h){const o=this.references.map((c,l)=>({idx:l,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,l)=>c.prefixLen>l.prefixLen?-1:c.prefixLen<l.prefixLen?1:c.offsetDist<l.offsetDist?-1:c.offsetDist>l.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=s}),define(X[640],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(X[641],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/hover/browser/hover",e)}),define(X[642],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(X[643],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(X[644],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(X[645],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(X[646],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(X[647],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/inlineCompletions/browser/commands",e)}),define(X[648],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/inlineCompletions/browser/hoverParticipant",e)}),define(X[649],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys",e)}),define(X[650],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget",e)}),define(X[651],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(X[652],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(X[653],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(X[654],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/links/browser/links",e)}),define(X[655],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/message/browser/messageController",e)}),define(X[656],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(X[657],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(X[658],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(X[659],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(X[660],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(X[661],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(X[662],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(X[663],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/rename/browser/rename",e)}),define(X[664],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(X[665],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(X[666],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(X[667],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(X[668],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(X[669],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(X[670],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(X[671],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(X[672],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(X[673],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(X[674],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(X[675],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(X[676],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(X[677],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(X[678],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(X[679],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(X[680],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(X[681],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(X[682],ee([3,4]),function(K,e){return K.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(X[683],ee([3,4]),function(K,e){return K.create("vs/platform/action/common/actionCommonCategories",e)}),define(X[684],ee([3,4]),function(K,e){return K.create("vs/platform/actionWidget/browser/actionList",e)}),define(X[685],ee([3,4]),function(K,e){return K.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(X[686],ee([3,4]),function(K,e){return K.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(X[687],ee([3,4]),function(K,e){return K.create("vs/platform/actions/browser/toolbar",e)}),define(X[688],ee([3,4]),function(K,e){return K.create("vs/platform/actions/common/menuService",e)}),define(X[689],ee([3,4]),function(K,e){return K.create("vs/platform/audioCues/browser/audioCueService",e)}),define(X[690],ee([3,4]),function(K,e){return K.create("vs/platform/configuration/common/configurationRegistry",e)}),define(X[691],ee([3,4]),function(K,e){return K.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(X[692],ee([3,4]),function(K,e){return K.create("vs/platform/contextkey/common/contextkey",e)}),define(X[693],ee([3,4]),function(K,e){return K.create("vs/platform/contextkey/common/contextkeys",e)}),define(X[694],ee([3,4]),function(K,e){return K.create("vs/platform/contextkey/common/scanner",e)}),define(X[695],ee([3,4]),function(K,e){return K.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(X[696],ee([3,4]),function(K,e){return K.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(X[697],ee([3,4]),function(K,e){return K.create("vs/platform/list/browser/listService",e)}),define(X[698],ee([3,4]),function(K,e){return K.create("vs/platform/markers/common/markers",e)}),define(X[699],ee([3,4]),function(K,e){return K.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(X[700],ee([3,4]),function(K,e){return K.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(X[701],ee([3,4]),function(K,e){return K.create("vs/platform/quickinput/browser/quickInput",e)}),define(X[702],ee([3,4]),function(K,e){return K.create("vs/platform/quickinput/browser/quickInputList",e)}),define(X[703],ee([3,4]),function(K,e){return K.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(X[704],ee([3,4]),function(K,e){return K.create("vs/platform/theme/common/colorRegistry",e)}),define(X[705],ee([3,4]),function(K,e){return K.create("vs/platform/theme/common/iconRegistry",e)}),define(X[706],ee([3,4]),function(K,e){return K.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(X[707],ee([3,4]),function(K,e){return K.create("vs/platform/workspace/common/workspace",e)}),define(X[708],ee([1,0]),function(K,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(X[709],ee([1,0,683]),function(K,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(X[710],ee([1,0,11,694]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=void 0;function y(...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 E=(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 p=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:p})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const p=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:p})}else this._match(126)?this._addToken(9):this._error(y("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(y("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(y("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(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 p=this._start,n=this._input.substring(this._start,this._current),t={type:19,offset:this._start,lexeme:n};this._errors.push({offset:p,lexeme:n,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 p=this._input.substring(this._start,this._current),n=b._keywords.get(p);n?this._addToken(n):this._tokens.push({type:17,lexeme:p,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(E);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,p=!1,n=!1;for(;;){if(g>=this._input.length){this._current=g,this._error(w);return}const i=this._input.charCodeAt(g);if(p)p=!1;else if(i===47&&!n){g++;break}else i===91?n=!0:i===92?p=!0:i===93&&(n=!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(X[711],ee([1,0]),function(K,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(X[712],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifierSet=e.ExtensionIdentifier=void 0;class _{constructor(E){this.value=E,this._lower=E.toLowerCase()}static toKey(E){return typeof E=="string"?E.toLowerCase():E._lower}}e.ExtensionIdentifier=_;class k{constructor(E){if(this._set=new Set,E)for(const w of E)this.add(w)}add(E){this._set.add(_.toKey(E))}has(E){return this._set.has(_.toKey(E))}}e.ExtensionIdentifierSet=k}),define(X[314],ee([1,0]),function(K,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(X[713],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function _(k){var y,E;return((y=k.lookupKeybinding("history.showPrevious"))===null||y===void 0?void 0:y.getElectronAccelerator())==="Up"&&((E=k.lookupKeybinding("history.showNext"))===null||E===void 0?void 0:E.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=_}),define(X[225],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class _{constructor(y,E=[],w=!1){this.ctor=y,this.staticArguments=E,this.supportsDelayedInstantiation=w}}e.SyncDescriptor=_}),define(X[50],ee([1,0,225]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const k=[];function y(w,b,S){b instanceof _.SyncDescriptor||(b=new _.SyncDescriptor(b,[],!!S)),k.push([w,b])}e.registerSingleton=y;function E(){return k}e.getSingletonServiceDescriptors=E}),define(X[714],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class _{constructor(E,w){this.key=E,this.data=w,this.incoming=new Map,this.outgoing=new Map}}e.Node=_;class k{constructor(E){this._hashFn=E,this._nodes=new Map}roots(){const E=[];for(const w of this._nodes.values())w.outgoing.size===0&&E.push(w);return E}insertEdge(E,w){const b=this.lookupOrInsertNode(E),S=this.lookupOrInsertNode(w);b.outgoing.set(S.key,S),S.incoming.set(b.key,b)}removeNode(E){const w=this._hashFn(E);this._nodes.delete(w);for(const b of this._nodes.values())b.outgoing.delete(w),b.incoming.delete(w)}lookupOrInsertNode(E){const w=this._hashFn(E);let b=this._nodes.get(w);return b||(b=new _(w,E),this._nodes.set(w,b)),b}isEmpty(){return this._nodes.size===0}toString(){const E=[];for(const[w,b]of this._nodes)E.push(`${w}
- (-> incoming)[${[...b.incoming.keys()].join(", ")}]
- (outgoing ->)[${[...b.outgoing.keys()].join(",")}]
- `);return E.join(`
- `)}findCycleSlow(){for(const[E,w]of this._nodes){const b=new Set([E]),S=this._findCycle(w,b);if(S)return S}}_findCycle(E,w){for(const[b,S]of E.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(X[8],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.IInstantiationService=e._util=void 0;var _;(function(E){E.serviceIds=new Map,E.DI_TARGET="$di$target",E.DI_DEPENDENCIES="$di$dependencies";function w(b){return b[E.DI_DEPENDENCIES]||[]}E.getServiceDependencies=w})(_||(e._util=_={})),e.IInstantiationService=y("instantiationService");function k(E,w,b){w[_.DI_TARGET]===w?w[_.DI_DEPENDENCIES].push({id:E,index:b}):(w[_.DI_DEPENDENCIES]=[{id:E,index:b}],w[_.DI_TARGET]=w)}function y(E){if(_.serviceIds.has(E))return _.serviceIds.get(E);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=()=>E,_.serviceIds.set(E,w),w}e.createDecorator=y}),define(X[151],ee([1,0,8,20,18]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,_.createDecorator)("IWorkspaceEditService");class E{constructor(g){this.metadata=g}static convert(g){return g.edits.map(p=>{if(w.is(p))return w.lift(p);if(b.is(p))return b.lift(p);throw new Error("Unsupported edit")})}}e.ResourceEdit=E;class w extends E{static is(g){return g instanceof w?!0:(0,y.isObject)(g)&&k.URI.isUri(g.resource)&&(0,y.isObject)(g.textEdit)}static lift(g){return g instanceof w?g:new w(g.resource,g.textEdit,g.versionId,g.metadata)}constructor(g,p,n=void 0,t){super(t),this.resource=g,this.textEdit=p,this.versionId=n}}e.ResourceTextEdit=w;class b extends E{static is(g){return g instanceof b?!0:(0,y.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,p,n={},t){super(t),this.oldResource=g,this.newResource=p,this.options=n}}e.ResourceFileEdit=b}),define(X[32],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,_.createDecorator)("codeEditorService")}),define(X[39],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,_.createDecorator)("languageService")}),define(X[111],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,_.createDecorator)("editorWorkerService")}),define(X[19],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,_.createDecorator)("ILanguageFeaturesService")}),define(X[715],ee([1,0,570,19,50]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class E{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=E,(0,y.registerSingleton)(k.ILanguageFeaturesService,E,1)}),define(X[226],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,_.createDecorator)("markerDecorationsService")}),define(X[51],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,_.createDecorator)("modelService")}),define(X[62],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,_.createDecorator)("textModelService")}),define(X[227],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,_.createDecorator)("semanticTokensStylingService")}),define(X[180],ee([1,0,8]),function(K,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(X[716],ee([1,0,50,8,269]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsDnDService=void 0,e.ITreeViewsDnDService=(0,k.createDecorator)("treeViewsDndService"),(0,_.registerSingleton)(e.ITreeViewsDnDService,y.TreeViewsDnDService,1)});var fe=this&&this.__param||function(K,e){return function(_,k){e(_,k,K)}};define(X[717],ee([1,0,6,2,80,9,75,41,12,5,96,39,46,87,141,110,204,142,431]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;let c=e.GhostTextWidget=class extends k.Disposable{constructor(f,m,C){super(),this.editor=f,this.model=m,this.languageService=C,this.isDisposed=(0,y.observableValue)("isDisposed",!1),this.currentTextModel=(0,y.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=(0,y.derived)("uiState",L=>{if(this.isDisposed.read(L))return;const D=this.currentTextModel.read(L);if(D!==this.model.targetTextModel.read(L))return;const I=this.model.ghostText.read(L);if(!I)return;const T=I instanceof d.GhostTextReplacement?I.columnRange:void 0,O=[],R=[];function A(B,V){if(R.length>0){const $=R[R.length-1];V&&$.decorations.push(new s.LineDecoration($.content.length+1,$.content.length+1+B[0].length,V,0)),$.content+=B[0],B=B.slice(1)}for(const $ of B)R.push({content:$,decorations:V?[new s.LineDecoration(1,$.length+1,V,0)]:[]})}const N=D.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)):A([N.substring(x,B.column-1)],void 0),V.length>0&&(A(V,"ghost-text"),P===void 0&&B.column<=N.length&&(P=B.column)),x=B.column-1}P!==void 0&&A([N.substring(x)],void 0);const F=P!==void 0?new h.ColumnRange(P,N.length+1):void 0;return{replacedRange:T,inlineTexts:O,additionalLines:R,hiddenRange:F,lineNumber:I.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(L),targetTextModel:D}}),this.decorations=(0,y.derived)("decorations",L=>{const D=this.uiState.read(L);if(!D)return[];const I=[];D.replacedRange&&I.push({range:D.replacedRange.toRange(D.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),D.hiddenRange&&I.push({range:D.hiddenRange.toRange(D.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const T of D.inlineTexts)I.push({range:g.Range.fromPositions(new S.Position(D.lineNumber,T.column)),options:{description:"ghost-text",after:{content:T.text,inlineClassName:T.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:t.InjectedTextCursorStops.Left},showIfCollapsed:!0}});return I}),this.additionalLinesWidget=this._register(new l(this.editor,this.languageService.languageIdCodec,(0,y.derived)("lines",L=>{const D=this.uiState.read(L);return D?{lineNumber:D.lineNumber,additionalLines:D.additionalLines,minReservedLineCount:D.additionalReservedLineCount,targetTextModel:D.targetTextModel}:void 0}))),this._register((0,k.toDisposable)(()=>{this.isDisposed.set(!0,void 0)})),this._register((0,h.applyObservableDecorations)(this.editor,this.decorations))}ownsViewZone(f){return this.additionalLinesWidget.viewZoneId===f}};e.GhostTextWidget=c=Me([fe(2,n.ILanguageService)],c);class l extends k.Disposable{get viewZoneId(){return this._viewZoneId}constructor(f,m,C){super(),this.editor=f,this.languageIdCodec=m,this.lines=C,this._viewZoneId=void 0,this.editorOptionsChanged=(0,y.observableSignalFromEvent)("editorOptionChanged",_.Event.filter(this.editor.onDidChangeConfiguration,L=>L.hasChanged(31)||L.hasChanged(112)||L.hasChanged(94)||L.hasChanged(89)||L.hasChanged(49)||L.hasChanged(48)||L.hasChanged(64))),this._register((0,y.autorun)("update view zone",L=>{const D=this.lines.read(L);this.editorOptionsChanged.read(L),D?this.updateLines(D.lineNumber,D.additionalLines,D.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,m,C){const L=this.editor.getModel();if(!L)return;const{tabSize:D}=L.getOptions();this.editor.changeViewZones(I=>{this._viewZoneId&&(I.removeZone(this._viewZoneId),this._viewZoneId=void 0);const T=Math.max(m.length,C);if(T>0){const O=document.createElement("div");a(O,D,m,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=I.addZone({afterLineNumber:f,heightInLines:T,domNode:O,afterColumnAffinity:1})}})}}function a(v,f,m,C,L){const D=C.get(31),I=C.get(112),T="none",O=C.get(89),R=C.get(49),A=C.get(48),N=C.get(64),P=new p.StringBuilder(1e4);P.appendString('<div class="suggest-preview-text">');for(let B=0,V=m.length;B<V;B++){const $=m[B],M=$.content;P.appendString('<div class="view-line'),P.appendString('" style="top:'),P.appendString(String(B*N)),P.appendString('px;width:1000000px;">');const Q=E.isBasicASCII(M),ie=E.containsRTL(M),re=i.LineTokens.createEmpty(M,L);(0,r.renderViewLine)(new r.RenderLineInput(A.isMonospace&&!D,A.canUseHalfwidthRightwardsArrow,M,!1,Q,ie,0,re,$.decorations,f,0,A.spaceWidth,A.middotWidth,A.wsmiddotWidth,I,T,O,R!==b.EditorFontLigatures.OFF,null),P),P.appendString("</div>")}P.appendString("</div>"),(0,w.applyFontInfo)(v,A);const x=P.build(),F=u?u.createHTML(x):x;v.innerHTML=F}const u=(o=window.trustedTypes)===null||o===void 0?void 0:o.createPolicy("editorGhostText",{createHTML:v=>v})}),define(X[123],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,_.createDecorator)("themeService")}),define(X[181],ee([1,0,8,689]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.Sound=e.IAudioCueService=void 0,e.IAudioCueService=(0,_.createDecorator)("audioCue");class y{static register(b){return new y(b.fileName)}constructor(b){this.fileName=b}}e.Sound=y,y.error=y.register({fileName:"error.mp3"}),y.warning=y.register({fileName:"warning.mp3"}),y.foldedArea=y.register({fileName:"foldedAreas.mp3"}),y.break=y.register({fileName:"break.mp3"}),y.quickFixes=y.register({fileName:"quickFixes.mp3"}),y.taskCompleted=y.register({fileName:"taskCompleted.mp3"}),y.taskFailed=y.register({fileName:"taskFailed.mp3"}),y.terminalBell=y.register({fileName:"terminalBell.mp3"}),y.diffLineInserted=y.register({fileName:"diffLineInserted.mp3"}),y.diffLineDeleted=y.register({fileName:"diffLineDeleted.mp3"}),y.diffLineModified=y.register({fileName:"diffLineModified.mp3"});class E{static register(b){const S=new E(b.sound,b.name,b.settingsKey);return E._audioCues.add(S),S}constructor(b,S,g){this.sound=b,this.name=S,this.settingsKey=g}}e.AudioCue=E,E._audioCues=new Set,E.error=E.register({name:(0,k.localize)(0,null),sound:y.error,settingsKey:"audioCues.lineHasError"}),E.warning=E.register({name:(0,k.localize)(1,null),sound:y.warning,settingsKey:"audioCues.lineHasWarning"}),E.foldedArea=E.register({name:(0,k.localize)(2,null),sound:y.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),E.break=E.register({name:(0,k.localize)(3,null),sound:y.break,settingsKey:"audioCues.lineHasBreakpoint"}),E.inlineSuggestion=E.register({name:(0,k.localize)(4,null),sound:y.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),E.terminalQuickFix=E.register({name:(0,k.localize)(5,null),sound:y.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),E.onDebugBreak=E.register({name:(0,k.localize)(6,null),sound:y.break,settingsKey:"audioCues.onDebugBreak"}),E.noInlayHints=E.register({name:(0,k.localize)(7,null),sound:y.error,settingsKey:"audioCues.noInlayHints"}),E.taskCompleted=E.register({name:(0,k.localize)(8,null),sound:y.taskCompleted,settingsKey:"audioCues.taskCompleted"}),E.taskFailed=E.register({name:(0,k.localize)(9,null),sound:y.taskFailed,settingsKey:"audioCues.taskFailed"}),E.terminalCommandFailed=E.register({name:(0,k.localize)(10,null),sound:y.error,settingsKey:"audioCues.terminalCommandFailed"}),E.terminalBell=E.register({name:(0,k.localize)(11,null),sound:y.terminalBell,settingsKey:"audioCues.terminalBell"}),E.notebookCellCompleted=E.register({name:(0,k.localize)(12,null),sound:y.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),E.notebookCellFailed=E.register({name:(0,k.localize)(13,null),sound:y.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),E.diffLineInserted=E.register({name:(0,k.localize)(14,null),sound:y.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),E.diffLineDeleted=E.register({name:(0,k.localize)(15,null),sound:y.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),E.diffLineModified=E.register({name:(0,k.localize)(16,null),sound:y.diffLineModified,settingsKey:"audioCues.diffLineModified"})}),define(X[97],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,_.createDecorator)("clipboardService")}),define(X[25],ee([1,0,6,53,2,60,18,8]),function(K,e,_,k,y,E,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 s=[];for(const d of S.description.args)s.push(d.constraint);const r=S.handler;S.handler=function(d,...h){return(0,w.validateConstraints)(h,s),r(d,...h)}}const{id:p}=S;let n=this._commands.get(p);n||(n=new E.LinkedList,this._commands.set(p,n));const t=n.unshift(S),i=(0,y.toDisposable)(()=>{t();const s=this._commands.get(p);s?.isEmpty()&&this._commands.delete(p)});return this._onDidRegisterCommand.fire(p),i}registerCommandAlias(S,g){return e.CommandsRegistry.registerCommand(S,(p,...n)=>p.get(e.ICommandService).executeCommand(g,...n))}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 p=this.getCommand(g);p&&S.set(g,p)}return S}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(X[315],ee([1,0,21,11,2,18,20,51,25,19]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class p{constructor(){this.lenses=[],this._disposables=new y.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(i,s){this._disposables.add(i);for(const r of i.lenses)this.lenses.push({symbol:r,provider:s})}}e.CodeLensModel=p;function n(t,i,s){return we(this,void 0,void 0,function*(){const r=t.ordered(i),d=new Map,h=new p,o=r.map((c,l)=>we(this,void 0,void 0,function*(){d.set(c,l);try{const a=yield Promise.resolve(c.provideCodeLenses(i,s));a&&h.add(a,c)}catch(a){(0,k.onUnexpectedExternalError)(a)}}));return yield Promise.all(o),h.lenses=h.lenses.sort((c,l)=>c.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:c.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:d.get(c.provider)<d.get(l.provider)?-1:d.get(c.provider)>d.get(l.provider)?1:c.symbol.range.startColumn<l.symbol.range.startColumn?-1:c.symbol.range.startColumn>l.symbol.range.startColumn?1:0),h})}e.getCodeLensModel=n,S.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(t,...i){let[s,r]=i;(0,E.assertType)(w.URI.isUri(s)),(0,E.assertType)(typeof r=="number"||!r);const{codeLensProvider:d}=t.get(g.ILanguageFeaturesService),h=t.get(b.IModelService).getModel(s);if(!h)throw(0,k.illegalArgument)();const o=[],c=new y.DisposableStore;return n(d,h,_.CancellationToken.None).then(l=>{c.add(l);const a=[];for(const u of l.lenses)r==null||u.symbol.command?o.push(u.symbol):r-- >0&&u.provider.resolveCodeLens&&a.push(Promise.resolve(u.provider.resolveCodeLens(h,u.symbol,_.CancellationToken.None)).then(v=>o.push(v||u.symbol)));return Promise.all(a)}).then(()=>o).finally(()=>{setTimeout(()=>c.dispose(),100)})})}),define(X[718],ee([1,0,16,21,11,2,18,20,5,51,25,19]),function(K,e,_,k,y,E,w,b,S,g,p,n){"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 E.DisposableStore;let h=[];for(const[o,c]of d){const l=o.links.map(a=>new t(a,c));h=i._union(h,l),(0,E.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,l,a,u;for(c=0,a=0,l=d.length,u=h.length;c<l&&a<u;){const v=d[c],f=h[a];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),a++)}for(;c<l;c++)o.push(d[c]);for(;a<u;a++)o.push(h[a]);return o}}e.LinksList=i;function s(r,d,h){const o=[],c=r.ordered(d).reverse().map((l,a)=>Promise.resolve(l.provideLinks(d,h)).then(u=>{u&&(o[a]=[u,l])},y.onUnexpectedExternalError));return Promise.all(c).then(()=>{const l=new i((0,_.coalesce)(o));return h.isCancellationRequested?(l.dispose(),new i([])):l})}e.getLinks=s,p.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(n.ILanguageFeaturesService),l=r.get(g.IModelService).getModel(h);if(!l)return[];const a=yield s(c,l,k.CancellationToken.None);if(!a)return[];for(let v=0;v<Math.min(o,a.links.length);v++)yield a.links[v].resolve(k.CancellationToken.None);const u=a.links.slice(0);return a.dispose(),u}))}),define(X[316],ee([1,0,21,11,20,51,25,18,575,5,19]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function n(u){return u&&!!u.data}e.isSemanticTokens=n;function t(u){return u&&Array.isArray(u.edits)}e.isSemanticTokensEdits=t;class i{constructor(v,f,m){this.provider=v,this.tokens=f,this.error=m}}e.DocumentSemanticTokensResult=i;function s(u,v){return u.has(v)}e.hasDocumentSemanticTokensProvider=s;function r(u,v){const f=u.orderedGroups(v);return f.length>0?f[0]:[]}function d(u,v,f,m,C){return we(this,void 0,void 0,function*(){const L=r(u,v),D=yield Promise.all(L.map(I=>we(this,void 0,void 0,function*(){let T,O=null;try{T=yield I.provideDocumentSemanticTokens(v,I===f?m:null,C)}catch(R){O=R,T=null}return(!T||!n(T)&&!t(T))&&(T=null),new i(I,T,O)})));for(const I of D){if(I.error)throw I.error;if(I.tokens)return I}return D.length>0?D[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 l(u,v){const f=u.orderedGroups(v);return f.length>0?f[0]:[]}function a(u,v,f,m){return we(this,void 0,void 0,function*(){const C=l(u,v),L=yield Promise.all(C.map(D=>we(this,void 0,void 0,function*(){let I;try{I=yield D.provideDocumentRangeSemanticTokens(v,f,m)}catch(T){(0,k.onUnexpectedExternalError)(T),I=null}return(!I||!n(I))&&(I=null),new o(D,I)})));for(const D of L)if(D.tokens)return D;return L.length>0?L[0]:null})}e.getDocumentRangeSemanticTokens=a,w.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f]=v;(0,b.assertType)(f instanceof y.URI);const m=u.get(E.IModelService).getModel(f);if(!m)return;const{documentSemanticTokensProvider:C}=u.get(p.ILanguageFeaturesService),L=h(C,m);return L?L[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 y.URI);const m=u.get(E.IModelService).getModel(f);if(!m)return;const{documentSemanticTokensProvider:C}=u.get(p.ILanguageFeaturesService);if(!s(C,m))return u.get(w.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",f,m.getFullModelRange());const L=yield d(C,m,null,null,_.CancellationToken.None);if(!L)return;const{provider:D,tokens:I}=L;if(!I||!n(I))return;const T=(0,S.encodeSemanticTokensDto)({id:0,type:"full",data:I.data});return I.resultId&&D.releaseDocumentSemanticTokens(I.resultId),T})),w.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f,m]=v;(0,b.assertType)(f instanceof y.URI);const C=u.get(E.IModelService).getModel(f);if(!C)return;const{documentRangeSemanticTokensProvider:L}=u.get(p.ILanguageFeaturesService),D=l(L,C);if(D.length===0)return;if(D.length===1)return D[0].getLegend();if(!m||!g.Range.isIRange(m))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),D[0].getLegend();const I=yield a(L,C,g.Range.lift(m),_.CancellationToken.None);if(I)return I.provider.getLegend()})),w.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f,m]=v;(0,b.assertType)(f instanceof y.URI),(0,b.assertType)(g.Range.isIRange(m));const C=u.get(E.IModelService).getModel(f);if(!C)return;const{documentRangeSemanticTokensProvider:L}=u.get(p.ILanguageFeaturesService),D=yield a(L,C,g.Range.lift(m),_.CancellationToken.None);if(!(!D||!D.tokens))return(0,S.encodeSemanticTokensDto)({id:0,type:"full",data:D.tokens.data})}))}),define(X[26],ee([1,0,8]),function(K,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,p){const n=Object.create(null);for(const t in g)y(n,t,g[t],p);return n}e.toValuesTree=k;function y(g,p,n,t){const i=p.split("."),s=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 ${p} as ${i.slice(0,d+1).join(".")} is ${JSON.stringify(o)}`);return}r=o}if(typeof r=="object"&&r!==null)try{r[s]=n}catch{t(`Ignoring ${p} as ${i.join(".")} is ${JSON.stringify(r)}`)}else t(`Ignoring ${p} as ${i.join(".")} is ${JSON.stringify(r)}`)}e.addToValueTree=y;function E(g,p){const n=p.split(".");w(g,n)}e.removeFromValueTree=E;function w(g,p){const n=p.shift();if(p.length===0){delete g[n];return}if(Object.keys(g).indexOf(n)!==-1){const t=g[n];typeof t=="object"&&!Array.isArray(t)&&(w(t,p),Object.keys(t).length===0&&delete g[n])}}function b(g,p,n){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=p.split("."),s=t(g,i);return typeof s>"u"?n:s}e.getConfigurationValue=b;function S(g){return g.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=S}),define(X[317],ee([1,0,31,149,285,26]),function(K,e,_,k,y,E){"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 l=this._entries[c];return l||(l=new S(h,o),this._entries[c]=l,l)}}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 p{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 n(h,o);if(h!==null&&h.depth>=this._maxCacheDepth)return new n(h,o);const c=S.getStackElementId(h);let l=this._entries[c];return l||(l=new n(h,null),this._entries[c]=l,l)}}p._INSTANCE=new p(w);class n{constructor(h,o){this.stack=h,this.embeddedLanguageData=o}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:p.create(this.stack,this.embeddedLanguageData)}equals(h){return!(h instanceof n)||!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,l){const a=c.languageId,u=c.state,v=_.TokenizationRegistry.get(a);if(!v)return this.enterLanguage(a),this.emit(l,""),u;const f=v.tokenize(h,o,u);if(l!==0)for(const m of f.tokens)this._tokens.push(new _.Token(m.offset+l,m.type,m.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 l=h!==null?h.length:0,a=o.length,u=c!==null?c.length:0;if(l===0&&a===0&&u===0)return new Uint32Array(0);if(l===0&&a===0)return c;if(a===0&&u===0)return h;const v=new Uint32Array(l+a+u);h!==null&&v.set(h);for(let f=0;f<a;f++)v[l+f]=o[f];return c!==null&&v.set(c,l+a),v}nestedLanguageTokenize(h,o,c,l){const a=c.languageId,u=c.state,v=_.TokenizationRegistry.get(a);if(!v)return this.enterLanguage(a),this.emit(l,""),u;const f=v.tokenizeEncoded(h,o,u);if(l!==0)for(let m=0,C=f.tokens.length;m<C;m+=2)f.tokens[m]+=l;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 s=e.MonarchTokenizer=class Ai{constructor(h,o,c,l,a){this._configurationService=a,this._languageService=h,this._standaloneThemeService=o,this._languageId=c,this._lexer=l,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 m=0,C=v.changedLanguages.length;m<C;m++){const L=v.changedLanguages[m];if(this._embeddedLanguages[L]){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 l=c.getLoadStatus();l.loaded===!1&&h.push(l.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 p.create(h,null)}tokenize(h,o,c){if(h.length>=this._maxTokenizationLineLength)return(0,k.nullTokenize)(this._languageId,c);const l=new t,a=this._tokenize(h,o,c,l);return l.finalize(a)}tokenizeEncoded(h,o,c){if(h.length>=this._maxTokenizationLineLength)return(0,k.nullTokenizeEncoded)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),c);const l=new i(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),a=this._tokenize(h,o,c,l);return l.finalize(a)}_tokenize(h,o,c,l){return c.embeddedLanguageData?this._nestedTokenize(h,o,c,0,l):this._myTokenize(h,o,c,0,l)}_findLeavingNestedLanguageOffset(h,o){let c=this._lexer.tokenizer[o.stack.state];if(!c&&(c=y.findRules(this._lexer,o.stack.state),!c))throw y.createError(this._lexer,"tokenizer state is not defined: "+o.stack.state);let l=-1,a=!1;for(const u of c){if(!y.isIAction(u.action)||u.action.nextEmbedded!=="@pop")continue;a=!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 m=h.search(v);m===-1||m!==0&&u.matchOnlyAtLineStart||(l===-1||m<l)&&(l=m)}if(!a)throw y.createError(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+o.stack.state);return l}_nestedTokenize(h,o,c,l,a){const u=this._findLeavingNestedLanguageOffset(h,c);if(u===-1){const m=a.nestedLanguageTokenize(h,o,c.embeddedLanguageData,l);return p.create(c.stack,new g(c.embeddedLanguageData.languageId,m))}const v=h.substring(0,u);v.length>0&&a.nestedLanguageTokenize(v,!1,c.embeddedLanguageData,l);const f=h.substring(u);return this._myTokenize(f,o,c,l+u,a)}_safeRuleName(h){return h?h.name:"(unknown)"}_myTokenize(h,o,c,l,a){a.enterLanguage(this._languageId);const u=h.length,v=o&&this._lexer.includeLF?h+`
- `:h,f=v.length;let m=c.embeddedLanguageData,C=c.stack,L=0,D=null,I=!0;for(;I||L<f;){const T=L,O=C.depth,R=D?D.groups.length:0,A=C.state;let N=null,P=null,x=null,F=null,B=null;if(D){N=D.matches;const M=D.groups.shift();P=M.matched,x=M.action,F=D.rule,D.groups.length===0&&(D=null)}else{if(!I&&L>=f)break;I=!1;let M=this._lexer.tokenizer[A];if(!M&&(M=y.findRules(this._lexer,A),!M))throw y.createError(this._lexer,"tokenizer state is not defined: "+A);const Q=v.substr(L);for(const ie of M)if((L===0||!ie.matchOnlyAtLineStart)&&(N=Q.match(ie.regex),N)){P=N[0],x=ie.action;break}}if(N||(N=[""],P=""),x||(L<f&&(N=[v.charAt(L)],P=N[0]),x=this._lexer.defaultToken),P===null)break;for(L+=P.length;y.isFuzzyAction(x)&&y.isIAction(x)&&x.test;)x=x.test(P,N,A,L===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=y.substituteMatches(this._lexer,x.token,P,N,A):V=x.token,x.nextEmbedded)if(x.nextEmbedded==="@pop"){if(!m)throw y.createError(this._lexer,"cannot pop embedded language if not inside one");m=null}else{if(m)throw y.createError(this._lexer,"cannot enter embedded language from within an embedded language");B=y.substituteMatches(this._lexer,x.nextEmbedded,P,N,A)}if(x.goBack&&(L=Math.max(0,L-x.goBack)),x.switchTo&&typeof x.switchTo=="string"){let M=y.substituteMatches(this._lexer,x.switchTo,P,N,A);if(M[0]==="@"&&(M=M.substr(1)),y.findRules(this._lexer,M))C=C.switchTo(M);else throw y.createError(this._lexer,"trying to switch to a state '"+M+"' that is undefined in rule: "+this._safeRuleName(F))}else{if(x.transform&&typeof x.transform=="function")throw y.createError(this._lexer,"action.transform not supported");if(x.next)if(x.next==="@push"){if(C.depth>=this._lexer.maxStack)throw y.createError(this._lexer,"maximum tokenizer stack size reached: ["+C.state+","+C.parent.state+",...]");C=C.push(A)}else if(x.next==="@pop"){if(C.depth<=1)throw y.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 M=y.substituteMatches(this._lexer,x.next,P,N,A);if(M[0]==="@"&&(M=M.substr(1)),y.findRules(this._lexer,M))C=C.push(M);else throw y.createError(this._lexer,"trying to set a next state '"+M+"' that is undefined in rule: "+this._safeRuleName(F))}}x.log&&typeof x.log=="string"&&y.log(this._lexer,this._lexer.languageId+": "+y.substituteMatches(this._lexer,x.log,P,N,A))}if(V===null)throw y.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(F));const $=M=>{const Q=this._languageService.getLanguageIdByLanguageName(M)||this._languageService.getLanguageIdByMimeType(M)||M,ie=this._getNestedEmbeddedLanguageData(Q);if(L<f){const re=h.substr(L);return this._nestedTokenize(re,o,p.create(C,ie),l+L,a)}else return p.create(C,ie)};if(Array.isArray(V)){if(D&&D.groups.length>0)throw y.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(F));if(N.length!==V.length+1)throw y.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(F));let M=0;for(let Q=1;Q<N.length;Q++)M+=N[Q].length;if(M!==P.length)throw y.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(F));D={rule:F,matches:N,groups:[]};for(let Q=0;Q<V.length;Q++)D.groups[Q]={action:V[Q],matched:N[Q+1]};L-=P.length;continue}else{if(V==="@rematch"&&(L-=P.length,P="",N=null,V="",B!==null))return $(B);if(P.length===0){if(f===0||O!==C.depth||A!==C.state||(D?D.groups.length:0)!==R)continue;throw y.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(F))}let M=null;if(y.isString(V)&&V.indexOf("@brackets")===0){const Q=V.substr(9),ie=r(this._lexer,P);if(!ie)throw y.createError(this._lexer,"@brackets token returned but no bracket defined as: "+P);M=y.sanitize(ie.token+Q)}else{const Q=V===""?"":V+this._lexer.tokenPostfix;M=y.sanitize(Q)}T<u&&a.emit(T+l,M)}if(B!==null)return $(B)}return p.create(C,m)}_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=s=Me([fe(4,E.IConfigurationService)],s);function r(d,h){if(!h)return null;h=y.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(X[719],ee([1,0,9,87,31,110,81,317]),function(K,e,_,k,y,E,w,b){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const g=(S=window.trustedTypes)===null||S===void 0?void 0:S.createPolicy("standaloneColorizer",{createHTML:s=>s});class p{static colorizeElement(r,d,h,o){o=o||{};const c=o.theme||"vs",l=o.mimeType||h.getAttribute("lang")||h.getAttribute("data-lang");if(!l)return console.error("Mode not detected"),Promise.resolve();const a=d.getLanguageIdByMimeType(l)||l;r.setTheme(c);const u=h.firstChild?h.firstChild.nodeValue:"";h.className+=" "+c;const v=f=>{var m;const C=(m=g?.createHTML(f))!==null&&m!==void 0?m:f;h.innerHTML=C};return this.colorize(d,u||"",a,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 l=4;o&&typeof o.tabSize=="number"&&(l=o.tabSize),_.startsWithUTF8BOM(d)&&(d=d.substr(1));const a=_.splitLines(d);if(!r.isRegisteredLanguageId(h))return t(a,l,c);const u=yield y.TokenizationRegistry.getOrCreate(h);return u?n(a,l,u,c):t(a,l,c)})}static colorizeLine(r,d,h,o,c=4){const l=w.ViewLineRenderingData.isBasicASCII(r,d),a=w.ViewLineRenderingData.containsRTL(r,l,h);return(0,E.renderViewLine2)(new E.RenderLineInput(!1,!0,r,!1,l,a,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 l=r.tokenization.getLineTokens(d).inflate();return this.colorizeLine(o,r.mightContainNonBasicASCII(),r.mightContainRTL(),l,h)}}e.Colorizer=p;function n(s,r,d,h){return new Promise((o,c)=>{const l=()=>{const a=i(s,r,d,h);if(d instanceof b.MonarchTokenizer){const u=d.getLoadStatus();if(u.loaded===!1){u.promise.then(l,c);return}}o(a)};l()})}function t(s,r,d){let h=[];const c=new Uint32Array(2);c[0]=0,c[1]=33587200;for(let l=0,a=s.length;l<a;l++){const u=s[l];c[0]=u.length;const v=new k.LineTokens(c,u,d),f=w.ViewLineRenderingData.isBasicASCII(u,!0),m=w.ViewLineRenderingData.containsRTL(u,f,!0),C=(0,E.renderViewLine2)(new E.RenderLineInput(!1,!0,u,!1,f,m,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(s,r,d,h){let o=[],c=d.getInitialState();for(let l=0,a=s.length;l<a;l++){const u=s[l],v=d.tokenizeEncoded(u,!0,c);k.LineTokens.convertToEndOffset(v.tokens,u.length);const f=new k.LineTokens(v.tokens,u,h),m=w.ViewLineRenderingData.isBasicASCII(u,!0),C=w.ViewLineRenderingData.containsRTL(u,m,!0),L=(0,E.renderViewLine2)(new E.RenderLineInput(!1,!0,u,!1,m,C,0,f.inflate(),[],r,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(L.html),o.push("<br/>"),c=v.endState}return o.join("")}}),define(X[14],ee([1,0,17,9,710,8,692]),function(K,e,_,k,y,E,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},p=(0,w.localize)(0,null),n=(0,w.localize)(1,null),t=(0,w.localize)(2,null),i=(0,w.localize)(3,null),s=(0,w.localize)(4,null),r=(0,w.localize)(5,null),d=(0,w.localize)(6,null),h=(0,w.localize)(7,null);class o{constructor(H=g){this._config=H,this._scanner=new y.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(H){if(H===""){this._parsingErrors.push({message:p,offset:0,lexeme:"",additionalInfo:n});return}this._tokens=this._scanner.reset(H).scan(),this._current=0,this._parsingErrors=[];try{const W=this._expr();if(!this._isAtEnd()){const q=this._peek(),Z=q.type===17?r:void 0;throw this._parsingErrors.push({message:s,offset:q.offset,lexeme:y.Scanner.getLexeme(q),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 Y=Z.lexeme,oe=Y.lastIndexOf("/"),ce=oe===Y.length-1?void 0:this._removeFlagsGY(Y.substring(oe+1));let ge;try{ge=new RegExp(Y.substring(1,oe),ce)}catch{throw this._errExpectedButGot("REGEX",Z)}return P.create(W,ge)}switch(Z.type){case 10:case 19:{const Y=[Z.lexeme];this._advance();let oe=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()&&oe.type!==15&&oe.type!==16;){switch(oe.type){case 0:ce++;break;case 1:ce--;break;case 10:case 18:for(let z=0;z<oe.lexeme.length;z++)oe.lexeme.charCodeAt(z)===40?ce++:Z.lexeme.charCodeAt(z)===41&&ce--}if(ce<0)break;Y.push(y.Scanner.getLexeme(oe)),this._advance(),oe=this._peek()}const ge=Y.join(""),le=ge.lastIndexOf("/"),ue=le===ge.length-1?void 0:this._removeFlagsGY(ge.substring(le+1));let j;try{j=new RegExp(ge.substring(1,le),ue)}catch{throw this._errExpectedButGot("REGEX",Z)}return c.regex(W,j)}case 18:{const Y=Z.lexeme;this._advance();let oe=null;if(!(0,k.isFalsyOrWhitespace)(Y)){const ce=Y.indexOf("/"),ge=Y.lastIndexOf("/");if(ce!==ge&&ce>=0){const le=Y.slice(ce+1,ge),ue=Y[ge+1]==="i"?"i":"";try{oe=new RegExp(le,ue)}catch{throw this._errExpectedButGot("REGEX",Z)}}}if(oe===null)throw this._errExpectedButGot("REGEX",Z);return P.create(W,oe)}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(),A.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
- | KEY '=~' REGEX
- | 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,q){const Z=(0,w.localize)(8,null,H,y.Scanner.getLexeme(W)),Y=W.offset,oe=y.Scanner.getLexeme(W);return this._parsingErrors.push({message:Z,offset:Y,lexeme:oe,additionalInfo:q}),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 m.create(H,W)}static notEquals(H,W){return D.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 L.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 l(se,H){const W=se?se.substituteConstants():void 0,q=H?H.substituteConstants():void 0;return!W&&!q?!0:!W||!q?!1:W.equals(q)}e.expressionsAreEqualWithConstantSubstitution=l;function a(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 q=b.get(H);return typeof q=="boolean"?q?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:M(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 m{static create(H,W,q=null){if(typeof W=="boolean")return W?f.create(H,q):I.create(H,q);const Z=b.get(H);return typeof Z=="boolean"?W===(Z?"true":"false")?v.INSTANCE:u.INSTANCE:new m(H,W,q)}constructor(H,W,q){this.key=H,this.value=W,this.negated=q,this.type=4}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){const H=b.get(this.key);if(typeof H=="boolean"){const 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=D.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=m;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:Q(this.key,this.valueKey,H.key,H.valueKey)}equals(H){return H.type===this.type?this.key===H.key&&this.valueKey===H.valueKey:!1}substituteConstants(){return this}evaluate(H){const W=H.getValue(this.valueKey),q=H.getValue(this.key);return Array.isArray(W)?W.includes(q):typeof q=="string"&&typeof W=="object"&&W!==null?S.call(W,q):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=L.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=C;class L{static create(H,W){return new L(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=L;class D{static create(H,W,q=null){if(typeof W=="boolean")return W?I.create(H,q):f.create(H,q);const Z=b.get(H);return typeof Z=="boolean"?W===(Z?"true":"false")?u.INSTANCE:v.INSTANCE:new D(H,W,q)}constructor(H,W,q){this.key=H,this.value=W,this.negated=q,this.type=5}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){const H=b.get(this.key);if(typeof H=="boolean"){const 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=m.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=D;class I{static create(H,W=null){const q=b.get(H);return typeof q=="boolean"?q?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:M(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,q=null){return T(W,Z=>new O(H,Z,q))}constructor(H,W,q){this.key=H,this.value=W,this.negated=q,this.type=12}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=O;class R{static create(H,W,q=null){return T(W,Z=>new R(H,Z,q))}constructor(H,W,q){this.key=H,this.value=W,this.negated=q,this.type=13}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=R;class A{static create(H,W,q=null){return T(W,Z=>new A(H,Z,q))}constructor(H,W,q){this.key=H,this.value=W,this.negated=q,this.type=14}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=A;class N{static create(H,W,q=null){return T(W,Z=>new N(H,Z,q))}constructor(H,W,q){this.key=H,this.value=W,this.negated=q,this.type=15}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=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:"",q=H.regexp?H.regexp.source:"";return W<q?-1:W>q?1:0}equals(H){if(H.type===this.type){const W=this.regexp?this.regexp.source:"",q=H.regexp?H.regexp.source:"";return this.key===H.key&&W===q}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,q=se.length;W<q;W++){const Z=se[W].substituteConstants();if(se[W]!==Z&&H===null){H=[];for(let Y=0;Y<W;Y++)H[Y]=se[Y]}H!==null&&(H[W]=Z)}return H===null?se:H}class B{static create(H,W,q){return B._normalizeArr(H,W,q)}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,q=this.expr.length;W<q;W++){const Z=a(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,q=this.expr.length;W<q;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,q=this.expr.length;W<q;W++)if(!this.expr[W].evaluate(H))return!1;return!0}static _normalizeArr(H,W,q){const Z=[];let Y=!1;for(const oe of H)if(oe){if(oe.type===1){Y=!0;continue}if(oe.type===0)return u.INSTANCE;if(oe.type===6){Z.push(...oe.expr);continue}Z.push(oe)}if(Z.length===0&&Y)return v.INSTANCE;if(Z.length!==0){if(Z.length===1)return Z[0];Z.sort(a);for(let oe=1;oe<Z.length;oe++)Z[oe-1].equals(Z[oe])&&(Z.splice(oe,1),oe--);if(Z.length===1)return Z[0];for(;Z.length>1;){const oe=Z[Z.length-1];if(oe.type!==9)break;Z.pop();const ce=Z.pop(),ge=Z.length===0,le=V.create(oe.expr.map(ue=>B.create([ue,ce],null,q)),null,ge);le&&(Z.push(le),Z.sort(a))}if(Z.length===1)return Z[0];if(q){for(let oe=0;oe<Z.length;oe++)for(let ce=oe+1;ce<Z.length;ce++)if(Z[oe].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,q){return V._normalizeArr(H,W,q)}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,q=this.expr.length;W<q;W++){const Z=a(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,q=this.expr.length;W<q;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,q=this.expr.length;W<q;W++)if(this.expr[W].evaluate(H))return!0;return!1}static _normalizeArr(H,W,q){let Z=[],Y=!1;if(H){for(let oe=0,ce=H.length;oe<ce;oe++){const ge=H[oe];if(ge){if(ge.type===0){Y=!0;continue}if(ge.type===1)return v.INSTANCE;if(ge.type===9){Z=Z.concat(ge.expr);continue}Z.push(ge)}}if(Z.length===0&&Y)return u.INSTANCE;Z.sort(a)}if(Z.length!==0){if(Z.length===1)return Z[0];for(let oe=1;oe<Z.length;oe++)Z[oe-1].equals(Z[oe])&&(Z.splice(oe,1),oe--);if(Z.length===1)return Z[0];if(q){for(let oe=0;oe<Z.length;oe++)for(let ce=oe+1;ce<Z.length;ce++)if(Z[oe].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(),q=H.shift(),Z=[];for(const Y of ne(W))for(const oe of ne(q))Z.push(B.create([Y,oe],null,!1));H.unshift(V.create(Z,null,!1))}this.negated=V.create(H,this,!0)}return this.negated}}e.ContextKeyOrExpr=V;class $ extends f{static all(){return $._info.values()}constructor(H,W,q){super(H,null),this._defaultValue=W,typeof q=="object"?$._info.push(Object.assign(Object.assign({},q),{key:H})):q!==!0&&$._info.push({key:H,description:q,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 m.create(this.key,H)}}e.RawContextKey=$,$._info=[],e.IContextKeyService=(0,E.createDecorator)("contextKeyService");function M(se,H){return se<H?-1:se>H?1:0}function Q(se,H,W,q){return se<W?-1:se>W?1:H<q?-1:H>q?1:0}function ie(se,H){if(se.type===0||H.type===1)return!0;if(se.type===9)return H.type===9?re(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 re(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 re(se,H){let W=0,q=0;for(;W<se.length&&q<H.length;){const Z=se[W].cmp(H[q]);if(Z<0)return!1;Z===0&&W++,q++}return W===se.length}function ne(se){return se.type===9?se.expr:[se]}}),define(X[22],ee([1,0,597,14]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var y;(function(E){E.editorSimpleInput=new k.RawContextKey("editorSimpleInput",!1,!0),E.editorTextFocus=new k.RawContextKey("editorTextFocus",!1,_.localize(0,null)),E.focus=new k.RawContextKey("editorFocus",!1,_.localize(1,null)),E.textInputFocus=new k.RawContextKey("textInputFocus",!1,_.localize(2,null)),E.readOnly=new k.RawContextKey("editorReadonly",!1,_.localize(3,null)),E.inDiffEditor=new k.RawContextKey("inDiffEditor",!1,_.localize(4,null)),E.columnSelection=new k.RawContextKey("editorColumnSelection",!1,_.localize(5,null)),E.writable=E.readOnly.toNegated(),E.hasNonEmptySelection=new k.RawContextKey("editorHasSelection",!1,_.localize(6,null)),E.hasOnlyEmptySelection=E.hasNonEmptySelection.toNegated(),E.hasMultipleSelections=new k.RawContextKey("editorHasMultipleSelections",!1,_.localize(7,null)),E.hasSingleSelection=E.hasMultipleSelections.toNegated(),E.tabMovesFocus=new k.RawContextKey("editorTabMovesFocus",!1,_.localize(8,null)),E.tabDoesNotMoveFocus=E.tabMovesFocus.toNegated(),E.isInWalkThroughSnippet=new k.RawContextKey("isInEmbeddedEditor",!1,!0),E.canUndo=new k.RawContextKey("canUndo",!1,!0),E.canRedo=new k.RawContextKey("canRedo",!1,!0),E.hoverVisible=new k.RawContextKey("editorHoverVisible",!1,_.localize(9,null)),E.hoverFocused=new k.RawContextKey("editorHoverFocused",!1,_.localize(10,null)),E.stickyScrollFocused=new k.RawContextKey("stickyScrollFocused",!1,_.localize(11,null)),E.stickyScrollVisible=new k.RawContextKey("stickyScrollVisible",!1,_.localize(12,null)),E.standaloneColorPickerVisible=new k.RawContextKey("standaloneColorPickerVisible",!1,_.localize(13,null)),E.standaloneColorPickerFocused=new k.RawContextKey("standaloneColorPickerFocused",!1,_.localize(14,null)),E.inCompositeEditor=new k.RawContextKey("inCompositeEditor",void 0,_.localize(15,null)),E.notInCompositeEditor=E.inCompositeEditor.toNegated(),E.languageId=new k.RawContextKey("editorLangId","",_.localize(16,null)),E.hasCompletionItemProvider=new k.RawContextKey("editorHasCompletionItemProvider",!1,_.localize(17,null)),E.hasCodeActionsProvider=new k.RawContextKey("editorHasCodeActionsProvider",!1,_.localize(18,null)),E.hasCodeLensProvider=new k.RawContextKey("editorHasCodeLensProvider",!1,_.localize(19,null)),E.hasDefinitionProvider=new k.RawContextKey("editorHasDefinitionProvider",!1,_.localize(20,null)),E.hasDeclarationProvider=new k.RawContextKey("editorHasDeclarationProvider",!1,_.localize(21,null)),E.hasImplementationProvider=new k.RawContextKey("editorHasImplementationProvider",!1,_.localize(22,null)),E.hasTypeDefinitionProvider=new k.RawContextKey("editorHasTypeDefinitionProvider",!1,_.localize(23,null)),E.hasHoverProvider=new k.RawContextKey("editorHasHoverProvider",!1,_.localize(24,null)),E.hasDocumentHighlightProvider=new k.RawContextKey("editorHasDocumentHighlightProvider",!1,_.localize(25,null)),E.hasDocumentSymbolProvider=new k.RawContextKey("editorHasDocumentSymbolProvider",!1,_.localize(26,null)),E.hasReferenceProvider=new k.RawContextKey("editorHasReferenceProvider",!1,_.localize(27,null)),E.hasRenameProvider=new k.RawContextKey("editorHasRenameProvider",!1,_.localize(28,null)),E.hasSignatureHelpProvider=new k.RawContextKey("editorHasSignatureHelpProvider",!1,_.localize(29,null)),E.hasInlayHintsProvider=new k.RawContextKey("editorHasInlayHintsProvider",!1,_.localize(30,null)),E.hasDocumentFormattingProvider=new k.RawContextKey("editorHasDocumentFormattingProvider",!1,_.localize(31,null)),E.hasDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,_.localize(32,null)),E.hasMultipleDocumentFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,_.localize(33,null)),E.hasMultipleDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,_.localize(34,null))})(y||(e.EditorContextKeys=y={}))}),define(X[228],ee([1,0,80,9,76,14,2,649]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionContextKeys=void 0;class S extends w.Disposable{constructor(p,n){super(),this.contextKeyService=p,this.model=n,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),s=i?.selectedInlineCompletion.read(t),r=i?.ghostText.read(t),d=i?.selectedSuggestItem.read(t);this.inlineCompletionVisible.set(d===void 0&&r!==void 0),r&&s&&this.suppressSuggestions.set(s.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register((0,_.autorun)("update context key: inlineCompletionSuggestsIndentation, inlineCompletionSuggestsIndentationLessThanTabSize",t=>{const i=this.model.read(t);let s=!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],l=i.textModel.getLineIndentColumn(d.lineNumber);if(h<=l){let u=(0,k.firstNonWhitespaceIndex)(c);u===-1&&(u=c.length-1),s=u>0;const v=i.textModel.getOptions().tabSize;r=y.CursorColumns.visibleColumnFromColumn(c,u+1,v)<v}}this.inlineCompletionSuggestsIndentation.set(s),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(r)}))}}e.InlineCompletionContextKeys=S,S.inlineSuggestionVisible=new E.RawContextKey("inlineSuggestionVisible",!1,(0,b.localize)(0,null)),S.inlineSuggestionHasIndentation=new E.RawContextKey("inlineSuggestionHasIndentation",!1,(0,b.localize)(1,null)),S.inlineSuggestionHasIndentationLessThanTabSize=new E.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,b.localize)(2,null)),S.alwaysShowInlineSuggestionToolbar=new E.RawContextKey("alwaysShowInlineSuggestionToolbar",!1,(0,b.localize)(3,null)),S.suppressSuggestions=new E.RawContextKey("inlineSuggestionSuppressSuggestions",void 0,(0,b.localize)(4,null))}),define(X[229],ee([1,0,21,11,18,20,12,31,19,62,25,14]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new n.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new n.RawContextKey("parameterHintsMultipleSignatures",!1)};function t(i,s,r,d,h){return we(this,void 0,void 0,function*(){const o=i.ordered(s);for(const c of o)try{const l=yield c.provideSignatureHelp(s,r,h,d);if(l)return l}catch(l){(0,k.onUnexpectedExternalError)(l)}})}e.provideSignatureHelp=t,p.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(i,...s)=>we(void 0,void 0,void 0,function*(){const[r,d,h]=s;(0,y.assertType)(E.URI.isUri(r)),(0,y.assertType)(w.Position.isIPosition(d)),(0,y.assertType)(typeof h=="string"||!h);const o=i.get(S.ILanguageFeaturesService),c=yield i.get(g.ITextModelService).createModelReference(r);try{const l=yield t(o.signatureHelpProvider,c.object.textEditorModel,w.Position.lift(d),{triggerKind:b.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:h},_.CancellationToken.None);return l?(setTimeout(()=>l.dispose(),0),l.value):void 0}finally{c.dispose()}}))}),define(X[720],ee([1,0,13,11,6,2,116,31,229]),function(K,e,_,k,y,E,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 s{constructor(d){this.hints=d,this.type=1}}t.Active=s})(g||(g={}));class p extends E.Disposable{constructor(i,s,r=p.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new y.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=g.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new E.MutableDisposable),this.triggerChars=new w.CharacterSet,this.retriggerChars=new w.CharacterSet,this.triggerId=0,this.editor=i,this.providers=s,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,s){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),s).catch(k.onUnexpectedError)}next(){if(this.state.type!==1)return;const i=this.state.hints.signatures.length,s=this.state.hints.activeSignature,r=s%i===i-1,d=this.editor.getOption(82).cycle;if((i<2||r)&&!d){this.cancel();return}this.updateActiveSignature(r&&d?0:s+1)}previous(){if(this.state.type!==1)return;const i=this.state.hints.signatures.length,s=this.state.hints.activeSignature,r=s===0,d=this.editor.getOption(82).cycle;if((i<2||r)&&!d){this.cancel();return}this.updateActiveSignature(r&&d?i-1:s-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 s=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(n);this._pendingTriggers=[];const h={triggerKind:d.triggerKind,triggerCharacter:d.triggerCharacter,isRetrigger:s,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),c=this.editor.getPosition();this.state=new g.Pending((0,_.createCancelablePromise)(l=>(0,S.provideSignatureHelp)(this.providers,o,c,h,l)),r);try{const l=yield this.state.request;return i!==this.triggerId?(l?.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new g.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return i===this.triggerId&&(this.state=g.Default),(0,k.onUnexpectedError)(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const i=this.editor.getModel();if(i)for(const s of this.providers.ordered(i)){for(const r of s.signatureHelpTriggerCharacters||[])if(r.length){const d=r.charCodeAt(0);this.triggerChars.add(d),this.retriggerChars.add(d)}for(const r of s.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(i){if(!this.triggerOnType)return;const s=i.length-1,r=i.charCodeAt(s);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:i.charAt(s)})}onCursorChange(i){i.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(82).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=p,p.DEFAULT_DELAY=120;function n(t,i){switch(i.triggerKind){case b.SignatureHelpTriggerKind.Invoke:return i;case b.SignatureHelpTriggerKind.ContentChange:return t;case b.SignatureHelpTriggerKind.TriggerCharacter:default:return i}}}),define(X[721],ee([1,0,14]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let k=e.SuggestAlternatives=class qt{constructor(E,w){this._editor=E,this._index=0,this._ckOtherSuggestions=qt.OtherSuggestions.bindTo(w)}dispose(){this.reset()}reset(){var E;this._ckOtherSuggestions.reset(),(E=this._listener)===null||E===void 0||E.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:E,index:w},b){if(E.items.length===0){this.reset();return}if(qt._moveIndex(!0,E,w)===w){this.reset();return}this._acceptNext=b,this._model=E,this._index=w,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(E,w,b){let S=b;for(let g=w.items.length;g>0&&(S=(S+w.items.length+(E?1:-1))%w.items.length,!(S===b||!w.items[S].completion.additionalTextEdits));g--);return S}next(){this._move(!0)}prev(){this._move(!1)}_move(E){if(this._model)try{this._ignore=!0,this._index=qt._moveIndex(E,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=Me([fe(1,_.IContextKeyService)],k)}),define(X[722],ee([1,0,14]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let k=e.WordContextKey=class Pi{constructor(E,w){this._editor=E,this._enabled=!1,this._ckAtEnd=Pi.AtEnd.bindTo(w),this._configListener=this._editor.onDidChangeConfiguration(b=>b.hasChanged(118)&&this._update()),this._update()}dispose(){var E;this._configListener.dispose(),(E=this._selectionListener)===null||E===void 0||E.dispose(),this._ckAtEnd.reset()}_update(){const E=this._editor.getOption(118)==="on";if(this._enabled!==E)if(this._enabled=E,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=Me([fe(1,_.IContextKeyService)],k)}),define(X[89],ee([1,0,14,8]),function(K,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(X[723],ee([1,0,47,16,6,2,45,17,303,311,458,219,41,148,224,89]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let d=e.EditorConfiguration=class extends E.Disposable{constructor(f,m,C,L){super(),this._accessibilityService=L,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new y.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new t.ComputeOptionsMemory,this.isSimpleWidget=f,this._containerObserver=this._register(new S.ElementSizeObserver(C,m.dimension)),this._rawOptions=u(m),this._validatedOptions=a.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(11)&&this._containerObserver.startObserving(),this._register(i.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(n.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(g.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(_.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const f=this._computeOptions(),m=a.checkEquals(this.options,f);m!==null&&(this.options=f,this._onDidChangeFast.fire(m),this._onDidChange.fire(m))}_computeOptions(){const f=this._readEnvConfiguration(),m=s.BareFontInfo.createFromValidatedSettings(this._validatedOptions,f.pixelRatio,this.isSimpleWidget),C=this._readFontInfo(m),L={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:n.TabFocus.getTabFocusMode("editorFocus"),accessibilitySupport:f.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return a.computeOptions(this._validatedOptions,L)}_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 m=u(f);a.applyUpdate(this._rawOptions,m)&&(this._validatedOptions=a.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(f){this._containerObserver.observe(f)}setIsDominatedByLongLines(f){this._isDominatedByLongLines!==f&&(this._isDominatedByLongLines=f,this._recomputeOptions())}setModelLineCount(f){const m=h(f);this._lineNumbersDigitCount!==m&&(this._lineNumbersDigitCount=m,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=Me([fe(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,m){this._values[f]=m}}class l{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,m){this._values[f]=m}}e.ComputedEditorOptions=l;class a{static validateOptions(f){const m=new c;for(const C of t.editorOptionsRegistry){const L=C.name==="_never_"?void 0:f[C.name];m._write(C.id,C.validate(L))}return m}static computeOptions(f,m){const C=new l;for(const L of t.editorOptionsRegistry)C._write(L.id,L.compute(m,C,f._read(L.id)));return C}static _deepEquals(f,m){if(typeof f!="object"||typeof m!="object"||!f||!m)return f===m;if(Array.isArray(f)||Array.isArray(m))return Array.isArray(f)&&Array.isArray(m)?k.equals(f,m):!1;if(Object.keys(f).length!==Object.keys(m).length)return!1;for(const C in f)if(!a._deepEquals(f[C],m[C]))return!1;return!0}static checkEquals(f,m){const C=[];let L=!1;for(const D of t.editorOptionsRegistry){const I=!a._deepEquals(f._read(D.id),m._read(D.id));C[D.id]=I,I&&(L=!0)}return L?new t.ConfigurationChangedEvent(C):null}static applyUpdate(f,m){let C=!1;for(const L of t.editorOptionsRegistry)if(m.hasOwnProperty(L.name)){const D=L.applyUpdate(f[L.name],m[L.name]);f[L.name]=D.newValue,C=C||D.didChange}return C}}function u(v){const f=w.deepClone(v);return(0,p.migrateOptions)(f),f}}),define(X[318],ee([1,0,85,6,2,45,5,181,32,89]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const p={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let n=e.DiffNavigator=class extends y.Disposable{constructor(i,s={},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=E.mixin(s,p,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(o=>{this.ignoreSelectionChange||(this._updateAccessibilityState(o.position.lineNumber),this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(o=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(i){this.ranges=[],i&&i.forEach(s=>{!this._options.ignoreCharChanges&&s.charChanges?s.charChanges.forEach(r=>{this.ranges.push({rhs:!0,range:new w.Range(r.modifiedStartLineNumber,r.modifiedStartColumn,r.modifiedEndLineNumber,r.modifiedEndColumn)})}):s.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new w.Range(s.modifiedStartLineNumber,1,s.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new w.Range(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber+1,1)})}),this.ranges.sort((s,r)=>w.Range.compareRangesUsingStarts(s.range,r.range)),this._onDidUpdate.fire(this)}_initIdx(i){let s=!1;const r=this._editor.getPosition();if(!r){this.nextIdx=0;return}for(let d=0,h=this.ranges.length;d<h&&!s;d++){const o=this.ranges[d].range;r.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=d+(i?0:-1),s=!0)}s||(this.nextIdx=i?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(i,s){if(_.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,s),this._updateAccessibilityState(d.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(i,s){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(s)this._audioCueService.playAudioCue(b.AudioCue.diffLineDeleted,!0);else return;const o=this._codeEditorService.getActiveCodeEditor();s&&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=n=Me([fe(2,b.IAudioCueService),fe(3,S.ICodeEditorService),fe(4,g.IAccessibilityService)],n)}),define(X[724],ee([1,0,6,53,2,45,189,20,691,25,26,14]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setContext=e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const t="data-keybinding-context";class i{constructor(D,I){this._id=D,this._parent=I,this._value=Object.create(null),this._value._contextId=D}get value(){return Object.assign({},this._value)}setValue(D,I){return this._value[D]!==I?(this._value[D]=I,!0):!1}removeValue(D){return D in this._value?(delete this._value[D],!0):!1}getValue(D){const I=this._value[D];return typeof I>"u"&&this._parent?this._parent.getValue(D):I}}e.Context=i;class s extends i{constructor(){super(-1,null)}setValue(D,I){return!1}removeValue(D){return!1}getValue(D){}}s.INSTANCE=new s;class r extends i{constructor(D,I,T){super(D,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,([A])=>A);this._values.clear(),T.fire(new o(R))}else{const R=[];for(const A of O.affectedKeys){const N=`config.${A}`,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(D){if(D.indexOf(r._keyPrefix)!==0)return super.getValue(D);if(this._values.has(D))return this._values.get(D);const I=D.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(D,O),O}setValue(D,I){return super.setValue(D,I)}removeValue(D){return super.removeValue(D)}}r._keyPrefix="config.";class d{constructor(D,I,T){this._service=D,this._key=I,this._defaultValue=T,this.reset()}set(D){this._service.setContext(this._key,D)}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(D){this.key=D}affectsSome(D){return D.has(this.key)}allKeysContainedIn(D){return this.affectsSome(D)}}class o{constructor(D){this.keys=D}affectsSome(D){for(const I of this.keys)if(D.has(I))return!0;return!1}allKeysContainedIn(D){return this.keys.every(I=>D.has(I))}}class c{constructor(D){this.events=D}affectsSome(D){for(const I of this.events)if(I.affectsSome(D))return!0;return!1}allKeysContainedIn(D){return this.events.every(I=>I.allKeysContainedIn(D))}}function l(L,D){return L.allKeysContainedIn(new Set(Object.keys(D)))}class a{constructor(D){this._onDidChangeContext=new _.PauseableEmitter({merge:I=>new c(I)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=D}createKey(D,I){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new d(this,D,I)}bufferChangeEvents(D){this._onDidChangeContext.pause();try{D()}finally{this._onDidChangeContext.resume()}}createScoped(D){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new v(this,D)}contextMatchesRules(D){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const I=this.getContextValuesContainer(this._myContextId);return D?D.evaluate(I):!0}getContextKeyValue(D){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(D)}setContext(D,I){if(this._isDisposed)return;const T=this.getContextValuesContainer(this._myContextId);T&&T.setValue(D,I)&&this._onDidChangeContext.fire(new h(D))}removeContext(D){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(D)&&this._onDidChangeContext.fire(new h(D))}getContext(D){return this._isDisposed?s.INSTANCE:this.getContextValuesContainer(f(D))}}e.AbstractContextKeyService=a;let u=e.ContextKeyService=class extends a{constructor(D){super(0),this._contexts=new Map,this._toDispose=new y.DisposableStore,this._lastContextId=0;const I=new r(this._myContextId,D,this._onDidChangeContext);this._contexts.set(this._myContextId,I),this._toDispose.add(I)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(D){return this._isDisposed?s.INSTANCE:this._contexts.get(D)||s.INSTANCE}createChildContext(D=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(D))),I}disposeContext(D){this._isDisposed||this._contexts.delete(D)}};e.ContextKeyService=u=Me([fe(0,p.IConfigurationService)],u);class v extends a{constructor(D,I){if(super(D.createChildContext()),this._parentChangeListener=new y.MutableDisposable,this._parent=D,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(D=>{const T=this._parent.getContextValuesContainer(this._myContextId).value;l(D,T)||this._onDidChangeContext.fire(D)})}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(t),this._isDisposed=!0)}getContextValuesContainer(D){return this._isDisposed?s.INSTANCE:this._parent.getContextValuesContainer(D)}createChildContext(D=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(D)}disposeContext(D){this._isDisposed||this._parent.disposeContext(D)}}function f(L){for(;L;){if(L.hasAttribute(t)){const D=L.getAttribute(t);return D?parseInt(D,10):NaN}L=L.parentElement}return 0}function m(L,D,I){L.get(n.IContextKeyService).createKey(String(D),C(I))}e.setContext=m;function C(L){return(0,E.cloneAndChange)(L,D=>{if(typeof D=="object"&&D.$mid===1)return b.URI.revive(D).toString();if(D instanceof b.URI)return D.toString()})}g.CommandsRegistry.registerCommand("_setContext",m),g.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...n.RawContextKey.all()].sort((L,D)=>L.key.localeCompare(D.key))},description:{description:(0,S.localize)(0,null),args:[]}}),g.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const L=[],D=new Set;for(const I of n.RawContextKey.all())D.has(I.key)||(D.add(I.key),L.push(I));L.sort((I,T)=>I.key.localeCompare(T.key)),console.log(JSON.stringify(L,void 0,2))})}),define(X[319],ee([1,0,17,693,14]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.ProductQualityContext=e.IsDevelopmentContext=e.IsMobileContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new y.RawContextKey("isMac",_.isMacintosh,(0,k.localize)(0,null)),e.IsLinuxContext=new y.RawContextKey("isLinux",_.isLinux,(0,k.localize)(1,null)),e.IsWindowsContext=new y.RawContextKey("isWindows",_.isWindows,(0,k.localize)(2,null)),e.IsWebContext=new y.RawContextKey("isWeb",_.isWeb,(0,k.localize)(3,null)),e.IsMacNativeContext=new y.RawContextKey("isMacNative",_.isMacintosh&&!_.isWeb,(0,k.localize)(4,null)),e.IsIOSContext=new y.RawContextKey("isIOS",_.isIOS,(0,k.localize)(5,null)),e.IsMobileContext=new y.RawContextKey("isMobile",_.isMobile,(0,k.localize)(6,null)),e.IsDevelopmentContext=new y.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new y.RawContextKey("productQualityType","",(0,k.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new y.RawContextKey(e.InputFocusedContextKey,!1,(0,k.localize)(8,null))}),define(X[55],ee([1,0,8]),function(K,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(X[152],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,_.createDecorator)("dialogService")}),define(X[182],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class _{constructor(...y){this._entries=new Map;for(const[E,w]of y)this.set(E,w)}set(y,E){const w=this._entries.get(y);return this._entries.set(y,E),w}get(y){return this._entries.get(y)}}e.ServiceCollection=_}),define(X[725],ee([1,0,13,11,2,225,714,8,182,60]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const p=!1;class n 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:
- ${r.toString()}`}}class t{constructor(r=new S.ServiceCollection,d=!1,h,o=p){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(l=>l):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:l=>{if(o)throw(0,k.illegalState)("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(l,h);if(!a)throw new Error(`[invokeFunction] unknown service '${l}'`);return a}},...d)}finally{o=!0,h.stop()}}createInstance(r,...d){let h,o;return r instanceof E.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((a,u)=>a.index-u.index),c=[];for(const a of o){const u=this._getOrCreateServiceInstance(a.id,h);u||this._throwIfStrict(`[createInstance] ${r.name} depends on UNKNOWN service ${a.id}.`,!1),c.push(u)}const l=o.length>0?o[0].index:d.length;if(d.length!==l){console.trace(`[createInstance] First service dependency of ${r.name} at position ${l+1} conflicts with ${d.length} static arguments`);const a=l-d.length;a>0?d=d.concat(new Array(a)):d=d.slice(0,l)}return Reflect.construct(r,d.concat(c))}_setServiceInstance(r,d){if(this._services.get(r)instanceof E.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 E.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 l=0;const a=[{id:r,desc:d,_trace:h}];for(;a.length;){const u=a.pop();if(c.lookupOrInsertNode(u),l++>1e3)throw new n(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 E.SyncDescriptor){const m={id:v.id,desc:f,_trace:u._trace.branch(v.id,!0)};c.insertEdge(u,m),a.push(m)}}}for(;;){const u=c.roots();if(u.length===0){if(!c.isEmpty())throw new n(c);break}for(const{data:v}of u){if(this._getServiceInstanceOrDescriptor(v.id)instanceof E.SyncDescriptor){const m=this._createServiceInstanceWithOwner(v.id,v.desc.ctor,v.desc.staticArguments,v.desc.supportsDelayedInstantiation,v._trace);this._setServiceInstance(v.id,m)}c.removeNode(v)}}return this._getServiceInstanceOrDescriptor(r)}_createServiceInstanceWithOwner(r,d,h=[],o,c){if(this._services.get(r)instanceof E.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 l=new t(void 0,this._strict,this,this._enableTracing);l._globalGraphImplicitDependency=String(r);const a=new Map,u=new _.IdleValue(()=>{const v=l._createInstance(d,h,c);for(const[f,m]of a){const C=v[f];if(typeof C=="function")for(const L of m)C.apply(v,L)}return a.clear(),v});return new Proxy(Object.create(null),{get(v,f){if(!u.isInitialized&&typeof f=="string"&&(f.startsWith("onDid")||f.startsWith("onWill"))){let L=a.get(f);return L||(L=new g.LinkedList,a.set(f,L)),(I,T,O)=>{const R=L.push([I,T,O]);return(0,y.toDisposable)(R)}}if(f in v)return v[f];const m=u.value;let C=m[f];return typeof C!="function"||(C=C.bind(m),v[f]=C),C},set(v,f,m){return u.value[f]=m,!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(`
- `).slice(3,4).join(`
- `)):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,l){const a=[],u=new Array(c+1).join(" ");for(const[v,f,m]of l._dep)if(f&&m){d=!0,a.push(`${u}CREATES -> ${v}`);const C=h(c+1,m);C&&a.push(C)}else a.push(`${u}uses -> ${v}`);return a.join(`
- `)}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(`
- `))}}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(X[726],ee([1,0,13,11,6,287,2,696]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const S=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class g extends w.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:y.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(t,i,s,r,d){super(),this._contextKeyService=t,this._commandService=i,this._telemetryService=s,this._notificationService=r,this._logService=d,this._onDidUpdateKeybindings=this._register(new y.Emitter),this._currentChords=[],this._currentChordChecker=new _.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new _.TimeoutTimer,this._logging=!1}dispose(){super.dispose()}_log(t){this._logging&&this._logService.info(`[KeybindingService]: ${t}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(t,i){const s=this._getResolver().lookupPrimaryKeybinding(t,i||this._contextKeyService);if(s)return s.resolvedKeybinding}dispatchEvent(t,i){return this._dispatch(t,i)}softDispatch(t,i){this._log("/ Soft dispatching keyboard event");const s=this.resolveKeyboardEvent(t);if(s.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),null;const[r]=s.getDispatchChords();if(r===null)return this._log("\\ Keyboard event cannot be dispatched"),null;const d=this._contextKeyService.getContext(i),h=this._currentChords.map(({keypress:o})=>o);return this._getResolver().resolve(d,h,r)}_scheduleLeaveChordMode(){const t=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-t>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(t,i){switch(this._currentChords.push({keypress:t,label:i}),this._currentChords.length){case 0:throw(0,k.illegalState)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(b.localize(0,null,i));break;default:{const s=this._currentChords.map(({label:r})=>r).join(", ");this._currentChordStatusMessage=this._notificationService.status(b.localize(1,null,s))}}this._scheduleLeaveChordMode(),E.IME.enabled&&E.IME.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],E.IME.enable()}_dispatch(t,i){return this._doDispatch(this.resolveKeyboardEvent(t),i,!1)}_singleModifierDispatch(t,i){const s=this.resolveKeyboardEvent(t),[r]=s.getSingleModifierDispatchChords();if(r)return this._ignoreSingleModifiers.has(r)?(this._log(`+ Ignoring single modifier ${r} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${r}.`),this._currentSingleModifier=r,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):r===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${r} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(s,i,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[d]=s.getChords();return this._ignoreSingleModifiers=new p(d),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(t,i,s=!1){var r;let d=!1;if(t.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let h=null,o=null;if(s){const[u]=t.getSingleModifierDispatchChords();h=u,o=u?[u]:[]}else[h]=t.getDispatchChords(),o=this._currentChords.map(({keypress:u})=>u);if(h===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),d;const c=this._contextKeyService.getContext(i),l=t.getLabel(),a=this._getResolver().resolve(c,o,h);switch(a.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const u=this._currentChords.map(({label:v})=>v).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(b.localize(2,null,u,l),{hideAfter:10*1e3}),this._leaveChordMode(),d=!0}return d}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),d=!0,this._expectAnotherChord(h,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),d;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${a.commandId} ]`),a.commandId===null){if(this.inChordMode){const u=this._currentChords.map(({label:v})=>v).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(b.localize(3,null,u,l),{hideAfter:10*1e3}),this._leaveChordMode()}d=!0}else this.inChordMode&&this._leaveChordMode(),a.isBubble||(d=!0),this._log(`+ Invoking command ${a.commandId}.`),typeof a.commandArgs>"u"?this._commandService.executeCommand(a.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(a.commandId,a.commandArgs).then(void 0,u=>this._notificationService.warn(u)),S.test(a.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:a.commandId,from:"keybinding",detail:(r=t.getUserSettingsLabel())!==null&&r!==void 0?r:void 0});return d}}}mightProducePrintableCharacter(t){return t.ctrlKey||t.metaKey?!1:t.keyCode>=31&&t.keyCode<=56||t.keyCode>=21&&t.keyCode<=30}}e.AbstractKeybindingService=g;class p{constructor(t){this._ctrlKey=t?t.ctrlKey:!1,this._shiftKey=t?t.shiftKey:!1,this._altKey=t?t.altKey:!1,this._metaKey=t?t.metaKey:!1}has(t){switch(t){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}p.EMPTY=new p(null)}),define(X[727],ee([1,0,11,206,113]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class E extends y.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 y.ResolvedChord(b.ctrlKey,b.shiftKey,b.altKey,b.metaKey,this._getLabel(b),this._getAriaLabel(b))}getDispatchChords(){return this._chords.map(b=>this._getChordDispatch(b))}getSingleModifierDispatchChords(){return this._chords.map(b=>this._getSingleModifierChordDispatch(b))}}e.BaseResolvedKeybinding=E}),define(X[34],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,_.createDecorator)("keybindingService")}),define(X[728],ee([1,0,7,298,40,6,2,623,14,55,8,34,422]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PostDropWidgetManager=e.dropWidgetVisibleCtx=e.changeDropTypeCommandId=void 0,e.changeDropTypeCommandId="editor.changeDropType",e.dropWidgetVisibleCtx=new S.RawContextKey("dropWidgetVisible",!1,(0,b.localize)(0,null));let t=class Ri extends w.Disposable{constructor(r,d,h,o,c,l,a){super(),this.editor=r,this.range=d,this.edits=h,this.onSelectNewEdit=o,this._contextMenuService=c,this._keybindingService=a,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.dropWidgetVisible=e.dropWidgetVisibleCtx.bindTo(l),this.dropWidgetVisible.set(!0),this._register((0,w.toDisposable)(()=>this.dropWidgetVisible.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,w.toDisposable)(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{d.containsPosition(u.position)||this.dispose()})),this._register(E.Event.runAndSubscribe(a.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var r;const d=(r=this._keybindingService.lookupKeybinding(e.changeDropTypeCommandId))===null||r===void 0?void 0:r.getLabel();this.button.element.title=d?(0,b.localize)(1,null,d):(0,b.localize)(2,null)}create(){this.domNode=_.$(".post-drop-widget"),this.button=this._register(new k.Button(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(_.addDisposableListener(this.domNode,_.EventType.CLICK,()=>this.showDropSelector()))}getId(){return Ri.ID}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showDropSelector(){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,y.toAction)({id:"",label:r.label,checked:d===this.edits.activeEditIndex,run:()=>{if(d!==this.edits.activeEditIndex)return this.onSelectNewEdit(d)}}))})}};t.ID="editor.widget.postDropWidget",t=Me([fe(4,g.IContextMenuService),fe(5,S.IContextKeyService),fe(6,n.IKeybindingService)],t);let i=e.PostDropWidgetManager=class extends w.Disposable{constructor(r,d){super(),this._editor=r,this._instantiationService=d,this._currentWidget=this._register(new w.MutableDisposable),this._register(E.Event.any(r.onDidChangeModel,r.onDidChangeModelContent)(()=>this.clear()))}show(r,d,h){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(t,this._editor,r,d,h))}clear(){this._currentWidget.clear()}changeExistingDropType(){var r;(r=this._currentWidget.value)===null||r===void 0||r.showDropSelector()}};e.PostDropWidgetManager=i=Me([fe(1,p.IInstantiationService)],i)}),define(X[729],ee([1,0,14]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;const k={kind:0},y={kind:1};function E(g,p,n){return{kind:2,commandId:g,commandArgs:p,isBubble:n}}class w{constructor(p,n,t){var i;this._log=t,this._defaultKeybindings=p,this._defaultBoundCommands=new Map;for(const s of p){const r=s.command;r&&r.charAt(0)!=="-"&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=w.handleRemovals([].concat(p).concat(n));for(let s=0,r=this._keybindings.length;s<r;s++){const d=this._keybindings[s];if(d.chords.length===0)continue;const h=(i=d.when)===null||i===void 0?void 0:i.substituteConstants();h&&h.type===0||this._addKeyPress(d.chords[0],d)}}static _isTargetedForRemoval(p,n,t){if(n){for(let i=0;i<n.length;i++)if(n[i]!==p.chords[i])return!1}return!(t&&t.type!==1&&(!p.when||!(0,_.expressionsAreEqualWithConstantSubstitution)(t,p.when)))}static handleRemovals(p){const n=new Map;for(let i=0,s=p.length;i<s;i++){const r=p[i];if(r.command&&r.command.charAt(0)==="-"){const d=r.command.substring(1);n.has(d)?n.get(d).push(r):n.set(d,[r])}}if(n.size===0)return p;const t=[];for(let i=0,s=p.length;i<s;i++){const r=p[i];if(!r.command||r.command.length===0){t.push(r);continue}if(r.command.charAt(0)==="-")continue;const d=n.get(r.command);if(!d||!r.isDefault){t.push(r);continue}let h=!1;for(const o of d){const c=o.when;if(this._isTargetedForRemoval(r,o.chords,c)){h=!0;break}}if(!h){t.push(r);continue}}return t}_addKeyPress(p,n){const t=this._map.get(p);if(typeof t>"u"){this._map.set(p,[n]),this._addToLookupMap(n);return}for(let i=t.length-1;i>=0;i--){const s=t[i];if(s.command===n.command)continue;let r=!0;for(let d=1;d<s.chords.length&&d<n.chords.length;d++)if(s.chords[d]!==n.chords[d]){r=!1;break}r&&w.whenIsEntirelyIncluded(s.when,n.when)&&this._removeFromLookupMap(s)}t.push(n),this._addToLookupMap(n)}_addToLookupMap(p){if(!p.command)return;let n=this._lookupMap.get(p.command);typeof n>"u"?(n=[p],this._lookupMap.set(p.command,n)):n.push(p)}_removeFromLookupMap(p){if(!p.command)return;const n=this._lookupMap.get(p.command);if(!(typeof n>"u")){for(let t=0,i=n.length;t<i;t++)if(n[t]===p){n.splice(t,1);return}}}static whenIsEntirelyIncluded(p,n){return!n||n.type===1?!0:!p||p.type===1?!1:(0,_.implies)(p,n)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(p,n){const t=this._lookupMap.get(p);if(typeof t>"u"||t.length===0)return null;if(t.length===1)return t[0];for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.contextMatchesRules(s.when))return s}return t[t.length-1]}resolve(p,n,t){const i=[...n,t];this._log(`| Resolving ${i}`);const s=this._map.get(i[0]);if(s===void 0)return this._log("\\ No keybinding entries."),k;let r=null;if(i.length<2)r=s;else{r=[];for(let h=0,o=s.length;h<o;h++){const c=s[h];if(i.length>c.chords.length)continue;let l=!0;for(let a=1;a<i.length;a++)if(c.chords[a]!==i[a]){l=!1;break}l&&r.push(c)}}const d=this._findCommand(p,r);return d?i.length<d.chords.length?(this._log(`\\ From ${r.length} keybinding entries, awaiting ${d.chords.length-i.length} more chord(s), when: ${b(d.when)}, source: ${S(d)}.`),y):(this._log(`\\ From ${r.length} keybinding entries, matched ${d.command}, when: ${b(d.when)}, source: ${S(d)}.`),E(d.command,d.commandArgs,d.bubble)):(this._log(`\\ From ${r.length} keybinding entries, no when clauses matched the context.`),k)}_findCommand(p,n){for(let t=n.length-1;t>=0;t--){const i=n[t];if(w._contextMatchesRules(p,i.when))return i}return null}static _contextMatchesRules(p,n){return n?n.evaluate(p):!0}}e.KeybindingResolver=w;function b(g){return g?`${g.serialize()}`:"no when condition"}function S(g){return g.extensionId?g.isBuiltinExtension?`built-in extension ${g.extensionId}`:`user extension ${g.extensionId}`:g.isDefault?"built-in":"user"}}),define(X[320],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class _{constructor(E,w,b,S,g,p,n){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=E,this.chords=E?k(E.getDispatchChords()):[],E&&this.chords.length===0&&(this.chords=k(E.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=p,this.isBuiltinExtension=n}}e.ResolvedKeybindingItem=_;function k(y){const E=[];for(let w=0,b=y.length;w<b;w++){const S=y[w];if(!S)return[];E.push(S)}return E}e.toEmptyArrayIfContainsNull=k}),define(X[730],ee([1,0,59,113,727,320]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class w extends y.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 p=(0,E.toEmptyArrayIfContainsNull)(S.chords.map(n=>this._toKeyCodeChord(n)));return p.length>0?[new w(p,g)]:[]}}e.USLayoutResolvedKeybinding=w}),define(X[153],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,_.createDecorator)("labelService")}),define(X[124],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,_.createDecorator)("layoutService")}),define(X[321],ee([1,0,7,6,124,32,50]),function(K,e,_,k,y,E,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 p;(p=this._codeEditorService.getFocusedCodeEditor())===null||p===void 0||p.focus()}constructor(p){this._codeEditorService=p,this.onDidLayout=k.Event.None,this.offset={top:0,quickPickTop:0}}};b=Me([fe(0,E.ICodeEditorService)],b);let S=e.EditorScopedLayoutService=class extends b{get hasContainer(){return!1}get container(){return this._container}constructor(p,n){super(n),this._container=p}};e.EditorScopedLayoutService=S=Me([fe(1,E.ICodeEditorService)],S),(0,w.registerSingleton)(y.ILayoutService,b,1)}),define(X[731],ee([1,0,7,6,2,89,26,14,124]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let g=e.AccessibilityService=class extends y.Disposable{constructor(n,t,i){super(),this._contextKeyService=n,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new k.Emitter,this._onDidChangeReducedMotion=new k.Emitter,this._accessibilityModeEnabledContext=E.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const s=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("editor.accessibilitySupport")&&(s(),this._onDidChangeScreenReaderOptimized.fire()),d.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),s(),this._register(this.onDidChangeScreenReaderOptimized(()=>s()));const r=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(n){if(!this._layoutService.hasContainer)return;this._register((0,_.addDisposableListener)(n,"change",()=>{this._systemMotionReduced=n.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const n=this._configurationService.getValue("editor.accessibilitySupport");return n==="on"||n==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const n=this._configMotionReduced;return n==="on"||n==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};e.AccessibilityService=g=Me([fe(0,b.IContextKeyService),fe(1,S.ILayoutService),fe(2,w.IConfigurationService)],g)}),define(X[732],ee([1,0,290,2,124]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let E=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 p=(0,k.toDisposable)(()=>{this.currentViewDisposable===p&&this.hideContextView()});return this.currentViewDisposable=p,p}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(b){this.contextView.hide(b)}};e.ContextViewService=E=Me([fe(0,y.ILayoutService)],E)}),define(X[63],ee([1,0,6,2,14,8]),function(K,e,_,k,y,E){"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,E.createDecorator)("logService");var w;(function(n){n[n.Off=0]="Off",n[n.Trace=1]="Trace",n[n.Debug=2]="Debug",n[n.Info=3]="Info",n[n.Warning=4]="Warning",n[n.Error=5]="Error"})(w||(e.LogLevel=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 s of this.loggers)s.trace(t,...i)}debug(t,...i){for(const s of this.loggers)s.debug(t,...i)}info(t,...i){for(const s of this.loggers)s.info(t,...i)}error(t,...i){for(const s of this.loggers)s.error(t,...i)}dispose(){for(const t of this.loggers)t.dispose()}}e.MultiplexLogger=g;function p(n){switch(n){case w.Trace:return"trace";case w.Debug:return"debug";case w.Info:return"info";case w.Warning:return"warn";case w.Error:return"error";case w.Off:return"off"}}e.LogLevelToString=p,e.CONTEXT_LOG_LEVEL=new y.RawContextKey("logLevel",p(w.Info))}),define(X[733],ee([1,0,47,7,13,2,124,63]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let S=e.BrowserClipboardService=class extends E.Disposable{constructor(p,n){super(),this.layoutService=p,this.logService=n,this.mapTextToType=new Map,this.findText="",this.resources=[],(_.isSafari||_.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const p=()=>{const n=new y.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=n,navigator.clipboard.write([new ClipboardItem({"text/plain":n.p})]).catch(t=>we(this,void 0,void 0,function*(){(!(t instanceof Error)||t.name!=="NotAllowedError"||!n.isRejected)&&this.logService.error(t)}))};this.layoutService.hasContainer&&(this._register((0,k.addDisposableListener)(this.layoutService.container,"click",p)),this._register((0,k.addDisposableListener)(this.layoutService.container,"keydown",p)))}writeText(p,n){return we(this,void 0,void 0,function*(){if(n){this.mapTextToType.set(n,p);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(p);try{return yield navigator.clipboard.writeText(p)}catch(s){console.error(s)}const t=document.activeElement,i=document.body.appendChild((0,k.$)("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=p,i.focus(),i.select(),document.execCommand("copy"),t instanceof HTMLElement&&t.focus(),document.body.removeChild(i)})}readText(p){return we(this,void 0,void 0,function*(){if(p)return this.mapTextToType.get(p)||"";try{return yield navigator.clipboard.readText()}catch(n){return console.error(n),""}})}readFindText(){return we(this,void 0,void 0,function*(){return this.findText})}writeFindText(p){return we(this,void 0,void 0,function*(){this.findText=p})}readResources(){return we(this,void 0,void 0,function*(){return this.resources})}};e.BrowserClipboardService=S=Me([fe(0,w.ILayoutService),fe(1,b.ILogService)],S)}),define(X[734],ee([1,0,2,63]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class y 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=y}),define(X[90],ee([1,0,103,698,8]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var E;(function(b){b[b.Hint=1]="Hint",b[b.Info=2]="Info",b[b.Warning=4]="Warning",b[b.Error=8]="Error"})(E||(e.MarkerSeverity=E={})),function(b){function S(i,s){return s-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 p(i){return g[i]||""}b.toString=p;function n(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=n;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}(E||(e.MarkerSeverity=E={}));var w;(function(b){const S="";function g(n){return p(n,!0)}b.makeKey=g;function p(n,t){const i=[S];return n.source?i.push(n.source.replace("\xA6","\\\xA6")):i.push(S),n.code?typeof n.code=="string"?i.push(n.code.replace("\xA6","\\\xA6")):i.push(n.code.value.replace("\xA6","\\\xA6")):i.push(S),n.severity!==void 0&&n.severity!==null?i.push(E.toString(n.severity)):i.push(S),n.message&&t?i.push(n.message.replace("\xA6","\\\xA6")):i.push(S),n.startLineNumber!==void 0&&n.startLineNumber!==null?i.push(n.startLineNumber.toString()):i.push(S),n.startColumn!==void 0&&n.startColumn!==null?i.push(n.startColumn.toString()):i.push(S),n.endLineNumber!==void 0&&n.endLineNumber!==null?i.push(n.endLineNumber.toString()):i.push(S),n.endColumn!==void 0&&n.endColumn!==null?i.push(n.endColumn.toString()):i.push(S),i.push(S),i.join("\xA6")}b.makeKeyOptionalMessage=p})(w||(e.IMarkerData=w={})),e.IMarkerService=(0,y.createDecorator)("markerService")}),define(X[735],ee([1,0,16,6,2,60,9,20,5,50,8,90,26]),function(K,e,_,k,y,E,w,b,S,g,p,n,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 s=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 y.DisposableStore,this._markers=[],this._nextIdx=-1,b.URI.isUri(h)?this._resourceFilter=v=>v.toString()===h.toString():h&&(this._resourceFilter=h);const l=this._configService.getValue("problems.sortOrder"),a=(v,f)=>{let m=(0,w.compare)(v.resource.toString(),f.resource.toString());return m===0&&(l==="position"?m=S.Range.compareRangesUsingStarts(v,f)||n.MarkerSeverity.compare(v.severity,f.severity):m=n.MarkerSeverity.compare(v.severity,f.severity)||S.Range.compareRangesUsingStarts(v,f)),m},u=()=>{this._markers=this._markerService.read({resource:b.URI.isUri(h)?h:void 0,severities:n.MarkerSeverity.Error|n.MarkerSeverity.Warning|n.MarkerSeverity.Info}),typeof h=="function"&&(this._markers=this._markers.filter(v=>this._resourceFilter(v.resource))),this._markers.sort(a)};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 l=!1,a=this._markers.findIndex(u=>u.resource.toString()===h.uri.toString());a<0&&(a=(0,_.binarySearch)(this._markers,{resource:h.uri},(u,v)=>(0,w.compare)(u.resource.toString(),v.resource.toString())),a<0&&(a=~a));for(let u=a;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,l=!0;break}if(this._markers[u].resource.toString()!==h.uri.toString())break}l||(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 l=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),l!==this._nextIdx}find(h,o){let c=this._markers.findIndex(l=>l.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=s=Me([fe(1,n.IMarkerService),fe(2,t.IConfigurationService)],s),e.IMarkerNavigationService=(0,p.createDecorator)("IMarkerNavigationService");let r=class{constructor(h,o){this._markerService=h,this._configService=o,this._provider=new E.LinkedList}getMarkerList(h){for(const o of this._provider){const c=o.getMarkerList(h);if(c)return c}return new s(h,this._markerService,this._configService)}};r=Me([fe(0,n.IMarkerService),fe(1,t.IConfigurationService)],r),(0,g.registerSingleton)(e.IMarkerNavigationService,r,1)}),define(X[736],ee([1,0,16,6,53,56,48,20,90]),function(K,e,_,k,y,E,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 E.ResourceMap,this._byOwner=new Map}set(i,s,r){let d=this._byResource.get(i);d||(d=new Map,this._byResource.set(i,d)),d.set(s,r);let h=this._byOwner.get(s);h||(h=new E.ResourceMap,this._byOwner.set(s,h)),h.set(i,r)}get(i,s){const r=this._byResource.get(i);return r?.get(s)}delete(i,s){let r=!1,d=!1;const h=this._byResource.get(i);h&&(r=h.delete(s));const o=this._byOwner.get(s);if(o&&(d=o.delete(i)),r!==d)throw new Error("illegal state");return r&&d}values(i){var s,r,d,h;return typeof i=="string"?(r=(s=this._byOwner.get(i))===null||s===void 0?void 0:s.values())!==null&&r!==void 0?r:y.Iterable.empty():b.URI.isUri(i)?(h=(d=this._byResource.get(i))===null||d===void 0?void 0:d.values())!==null&&h!==void 0?h:y.Iterable.empty():y.Iterable.map(y.Iterable.concat(...this._byOwner.values()),o=>o[1])}}class p{constructor(i){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new E.ResourceMap,this._service=i,this._subscription=i.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(i){for(const s of i){const r=this._data.get(s);r&&this._substract(r);const d=this._resourceStats(s);this._add(d),this._data.set(s,d)}}_resourceStats(i){const s={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(i.scheme))return s;for(const{severity:r}of this._service.read({resource:i}))r===S.MarkerSeverity.Error?s.errors+=1:r===S.MarkerSeverity.Warning?s.warnings+=1:r===S.MarkerSeverity.Info?s.infos+=1:s.unknowns+=1;return s}_substract(i){this.errors-=i.errors,this.warnings-=i.warnings,this.infos-=i.infos,this.unknowns-=i.unknowns}_add(i){this.errors+=i.errors,this.warnings+=i.warnings,this.infos+=i.infos,this.unknowns+=i.unknowns}}class n{constructor(){this._onMarkerChanged=new k.DebounceEmitter({delay:0,merge:n._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new g,this._stats=new p(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(i,s){for(const r of s||[])this.changeOne(i,r,[])}changeOne(i,s,r){if((0,_.isFalsyOrEmpty)(r))this._data.delete(s,i)&&this._onMarkerChanged.fire([s]);else{const d=[];for(const h of r){const o=n._toMarker(i,s,h);o&&d.push(o)}this._data.set(s,i,d),this._onMarkerChanged.fire([s])}}static _toMarker(i,s,r){let{code:d,severity:h,message:o,source:c,startLineNumber:l,startColumn:a,endLineNumber:u,endColumn:v,relatedInformation:f,tags:m}=r;if(o)return l=l>0?l:1,a=a>0?a:1,u=u>=l?u:l,v=v>0?v:a,{resource:s,owner:i,code:d,severity:h,message:o,source:c,startLineNumber:l,startColumn:a,endLineNumber:u,endColumn:v,relatedInformation:f,tags:m}}changeAll(i,s){const r=[],d=this._data.values(i);if(d)for(const h of d){const o=y.Iterable.first(h);o&&(r.push(o.resource),this._data.delete(o.resource,i))}if((0,_.isNonEmptyArray)(s)){const h=new E.ResourceMap;for(const{resource:o,marker:c}of s){const l=n._toMarker(i,o,c);if(!l)continue;const a=h.get(o);a?a.push(l):(h.set(o,[l]),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:s,resource:r,severities:d,take:h}=i;if((!h||h<0)&&(h=-1),s&&r){const o=this._data.get(r,s);if(o){const c=[];for(const l of o)if(n._accept(l,d)){const a=c.push(l);if(h>0&&a===h)break}return c}else return[]}else if(!s&&!r){const o=[];for(const c of this._data.values())for(const l of c)if(n._accept(l,d)){const a=o.push(l);if(h>0&&a===h)return o}return o}else{const o=this._data.values(r??s),c=[];for(const l of o)for(const a of l)if(n._accept(a,d)){const u=c.push(a);if(h>0&&u===h)return c}return c}}static _accept(i,s){return s===void 0||(s&i.severity)===i.severity}static _merge(i){const s=new E.ResourceMap;for(const r of i)for(const d of r)s.set(d,!0);return Array.from(s.keys())}}e.MarkerService=n}),define(X[43],ee([1,0,103,8]),function(K,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 y{}e.NoOpNotification=y}),define(X[52],ee([1,0,9,20,8]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.matchesSomeScheme=e.matchesScheme=e.IOpenerService=void 0,e.IOpenerService=(0,y.createDecorator)("openerService");function E(S,g){return k.URI.isUri(S)?(0,_.equalsIgnoreCase)(S.scheme,g):(0,_.startsWithIgnoreCase)(S,g+":")}e.matchesScheme=E;function w(S,...g){return g.some(p=>E(S,p))}e.matchesSomeScheme=w;function b(S){let g;const p=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(S.fragment);return p&&(g={startLineNumber:parseInt(p[1]),startColumn:p[2]?parseInt(p[2]):1,endLineNumber:p[4]?parseInt(p[4]):void 0,endColumn:p[4]?p[5]?parseInt(p[5]):1:void 0},S=S.with({fragment:""})),{selection:g,uri:S}}e.extractSelection=b}),define(X[737],ee([1,0,7,21,60,56,211,48,42,20,32,25,711,52]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let s=class{constructor(o){this._commandService=o}open(o,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 l=[];try{l=(0,w.parse)(decodeURIComponent(o.query))}catch{try{l=(0,w.parse)(o.query)}catch{}}return Array.isArray(l)||(l=[l]),yield this._commandService.executeCommand(o.path,...l),!0})}};s=Me([fe(0,n.ICommandService)],s);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:l,uri:a}=(0,i.extractSelection)(o);return o=a,o.scheme===b.Schemas.file&&(o=(0,S.normalizePath)(o)),yield this._editorService.openCodeEditor({resource:o,options:Object.assign({selection:l,source:c?.fromUserGesture?t.EditorOpenSource.USER:t.EditorOpenSource.API},c?.editorOptions)},this._editorService.getFocusedCodeEditor(),c?.openToSide),!0})}};r=Me([fe(0,p.ICodeEditorService)],r);let d=e.OpenerService=class{constructor(o,c){this._openers=new y.LinkedList,this._validators=new y.LinkedList,this._resolvers=new y.LinkedList,this._resolvedUriTargets=new E.ResourceMap(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new y.LinkedList,this._defaultExternalOpener={openExternal:l=>we(this,void 0,void 0,function*(){return(0,i.matchesSomeScheme)(l,b.Schemas.http,b.Schemas.https)?_.windowOpenNoOpener(l):window.location.href=l,!0})},this._openers.push({open:(l,a)=>we(this,void 0,void 0,function*(){return a?.openExternal||(0,i.matchesSomeScheme)(l,b.Schemas.mailto,b.Schemas.http,b.Schemas.https,b.Schemas.vsls)?(yield this._doOpenExternal(l,a),!0):!1})}),this._openers.push(new s(c)),this._openers.push(new r(o))}registerOpener(o){return{dispose:this._openers.unshift(o)}}open(o,c){var l;return we(this,void 0,void 0,function*(){const a=typeof o=="string"?g.URI.parse(o):o,u=(l=this._resolvedUriTargets.get(a))!==null&&l!==void 0?l: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 l of this._resolvers)try{const a=yield l.resolveExternalUri(o,c);if(a)return this._resolvedUriTargets.has(a.resolved)||this._resolvedUriTargets.set(a.resolved,o),a}catch{}throw new Error("Could not resolve external URI: "+o.toString())})}_doOpenExternal(o,c){return we(this,void 0,void 0,function*(){const l=typeof o=="string"?g.URI.parse(o):o;let a;try{a=(yield this.resolveExternalUri(l,c)).resolved}catch{a=l}let u;if(typeof o=="string"&&l.toString()===a.toString()?u=o:u=encodeURI(a.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:l,preferredOpenerId:v},k.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(u,{sourceUri:l},k.CancellationToken.None)})}dispose(){this._validators.clear()}};e.OpenerService=d=Me([fe(0,p.ICodeEditorService),fe(1,n.ICommandService)],d)}),define(X[70],ee([1,0,136,56,133,50,8,63,52]),function(K,e,_,k,y,E,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 s=0;function r(d){let h=i.get(d);return h===void 0&&(h=++s,i.set(d,h)),h}t.of=r})(g||(g={}));class p{constructor(i,s,r,d,h,o){this._logService=i,this._name=s,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((s,r)=>(0,_.doHash)(g.of(r),s),0)}get(i){const s=this._key(i),r=this._cache.get(s);return r?(0,y.clamp)(r.value,this._min,this._max):this.default()}update(i,s){const r=this._key(i);let d=this._cache.get(r);d||(d=new y.SlidingWindowAverage(6),this._cache.set(r,d));const h=(0,y.clamp)(d.update(s),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 y.MovingAverage;for(const[,s]of this._cache)i.update(s.value);return i.value}default(){const i=this._overall()|0||this._default;return(0,y.clamp)(i,this._min,this._max)}}let n=e.LanguageFeatureDebounceService=class{constructor(i){this._logService=i,this._data=new Map}for(i,s,r){var d,h,o;const c=(d=r?.min)!==null&&d!==void 0?d:50,l=(h=r?.max)!==null&&h!==void 0?h:Math.pow(c,2),a=(o=r?.key)!==null&&o!==void 0?o:void 0,u=`${g.of(i)},${c}${a?","+a:""}`;let v=this._data.get(u);return v||(v=new p(this._logService,s,i,this._overallAverage()|0||c*1.5,c,l),this._data.set(u,v)),v}_overallAverage(){const i=new y.MovingAverage;for(const s of this._data.values())i.update(s.default());return i.value}};e.LanguageFeatureDebounceService=n=Me([fe(0,b.ILogService)],n),(0,E.registerSingleton)(e.ILanguageFeatureDebounceService,n,1)}),define(X[183],ee([1,0,16,21,11,53,56,12,5,70,8,50,51,2,19]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class r{remove(){var a;(a=this.parent)===null||a===void 0||a.children.delete(this.id)}static findId(a,u){let v;typeof a=="string"?v=`${u.id}/${a}`:(v=`${u.id}/${a.name}`,u.children.get(v)!==void 0&&(v=`${u.id}/${a.name}_${a.range.startLineNumber}_${a.range.startColumn}`));let f=v;for(let m=0;u.children.get(f)!==void 0;m++)f=`${v}_${m}`;return f}static empty(a){return a.children.size===0}}e.TreeElement=r;class d extends r{constructor(a,u,v){super(),this.id=a,this.parent=u,this.symbol=v,this.children=new Map}}e.OutlineElement=d;class h extends r{constructor(a,u,v,f){super(),this.id=a,this.parent=u,this.label=v,this.order=f,this.children=new Map}}e.OutlineGroup=h;class o extends r{static create(a,u,v){const f=new k.CancellationTokenSource(v),m=new o(u.uri),C=a.ordered(u),L=C.map((I,T)=>{var O;const R=r.findId(`provider_${T}`,m),A=new h(R,m,(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,A);return A},N=>((0,y.onUnexpectedExternalError)(N),A)).then(N=>{r.empty(N)?N.remove():m._groups.set(R,N)})}),D=a.onDidChange(()=>{const I=a.ordered(u);(0,_.equals)(I,C)||f.cancel()});return Promise.all(L).then(()=>f.token.isCancellationRequested&&!v.isCancellationRequested?o.create(a,u,v):m._compact()).finally(()=>{D.dispose()})}static _makeOutlineElement(a,u){const v=r.findId(a,u),f=new d(v,u,a);if(a.children)for(const m of a.children)o._makeOutlineElement(m,f);u.children.set(f.id,f)}constructor(a){super(),this.uri=a,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let a=0;for(const[u,v]of this._groups)v.children.size===0?this._groups.delete(u):a+=1;if(a!==1)this.children=this._groups;else{const u=E.Iterable.first(this._groups.values());for(const[,v]of u.children)v.parent=this,this.children.set(v.id,v)}return this}getTopLevelSymbols(){const a=[];for(const u of this.children.values())u instanceof d?a.push(u.symbol):a.push(...E.Iterable.map(u.children.values(),v=>v.symbol));return a.sort((u,v)=>S.Range.compareRangesUsingStarts(u.range,v.range))}asListOfDocumentSymbols(){const a=this.getTopLevelSymbols(),u=[];return o._flattenDocumentSymbols(u,a,""),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(a,u,v){for(const f of u)a.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(a,f.children,f.name)}}e.OutlineModel=o,e.IOutlineModelService=(0,p.createDecorator)("IOutlineModelService");let c=e.OutlineModelService=class{constructor(a,u,v){this._languageFeaturesService=a,this._disposables=new i.DisposableStore,this._cache=new w.LRUCache(10,.7),this._debounceInformation=u.for(a.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(v.onModelRemoved(f=>{this._cache.delete(f.id)}))}dispose(){this._disposables.dispose()}getOrCreate(a,u){return we(this,void 0,void 0,function*(){const v=this._languageFeaturesService.documentSymbolProvider,f=v.ordered(a);let m=this._cache.get(a.id);if(!m||m.versionId!==a.getVersionId()||!(0,_.equals)(m.provider,f)){const L=new k.CancellationTokenSource;m={versionId:a.getVersionId(),provider:f,promiseCnt:0,source:L,promise:o.create(v,a,L.token),model:void 0},this._cache.set(a.id,m);const D=Date.now();m.promise.then(I=>{m.model=I,this._debounceInformation.update(a,Date.now()-D)}).catch(I=>{this._cache.delete(a.id)})}if(m.model)return m.model;m.promiseCnt+=1;const C=u.onCancellationRequested(()=>{--m.promiseCnt===0&&(m.source.cancel(),this._cache.delete(a.id))});try{return yield m.promise}finally{C.dispose()}})}};e.OutlineModelService=c=Me([fe(0,s.ILanguageFeaturesService),fe(1,g.ILanguageFeatureDebounceService),fe(2,t.IModelService)],c),(0,n.registerSingleton)(e.IOutlineModelService,c,1)}),define(X[738],ee([1,0,21,18,20,62,183,25]),function(K,e,_,k,y,E,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[p]=g;(0,k.assertType)(y.URI.isUri(p));const n=S.get(w.IOutlineModelService),i=yield S.get(E.ITextModelService).createModelReference(p);try{return(yield n.getOrCreate(i.object.textEditorModel,_.CancellationToken.None)).getTopLevelSymbols()}finally{i.dispose()}})})}),define(X[739],ee([1,0,7,77,44,58,6,2,52,455]),function(K,e,_,k,y,E,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(n){n?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=n}constructor(n,t,i={},s){var r;super(),this._link=t,this._enabled=!0,this.el=(0,_.append)(n,(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(a=>new y.StandardKeyboardEvent(a)).filter(a=>a.keyCode===3).event,c=this._register(new k.DomEmitter(this.el,E.EventType.Tap)).event;this._register(E.Gesture.addTarget(this.el));const l=w.Event.any(d.event,o,c);this._register(l(a=>{this.enabled&&(_.EventHelper.stop(a,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e.Link=g=Me([fe(3,S.IOpenerService)],g)}),define(X[83],ee([1,0,8]),function(K,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(E){this.callback=E}report(E){this._value=E,this.callback(this._value)}}e.Progress=k,k.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,_.createDecorator)("editorProgressService")}),define(X[740],ee([1,0,13,21,2,18]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var w;(function(p){p[p.NO_ACTION=0]="NO_ACTION",p[p.CLOSE_PICKER=1]="CLOSE_PICKER",p[p.REFRESH_PICKER=2]="REFRESH_PICKER",p[p.REMOVE_ITEM=3]="REMOVE_ITEM"})(w||(e.TriggerAction=w={}));function b(p){const n=p;return Array.isArray(n.items)}function S(p){const n=p;return!!n.picks&&n.additionalPicks instanceof Promise}class g extends y.Disposable{constructor(n,t){super(),this.prefix=n,this.options=t}provide(n,t,i){var s;const r=new y.DisposableStore;n.canAcceptInBackground=!!(!((s=this.options)===null||s===void 0)&&s.canAcceptInBackground),n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1;let d;const h=r.add(new y.MutableDisposable),o=()=>we(this,void 0,void 0,function*(){const c=h.value=new y.DisposableStore;d?.dispose(!0),n.busy=!1,d=new k.CancellationTokenSource(t);const l=d.token,a=n.value.substr(this.prefix.length).trim(),u=this._getPicks(a,c,l,i),v=(m,C)=>{var L;let D,I;if(b(m)?(D=m.items,I=m.active):D=m,D.length===0){if(C)return!1;(a.length>0||n.hideInput)&&(!((L=this.options)===null||L===void 0)&&L.noResultsPick)&&((0,E.isFunction)(this.options.noResultsPick)?D=[this.options.noResultsPick(a)]:D=[this.options.noResultsPick])}return n.items=D,I&&(n.activeItems=[I]),!0},f=m=>we(this,void 0,void 0,function*(){let C=!1,L=!1;yield Promise.all([(()=>we(this,void 0,void 0,function*(){typeof m.mergeDelay=="number"&&(yield(0,_.timeout)(m.mergeDelay),l.isCancellationRequested)||L||(C=v(m.picks,!0))}))(),(()=>we(this,void 0,void 0,function*(){n.busy=!0;try{const D=yield m.additionalPicks;if(l.isCancellationRequested)return;let I,T;b(m.picks)?(I=m.picks.items,T=m.picks.active):I=m.picks;let O,R;if(b(D)?(O=D.items,R=D.active):O=D,O.length>0||!C){let A;if(!T&&!R){const N=n.activeItems[0];N&&I.indexOf(N)!==-1&&(A=N)}v({items:[...I,...O],active:T||R||A})}}finally{l.isCancellationRequested||(n.busy=!1),L=!0}}))()])});if(u!==null)if(S(u))yield f(u);else if(!(u instanceof Promise))v(u);else{n.busy=!0;try{const m=yield u;if(l.isCancellationRequested)return;S(m)?yield f(m):v(m)}finally{l.isCancellationRequested||(n.busy=!1)}}});return r.add(n.onDidChangeValue(()=>o())),o(),r.add(n.onDidAccept(c=>{const[l]=n.selectedItems;typeof l?.accept=="function"&&(c.inBackground||n.hide(),l.accept(n.keyMods,c))})),r.add(n.onDidTriggerItemButton(({button:c,item:l})=>we(this,void 0,void 0,function*(){var a,u;if(typeof l.trigger=="function"){const v=(u=(a=l.buttons)===null||a===void 0?void 0:a.indexOf(c))!==null&&u!==void 0?u:-1;if(v>=0){const f=l.trigger(v,n.keyMods),m=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(m){case w.NO_ACTION:break;case w.CLOSE_PICKER:n.hide();break;case w.REFRESH_PICKER:o();break;case w.REMOVE_ITEM:{const C=n.items.indexOf(l);if(C!==-1){const L=n.items.slice(),D=L.splice(C,1),I=n.activeItems.filter(O=>O!==D[0]),T=n.keepScrollPosition;n.keepScrollPosition=!0,n.items=L,I&&(n.activeItems=I),n.keepScrollPosition=T}break}}}}}))),r}}e.PickerQuickAccessProvider=g}),define(X[741],ee([1,0,7,44,67,218,2,103,167]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const S=_.$;class g extends w.Disposable{constructor(n,t,i){super(),this.parent=n,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 y.StandardMouseEvent(d))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=_.append(this.parent,S(".quick-input-box")),this.findInput=this._register(new E.FindInput(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const s=this.findInput.inputBox.inputElement;s.role="combobox",s.ariaHasPopup="menu",s.ariaAutoComplete="list",s.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(n){this.findInput.setValue(n)}select(n=null){this.findInput.inputBox.select(n)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(n){this.findInput.inputBox.setPlaceHolder(n)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(n){this.findInput.inputBox.inputElement.type=n?"password":"text"}set enabled(n){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!n)}set toggles(n){this.findInput.setAdditionalToggles(n)}setAttribute(n,t){this.findInput.inputBox.inputElement.setAttribute(n,t)}showDecoration(n){n===b.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:n===b.default.Info?1:n===b.default.Warning?2:3,content:""})}stylesForType(n){return this.findInput.inputBox.stylesForType(n===b.default.Info?1:n===b.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}e.QuickInputBox=g}),define(X[322],ee([1,0,7,77,6,44,58,144,158,366,703,167]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.getIconClass=void 0;const n={},t=new S.IdGenerator("quick-input-button-icon-");function i(r){if(!r)return;let d;const h=r.dark.toString();return n[h]?d=n[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)}`),n[h]=d),d}e.getIconClass=i;function s(r,d,h){_.reset(d);const o=(0,g.parseLinkedText)(r);let c=0;for(const l of o.nodes)if(typeof l=="string")d.append(...(0,b.renderLabelWithIcons)(l));else{let a=l.title;!a&&l.href.startsWith("command:")?a=(0,p.localize)(0,null,l.href.substring(8)):a||(a=l.href);const u=_.$("a",{href:l.href,title:a,tabIndex:c++},l.label);u.style.textDecoration="underline";const v=D=>{_.isEventLike(D)&&_.EventHelper.stop(D,!0),h.callback(l.href)},f=h.disposables.add(new k.DomEmitter(u,_.EventType.CLICK)).event,m=h.disposables.add(new k.DomEmitter(u,_.EventType.KEY_DOWN)).event,C=h.disposables.add(y.Event.chain(m)).filter(D=>{const I=new E.StandardKeyboardEvent(D);return I.equals(10)||I.equals(3)}).event;h.disposables.add(w.Gesture.addTarget(u));const L=h.disposables.add(new k.DomEmitter(u,w.EventType.Tap)).event;y.Event.any(f,L,C)(v,null,h.disposables),d.appendChild(u)}}e.renderQuickInputDescription=s}),define(X[742],ee([1,0,7,44,69,216,212,16,13,365,100,11,6,114,2,17,9,18,702,322,167]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const l=_.$;class a{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,l(".quick-input-list-entry"));const A=_.append(R.entry,l("label.quick-input-list-label"));R.toDisposeTemplate.push(_.addStandardDisposableListener(A,_.EventType.CLICK,V=>{R.checkbox.offsetParent||V.preventDefault()})),R.checkbox=_.append(A,l("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(A,l(".quick-input-list-rows")),P=_.append(N,l(".quick-input-list-row")),x=_.append(N,l(".quick-input-list-row"));R.label=new E.IconLabel(P,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const F=_.append(P,l(".quick-input-list-entry-keybinding"));R.keybinding=new w.KeybindingLabel(F,r.OS);const B=_.append(x,l(".quick-input-list-label-meta"));return R.detail=new E.IconLabel(B,{supportHighlights:!0,supportIcons:!0}),R.separator=_.append(R.entry,l(".quick-input-list-separator")),R.actionBar=new y.ActionBar(R.entry),R.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),R.toDisposeTemplate.push(R.actionBar),R}renderElement(O,R,A){A.element=O,O.element=(0,h.withNullAsUndefined)(A.entry);const N=O.item?O.item:O.separator;A.checkbox.checked=O.checked,A.toDisposeElement.push(O.onChecked($=>A.checkbox.checked=$));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,A.entry.classList.remove("quick-input-list-separator-as-item")):A.entry.classList.add("quick-input-list-separator-as-item"),A.label.setLabel(O.saneLabel,O.saneDescription,B),A.keybinding.set(N.type==="separator"?void 0:N.keybinding),O.saneDetail&&A.detail.setLabel(O.saneDetail,void 0,{matches:F,title:O.saneDetail}),O.item&&O.separator&&O.separator.label?(A.separator.textContent=O.separator.label,A.separator.style.display=""):A.separator.style.display="none",A.entry.classList.toggle("quick-input-list-separator-border",!!O.separator);const V=N.buttons;V&&V.length?(A.actionBar.push(V.map(($,M)=>{let Q=$.iconClass||($.iconPath?(0,c.getIconClass)($.iconPath):void 0);return $.alwaysVisible&&(Q=Q?`${Q} always-visible`:"always-visible"),{id:`id-${M}`,class:Q,enabled:!0,label:"",tooltip:$.tooltip||"",run:()=>{N.type!=="separator"?O.fireButtonTriggered({button:$,item:N}):O.fireSeparatorButtonTriggered({button:$,separator:N})}}}),{icon:!0,label:!1}),A.entry.classList.add("has-actions")):A.entry.classList.remove("has-actions")}disposeElement(O,R,A){A.toDisposeElement=(0,s.dispose)(A.toDisposeElement),A.actionBar.clear()}disposeTemplate(O){O.toDisposeElement=(0,s.dispose)(O.toDisposeElement),O.toDisposeTemplate=(0,s.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 m{constructor(O,R,A){this.parent=O,this.options=A,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,l(".quick-input-list"));const N=new v,P=new I;this.list=A.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(A.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,n.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 A=0,N=O.length;A<N;A++){const P=O[A];if(!P.hidden)if(P.checked)R=!0;else return!1}return R}getCheckedCount(){let O=0;const R=this.elements;for(let A=0,N=R.length;A<N;A++)R[A].checked&&O++;return O}getVisibleCount(){let O=0;const R=this.elements;for(let A=0,N=R.length;A<N;A++)R[A].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,s.dispose)(this.elementDisposables);const R=N=>this.fireButtonTriggered(N),A=N=>this.fireSeparatorButtonTriggered(N);this.inputElements=O,this.elements=O.reduce((N,P,x)=>{var F,B,V;const $=x&&O[x-1],M=P.label?P.label.replace(/\r?\n/g," "):"",Q=(0,i.parseLabelWithIcons)(M).text.trim();let ie,re,ne,se,H,W,q;P.type!=="separator"&&(ie=P.meta&&P.meta.replace(/\r?\n/g," "),re=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,q=P.tooltip);const Z=P.ariaLabel||[M,re,ne].map(ge=>(0,i.getCodiconAriaLabel)(ge)).filter(ge=>!!ge).join(", "),Y=this.parent.classList.contains("show-checkboxes");let oe;if(P.type==="separator"){if(!P.buttons)return N;oe=P}else $&&$.type==="separator"&&!$.buttons&&(oe=$);const ce=new a({hasCheckbox:Y,index:x,item:P.type!=="separator"?P:void 0,saneLabel:M,saneSortLabel:Q,saneMeta:ie,saneAriaLabel:Z,saneDescription:re,saneDetail:ne,saneTooltip:q,labelHighlights:se,descriptionHighlights:H,detailHighlights:W,checked:!1,separator:oe,fireButtonTriggered:R,fireSeparatorButtonTriggered:A});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 A of O)R.add(A);for(const A of this.elements)A.checked=R.has(A.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,A=>!!A.item);break;case f.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,A=>!!A.item);break;case f.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,A=>!!A.item);break;case f.Next:{this.list.focusNext(void 0,!0,void 0,N=>!!N.item);const A=this.list.getFocus()[0];A!==0&&!this.elements[A-1].item&&this.list.firstVisibleIndex>A-1&&this.list.reveal(A-1);break}case f.Previous:{this.list.focusPrevious(void 0,!0,void 0,N=>!!N.item);const A=this.list.getFocus()[0];A!==0&&!this.elements[A-1].item&&this.list.firstVisibleIndex>A-1&&this.list.reveal(A-1);break}case f.NextPage:this.list.focusNextPage(void 0,A=>!!A.item);break;case f.PreviousPage:this.list.focusPreviousPage(void 0,A=>!!A.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,A,N;this._lastHover&&!this._lastHover.isDisposed&&((A=(R=this.options.hoverDelegate).onDidHideHover)===null||A===void 0||A.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),!this.sortByLabel){const $=P.index&&this.inputElements[P.index-1];N=$&&$.type==="separator"?$:N,N&&!P.hidden&&(P.separator=N,N=void 0)}})}const A=this.elements.filter(N=>!N.hidden);if(this.sortByLabel&&O){const N=O.toLowerCase();A.sort((P,x)=>D(P,x,N))}return this.elementsToIndexes=A.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,A),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(A.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const O=this.list.getFocusedElements(),R=this.allVisibleChecked(O);for(const A of O)A.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,s.dispose)(this.elementDisposables),this.disposables=(0,s.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(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 A=new s.DisposableStore;A.add(this.list.onDidChangeFocus(N=>{N.indexes.length&&this.showHover(N.elements[0])})),this._lastHover&&A.add(this._lastHover),this._toggleHover=A,this.elementDisposables.push(this._toggleHover)}}e.QuickInputList=m,Me([p.memoize],m.prototype,"onDidChangeFocus",null),Me([p.memoize],m.prototype,"onDidChangeSelection",null);function C(T,O){const{text:R,iconOffsets:A}=O;if(!A||A.length===0)return L(T,R);const N=(0,d.ltrim)(R," "),P=R.length-N.length,x=L(T,N);if(x)for(const F of x){const B=A[F.start+P]+P;F.start+=B,F.end+=B}return x}function L(T,O){const R=O.toLowerCase().indexOf(T.toLowerCase());return R!==-1?[{start:R,end:R+T.length}]:null}function D(T,O,R){const A=T.labelHighlights||[],N=O.labelHighlights||[];return A.length&&!N.length?-1:!A.length&&N.length?1:A.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(X[79],ee([1,0,8]),function(K,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 y;(function(w){w[w.NONE=0]="NONE",w[w.FIRST=1]="FIRST",w[w.SECOND=2]="SECOND",w[w.LAST=3]="LAST"})(y||(e.ItemActivation=y={}));class E{constructor(b){this.options=b}}e.QuickPickItemScorerAccessor=E,e.quickPickItemScorerAccessor=new E,e.IQuickInputService=(0,_.createDecorator)("quickInputService")}),define(X[743],ee([1,0,7,44,69,298,291,550,146,40,16,13,21,27,6,2,17,103,30,18,701,79,741,742,322,167]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const m=_.$,C={iconClass:o.ThemeIcon.asClassName(i.Codicon.quickInputBack),tooltip:(0,l.localize)(0,null),handle:-1};class L extends r.Disposable{constructor(R){super(),this.ui=R,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=L.noPromptMessage,this._severity=h.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new s.Emitter),this.onDidHideEmitter=this._register(new s.Emitter),this.onDisposeEmitter=this._register(new s.Emitter),this.visibleDisposables=this._register(new r.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(R){this._title=R,this.update()}get description(){return this._description}set description(R){this._description=R,this.update()}get step(){return this._steps}set step(R){this._steps=R,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(R){this._totalSteps=R,this.update()}get enabled(){return this._enabled}set enabled(R){this._enabled=R,this.update()}get contextKey(){return this._contextKey}set contextKey(R){this._contextKey=R,this.update()}get busy(){return this._busy}set busy(R){this._busy=R,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(R){const A=this._ignoreFocusOut!==R&&!d.isIOS;this._ignoreFocusOut=R&&!d.isIOS,A&&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=a.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:R})}update(){var R,A;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.busy&&!this.busyDelay&&(this.busyDelay=new n.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const F=this.buttons.filter(V=>V===C);this.ui.leftActionBar.push(F.map((V,$)=>{const M=new g.Action(`id-${$}`,"",V.iconClass||(0,f.getIconClass)(V.iconPath),!0,()=>we(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(V)}));return M.tooltip=V.tooltip||"",M}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const B=this.buttons.filter(V=>V!==C);this.ui.rightActionBar.push(B.map((V,$)=>{const M=new g.Action(`id-${$}`,"",V.iconClass||(0,f.getIconClass)(V.iconPath),!0,()=>we(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(V)}));return M.tooltip=V.tooltip||"",M}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const F=(A=(R=this.toggles)===null||R===void 0?void 0:R.filter(B=>B instanceof S.Toggle))!==null&&A!==void 0?A:[];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,l.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 A=this.ui.inputBox.stylesForType(R);this.ui.message.style.color=A.foreground?`${A.foreground}`:"",this.ui.message.style.backgroundColor=A.background?`${A.background}`:"",this.ui.message.style.border=A.border?`1px solid ${A.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}L.noPromptMessage=(0,l.localize)(1,null);class D extends L{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new s.Emitter),this.onWillAcceptEmitter=this._register(new s.Emitter),this.onDidAcceptEmitter=this._register(new s.Emitter),this.onDidCustomEmitter=this._register(new s.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=a.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new s.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new s.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new s.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new s.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=R=>R,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(R){this._quickNavigate=R,this.update()}get value(){return this._value}set value(R){this.doSetValue(R)}doSetValue(R,A){this._value!==R&&(this._value=R,A||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?a.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,p.equals)(R,this._activeItems,(A,N)=>A===N)||(this._activeItems=R,this.onDidChangeActiveEmitter.fire(R))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:R,event:A})=>{if(this.canSelectMany){R.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,p.equals)(R,this._selectedItems,(N,P)=>N===P)||(this._selectedItems=R,this.onDidChangeSelectionEmitter.fire(R),R.length&&this.handleAccept(A instanceof MouseEvent&&A.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(R=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,p.equals)(R,this._selectedItems,(A,N)=>A===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 A=!1;this.onWillAcceptEmitter.fire({veto:()=>A=!0}),A||this.onDidAcceptEmitter.fire({inBackground:R})}registerQuickNavigation(){return _.addDisposableListener(this.ui.container,_.EventType.KEY_UP,R=>{if(this.canSelectMany||!this._quickNavigate)return;const A=new k.StandardKeyboardEvent(R),N=A.keyCode;this._quickNavigate.keybindings.some(F=>{const B=F.getChords();return B.length>1?!1:B[0].shiftKey&&N===4?!(A.ctrlKey||A.altKey||A.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,A=!!this.description,N={title:!!this.title||!!this.step||!!this.buttons.length,description:A,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||A,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||D.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 a.ItemActivation.NONE:this._itemActivation=a.ItemActivation.FIRST;break;case a.ItemActivation.SECOND:this.ui.list.focus(v.QuickInputListFocus.Second),this._itemActivation=a.ItemActivation.FIRST;break;case a.ItemActivation.LAST:this.ui.list.focus(v.QuickInputListFocus.Last),this._itemActivation=a.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)}}D.DEFAULT_ARIA_LABEL=(0,l.localize)(3,null);class I extends L{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new s.Emitter),this.onDidAcceptEmitter=this._register(new s.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(R){this._value=R||"",this.update()}get placeholder(){return this._placeholder}set placeholder(R){this._placeholder=R,this.update()}get password(){return this._password}set password(R){this._password=R,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(R=>{R!==this.value&&(this._value=R,this.onDidValueChangeEmitter.fire(R))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const R={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0};this.ui.setVisibilities(R),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}class T extends r.Disposable{constructor(R){super(),this.options=R,this.enabled=!0,this.onDidAcceptEmitter=this._register(new s.Emitter),this.onDidCustomEmitter=this._register(new s.Emitter),this.onDidTriggerButtonEmitter=this._register(new s.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new s.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new s.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=R.idPrefix,this.parentElement=R.container,this.styles=R.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const R=A=>{this.keyMods.ctrlCmd=A.ctrlKey||A.metaKey,this.keyMods.alt=A.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,m(".quick-input-widget.show-file-icons"));R.tabIndex=-1,R.style.display="none";const A=_.createStyleSheet(R),N=_.append(R,m(".quick-input-titlebar")),P=this._register(new y.ActionBar(N));P.domNode.classList.add("quick-input-left-action-bar");const x=_.append(N,m(".quick-input-title")),F=this._register(new y.ActionBar(N));F.domNode.classList.add("quick-input-right-action-bar");const B=_.append(R,m(".quick-input-description")),V=_.append(R,m(".quick-input-header")),$=_.append(V,m("input.quick-input-check-all"));$.type="checkbox",$.setAttribute("aria-label",(0,l.localize)(4,null)),this._register(_.addStandardDisposableListener($,_.EventType.CHANGE,z=>{const U=$.checked;ue.setAllVisibleChecked(U)})),this._register(_.addDisposableListener($,_.EventType.CLICK,z=>{(z.x||z.y)&&re.setFocus()}));const M=_.append(V,m(".quick-input-description")),Q=_.append(V,m(".quick-input-and-message")),ie=_.append(Q,m(".quick-input-filter")),re=this._register(new u.QuickInputBox(ie,this.styles.inputBox,this.styles.toggle));re.setAttribute("aria-describedby",`${this.idPrefix}message`);const ne=_.append(ie,m(".quick-input-visible-count"));ne.setAttribute("aria-live","polite"),ne.setAttribute("aria-atomic","true");const se=new w.CountBadge(ne,{countFormat:(0,l.localize)(5,null)},this.styles.countBadge),H=_.append(ie,m(".quick-input-count"));H.setAttribute("aria-live","polite");const W=new w.CountBadge(H,{countFormat:(0,l.localize)(6,null)},this.styles.countBadge),q=_.append(V,m(".quick-input-action")),Z=new E.Button(q,this.styles.button);Z.label=(0,l.localize)(7,null),this._register(Z.onDidClick(z=>{this.onDidAcceptEmitter.fire()}));const Y=_.append(V,m(".quick-input-action")),oe=new E.Button(Y,this.styles.button);oe.label=(0,l.localize)(8,null),this._register(oe.onDidClick(z=>{this.onDidCustomEmitter.fire()}));const ce=_.append(Q,m(`#${this.idPrefix}message.quick-input-message`)),ge=new b.ProgressBar(R,this.styles.progressBar);ge.getContainer().classList.add("quick-input-progress");const le=this.idPrefix+"list",ue=this._register(new v.QuickInputList(R,le,this.options));re.setAttribute("aria-controls",le),this._register(ue.onDidChangeFocus(()=>{var z;re.setAttribute("aria-activedescendant",(z=ue.getActiveDescendant())!==null&&z!==void 0?z:"")})),this._register(ue.onChangedAllVisibleChecked(z=>{$.checked=z})),this._register(ue.onChangedVisibleCount(z=>{se.setCount(z)})),this._register(ue.onChangedCheckedCount(z=>{W.setCount(z)})),this._register(ue.onLeave(()=>{setTimeout(()=>{re.setFocus(),this.controller instanceof D&&this.controller.canSelectMany&&ue.clearFocus()},0)}));const j=_.trackFocus(R);return this._register(j),this._register(_.addDisposableListener(R,_.EventType.FOCUS,z=>{this.previousFocusElement=z.relatedTarget instanceof HTMLElement?z.relatedTarget:void 0},!0)),this._register(j.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(a.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(_.addDisposableListener(R,_.EventType.FOCUS,z=>{re.setFocus()})),this._register(_.addDisposableListener(R,_.EventType.KEY_DOWN,z=>{const U=new k.StandardKeyboardEvent(z);switch(U.keyCode){case 3:_.EventHelper.stop(z,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:_.EventHelper.stop(z,!0),this.hide(a.QuickInputHideReason.Gesture);break;case 2:if(!U.altKey&&!U.ctrlKey&&!U.metaKey){const J=[".action-label.codicon"];R.classList.contains("show-checkboxes")?J.push("input"):J.push("input[type=text]"),this.getUI().list.isDisplayed()&&J.push(".monaco-list"),this.getUI().message&&J.push(".quick-input-message a");const te=R.querySelectorAll(J.join(", "));U.shiftKey&&U.target===te[0]?(_.EventHelper.stop(z,!0),ue.clearFocus()):!U.shiftKey&&U.target===te[te.length-1]&&(_.EventHelper.stop(z,!0),te[0].focus())}break;case 10:U.ctrlKey&&(_.EventHelper.stop(z,!0),this.getUI().list.toggleHover());break}})),this.ui={container:R,styleSheet:A,leftActionBar:P,titleBar:N,title:x,description1:B,description2:M,rightActionBar:F,checkAll:$,filterContainer:ie,inputBox:re,visibleCountContainer:ne,visibleCount:se,countContainer:H,count:W,okContainer:q,ok:Z,message:ce,customButtonContainer:Y,customButton:oe,list:ue,progressBar:ge,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:z=>this.show(z),hide:()=>this.hide(),setVisibilities:z=>this.setVisibilities(z),setEnabled:z=>this.setEnabled(z),setContextKey:z=>this.options.setContextKey(z),linkOpenerDelegate:z=>this.options.linkOpenerDelegate(z)},this.updateStyles(),this.ui}pick(R,A={},N=t.CancellationToken.None){return new Promise((P,x)=>{let F=M=>{var Q;F=P,(Q=A.onKeyMods)===null||Q===void 0||Q.call(A,B.keyMods),P(M)};if(N.isCancellationRequested){F(void 0);return}const B=this.createQuickPick();let V;const $=[B,B.onDidAccept(()=>{if(B.canSelectMany)F(B.selectedItems.slice()),B.hide();else{const M=B.activeItems[0];M&&(F(M),B.hide())}}),B.onDidChangeActive(M=>{const Q=M[0];Q&&A.onDidFocus&&A.onDidFocus(Q)}),B.onDidChangeSelection(M=>{if(!B.canSelectMany){const Q=M[0];Q&&(F(Q),B.hide())}}),B.onDidTriggerItemButton(M=>A.onDidTriggerItemButton&&A.onDidTriggerItemButton(Object.assign(Object.assign({},M),{removeItem:()=>{const Q=B.items.indexOf(M.item);if(Q!==-1){const ie=B.items.slice(),re=ie.splice(Q,1),ne=B.activeItems.filter(H=>H!==re[0]),se=B.keepScrollPosition;B.keepScrollPosition=!0,B.items=ie,ne&&(B.activeItems=ne),B.keepScrollPosition=se}}}))),B.onDidTriggerSeparatorButton(M=>{var Q;return(Q=A.onDidTriggerSeparatorButton)===null||Q===void 0?void 0:Q.call(A,M)}),B.onDidChangeValue(M=>{V&&!M&&(B.activeItems.length!==1||B.activeItems[0]!==V)&&(B.activeItems=[V])}),N.onCancellationRequested(()=>{B.hide()}),B.onDidHide(()=>{(0,r.dispose)($),F(void 0)})];B.title=A.title,B.canSelectMany=!!A.canPickMany,B.placeholder=A.placeHolder,B.ignoreFocusOut=!!A.ignoreFocusLost,B.matchOnDescription=!!A.matchOnDescription,B.matchOnDetail=!!A.matchOnDetail,B.matchOnLabel=A.matchOnLabel===void 0||A.matchOnLabel,B.autoFocusOnList=A.autoFocusOnList===void 0||A.autoFocusOnList,B.quickNavigate=A.quickNavigate,B.hideInput=!!A.hideInput,B.contextKey=A.contextKey,B.busy=!0,Promise.all([R,A.activeItem]).then(([M,Q])=>{V=Q,B.busy=!1,B.items=M,B.canSelectMany&&(B.selectedItems=M.filter(ie=>ie.type!=="separator"&&ie.picked)),V&&(B.activeItems=[V])}),B.show(),Promise.resolve(R).then(void 0,M=>{x(M),B.hide()})})}createQuickPick(){const R=this.getUI();return new D(R)}createInputBox(){const R=this.getUI();return new I(R)}show(R){const A=this.getUI();this.onShowEmitter.fire();const N=this.controller;this.controller=R,N?.didHide(),this.setEnabled(!0),A.leftActionBar.clear(),A.title.textContent="",A.description1.textContent="",A.description2.textContent="",A.rightActionBar.clear(),A.checkAll.checked=!1,A.inputBox.placeholder="",A.inputBox.password=!1,A.inputBox.showDecoration(h.default.Ignore),A.visibleCount.setCount(0),A.count.setCount(0),_.reset(A.message),A.progressBar.stop(),A.list.setElements([]),A.list.matchOnDescription=!1,A.list.matchOnDetail=!1,A.list.matchOnLabel=!0,A.list.sortByLabel=!0,A.ignoreFocusOut=!1,A.inputBox.toggles=void 0;const P=this.options.backKeybindingLabel();C.tooltip=P?(0,l.localize)(9,null,P):(0,l.localize)(10,null),A.container.style.display="",this.updateLayout(),A.inputBox.setFocus()}setVisibilities(R){const A=this.getUI();A.title.style.display=R.title?"":"none",A.description1.style.display=R.description&&(R.inputBox||R.checkAll)?"":"none",A.description2.style.display=R.description&&!(R.inputBox||R.checkAll)?"":"none",A.checkAll.style.display=R.checkAll?"":"none",A.filterContainer.style.display=R.inputBox?"":"none",A.visibleCountContainer.style.display=R.visibleCount?"":"none",A.countContainer.style.display=R.count?"":"none",A.okContainer.style.display=R.ok?"":"none",A.customButtonContainer.style.display=R.customButton?"":"none",A.message.style.display=R.message?"":"none",A.progressBar.getContainer().style.display=R.progressBar?"":"none",A.list.display(!!R.list),A.container.classList.toggle("show-checkboxes",!!R.checkBox),A.container.classList.toggle("hidden-input",!R.inputBox&&!R.description),this.updateLayout()}setEnabled(R){if(R!==this.enabled){this.enabled=R;for(const A of this.getUI().leftActionBar.viewItems)A.action.enabled=R;for(const A of this.getUI().rightActionBar.viewItems)A.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 A;const N=this.controller;if(N){const P=!(!((A=this.ui)===null||A===void 0)&&A.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,A){this.dimension=R,this.titleBarOffset=A,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const R=this.ui.container.style,A=Math.min(this.dimension.width*.62,T.MAX_WIDTH);R.width=A+"px",R.marginLeft="-"+A/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:A,quickInputForeground:N,widgetBorder:P,widgetShadow:x}=this.styles.widget;this.ui.titleBar.style.backgroundColor=R??"",this.ui.container.style.backgroundColor=A??"",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(`
- `);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(X[35],ee([1,0,85,18]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class y{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 y}),define(X[323],ee([1,0,159,56,211,20,52,35]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalSelectionTransfer=e.Extensions=e.createDraggedEditorInputFromRawResourcesData=e.extractEditorsDropData=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};function S(t){var i;const s=[];if(t.dataTransfer&&t.dataTransfer.types.length>0){const h=t.dataTransfer.getData(e.CodeDataTransfers.EDITORS);if(h)try{s.push(...(0,y.parse)(h))}catch{}else try{const l=t.dataTransfer.getData(_.DataTransfers.RESOURCES);s.push(...g(l))}catch{}if(!((i=t.dataTransfer)===null||i===void 0)&&i.files)for(let l=0;l<t.dataTransfer.files.length;l++){const a=t.dataTransfer.files[l];if(a&&a.path)try{s.push({resource:E.URI.file(a.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const o=t.dataTransfer.getData(e.CodeDataTransfers.FILES);if(o)try{const l=JSON.parse(o);for(const a of l)s.push({resource:E.URI.file(a),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const c=b.Registry.as(e.Extensions.DragAndDropContribution).getAll();for(const l of c){const a=t.dataTransfer.getData(l.dataFormatKey);if(a)try{s.push(...l.getEditorInputs(a))}catch{}}}const r=[],d=new k.ResourceMap;for(const h of s)h.resource?d.has(h.resource)||(r.push(h),d.set(h.resource,!0)):r.push(h);return r}e.extractEditorsDropData=S;function g(t){const i=[];if(t){const s=JSON.parse(t);for(const r of s)if(r.indexOf(":")>0){const{selection:d,uri:h}=(0,w.extractSelection)(E.URI.parse(r));i.push({resource:h,options:{selection:d}})}}return i}e.createDraggedEditorInputFromRawResourcesData=g;class p{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},b.Registry.add(e.Extensions.DragAndDropContribution,new p);class n{constructor(){}static getInstance(){return n.INSTANCE}hasData(i){return i&&i===this.proto}getData(i){if(this.hasData(i))return this.data}}e.LocalSelectionTransfer=n,n.INSTANCE=new n}),define(X[324],ee([1,0,159,164,102,20,323]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addExternalEditorsDropData=e.toVSDataTransfer=void 0;function b(n){const t=new k.VSDataTransfer;for(const i of n.items){const s=i.type;if(i.kind==="string"){const r=new Promise(d=>i.getAsString(d));t.append(s,(0,k.createStringDataTransferItem)(r))}else if(i.kind==="file"){const r=i.getAsFile();r&&t.append(s,S(r))}}return t}e.toVSDataTransfer=b;function S(n){const t=n.path?E.URI.parse(n.path):void 0;return(0,k.createFileDataTransferItem)(n.name,t,()=>we(this,void 0,void 0,function*(){return new Uint8Array(yield n.arrayBuffer())}))}const g=Object.freeze([w.CodeDataTransfers.EDITORS,w.CodeDataTransfers.FILES,_.DataTransfers.RESOURCES]);function p(n,t,i=!1){var s;if(t.dataTransfer&&(i||!n.has(y.Mimes.uriList))){const r=(0,w.extractEditorsDropData)(t).filter(d=>d.resource).map(d=>d.resource.toString());for(const d of(s=t.dataTransfer)===null||s===void 0?void 0:s.items){const h=d.getAsFile();h&&r.push(h.path?E.URI.file(h.path).toString():h.name)}r.length&&n.replace(y.Mimes.uriList,(0,k.createStringDataTransferItem)(k.UriList.create(r)))}for(const r of g)n.delete(r)}e.addExternalEditorsDropData=p}),define(X[230],ee([1,0,6,35]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function y(b){return b.length>0&&b.charAt(b.length-1)==="#"?b.substring(0,b.length-1):b}class E{constructor(){this._onDidChangeSchema=new _.Emitter,this.schemasById={}}registerSchema(S,g){this.schemasById[y(S)]=g,this._onDidChangeSchema.fire(S)}notifySchemaChanged(S){this._onDidChangeSchema.fire(S)}}const w=new E;k.Registry.add(e.Extensions.JSONContribution,w)}),define(X[91],ee([1,0,16,6,18,690,26,230,35]),function(K,e,_,k,y,E,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 p{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new k.Emitter,this._onDidUpdateConfiguration=new k.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:E.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 l=new Set;this.doRegisterConfigurations(o,c,l),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:l})}registerDefaultConfigurations(o){const c=new Set;this.doRegisterDefaultConfigurations(o,c),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:c,defaultsOverrides:!0})}doRegisterDefaultConfigurations(o,c){var l;const a=[];for(const{overrides:u,source:v}of o)for(const f in u)if(c.add(f),e.OVERRIDE_PROPERTY_REGEX.test(f)){const m=this.configurationDefaultsOverrides.get(f),C=(l=m?.valuesSources)!==null&&l!==void 0?l:new Map;if(v)for(const T of Object.keys(u[f]))C.set(T,v);const L=Object.assign(Object.assign({},m?.value||{}),u[f]);this.configurationDefaultsOverrides.set(f,{source:v,value:L,valuesSources:C});const D=(0,w.getLanguageTagSettingPlainKey)(f),I={type:"object",default:L,description:E.localize(1,null,D),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:L,source:y.isString(v)?void 0:v,defaultValueSource:v};a.push(...i(f)),this.configurationProperties[f]=I,this.defaultLanguageConfigurationOverridesNode.properties[f]=I}else{this.configurationDefaultsOverrides.set(f,{value:u[f],source:v});const m=this.configurationProperties[f];m&&(this.updatePropertyDefaultValue(f,m),this.updateSchema(f,m))}this.doRegisterOverrideIdentifiers(a)}registerOverrideIdentifiers(o){this.doRegisterOverrideIdentifiers(o),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(o){for(const c of o)this.overrideIdentifiers.add(c);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(o,c,l){o.forEach(a=>{this.validateAndRegisterProperties(a,c,a.extensionInfo,a.restrictedProperties,void 0,l),this.configurationContributors.push(a),this.registerJSONConfiguration(a)})}validateAndRegisterProperties(o,c=!0,l,a,u=3,v){var f;u=y.isUndefinedOrNull(o.scope)?u:o.scope;const m=o.properties;if(m)for(const L in m){const D=m[L];if(c&&d(L,D)){delete m[L];continue}if(D.source=l,D.defaultDefaultValue=m[L].default,this.updatePropertyDefaultValue(L,D),e.OVERRIDE_PROPERTY_REGEX.test(L)?D.scope=void 0:(D.scope=y.isUndefinedOrNull(D.scope)?u:D.scope,D.restricted=y.isUndefinedOrNull(D.restricted)?!!a?.includes(L):D.restricted),m[L].hasOwnProperty("included")&&!m[L].included){this.excludedConfigurationProperties[L]=m[L],delete m[L];continue}else this.configurationProperties[L]=m[L],!((f=m[L].policy)===null||f===void 0)&&f.name&&this.policyConfigurations.set(m[L].policy.name,L);!m[L].deprecationMessage&&m[L].markdownDeprecationMessage&&(m[L].deprecationMessage=m[L].markdownDeprecationMessage),v.add(L)}const C=o.allOf;if(C)for(const L of C)this.validateAndRegisterProperties(L,c,l,a,u,v)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(o){const c=l=>{const a=l.properties;if(a)for(const v in a)this.updateSchema(v,a[v]);const u=l.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}]`,l={type:"object",description:E.localize(2,null),errorMessage:E.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(c,l),e.allSettings.properties[c]=l,e.applicationSettings.properties[c]=l,e.machineSettings.properties[c]=l,e.machineOverridableSettings.properties[c]=l,e.windowSettings.properties[c]=l,e.resourceSettings.properties[c]=l}}registerOverridePropertyPatternKey(){const o={type:"object",description:E.localize(4,null),errorMessage:E.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 l=this.configurationDefaultsOverrides.get(o);let a=l?.value,u=l?.source;y.isUndefined(a)&&(a=c.defaultDefaultValue,u=void 0),y.isUndefined(a)&&(a=s(c.type)),c.default=a,c.defaultValueSource=u}}const n="\\[([^\\]]+)\\]",t=new RegExp(n,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${n})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function i(h){const o=[];if(e.OVERRIDE_PROPERTY_REGEX.test(h)){let c=t.exec(h);for(;c?.length;){const l=c[1].trim();l&&o.push(l),c=t.exec(h)}}return(0,_.distinct)(o)}e.overrideIdentifiersFromKey=i;function s(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=s;const r=new p;S.Registry.add(e.Extensions.Configuration,r);function d(h,o){var c,l,a,u;return h.trim()?e.OVERRIDE_PROPERTY_REGEX.test(h)?E.localize(7,null,h):r.getConfigurationProperties()[h]!==void 0?E.localize(8,null,h):!((c=o.policy)===null||c===void 0)&&c.name&&r.getPolicyConfigurations().get((l=o.policy)===null||l===void 0?void 0:l.name)!==void 0?E.localize(9,null,h,(a=o.policy)===null||a===void 0?void 0:a.name,r.getPolicyConfigurations().get((u=o.policy)===null||u===void 0?void 0:u.name)):null:E.localize(6,null)}e.validateProperty=d}),define(X[231],ee([1,0,41,168,593,91,35]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:y.localize(0,null),scope:5});const b=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:k.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:y.localize(1,null,"`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:y.localize(2,null)},"editor.insertSpaces":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:y.localize(3,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:y.localize(4,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:y.localize(5,null)},"editor.largeFileOptimizations":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:y.localize(6,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:y.localize(7,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[y.localize(8,null),y.localize(9,null),y.localize(10,null)],description:y.localize(11,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[y.localize(12,null),y.localize(13,null),y.localize(14,null)],default:"configuredByTheme",description:y.localize(15,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:y.localize(16,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:y.localize(17,null)},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:y.localize(18,null),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:y.localize(19,null)},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:y.localize(20,null)},"editor.language.brackets":{type:["array","null"],default:null,description:y.localize(21,null),items:{type:"array",items:[{type:"string",description:y.localize(22,null)},{type:"string",description:y.localize(23,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:y.localize(24,null),items:{type:"array",items:[{type:"string",description:y.localize(25,null)},{type:"string",description:y.localize(26,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:y.localize(27,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:y.localize(28,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:y.localize(29,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:y.localize(30,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:y.localize(31,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:y.localize(32,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:y.localize(33,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[y.localize(34,null),y.localize(35,null),y.localize(36,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:"legacy",markdownEnumDescriptions:[y.localize(37,null),y.localize(38,null)],tags:["experimental"]}}});function S(s){return typeof s.type<"u"||typeof s.anyOf<"u"}for(const s of _.editorOptionsRegistry){const r=s.schema;if(typeof r<"u")if(S(r))b.properties[`editor.${s.name}`]=r;else for(const d in r)Object.hasOwnProperty.call(r,d)&&(b.properties[d]=r[d])}let g=null;function p(){return g===null&&(g=Object.create(null),Object.keys(b.properties).forEach(s=>{g[s]=!0})),g}function n(s){return p()[`editor.${s}`]||!1}e.isEditorConfigurationKey=n;function t(s){return p()[`diffEditor.${s}`]||!1}e.isDiffEditorConfigurationKey=t,w.Registry.as(E.Extensions.Configuration).registerConfiguration(b)}),define(X[71],ee([1,0,598,6,35,102,91]),function(K,e,_,k,y,E,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 p=0,n=this._languages.length;p<n;p++)if(this._languages[p]===g){this._languages.splice(p,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=b,e.ModesRegistry=new b,y.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[_.localize(0,null),"text"],mimetypes:[E.Mimes.text]}),y.Registry.as(w.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(X[28],ee([1,0,6,2,9,139,105,121,480,571,481,484,222,8,26,39,50,71,483]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 l=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($=>x.has($)),V=F.change.overrides.filter(([$,M])=>M.some(Q=>x.has(Q))).map(([$])=>$);if(B)this.configurations.clear(),this.onDidChangeEmitter.fire(new c(void 0));else for(const $ of V)this.languageService.isRegisteredLanguageId($)&&(this.configurations.delete($),this.onDidChangeEmitter.fire(new c($)))})),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=a(N,this._registry,this.configurationService,this.languageService),this.configurations.set(N,P)),P}};e.LanguageConfigurationService=l=Me([fe(0,s.IConfigurationService),fe(1,r.ILanguageService)],l);function a(A,N,P,x){let F=N.getLanguageConfiguration(A);if(!F){if(!x.isRegisteredLanguageId(A))return new R(A,{});F=new R(A,{})}const B=v(F.languageId,P),V=D([F.underlyingConfig,B]);return new R(F.languageId,V)}const u={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function v(A,N){const P=N.getValue(u.brackets,{overrideIdentifier:A}),x=N.getValue(u.colorizedBracketPairs,{overrideIdentifier:A});return{brackets:f(P),colorizedBracketPairs:f(x)}}function f(A){if(Array.isArray(A))return A.map(N=>{if(!(!Array.isArray(N)||N.length!==2))return[N[0],N[1]]}).filter(N=>!!N)}function m(A,N,P){const x=A.getLineContent(N);let F=y.getLeadingWhitespace(x);return F.length>P-1&&(F=F.substring(0,P-1)),F}e.getIndentationAtPosition=m;function C(A,N,P){A.tokenization.forceTokenization(N);const x=A.tokenization.getLineTokens(N),F=typeof P>"u"?A.getLineMaxColumn(N)-1:P-1;return(0,b.createScopedLineTokens)(x,F)}e.getScopedLineTokens=C;class L{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),D(this._entries.map(N=>N.configuration)))}}function D(A){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 A)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 L(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 n.OnEnterSupport(this.underlyingConfig):null,this.comments=R._handleComments(this.underlyingConfig),this.characterPair=new S.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||E.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new o.LanguageBracketsConfiguration(N,this.underlyingConfig)}getWordDefinition(){return(0,E.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,l,1)}),define(X[232],ee([1,0,13,2,302,563,5,28,579,51,180,9,16,63,57,11,19,170,104]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const c=60*1e3,l=5*60*1e3;function a(I,T){const O=I.getModel(T);return!(!O||O.isTooLargeForSyncing())}let u=e.EditorWorkerService=class extends k.Disposable{constructor(T,O,R,A,N){super(),this._modelService=T,this._workerManager=this._register(new f(this._modelService,A)),this._logService=R,this._register(N.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(P,x)=>a(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,A)))}dispose(){super.dispose()}canComputeUnicodeHighlights(T){return a(this._modelService,T)}computedUnicodeHighlights(T,O,R){return this._workerManager.withWorker().then(A=>A.computedUnicodeHighlights(T,O,R))}computeDiff(T,O,R,A){return we(this,void 0,void 0,function*(){const N=yield this._workerManager.withWorker().then(x=>x.computeDiff(T,O,R,A));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(!a(this._modelService,T))return Promise.resolve(O);const A=s.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),A.elapsed())),Promise.race([N,(0,_.timeout)(1e3).then(()=>O)])}else return Promise.resolve(void 0)}canNavigateValueSet(T){return a(this._modelService,T)}navigateValueSet(T,O,R){return this._workerManager.withWorker().then(A=>A.navigateValueSet(T,O,R))}canComputeWordRanges(T){return a(this._modelService,T)}computeWordRanges(T,O){return this._workerManager.withWorker().then(R=>R.computeWordRanges(T,O))}};e.EditorWorkerService=u=Me([fe(0,g.IModelService),fe(1,p.ITextResourceConfigurationService),fe(2,i.ILogService),fe(3,b.ILanguageConfigurationService),fe(4,d.ILanguageFeaturesService)],u);class v{constructor(T,O,R,A){this.languageConfigurationService=A,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 A=[];if(R.wordBasedSuggestionsMode==="currentDocument")a(this._modelService,T.uri)&&A.push(T.uri);else for(const $ of this._modelService.getModels())a(this._modelService,$.uri)&&($===T?A.unshift($.uri):(R.wordBasedSuggestionsMode==="allDocuments"||$.getLanguageId()===T.getLanguageId())&&A.push($.uri));if(A.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(A,P?.word,N);if(V)return{duration:V.duration,suggestions:V.words.map($=>({kind:18,label:$,insertText:$,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(l/2)),this._register(this._modelService.onModelRemoved(A=>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>l&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new D(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class m 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 A=new _.IntervalTimer;A.cancelAndSet(()=>this._checkStopModelSync(),Math.round(c/2)),this._register(A)}}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 A=R.toString();this._syncedModels[A]||this._beginModelSync(R,O),this._syncedModels[A]&&(this._syncedModelsLastUsedTime[A]=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 A=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(A.toString(),P)})),N.add(R.onWillDispose(()=>{this._stopModelSync(A)})),N.add((0,k.toDisposable)(()=>{this._proxy.acceptRemovedModel(A)})),this._syncedModels[A]=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 L{constructor(T){this._workerClient=T}fhr(T,O){return this._workerClient.fhr(T,O)}}e.EditorWorkerHost=L;class D extends k.Disposable{constructor(T,O,R,A){super(),this.languageConfigurationService=A,this._disposed=!1,this._modelService=T,this._keepIdleModels=O,this._workerFactory=new E.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 y.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new L(this)))}catch(T){(0,y.logOnceWebWorkerWarning)(T),this._worker=new C(new S.EditorSimpleWorker(new L(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,T=>((0,y.logOnceWebWorkerWarning)(T),this._worker=new C(new S.EditorSimpleWorker(new L(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(T){return this._modelManager||(this._modelManager=this._register(new m(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(A=>A.computeUnicodeHighlights(T.toString(),O,R))}computeDiff(T,O,R,A){return this._withSyncedResources([T,O],!0).then(N=>N.computeDiff(T.toString(),O.toString(),R,A))}computeMoreMinimalEdits(T,O,R){return this._withSyncedResources([T]).then(A=>A.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 A=yield this._withSyncedResources(T),N=R.source,P=(0,n.regExpFlags)(R);return A.textualSuggest(T.map(x=>x.toString()),O,N,P)})}computeWordRanges(T,O){return this._withSyncedResources([T]).then(R=>{const A=this._modelService.getModel(T);if(!A)return Promise.resolve(null);const N=this.languageConfigurationService.getLanguageConfiguration(A.getLanguageId()).getWordDefinition(),P=N.source,x=(0,n.regExpFlags)(N);return R.computeWordRanges(T.toString(),O,P,x)})}navigateValueSet(T,O,R){return this._withSyncedResources([T]).then(A=>{const N=this._modelService.getModel(T);if(!N)return null;const P=this.languageConfigurationService.getLanguageConfiguration(N.getLanguageId()).getWordDefinition(),x=P.source,F=(0,n.regExpFlags)(P);return A.navigateValueSet(T.toString(),O,R,x,F)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=D}),define(X[744],ee([1,0,45,232]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function y(w,b,S){return new E(w,b,S)}e.createWebWorker=y;class E 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 p=(i,s)=>b.fmr(i,s),n=(i,s)=>function(){const r=Array.prototype.slice.call(arguments,0);return s(i,r)},t={};for(const i of g)t[i]=n(i,p);return t})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(b){return this._withSyncedResources(b).then(S=>this.getProxy())}}}),define(X[233],ee([1,0,9,105,121,28]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndentMetadata=e.getIndentActionForType=e.getIndentForEnter=e.getGoodIndentForLine=e.getInheritIndentForLine=void 0;function w(t,i,s){const r=t.tokenization.getLanguageIdAtPosition(i,0);if(i>1){let 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(s.shouldIgnore(o)||/^\s+$/.test(o)||o===""){h=d;continue}return d}}return-1}function b(t,i,s,r=!0,d){if(t<4)return null;const h=d.getLanguageConfiguration(i.tokenization.getLanguageId()).indentRulesSupport;if(!h)return null;if(s<=1)return{indentation:"",action:null};for(let l=s-1;l>0&&i.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};const o=w(i,s,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 l=o-1,a=h.getIndentMetadata(i.getLineContent(l));if(!(a&3)&&a&4){let u=0;for(let v=l-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 m=u-1;m>0;m--)if(!h.shouldIndentNextLine(i.getLineContent(u))){f=m;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,s,r,d,h){if(t<4)return null;const o=h.getLanguageConfiguration(s);if(!o)return null;const c=h.getLanguageConfiguration(s).indentRulesSupport;if(!c)return null;const l=b(t,i,r,void 0,h),a=i.getLineContent(r);if(l){const u=l.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 m=_.getLeadingWhitespace(i.getLineContent(u));return f.removeText&&(m=m.substring(0,m.length-f.removeText)),f.indentAction===k.IndentAction.Indent||f.indentAction===k.IndentAction.IndentOutdent?m=d.shiftIndent(m):f.indentAction===k.IndentAction.Outdent&&(m=d.unshiftIndent(m)),c.shouldDecrease(a)&&(m=d.unshiftIndent(m)),f.appendText&&(m+=f.appendText),_.getLeadingWhitespace(m)}}}return c.shouldDecrease(a)?l.action===k.IndentAction.Indent?l.indentation:d.unshiftIndent(l.indentation):l.action===k.IndentAction.Indent?d.shiftIndent(l.indentation):l.indentation}return null}e.getGoodIndentForLine=S;function g(t,i,s,r,d){if(t<4)return null;i.tokenization.forceTokenization(s.startLineNumber);const h=i.tokenization.getLineTokens(s.startLineNumber),o=(0,y.createScopedLineTokens)(h,s.startColumn-1),c=o.getLineContent();let l=!1,a;o.firstCharOffset>0&&h.getLanguageId(0)!==o.languageId?(l=!0,a=c.substr(0,s.startColumn-1-o.firstCharOffset)):a=h.getLineContent().substring(0,s.startColumn-1);let u;s.isEmpty()?u=c.substr(s.startColumn-1-o.firstCharOffset):u=(0,E.getScopedLineTokens)(i,s.endLineNumber,s.endColumn).getLineContent().substr(s.endColumn-1-o.firstCharOffset);const v=d.getLanguageConfiguration(o.languageId).indentRulesSupport;if(!v)return null;const f=a,m=_.getLeadingWhitespace(a),C={tokenization:{getLineTokens:T=>i.tokenization.getLineTokens(T),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(T,O)=>i.getLanguageIdAtPosition(T,O)},getLineContent:T=>T===s.startLineNumber?f:i.getLineContent(T)},L=_.getLeadingWhitespace(h.getLineContent()),D=b(t,C,s.startLineNumber+1,void 0,d);if(!D){const T=l?L:m;return{beforeEnter:T,afterEnter:T}}let I=l?L:D.indentation;return D.action===k.IndentAction.Indent&&(I=r.shiftIndent(I)),v.shouldDecrease(u)&&(I=r.unshiftIndent(I)),{beforeEnter:l?L:m,afterEnter:I}}e.getIndentForEnter=g;function p(t,i,s,r,d,h){if(t<4)return null;const o=(0,E.getScopedLineTokens)(i,s.startLineNumber,s.startColumn);if(o.firstCharOffset)return null;const c=h.getLanguageConfiguration(o.languageId).indentRulesSupport;if(!c)return null;const l=o.getLineContent(),a=l.substr(0,s.startColumn-1-o.firstCharOffset);let u;if(s.isEmpty()?u=l.substr(s.startColumn-1-o.firstCharOffset):u=(0,E.getScopedLineTokens)(i,s.endLineNumber,s.endColumn).getLineContent().substr(s.endColumn-1-o.firstCharOffset),!c.shouldDecrease(a+u)&&c.shouldDecrease(a+r+u)){const v=b(t,i,s.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=p;function n(t,i,s){const r=s.getLanguageConfiguration(t.getLanguageId()).indentRulesSupport;return!r||i<1||i>t.getLineCount()?null:r.getIndentMetadata(t.getLineContent(i))}e.getIndentMetadata=n}),define(X[234],ee([1,0,105,28]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function y(E,w,b,S){const g=(0,k.getScopedLineTokens)(w,b.startLineNumber,b.startColumn),p=S.getLanguageConfiguration(g.languageId);if(!p)return null;const n=g.getLineContent(),t=n.substr(0,b.startColumn-1-g.firstCharOffset);let i;b.isEmpty()?i=n.substr(b.startColumn-1-g.firstCharOffset):i=(0,k.getScopedLineTokens)(w,b.endLineNumber,b.endColumn).getLineContent().substr(b.endColumn-1-g.firstCharOffset);let s="";if(b.startLineNumber>1&&g.firstCharOffset===0){const l=(0,k.getScopedLineTokens)(w,b.startLineNumber-1);l.languageId===g.languageId&&(s=l.getLineContent())}const r=p.onEnter(E,s,t,i);if(!r)return null;const d=r.indentAction;let h=r.appendText;const o=r.removeText||0;h?d===_.IndentAction.Indent&&(h=" "+h):d===_.IndentAction.Indent||d===_.IndentAction.IndentOutdent?h=" ":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=y}),define(X[235],ee([1,0,9,76,5,23,234,28]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=void 0;const S=Object.create(null);function g(n,t){if(t<=0)return"";S[n]||(S[n]=["",n]);const i=S[n];for(let s=i.length;s<=t;s++)i[s]=i[s-1]+n;return i[t]}let p=e.ShiftCommand=class li{static unshiftIndent(t,i,s,r,d){const h=k.CursorColumns.visibleColumnFromColumn(t,i,s);if(d){const o=g(" ",r),l=k.CursorColumns.prevIndentTabStop(h,r)/r;return g(o,l)}else{const o=" ",l=k.CursorColumns.prevRenderTabStop(h,s)/s;return g(o,l)}}static shiftIndent(t,i,s,r,d){const h=k.CursorColumns.visibleColumnFromColumn(t,i,s);if(d){const o=g(" ",r),l=k.CursorColumns.nextIndentTabStop(h,r)/r;return g(o,l)}else{const o=" ",l=k.CursorColumns.nextRenderTabStop(h,s)/s;return g(o,l)}}constructor(t,i,s){this._languageConfigurationService=s,this._opts=i,this._selection=t,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(t,i,s){this._useLastEditRangeForCursorEndPosition?t.addTrackedEditOperation(i,s):t.addEditOperation(i,s)}getEditOperations(t,i){const s=this._selection.startLineNumber;let r=this._selection.endLineNumber;this._selection.endColumn===1&&s!==r&&(r=r-1);const{tabSize:d,indentSize:h,insertSpaces:o}=this._opts,c=s===r;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,a=0;for(let u=s;u<=r;u++,l=a){a=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 L=(0,w.getEnterAction)(this._opts.autoIndent,t,new y.Range(u-1,t.getLineMaxColumn(u-1),u-1,t.getLineMaxColumn(u-1)),this._languageConfigurationService);if(L){if(a=l,L.appendText)for(let D=0,I=L.appendText.length;D<I&&a<h&&L.appendText.charCodeAt(D)===32;D++)a++;L.removeText&&(a=Math.max(0,a-L.removeText));for(let D=0;D<a&&!(f===0||v.charCodeAt(f-1)!==32);D++)f--}}if(this._opts.isUnshift&&f===0)continue;let m;this._opts.isUnshift?m=li.unshiftIndent(v,f+1,d,h,o):m=li.shiftIndent(v,f+1,d,h,o),this._addEditOperation(i,new y.Range(u,1,u,f+1),m),u===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=f+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&t.getLineLength(s)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const l=o?g(" ",h):" ";for(let a=s;a<=r;a++){const u=t.getLineContent(a);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 y.Range(a,1,a,v+1),"")}else this._addEditOperation(i,new y.Range(a,1,a,1),l),a===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(t,i){if(this._useLastEditRangeForCursorEndPosition){const r=i.getInverseEditOperations()[0];return new E.Selection(r.range.endLineNumber,r.range.endColumn,r.range.endLineNumber,r.range.endColumn)}const s=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const r=this._selection.startColumn;return s.startColumn<=r?s:s.getDirection()===0?new E.Selection(s.startLineNumber,r,s.endLineNumber,s.endColumn):new E.Selection(s.endLineNumber,s.endColumn,s.startLineNumber,r)}return s}};e.ShiftCommand=p=Me([fe(2,b.ILanguageConfigurationService)],p)}),define(X[236],ee([1,0,11,9,119,235,465,66,138,5,12,105,28,121,233,234]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class d{static indent(f,m,C){if(m===null||C===null)return[];const L=[];for(let D=0,I=C.length;D<I;D++)L[D]=new E.ShiftCommand(C[D],{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService);return L}static outdent(f,m,C){const L=[];for(let D=0,I=C.length;D<I;D++)L[D]=new E.ShiftCommand(C[D],{isUnshift:!0,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService);return L}static shiftIndent(f,m,C){return C=C||1,E.ShiftCommand.shiftIndent(m,m.length+C,f.tabSize,f.indentSize,f.insertSpaces)}static unshiftIndent(f,m,C){return C=C||1,E.ShiftCommand.unshiftIndent(m,m.length+C,f.tabSize,f.indentSize,f.insertSpaces)}static _distributedPaste(f,m,C,L){const D=[];for(let I=0,T=C.length;I<T;I++)D[I]=new y.ReplaceCommand(C[I],L[I]);return new b.EditOperationResult(0,D,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(f,m,C,L,D){const I=[];for(let T=0,O=C.length;T<O;T++){const R=C[T],A=R.getPosition();if(D&&!R.isEmpty()&&(D=!1),D&&L.indexOf(`
- `)!==L.length-1&&(D=!1),D){const N=new g.Range(A.lineNumber,1,A.lineNumber,1);I[T]=new y.ReplaceCommandThatPreservesSelection(N,L,R,!0)}else I[T]=new y.ReplaceCommand(R,L)}return new b.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(f,m,C,L,D){if(L||m.length===1)return null;if(D&&D.length===m.length)return D;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===m.length)return I}return null}static paste(f,m,C,L,D,I){const T=this._distributePasteToCursors(f,C,L,D,I);return T?(C=C.sort(g.Range.compareRangesUsingStarts),this._distributedPaste(f,m,C,T)):this._simplePaste(f,m,C,L,D)}static _goodIndentForLine(f,m,C){let L=null,D="";const I=(0,s.getInheritIndentForLine)(f.autoIndent,m,C,!1,f.languageConfigurationService);if(I)L=I.action,D=I.indentation;else if(C>1){let T;for(T=C-1;T>=1;T--){const A=m.getLineContent(T);if(k.lastNonWhitespaceIndex(A)>=0)break}if(T<1)return null;const O=m.getLineMaxColumn(T),R=(0,r.getEnterAction)(f.autoIndent,m,new g.Range(T,O,T,O),f.languageConfigurationService);R&&(D=R.indentation+R.appendText)}return L&&(L===n.IndentAction.Indent&&(D=d.shiftIndent(f,D)),L===n.IndentAction.Outdent&&(D=d.unshiftIndent(f,D)),D=f.normalizeIndentation(D)),D||null}static _replaceJumpToNextIndent(f,m,C,L){let D="";const I=C.getStartPosition();if(f.insertSpaces){const T=f.visibleColumnFromColumn(m,I),O=f.indentSize,R=O-T%O;for(let A=0;A<R;A++)D+=" "}else D=" ";return new y.ReplaceCommand(C,D,L)}static tab(f,m,C){const L=[];for(let D=0,I=C.length;D<I;D++){const T=C[D];if(T.isEmpty()){const O=m.getLineContent(T.startLineNumber);if(/^\s*$/.test(O)&&m.tokenization.isCheapToTokenize(T.startLineNumber)){let R=this._goodIndentForLine(f,m,T.startLineNumber);R=R||" ";const A=f.normalizeIndentation(R);if(!O.startsWith(A)){L[D]=new y.ReplaceCommand(new g.Range(T.startLineNumber,1,T.startLineNumber,O.length+1),A,!0);continue}}L[D]=this._replaceJumpToNextIndent(f,m,T,!0)}else{if(T.startLineNumber===T.endLineNumber){const O=m.getLineMaxColumn(T.startLineNumber);if(T.startColumn!==1||T.endColumn!==O){L[D]=this._replaceJumpToNextIndent(f,m,T,!1);continue}}L[D]=new E.ShiftCommand(T,{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService)}}return L}static compositionType(f,m,C,L,D,I,T,O){const R=L.map(A=>this._compositionType(C,A,D,I,T,O));return new b.EditOperationResult(4,R,{shouldPushStackElementBefore:l(f,4),shouldPushStackElementAfter:!1})}static _compositionType(f,m,C,L,D,I){if(!m.isEmpty())return null;const T=m.getPosition(),O=Math.max(1,T.column-L),R=Math.min(f.getLineMaxColumn(T.lineNumber),T.column+D),A=new g.Range(T.lineNumber,O,T.lineNumber,R);return f.getValueInRange(A)===C&&I===0?null:new y.ReplaceCommandWithOffsetCursorState(A,C,0,I)}static _typeCommand(f,m,C){return C?new y.ReplaceCommandWithoutChangingPosition(f,m,!0):new y.ReplaceCommand(f,m,!0)}static _enter(f,m,C,L){if(f.autoIndent===0)return d._typeCommand(L,`
- `,C);if(!m.tokenization.isCheapToTokenize(L.getStartPosition().lineNumber)||f.autoIndent===1){const O=m.getLineContent(L.startLineNumber),R=k.getLeadingWhitespace(O).substring(0,L.startColumn-1);return d._typeCommand(L,`
- `+f.normalizeIndentation(R),C)}const D=(0,r.getEnterAction)(f.autoIndent,m,L,f.languageConfigurationService);if(D){if(D.indentAction===n.IndentAction.None)return d._typeCommand(L,`
- `+f.normalizeIndentation(D.indentation+D.appendText),C);if(D.indentAction===n.IndentAction.Indent)return d._typeCommand(L,`
- `+f.normalizeIndentation(D.indentation+D.appendText),C);if(D.indentAction===n.IndentAction.IndentOutdent){const O=f.normalizeIndentation(D.indentation),R=f.normalizeIndentation(D.indentation+D.appendText),A=`
- `+R+`
- `+O;return C?new y.ReplaceCommandWithoutChangingPosition(L,A,!0):new y.ReplaceCommandWithOffsetCursorState(L,A,-1,R.length-O.length,!0)}else if(D.indentAction===n.IndentAction.Outdent){const O=d.unshiftIndent(f,D.indentation);return d._typeCommand(L,`
- `+f.normalizeIndentation(O+D.appendText),C)}}const I=m.getLineContent(L.startLineNumber),T=k.getLeadingWhitespace(I).substring(0,L.startColumn-1);if(f.autoIndent>=4){const O=(0,s.getIndentForEnter)(f.autoIndent,m,L,{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(m,L.getEndPosition());const A=L.endColumn,N=m.getLineContent(L.endLineNumber),P=k.firstNonWhitespaceIndex(N);if(P>=0?L=L.setEndPosition(L.endLineNumber,Math.max(L.endColumn,P+1)):L=L.setEndPosition(L.endLineNumber,m.getLineMaxColumn(L.endLineNumber)),C)return new y.ReplaceCommandWithoutChangingPosition(L,`
- `+f.normalizeIndentation(O.afterEnter),!0);{let x=0;return A<=P+1&&(f.insertSpaces||(R=Math.ceil(R/f.indentSize)),x=Math.min(R+1-f.normalizeIndentation(O.afterEnter).length-1,0)),new y.ReplaceCommandWithOffsetCursorState(L,`
- `+f.normalizeIndentation(O.afterEnter),0,x,!0)}}}return d._typeCommand(L,`
- `+f.normalizeIndentation(T),C)}static _isAutoIndentType(f,m,C){if(f.autoIndent<4)return!1;for(let L=0,D=C.length;L<D;L++)if(!m.tokenization.isCheapToTokenize(C[L].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(f,m,C,L){const D=(0,t.getIndentationAtPosition)(m,C.startLineNumber,C.startColumn),I=(0,s.getIndentActionForType)(f.autoIndent,m,C,L,{shiftIndent:T=>d.shiftIndent(f,T),unshiftIndent:T=>d.unshiftIndent(f,T)},f.languageConfigurationService);if(I===null)return null;if(I!==f.normalizeIndentation(D)){const T=m.getLineFirstNonWhitespaceColumn(C.startLineNumber);return T===0?d._typeCommand(new g.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),f.normalizeIndentation(I)+L,!1):d._typeCommand(new g.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),f.normalizeIndentation(I)+m.getLineContent(C.startLineNumber).substring(T-1,C.startColumn-1)+L,!1)}return null}static _isAutoClosingOvertype(f,m,C,L,D){if(f.autoClosingOvertype==="never"||!f.autoClosingPairs.autoClosingPairsCloseSingleChar.has(D))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(),A=m.getLineContent(R.lineNumber);if(A.charAt(R.column-1)!==D)return!1;const P=(0,b.isQuote)(D);if((R.column>2?A.charCodeAt(R.column-2):0)===92&&P)return!1;if(f.autoClosingOvertype==="auto"){let F=!1;for(let B=0,V=L.length;B<V;B++){const $=L[B];if(R.lineNumber===$.startLineNumber&&R.column===$.startColumn){F=!0;break}}if(!F)return!1}}return!0}static _runAutoClosingOvertype(f,m,C,L,D){const I=[];for(let T=0,O=L.length;T<O;T++){const A=L[T].getPosition(),N=new g.Range(A.lineNumber,A.column,A.lineNumber,A.column+1);I[T]=new y.ReplaceCommand(N,D)}return new b.EditOperationResult(4,I,{shouldPushStackElementBefore:l(f,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(f,m){const C=m.charAt(0),L=f.autoClosingPairs.autoClosingPairsOpenByStart.get(C)||[],D=f.autoClosingPairs.autoClosingPairsCloseByStart.get(C)||[],I=L.some(O=>m.startsWith(O.open)),T=D.some(O=>m.startsWith(O.close));return!I&&T}static _findAutoClosingPairOpen(f,m,C,L){const D=f.autoClosingPairs.autoClosingPairsOpenByEnd.get(L);if(!D)return null;let I=null;for(const T of D)if(I===null||T.open.length>I.open.length){let O=!0;for(const R of C)if(m.getValueInRange(new g.Range(R.lineNumber,R.column-T.open.length+1,R.lineNumber,R.column))+L!==T.open){O=!1;break}O&&(I=T)}return I}static _findContainedAutoClosingPair(f,m){if(m.open.length<=1)return null;const C=m.close.charAt(m.close.length-1),L=f.autoClosingPairs.autoClosingPairsCloseByEnd.get(C)||[];let D=null;for(const I of L)I.open!==m.open&&m.open.includes(I.open)&&m.close.endsWith(I.close)&&(!D||I.open.length>D.open.length)&&(D=I);return D}static _getAutoClosingPairClose(f,m,C,L,D){const I=(0,b.isQuote)(L),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 D?{lineNumber:B.lineNumber,beforeColumn:B.column-L.length,afterColumn:B.column}:{lineNumber:B.lineNumber,beforeColumn:B.column,afterColumn:B.column}}),A=this._findAutoClosingPairOpen(f,m,R.map(F=>new p.Position(F.lineNumber,F.beforeColumn)),L);if(!A)return null;const N=this._findContainedAutoClosingPair(f,A),P=N?N.close:"";let x=!0;for(const F of R){const{lineNumber:B,beforeColumn:V,afterColumn:$}=F,M=m.getLineContent(B),Q=M.substring(0,V-1),ie=M.substring($-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(A.open.length===1&&(L==="'"||L==='"')&&T!=="always"){const H=(0,S.getMapForWordSeparators)(f.wordSeparators);if(Q.length>0){const W=Q.charCodeAt(Q.length-1);if(H.get(W)===0)return null}}if(!m.tokenization.isCheapToTokenize(B))return null;m.tokenization.forceTokenization(B);const re=m.tokenization.getLineTokens(B),ne=(0,i.createScopedLineTokens)(re,V-1);if(!A.shouldAutoClose(ne,V-ne.firstCharOffset))return null;const se=A.findNeutralCharacter();if(se){const H=m.tokenization.getTokenTypeIfInsertingCharacter(B,V,se);if(!A.isOK(H))return null}}return x?A.close.substring(0,A.close.length-P.length):A.close}static _runAutoClosingOpenCharType(f,m,C,L,D,I,T){const O=[];for(let R=0,A=L.length;R<A;R++){const N=L[R];O[R]=new h(N,D,!I,T)}return new b.EditOperationResult(4,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(f,m){return(0,b.isQuote)(m)?f.autoSurround==="quotes"||f.autoSurround==="languageDefined":f.autoSurround==="brackets"||f.autoSurround==="languageDefined"}static _isSurroundSelectionType(f,m,C,L){if(!d._shouldSurroundChar(f,L)||!f.surroundingPairs.hasOwnProperty(L))return!1;const D=(0,b.isQuote)(L);for(const I of C){if(I.isEmpty())return!1;let T=!0;for(let O=I.startLineNumber;O<=I.endLineNumber;O++){const R=m.getLineContent(O),A=O===I.startLineNumber?I.startColumn-1:0,N=O===I.endLineNumber?I.endColumn-1:R.length,P=R.substring(A,N);if(/[^ \t]/.test(P)){T=!1;break}}if(T)return!1;if(D&&I.startLineNumber===I.endLineNumber&&I.startColumn+1===I.endColumn){const O=m.getValueInRange(I);if((0,b.isQuote)(O))return!1}}return!0}static _runSurroundSelectionType(f,m,C,L,D){const I=[];for(let T=0,O=L.length;T<O;T++){const R=L[T],A=m.surroundingPairs[D];I[T]=new w.SurroundSelectionCommand(R,D,A)}return new b.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(f,m,C){return!!(C.length===1&&m.tokenization.isCheapToTokenize(C[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(f,m,C,L,D){if(!m.electricChars.hasOwnProperty(D)||!L.isEmpty())return null;const I=L.getPosition();C.tokenization.forceTokenization(I.lineNumber);const T=C.tokenization.getLineTokens(I.lineNumber);let O;try{O=m.onElectricCharacter(D,T,I.column)}catch(R){return(0,_.onUnexpectedError)(R),null}if(!O)return null;if(O.matchOpenBracket){const R=(T.getLineContent()+D).lastIndexOf(O.matchOpenBracket)+1,A=C.bracketPairs.findMatchingBracketUp(O.matchOpenBracket,{lineNumber:I.lineNumber,column:R},500);if(A){if(A.startLineNumber===I.lineNumber)return null;const N=C.getLineContent(A.startLineNumber),P=k.getLeadingWhitespace(N),x=m.normalizeIndentation(P),F=C.getLineContent(I.lineNumber),B=C.getLineFirstNonWhitespaceColumn(I.lineNumber)||I.column,V=F.substring(B-1,I.column-1),$=x+V+D,M=new g.Range(I.lineNumber,1,I.lineNumber,I.column),Q=new y.ReplaceCommand(M,$);return new b.EditOperationResult(c($,f),[Q],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(f,m,C,L,D,I){if(!L)return null;let T=null;for(const N of L)if(T===null)T=N.insertedText;else if(T!==N.insertedText)return null;if(!T||T.length!==1)return null;const O=T;let R=!1;for(const N of L)if(N.deletedText.length!==0){R=!0;break}if(R){if(!d._shouldSurroundChar(m,O)||!m.surroundingPairs.hasOwnProperty(O))return null;const N=(0,b.isQuote)(O);for(const F of L)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 D){if(!F.isEmpty())return null;P.push(F.getPosition())}if(P.length!==L.length)return null;const x=[];for(let F=0,B=P.length;F<B;F++)x.push(new w.CompositionSurroundSelectionCommand(P[F],L[F].deletedText,m.surroundingPairs[O]));return new b.EditOperationResult(4,x,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(m,C,D,I,O)){const N=D.map(P=>new y.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 A=this._getAutoClosingPairClose(m,C,D,O,!0);return A!==null?this._runAutoClosingOpenCharType(f,m,C,D,O,!0,A):null}static typeWithInterceptors(f,m,C,L,D,I,T){if(!f&&T===`
- `){const A=[];for(let N=0,P=D.length;N<P;N++)A[N]=d._enter(C,L,!1,D[N]);return new b.EditOperationResult(4,A,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!f&&this._isAutoIndentType(C,L,D)){const A=[];let N=!1;for(let P=0,x=D.length;P<x;P++)if(A[P]=this._runAutoIndentType(C,L,D[P],T),!A[P]){N=!0;break}if(!N)return new b.EditOperationResult(4,A,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(C,L,D,I,T))return this._runAutoClosingOvertype(m,C,L,D,T);if(!f){const A=this._getAutoClosingPairClose(C,L,D,T,!1);if(A)return this._runAutoClosingOpenCharType(m,C,L,D,T,!1,A)}if(!f&&this._isSurroundSelectionType(C,L,D,T))return this._runSurroundSelectionType(m,C,L,D,T);if(!f&&this._isTypeInterceptorElectricChar(C,L,D)){const A=this._typeInterceptorElectricChar(m,C,L,D[0],T);if(A)return A}const O=[];for(let A=0,N=D.length;A<N;A++)O[A]=new y.ReplaceCommand(D[A],T);const R=c(T,m);return new b.EditOperationResult(R,O,{shouldPushStackElementBefore:l(m,R),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(f,m,C,L,D){const I=[];for(let O=0,R=L.length;O<R;O++)I[O]=new y.ReplaceCommand(L[O],D);const T=c(D,f);return new b.EditOperationResult(T,I,{shouldPushStackElementBefore:l(f,T),shouldPushStackElementAfter:!1})}static lineInsertBefore(f,m,C){if(m===null||C===null)return[];const L=[];for(let D=0,I=C.length;D<I;D++){let T=C[D].positionLineNumber;if(T===1)L[D]=new y.ReplaceCommandWithoutChangingPosition(new g.Range(1,1,1,1),`
- `);else{T--;const O=m.getLineMaxColumn(T);L[D]=this._enter(f,m,!1,new g.Range(T,O,T,O))}}return L}static lineInsertAfter(f,m,C){if(m===null||C===null)return[];const L=[];for(let D=0,I=C.length;D<I;D++){const T=C[D].positionLineNumber,O=m.getLineMaxColumn(T);L[D]=this._enter(f,m,!1,new g.Range(T,O,T,O))}return L}static lineBreakInsert(f,m,C){const L=[];for(let D=0,I=C.length;D<I;D++)L[D]=this._enter(f,m,!0,C[D]);return L}}e.TypeOperations=d;class h extends y.ReplaceCommandWithOffsetCursorState{constructor(f,m,C,L){super(f,(C?m:"")+L,0,-L.length),this._openCharacter=m,this._closeCharacter=L,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(f,m){const L=m.getInverseEditOperations()[0].range;return this.closeCharacterRange=new g.Range(L.startLineNumber,L.endColumn-this._closeCharacter.length,L.endLineNumber,L.endColumn),this.enclosingRange=new g.Range(L.startLineNumber,L.endColumn-this._openCharacter.length-this._closeCharacter.length,L.endLineNumber,L.endColumn),super.computeCursorState(f,m)}}e.TypeWithAutoClosingCommand=h;class o{constructor(f,m,C,L,D,I){this.deletedText=f,this.deletedSelectionStart=m,this.deletedSelectionEnd=C,this.insertedText=L,this.insertedSelectionStart=D,this.insertedSelectionEnd=I}}e.CompositionOutcome=o;function c(v,f){return v===" "?f===5||f===6?6:5:4}function l(v,f){return u(v)&&!u(f)?!0:v===5?!1:a(v)!==a(f)}function a(v){return v===6||v===5?"space":v}function u(v){return v===4||v===5||v===6}}),define(X[745],ee([1,0,11,9,479,66,466,194,236,5,23,106,202,2,223]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class r extends i.Disposable{constructor(u,v,f,m){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,m),this._cursors=new y.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,i.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(u){this.context=new w.CursorContext(this._model,this._viewModel,this._coordinatesConverter,u),this._cursors.updateContext(this.context)}onLineMappingChanged(u){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(u,"viewModel",0,this.getCursorStates())}setHasFocus(u){this._hasFocus=u}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const u=this._cursors.getSelections();for(let 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,m){let C=!1;const L=this.context.cursorConfig.multiCursorLimit;m!==null&&m.length>L&&(m=m.slice(0,L),C=!0);const D=d.from(this._model,this);return this._cursors.setStates(m),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(u,v,f,D,C)}setCursorColumnSelectData(u){this._columnSelectData=u}revealPrimary(u,v,f,m,C,L){const D=this._cursors.getViewPositions();let I=null,T=null;D.length>1?T=this._cursors.getViewSelections():I=g.Range.fromPositions(D[0],D[0]),u.emitViewEvent(new t.ViewRevealRangeRequestEvent(v,f,I,T,m,C,L))}saveState(){const u=[],v=this._cursors.getSelections();for(let f=0,m=v.length;f<m;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 m=0,C=v.length;m<C;m++){const L=v[m];let D=1,I=1;L.position&&L.position.lineNumber&&(D=L.position.lineNumber),L.position&&L.position.column&&(I=L.position.column);let T=D,O=I;L.selectionStart&&L.selectionStart.lineNumber&&(T=L.selectionStart.lineNumber),L.selectionStart&&L.selectionStart.column&&(O=L.selectionStart.column),f.push({selectionStartLineNumber:T,selectionStartColumn:O,positionLineNumber:D,positionColumn:I})}this.setStates(u,"restoreState",0,E.CursorState.fromModelSelections(f)),this.revealPrimary(u,"restoreState",!1,0,!0,1)}onModelContentChanged(u,v){if(v instanceof n.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(u,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const f=v.rawContentChangedEvent;if(this._knownModelVersionId=f.versionId,this._isHandling)return;const m=f.containsEvent(1);if(this._prevEditOperationType=0,m)this._cursors.dispose(),this._cursors=new y.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(u,"model",1,null,!1);else if(this._hasFocus&&f.resultingSelection&&f.resultingSelection.length>0){const C=E.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,E.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,m){this.setStates(u,v,m,E.CursorState.fromModelSelections(f))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(u){this._prevEditOperationType=u}_pushAutoClosedAction(u,v){const f=[],m=[];for(let D=0,I=u.length;D<I;D++)f.push({range:u[D],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),m.push({range:v[D],options:{description:"auto-closed-enclosing",stickiness:1}});const C=this._model.deltaDecorations([],f),L=this._model.deltaDecorations([],m);this._autoClosedActions.push(new h(this._model,C,L))}_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=[],m=[];for(let C=0;C<u.commands.length;C++){const L=u.commands[C];L instanceof S.TypeWithAutoClosingCommand&&L.enclosingRange&&L.closeCharacterRange&&(f.push(L.closeCharacterRange),m.push(L.enclosingRange))}f.length>0&&this._pushAutoClosedAction(f,m),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,m,C){const L=d.from(this._model,this);if(L.equals(m))return!1;const D=this._cursors.getSelections(),I=this._cursors.getViewSelections();if(u.emitViewEvent(new t.ViewCursorStateChangedEvent(I,D,f)),!m||m.cursorState.length!==L.cursorState.length||L.cursorState.some((T,O)=>!T.modelState.equals(m.cursorState[O].modelState))){const T=m?m.cursorState.map(R=>R.modelState.selection):null,O=m?m.modelVersionId:0;u.emitOutgoingEvent(new s.CursorStateChangedEvent(T,D,O,L.modelVersionId,v||"keyboard",f,C))}return!0}_findAutoClosingPairs(u){if(!u.length)return null;const v=[];for(let f=0,m=u.length;f<m;f++){const C=u[f];if(!C.text||C.text.indexOf(`
- `)>=0)return null;const L=C.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!L)return null;const D=L[1],I=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(D);if(!I||I.length!==1)return null;const T=I[0].open,O=C.text.length-L[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,m){let C=null;v==="snippet"&&(C=this._findAutoClosingPairs(f)),C&&(f[0]._isTracked=!0);const L=[],D=[],I=this._model.pushEditOperations(this.getSelections(),f,T=>{if(C)for(let R=0,A=C.length;R<A;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;L.push(new g.Range(F,V+1,F,V+2)),D.push(new g.Range(F,B+1,F,V+2))}const O=m(T);return O&&(this._isHandling=!0),O});I&&(this._isHandling=!1,this.setSelections(u,v,I,0)),L.length>0&&this._pushAutoClosedAction(L,D)}_executeEdit(u,v,f,m=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(L){(0,_.onUnexpectedError)(L)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(v,f,m,C,!1)&&this.revealPrimary(v,f,!1,0,!0,0)}getAutoClosedCharacters(){return h.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(u){this._compositionState=new l(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 m=v.length;let C=0;for(;C<m;){const L=k.nextCharLength(v,C),D=v.substr(C,L);this._executeEditOperation(S.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),D)),C+=L}}else this._executeEditOperation(S.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),v))},u,f)}compositionType(u,v,f,m,C,L){if(v.length===0&&f===0&&m===0){if(C!==0){const D=this.getSelections().map(I=>{const T=I.getPosition();return new p.Selection(T.lineNumber,T.column+C,T.lineNumber,T.column+C)});this.setSelections(u,L,D,0)}return}this._executeEdit(()=>{this._executeEditOperation(S.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),v,f,m,C))},u,L)}paste(u,v,f,m,C){this._executeEdit(()=>{this._executeEditOperation(S.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),v,f,m||[]))},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 E.EditOperationResult(0,[v],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},u,f)}executeCommands(u,v,f){this._executeEdit(()=>{this._executeEditOperation(new E.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 m=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[f]);if(m&&(v.push(m),m.startLineNumber!==m.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 m={model:u,selectionsBefore:v,trackedRanges:[],trackedRangesDirection:[]},C=this._innerExecuteCommands(m,f);for(let L=0,D=m.trackedRanges.length;L<D;L++)m.model._setTrackedRange(m.trackedRanges[L],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 m=f.operations,C=this._getLoserCursorMap(m);if(C.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const L=[];for(let T=0,O=m.length;T<O;T++)C.hasOwnProperty(m[T].identifier.major.toString())||L.push(m[T]);f.hadTrackedEditOperation&&L.length>0&&(L[0]._isTracked=!0);let D=u.model.pushEditOperations(u.selectionsBefore,L,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,A=[];for(let N=0;N<u.selectionsBefore.length;N++)O[N].length>0?(O[N].sort(R),A[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 p.Selection(F.startLineNumber,F.startColumn,F.endLineNumber,F.endColumn):new p.Selection(F.endLineNumber,F.endColumn,F.startLineNumber,F.startColumn)}})):A[N]=u.selectionsBefore[N];return A});D||(D=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)D.splice(T,1);return D}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=[],m=!1;for(let C=0,L=v.length;C<L;C++){const D=v[C];if(D){const I=this._getEditOperationsFromCommand(u,C,D);f=f.concat(I.operations),m=m||I.hadTrackedEditOperation}}return{operations:f,hadTrackedEditOperation:m}}static _getEditOperationsFromCommand(u,v,f){const m=[];let C=0;const L=(R,A,N=!1)=>{g.Range.isEmpty(R)&&A===""||m.push({identifier:{major:v,minor:C++},range:R,text:A,forceMoveMarkers:N,isAutoWhitespaceEdit:f.insertsAutoWhitespace})};let D=!1;const O={addEditOperation:L,addTrackedEditOperation:(R,A,N)=>{D=!0,L(R,A,N)},trackSelection:(R,A)=>{const N=p.Selection.liftSelection(R);let P;if(N.isEmpty())if(typeof A=="boolean")A?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:m,hadTrackedEditOperation:D}}static _getLoserCursorMap(u){u=u.slice(0),u.sort((f,m)=>-g.Range.compareRangesUsingEnds(f.range,m.range));const v={};for(let f=1;f<u.length;f++){const m=u[f-1],C=u[f];if(g.Range.getStartPosition(m.range).isBefore(g.Range.getEndPosition(C.range))){let L;m.identifier.major>C.identifier.major?L=m.identifier.major:L=C.identifier.major,v[L.toString()]=!0;for(let D=0;D<u.length;D++)u[D].identifier.major===L&&(u.splice(D,1),D<f&&f--,D--);f>0&&f--}}return v}}class c{constructor(u,v,f){this.text=u,this.startSelection=v,this.endSelection=f}}class l{static _capture(u,v){const f=[];for(const m of v){if(m.startLineNumber!==m.endLineNumber)return null;f.push(new c(u.getLineContent(m.startLineNumber),m.startColumn-1,m.endColumn-1))}return f}constructor(u,v){this._original=l._capture(u,v)}deduceOutcome(u,v){if(!this._original)return null;const f=l._capture(u,v);if(!f||this._original.length!==f.length)return null;const m=[];for(let C=0,L=this._original.length;C<L;C++)m.push(l._deduceOutcome(this._original[C],f[C]));return m}static _deduceOutcome(u,v){const f=Math.min(u.startSelection,v.startSelection,k.commonPrefixLength(u.text,v.text)),m=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-m),L=v.text.substring(f,v.text.length-m);return new S.CompositionOutcome(C,u.startSelection-f,u.endSelection-f,L,v.startSelection-f,v.endSelection-f)}}}),define(X[746],ee([1,0,48,42,71,314]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClasses=void 0;const w=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function b(p,n,t,i){const s=i===E.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===E.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]&&s.push(`${g(d[1].toLowerCase())}-name-dir-icon`)):r=g(t.authority.toLowerCase())}if(i===E.FileKind.FOLDER)s.push(`${r}-name-folder-icon`);else{if(r){if(s.push(`${r}-name-file-icon`),s.push("name-file-icon"),r.length<=255){const h=r.split(".");for(let o=1;o<h.length;o++)s.push(`${h.slice(o).join(".")}-ext-file-icon`)}s.push("ext-file-icon")}const d=S(p,n,t);d&&s.push(`${g(d)}-lang-file-icon`)}}return s}e.getIconClasses=b;function S(p,n,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=n.getLanguageIdByMimeType(r))}else{const s=p.getModel(t);s&&(i=s.getLanguageId())}return i&&i!==y.PLAINTEXT_LANGUAGE_ID?i:n.guessLanguageIdByFilepathOrFirstLine(t)}function g(p){return p.replace(/[\11\12\14\15\40]/g,"/")}}),define(X[747],ee([1,0,286,102,48,88,42,9,71]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.clearPlatformLanguageAssociations=e.registerPlatformLanguageAssociation=void 0;let g=[],p=[],n=[];function t(l,a=!1){i(l,!1,a)}e.registerPlatformLanguageAssociation=t;function i(l,a,u){const v=s(l,a);g.push(v),v.userConfigured?n.push(v):p.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 s(l,a){return{id:l.id,mime:l.mime,filename:l.filename,extension:l.extension,filepattern:l.filepattern,firstline:l.firstline,userConfigured:a,filenameLowercase:l.filename?l.filename.toLowerCase():void 0,extensionLowercase:l.extension?l.extension.toLowerCase():void 0,filepatternLowercase:l.filepattern?(0,_.parse)(l.filepattern.toLowerCase()):void 0,filepatternOnPath:l.filepattern?l.filepattern.indexOf(E.posix.sep)>=0:!1}}function r(){g=g.filter(l=>l.userConfigured),p=[]}e.clearPlatformLanguageAssociations=r;function d(l,a){return h(l,a).map(u=>u.id)}e.getLanguageIds=d;function h(l,a){let u;if(l)switch(l.scheme){case y.Schemas.file:u=l.fsPath;break;case y.Schemas.data:{u=w.DataUri.parseMetaData(l).get(w.DataUri.META_DATA_LABEL);break}case y.Schemas.vscodeNotebookCell:u=void 0;break;default:u=l.path}if(!u)return[{id:"unknown",mime:k.Mimes.unknown}];u=u.toLowerCase();const v=(0,E.basename)(u),f=o(u,v,n);if(f)return[f,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];const m=o(u,v,p);if(m)return[m,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];if(a){const C=c(a);if(C)return[C,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}]}return[{id:"unknown",mime:k.Mimes.unknown}]}function o(l,a,u){var v;let f,m,C;for(let L=u.length-1;L>=0;L--){const D=u[L];if(a===D.filenameLowercase){f=D;break}if(D.filepattern&&(!m||D.filepattern.length>m.filepattern.length)){const I=D.filepatternOnPath?l:a;!((v=D.filepatternLowercase)===null||v===void 0)&&v.call(D,I)&&(m=D)}D.extension&&(!C||D.extension.length>C.extension.length)&&a.endsWith(D.extensionLowercase)&&(C=D)}if(f)return f;if(m)return m;if(C)return C}function c(l){if((0,b.startsWithUTF8BOM)(l)&&(l=l.substr(1)),l.length>0)for(let a=g.length-1;a>=0;a--){const u=g[a];if(!u.firstline)continue;const v=l.match(u.firstline);if(v&&v.length>0)return u}}}),define(X[748],ee([1,0,6,2,9,747,71,91,35]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const g=Object.prototype.hasOwnProperty,p="vs.editor.nullLanguage";class n{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(p,0),this._register(w.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(s,r){this._languageIdToLanguage[r]=s,this._languageToLanguageId.set(s,r)}register(s){if(this._languageToLanguageId.has(s))return;const r=this._nextLanguageId++;this._register(s,r)}encodeLanguageId(s){return this._languageToLanguageId.get(s)||0}decodeLanguageId(s){return this._languageIdToLanguage[s]||p}}e.LanguageIdCodec=n;class t extends k.Disposable{constructor(s=!0,r=!1){super(),this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,t.instanceCount++,this._warnOnOverwrite=r,this.languageIdCodec=new n,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},s&&(this._initializeFromRegistry(),this._register(w.ModesRegistry.onDidChangeLanguages(d=>{this._initializeFromRegistry()})))}dispose(){t.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,E.clearPlatformLanguageAssociations)();const s=[].concat(w.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(s)}_registerLanguages(s){for(const r of s)this._registerLanguage(r);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(r=>{const 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(s){const r=s.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,s)}_mergeLanguage(s,r){const d=r.id;let h=null;if(Array.isArray(r.mimetypes)&&r.mimetypes.length>0&&(s.mimetypes.push(...r.mimetypes),h=r.mimetypes[0]),h||(h=`text/x-${d}`,s.mimetypes.push(h)),Array.isArray(r.extensions)){r.configuration?s.extensions=r.extensions.concat(s.extensions):s.extensions=s.extensions.concat(r.extensions);for(const l of r.extensions)(0,E.registerPlatformLanguageAssociation)({id:d,mime:h,extension:l},this._warnOnOverwrite)}if(Array.isArray(r.filenames))for(const l of r.filenames)(0,E.registerPlatformLanguageAssociation)({id:d,mime:h,filename:l},this._warnOnOverwrite),s.filenames.push(l);if(Array.isArray(r.filenamePatterns))for(const l of r.filenamePatterns)(0,E.registerPlatformLanguageAssociation)({id:d,mime:h,filepattern:l},this._warnOnOverwrite);if(typeof r.firstLine=="string"&&r.firstLine.length>0){let l=r.firstLine;l.charAt(0)!=="^"&&(l="^"+l);try{const a=new RegExp(l);(0,y.regExpLeadsToEndlessLoop)(a)||(0,E.registerPlatformLanguageAssociation)({id:d,mime:h,firstline:a},this._warnOnOverwrite)}catch(a){console.warn(`[${r.id}]: Invalid regular expression \`${l}\`: `,a)}}s.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 l of o)!l||l.length===0||s.aliases.push(l);const c=o!==null&&o.length>0;if(!(c&&o[0]===null)){const l=(c?o[0]:null)||d;(c||!s.name)&&(s.name=l)}r.configuration&&s.configurationFiles.push(r.configuration),r.icon&&s.icons.push(r.icon)}isRegisteredLanguageId(s){return s?g.call(this._languages,s):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(s){const r=s.toLowerCase();return g.call(this._lowercaseNameMap,r)?this._lowercaseNameMap[r]:null}getLanguageIdByMimeType(s){return s&&g.call(this._mimeTypesMap,s)?this._mimeTypesMap[s]:null}guessLanguageIdByFilepathOrFirstLine(s,r){return!s&&!r?[]:(0,E.getLanguageIds)(s,r)}}e.LanguagesRegistry=t,t.instanceCount=0}),define(X[749],ee([1,0,6,2,748,16,31,71]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class S extends k.Disposable{constructor(n=!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 y.LanguagesRegistry(!0,n)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){S.instanceCount--,super.dispose()}isRegisteredLanguageId(n){return this._registry.isRegisteredLanguageId(n)}getLanguageIdByLanguageName(n){return this._registry.getLanguageIdByLanguageName(n)}getLanguageIdByMimeType(n){return this._registry.getLanguageIdByMimeType(n)}guessLanguageIdByFilepathOrFirstLine(n,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(n,t);return(0,E.firstOrDefault)(i,null)}createById(n){return new g(this.onDidChange,()=>this._createAndGetLanguageIdentifier(n))}createByFilepathOrFirstLine(n,t){return new g(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(n,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(n){return(!n||!this.isRegisteredLanguageId(n))&&(n=b.PLAINTEXT_LANGUAGE_ID),n}requestBasicLanguageFeatures(n){this._requestedBasicLanguages.has(n)||(this._requestedBasicLanguages.add(n),this._onDidRequestBasicLanguageFeatures.fire(n))}requestRichLanguageFeatures(n){this._requestedRichLanguages.has(n)||(this._requestedRichLanguages.add(n),this.requestBasicLanguageFeatures(n),w.TokenizationRegistry.getOrCreate(n),this._onDidRequestRichLanguageFeatures.fire(n))}}e.LanguageService=S,S.instanceCount=0;class g{constructor(n,t){this._onDidChangeLanguages=n,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new _.Emitter({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var n;const t=this._selector();t!==this.languageId&&(this.languageId=t,(n=this._emitter)===null||n===void 0||n.fire(this.languageId))}}}),define(X[325],ee([1,0,37,232,51,28,2,19,192]),function(K,e,_,k,y,E,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,s){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),l=h?_.Color.Format.CSS.formatHSL(o):_.Color.Format.CSS.formatHSLA(o),a=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:l,textEdit:{range:r,text:l}}),u.push({label:a,textEdit:{range:r,text:a}}),u}}e.DefaultDocumentColorProvider=g;let p=class extends w.Disposable{constructor(t,i,s){super(),this._register(s.colorProvider.register("*",new g(t,i)))}};p=Me([fe(0,y.IModelService),fe(1,E.ILanguageConfigurationService),fe(2,b.ILanguageFeaturesService)],p),(0,S.registerEditorFeature)(p)}),define(X[326],ee([1,0,21,11,20,5,51,25,19,325,26]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function n(o,c,l,a=!0){return we(this,void 0,void 0,function*(){return d(new i,o,c,l,a)})}e.getColors=n;function t(o,c,l,a){return Promise.resolve(l.provideColorPresentations(o,c,a))}e.getColorPresentations=t;class i{constructor(){}compute(c,l,a,u){return we(this,void 0,void 0,function*(){const v=yield c.provideDocumentColors(l,a);if(Array.isArray(v))for(const f of v)u.push({colorInfo:f,provider:c});return Array.isArray(v)})}}class s{constructor(){}compute(c,l,a,u){return we(this,void 0,void 0,function*(){const v=yield c.provideDocumentColors(l,a);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,l,a,u){return we(this,void 0,void 0,function*(){const v=yield c.provideColorPresentations(l,this.colorInfo,_.CancellationToken.None);return Array.isArray(v)&&u.push(...v),Array.isArray(v)})}}function d(o,c,l,a,u){return we(this,void 0,void 0,function*(){let v=!1,f;const m=[],C=c.ordered(l);for(let L=C.length-1;L>=0;L--){const D=C[L];if(D instanceof g.DefaultDocumentColorProvider)f=D;else try{v||(v=yield o.compute(D,l,a,m))}catch(I){(0,k.onUnexpectedExternalError)(I)}}return v?m:f&&u?(yield o.compute(f,l,a,m),m):[]})}function h(o,c){const{colorProvider:l}=o.get(S.ILanguageFeaturesService),a=o.get(w.IModelService).getModel(c);if(!a)throw(0,k.illegalArgument)();const u=o.get(p.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:c});return{model:a,colorProviderRegistry:l,isDefaultColorDecoratorsEnabled:u}}b.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(o,...c){const[l]=c;if(!(l instanceof y.URI))throw(0,k.illegalArgument)();const{model:a,colorProviderRegistry:u,isDefaultColorDecoratorsEnabled:v}=h(o,l);return d(new s,u,a,_.CancellationToken.None,v)}),b.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(o,...c){const[l,a]=c,{uri:u,range:v}=a;if(!(u instanceof y.URI)||!Array.isArray(l)||l.length!==4||!E.Range.isIRange(v))throw(0,k.illegalArgument)();const{model:f,colorProviderRegistry:m,isDefaultColorDecoratorsEnabled:C}=h(o,u),[L,D,I,T]=l;return d(new r({range:v,color:{red:L,green:D,blue:I,alpha:T}}),m,f,_.CancellationToken.None,C)})}),define(X[750],ee([1,0,21,64,2,80,135,12,31,28,19,280,584]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionWithUpdatedRange=e.UpToDateInlineCompletions=e.InlineCompletionsSource=void 0;let i=e.InlineCompletionsSource=class extends y.Disposable{constructor(u,v,f,m,C){super(),this.textModel=u,this.versionId=v,this._debounceValue=f,this.languageFeaturesService=m,this.languageConfigurationService=C,this.updateOperation=this._register(new y.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()}))}clear(u){this.updateOperation.clear(),this.inlineCompletions.set(void 0,u),this.suggestWidgetInlineCompletions.set(void 0,u)}clearSuggestWidgetInlineCompletions(){var u;!((u=this.updateOperation.value)===null||u===void 0)&&u.request.context.selectedSuggestionInfo&&this.updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,void 0)}update(u,v,f){var m,C;const L=new r(u,v,this.textModel.getVersionId()),D=v.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((m=this.updateOperation.value)===null||m===void 0)&&m.request.satisfies(L))return this.updateOperation.value.promise;if(!((C=D.get())===null||C===void 0)&&C.request.satisfies(L))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 s(this._debounceValue.get(this.textModel))),T.token.isCancellationRequested||this.textModel.getVersionId()!==L.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()!==L.versionId)return!1;const x=new Date;this._debounceValue.update(this.textModel,x.getTime()-N.getTime());const F=new o(P,L,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(0,w.transaction)(B=>{D.set(F,B)}),this.updateOperation.clear(),!0}))(),R=new h(L,T,O);return this.updateOperation.value=R,O}};e.InlineCompletionsSource=i=Me([fe(3,p.ILanguageFeaturesService),fe(4,g.ILanguageConfigurationService)],i);function s(a,u){return new Promise(v=>{let f;const m=setTimeout(()=>{f&&f.dispose(),v()},a);u&&(f=u.onCancellationRequested(()=>{clearTimeout(m),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(a,u,v){return!a||!u?a===u:v(a,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,m){this.inlineCompletionProviderResult=u,this.request=v,this.textModel=f,this.versionId=m,this.refCount=1,this.prependedInlineCompletionItems=[],this.counter=0,this.rangeVersion=(0,E.derived)("ranges",L=>{this.versionId.read(L);let D=!1;for(const I of this._inlineCompletions)D=D||I._updateRange(this.textModel);return D&&this.counter++,this.counter});const C=f.deltaDecorations([],u.completions.map(L=>({range:L.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=u.completions.map((L,D)=>new c(L,C[D],this.rangeVersion))}prepend(u,v,f){f&&u.source.addRef();const m=this.textModel.deltaDecorations([],[{range:v,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new c(u,m,this.rangeVersion,v)),this.prependedInlineCompletionItems.push(u)}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()}}}e.UpToDateInlineCompletions=o;class c{constructor(u,v,f,m){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=m??u.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)}toInlineCompletion(u){return this.inlineCompletion.withRange(this.getUpdatedRange(u))}toSingleTextEdit(u){return new n.SingleTextEdit(this.getUpdatedRange(u),this.inlineCompletion.insertText)}isVisible(u,v,f){const m=this.toFilterTextReplacement(f).removeCommonPrefix(u);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this.getUpdatedRange(f).getStartPosition())||v.lineNumber!==m.range.startLineNumber)return!1;const C=u.getValueInRange(m.range,1).toLowerCase(),L=m.text.toLowerCase(),D=Math.max(0,v.column-m.range.startColumn);let I=L.substring(0,D),T=L.substring(D),O=C.substring(0,D),R=C.substring(D);const A=u.getLineIndentColumn(m.range.startLineNumber);return m.range.startColumn<=A&&(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)}toFilterTextReplacement(u){return new n.SingleTextEdit(this.getUpdatedRange(u),this.inlineCompletion.filterText)}canBeReused(u,v){return this._isValid&&this.getUpdatedRange(void 0).containsPosition(v)&&this.isVisible(u,v,void 0)&&!this.isSmallerThanOriginal(void 0)}isSmallerThanOriginal(u){return l(this.getUpdatedRange(u)).isBefore(l(this.inlineCompletion.range))}}e.InlineCompletionWithUpdatedRange=c;function l(a){return a.startLineNumber===a.endLineNumber?new b.Position(1,1+a.endColumn-a.startColumn):new b.Position(1+a.endLineNumber-a.startLineNumber,a.endColumn)}}),define(X[751],ee([1,0,9,235,5,23,105,28,279,233,234]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let n=e.MoveLinesCommand=class{constructor(i,s,r,d){this._languageConfigurationService=d,this._selection=i,this._isMovingDown=s,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(i,s){const r=i.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){this._selectionId=s.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=s.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let 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(),l=this.buildIndentConverter(h,o,c),a={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?s.addEditOperation(new y.Range(1,1,1,1),null):(s.addEditOperation(new y.Range(u,1,u,1),i.getLineContent(v)),s.addEditOperation(new y.Range(v,1,v,i.getLineMaxColumn(v)),null)),d=new E.Selection(v,1,v,1)}else{let u,v;if(this._isMovingDown){u=d.endLineNumber+1,v=i.getLineContent(u),s.addEditOperation(new y.Range(u-1,i.getLineMaxColumn(u-1),u,i.getLineMaxColumn(u)),null);let f=v;if(this.shouldAutoIndent(i,d)){const m=this.matchEnterRule(i,l,h,u,d.startLineNumber-1);if(m!==null){const L=_.getLeadingWhitespace(i.getLineContent(u)),D=m+S.getSpaceCnt(L,h);f=S.generateIndent(D,h,c)+this.trimLeft(v)}else{a.getLineContent=D=>D===d.startLineNumber?i.getLineContent(u):i.getLineContent(D);const L=(0,g.getGoodIndentForLine)(this._autoIndent,a,i.getLanguageIdAtPosition(u,1),d.startLineNumber,l,this._languageConfigurationService);if(L!==null){const D=_.getLeadingWhitespace(i.getLineContent(u)),I=S.getSpaceCnt(L,h),T=S.getSpaceCnt(D,h);I!==T&&(f=S.generateIndent(I,h,c)+this.trimLeft(v))}}s.addEditOperation(new y.Range(d.startLineNumber,1,d.startLineNumber,1),f+`
- `);const C=this.matchEnterRuleMovingDown(i,l,h,d.startLineNumber,u,f);if(C!==null)C!==0&&this.getIndentEditsOfMovingBlock(i,s,d,h,c,C);else{a.getLineContent=D=>D===d.startLineNumber?f:D>=d.startLineNumber+1&&D<=d.endLineNumber+1?i.getLineContent(D-1):i.getLineContent(D);const L=(0,g.getGoodIndentForLine)(this._autoIndent,a,i.getLanguageIdAtPosition(u,1),d.startLineNumber+1,l,this._languageConfigurationService);if(L!==null){const D=_.getLeadingWhitespace(i.getLineContent(d.startLineNumber)),I=S.getSpaceCnt(L,h),T=S.getSpaceCnt(D,h);if(I!==T){const O=I-T;this.getIndentEditsOfMovingBlock(i,s,d,h,c,O)}}}}else s.addEditOperation(new y.Range(d.startLineNumber,1,d.startLineNumber,1),f+`
- `)}else if(u=d.startLineNumber-1,v=i.getLineContent(u),s.addEditOperation(new y.Range(u,1,u+1,1),null),s.addEditOperation(new y.Range(d.endLineNumber,i.getLineMaxColumn(d.endLineNumber),d.endLineNumber,i.getLineMaxColumn(d.endLineNumber)),`
- `+v),this.shouldAutoIndent(i,d)){a.getLineContent=m=>m===u?i.getLineContent(d.startLineNumber):i.getLineContent(m);const f=this.matchEnterRule(i,l,h,d.startLineNumber,d.startLineNumber-2);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(i,s,d,h,c,f);else{const m=(0,g.getGoodIndentForLine)(this._autoIndent,a,i.getLanguageIdAtPosition(d.startLineNumber,1),u,l,this._languageConfigurationService);if(m!==null){const C=_.getLeadingWhitespace(i.getLineContent(d.startLineNumber)),L=S.getSpaceCnt(m,h),D=S.getSpaceCnt(C,h);if(L!==D){const I=L-D;this.getIndentEditsOfMovingBlock(i,s,d,h,c,I)}}}}}this._selectionId=s.trackSelection(d)}buildIndentConverter(i,s,r){return{shiftIndent:d=>k.ShiftCommand.shiftIndent(d,d.length+1,i,s,r),unshiftIndent:d=>k.ShiftCommand.unshiftIndent(d,d.length+1,i,s,r)}}parseEnterResult(i,s,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=s.unshiftIndent(h.indentation)+h.appendText);const c=i.getLineContent(d);if(this.trimLeft(c).indexOf(this.trimLeft(o))>=0){const l=_.getLeadingWhitespace(i.getLineContent(d));let a=_.getLeadingWhitespace(o);const u=(0,g.getIndentMetadata)(i,d,this._languageConfigurationService);u!==null&&u&2&&(a=s.unshiftIndent(a));const v=S.getSpaceCnt(a,r),f=S.getSpaceCnt(l,r);return v-f}}return null}matchEnterRuleMovingDown(i,s,r,d,h,o){if(_.lastNonWhitespaceIndex(o)>=0){const c=i.getLineMaxColumn(h),l=(0,p.getEnterAction)(this._autoIndent,i,new y.Range(h,c,h,c),this._languageConfigurationService);return this.parseEnterResult(i,s,r,d,l)}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 l=i.getLineMaxColumn(c),a=(0,p.getEnterAction)(this._autoIndent,i,new y.Range(c,l,c,l),this._languageConfigurationService);return this.parseEnterResult(i,s,r,d,a)}}matchEnterRule(i,s,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 l=i.getLineMaxColumn(c),a=(0,p.getEnterAction)(this._autoIndent,i,new y.Range(c,l,c,l),this._languageConfigurationService);return this.parseEnterResult(i,s,r,d,a)}trimLeft(i){return i.replace(/^\s+/,"")}shouldAutoIndent(i,s){if(this._autoIndent<4||!i.tokenization.isCheapToTokenize(s.startLineNumber))return!1;const r=i.getLanguageIdAtPosition(s.startLineNumber,1),d=i.getLanguageIdAtPosition(s.endLineNumber,1);return!(r!==d||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(i,s,r,d,h,o){for(let c=r.startLineNumber;c<=r.endLineNumber;c++){const l=i.getLineContent(c),a=_.getLeadingWhitespace(l),v=S.getSpaceCnt(a,d)+o,f=S.generateIndent(v,d,h);f!==a&&(s.addEditOperation(new y.Range(c,1,c,a.length+1),f),c===r.endLineNumber&&r.endColumn<=a.length+1&&f===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(i,s){let r=s.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&r.startLineNumber<r.endLineNumber&&(r=r.setEndPosition(r.endLineNumber,2)),r}};e.MoveLinesCommand=n=Me([fe(3,b.ILanguageConfigurationService)],n)}),define(X[125],ee([1,0,215,11,6,2,75,39,71,306,52,436]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";var n;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 y.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 E.DisposableStore,l=c.add((0,_.renderMarkdown)(d,Object.assign(Object.assign({},this._getRenderOptions(d,c)),h),o));return l.element.classList.add("rendered-markdown"),{element:l.element,dispose:()=>c.dispose()}}_getRenderOptions(d,h){return{codeBlockRenderer:(o,c)=>we(this,void 0,void 0,function*(){var l,a,u;let v;o?v=this._languageService.getLanguageIdByLanguageName(o):this._options.editor&&(v=(l=this._options.editor.getModel())===null||l===void 0?void 0:l.getLanguageId()),v||(v=S.PLAINTEXT_LANGUAGE_ID);const f=yield(0,g.tokenizeToString)(this._languageService,c,v),m=document.createElement("span");if(m.innerHTML=(u=(a=Oi._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(f))!==null&&u!==void 0?u:f,this._options.editor){const C=this._options.editor.getOption(48);(0,w.applyFontInfo)(m,C)}else this._options.codeBlockFontFamily&&(m.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(m.style.fontSize=this._options.codeBlockFontSize),m}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:o=>i(this._openerService,o,d.isTrusted),disposables:h}}}};t._ttpTokenizer=(n=window.trustedTypes)===null||n===void 0?void 0:n.createPolicy("tokenizeToString",{createHTML(r){return r}}),e.MarkdownRenderer=t=Me([fe(1,b.ILanguageService),fe(2,p.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:s(h)})}catch(o){return(0,k.onUnexpectedError)(o),!1}})}e.openLinkFromMarkdown=i;function s(r){return r===!0?!0:r&&Array.isArray(r.enabledCommands)?r.enabledCommands:!1}}),define(X[752],ee([1,0,7,16,61,2,125,309,295]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const g=_.$;class p extends E.Disposable{constructor(i,s,r){super(),this._renderDisposeables=this._register(new E.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},s,r)),this._computer=new n(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 p.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(s=>this._editor.applyFontInfo(s))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(i){this._computer.lineNumber!==i&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=i,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(i){this._messages=i,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(i,s){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const d of s){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 s=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=`${s.glyphMarginLeft+s.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(c),0)}px`}}e.MarginHoverWidget=p,p.ID="editor.contrib.modesGlyphHoverWidget";class n{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}),s=this._editor.getLineDecorations(this._lineNumber),r=[];if(!s)return r;for(const d of s){if(!d.options.glyphMarginClassName)continue;const h=d.options.glyphMarginHoverMessage;!h||(0,y.isEmptyMarkdownString)(h)||r.push(...(0,k.asArray)(h).map(i))}return r}}}),define(X[327],ee([1,0,7,78,27,30,6,61,2,125,293,672,8]),function(K,e,_,k,y,E,w,b,S,g,p,n,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 s=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"+E.ThemeIcon.asCSSSelector(y.Codicon.close))),this._close.title=n.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(),l=h.get(114)||o.fontSize,a=h.get(115)||o.lineHeight,u=o.fontWeight,v=`${l}px`,f=`${a}px`;this.domNode.style.fontSize=v,this.domNode.style.lineHeight=`${a/l}`,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(115)||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=n.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(h,o){var c,l;this._renderDisposeable.clear();let{detail:a,documentation:u}=h.completion;if(o){let v="";v+=`score: ${h.score[0]}
- `,v+=`prefix: ${(c=h.word)!==null&&c!==void 0?c:"(no prefix)"}
- `,v+=`word: ${h.completion.filterText?h.completion.filterText+" (filterText)":h.textLabel}
- `,v+=`distance: ${h.distance} (localityBonus-setting)
- `,v+=`index: ${h.idx}, based on ${h.completion.sortText&&`sortText: "${h.completion.sortText}"`||"label"}
- `,v+=`commit_chars: ${(l=h.completion.commitCharacters)===null||l===void 0?void 0:l.join("")}
- `,u=new b.MarkdownString().appendCodeblock("empty",v),a=`Provider: ${h.provider._debugDisplayName}`}if(!o&&!i(h)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),a){const v=a.length>1e5?`${a.substr(0,1e5)}\u2026`:a;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=s=Me([fe(1,t.IInstantiationService)],s);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 p.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(h.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let c,l,a=0,u=0;this._disposables.add(this._resizable.onDidWillResize(()=>{c=this._topLeft,l=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(v=>{if(c&&l){this.widget.layout(v.dimension.width,v.dimension.height);let f=!1;v.west&&(u=l.width-v.dimension.width,f=!0),v.north&&(a=l.height-v.dimension.height,f=!0),f&&this._applyTopLeft({top:c.top+a,left:c.left+u})}v.done&&(c=void 0,l=void 0,a=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 l=h.getBoundingClientRect();this._anchorBox=l,this._preferAlignAtTop=o,this._placeAtAnchor(this._anchorBox,(c=this._userSize)!==null&&c!==void 0?c:this.widget.size,o)}_placeAtAnchor(h,o,c){var l;const a=_.getClientArea(document.body),u=this.widget.getLayoutInfo(),v=new _.Dimension(220,2*u.lineHeight),f=h.top,m=function(){const P=a.width-(h.left+h.width+u.borderWidth+u.horizontalPadding),x=-u.borderWidth+h.left+h.width,F=new _.Dimension(P,a.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,a.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))}}(),L=function(){const P=h.left,x=-u.borderWidth+h.top+h.height,F=new _.Dimension(h.width-u.borderHeight,a.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)}}(),D=[m,C,L],I=(l=D.find(P=>P.fit>=0))!==null&&l!==void 0?l:D.sort((P,x)=>x.fit-P.fit)[0],T=h.top+h.height-u.borderHeight;let O,R=o.height;const A=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);R>A&&(R=A);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===m,O,I!==m),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(X[328],ee([1,0,16,56,45,18,20,26,91,35]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function p(d){return Object.isFrozen(d)?d:y.deepFreeze(d)}class n{constructor(h={},o=[],c=[],l){this._contents=h,this._keys=o,this._overrides=c,this.raw=l,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 n)return c;const l=new t("");return l.parseRaw(c),l.configurationModel});this._rawConfiguration=o.reduce((c,l)=>l===c?l:c.merge(l),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),l=o?this.rawConfiguration.getOverrideValue(h,o):void 0,a=o?this.rawConfiguration.override(o).getValue(h):c;return{value:c,override:l,merged:a}}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 l=y.deepClone(this.contents),a=y.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(l,f.contents);for(const m of f.overrides){const[C]=a.filter(L=>_.equals(L.identifiers,m.identifiers));C?(this.mergeContents(C.contents,m.contents),C.keys.push(...m.keys),C.keys=_.distinct(C.keys)):a.push(y.deepClone(m))}for(const m of f.keys)u.indexOf(m)===-1&&u.push(m)}return new n(l,u,a,v.every(f=>f instanceof n)?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 l of _.distinct([...Object.keys(this.contents),...Object.keys(o)])){let a=this.contents[l];const u=o[l];u&&(typeof a=="object"&&typeof u=="object"?(a=y.deepClone(a),this.mergeContents(a,u)):a=u),c[l]=a}return new n(c,this.keys,this.overrides)}mergeContents(h,o){for(const c of Object.keys(o)){if(c in h&&E.isObject(h[c])&&E.isObject(o[c])){this.mergeContents(h[c],o[c]);continue}h[c]=y.deepClone(o[c])}}getContentsForOverrideIdentifer(h){let o=null,c=null;const l=a=>{a&&(c?this.mergeContents(c,a):c=y.deepClone(a))};for(const a of this.overrides)_.equals(a.identifiers,[h])?o=a.contents:a.identifiers.includes(h)&&l(a.contents);return l(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,l=>console.error(l)),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],l=>console.error(l))})}}e.ConfigurationModel=n;class t{constructor(h){this._name=h,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new n}parseRaw(h,o){this._raw=h;const{contents:c,keys:l,overrides:a,restricted:u,hasExcludedProperties:v}=this.doParseRaw(h,o);this._configurationModel=new n(c,l,a,v?[h]:void 0),this._restrictedConfigurations=u||[]}doParseRaw(h,o){const c=g.Registry.as(S.Extensions.Configuration).getConfigurationProperties(),l=this.filter(h,c,!0,o);h=l.raw;const a=(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:a,keys:u,overrides:v,restricted:l.restricted,hasExcludedProperties:l.hasExcludedProperties}}filter(h,o,c,l){let a=!1;if(!l?.scopes&&!l?.skipRestricted)return{raw:h,restricted:[],hasExcludedProperties:a};const u={},v=[];for(const f in h)if(S.OVERRIDE_PROPERTY_REGEX.test(f)&&c){const m=this.filter(h[f],o,!1,l);u[f]=m.raw,a=a||m.hasExcludedProperties,v.push(...m.restricted)}else{const m=o[f],C=m?typeof m.scope<"u"?m.scope:3:void 0;m?.restricted&&v.push(f),(C===void 0||l.scopes===void 0||l.scopes.includes(C))&&!(l.skipRestricted&&m?.restricted)?u[f]=h[f]:a=!0}return{raw:u,restricted:v,hasExcludedProperties:a}}toOverrides(h,o){const c=[];for(const l of Object.keys(h))if(S.OVERRIDE_PROPERTY_REGEX.test(l)){const a={};for(const u in h[l])a[u]=h[l][u];c.push({identifiers:(0,S.overrideIdentifiersFromKey)(l),keys:Object.keys(a),contents:(0,b.toValuesTree)(a,o)})}return c}}e.ConfigurationModelParser=t;class i{constructor(h,o,c,l,a,u,v,f,m,C,L,D,I){this.key=h,this.overrides=o,this._value=c,this.overrideIdentifiers=l,this.defaultConfiguration=a,this.policyConfiguration=u,this.applicationConfiguration=v,this.userConfiguration=f,this.localUserConfiguration=m,this.remoteUserConfiguration=C,this.workspaceConfiguration=L,this.folderConfigurationModel=D,this.memoryConfigurationModel=I}inspect(h,o,c){const l=h.inspect(o,c);return{get value(){return p(l.value)},get override(){return p(l.override)},get merged(){return p(l.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class s{constructor(h,o,c,l,a=new n,u=new n,v=new k.ResourceMap,f=new n,m=new k.ResourceMap){this._defaultConfiguration=h,this._policyConfiguration=o,this._applicationConfiguration=c,this._localUserConfiguration=l,this._remoteUserConfiguration=a,this._workspaceConfiguration=u,this._folderConfigurations=v,this._memoryConfiguration=f,this._memoryConfigurationByResource=m,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 l;c.resource?(l=this._memoryConfigurationByResource.get(c.resource),l||(l=new n,this._memoryConfigurationByResource.set(c.resource,l))):l=this._memoryConfiguration,o===void 0?l.removeValue(h):l.setValue(h,o),c.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(h,o,c){const l=this.getConsolidatedConfigurationModel(h,o,c),a=this.getFolderConfigurationModelForResource(o.resource,c),u=o.resource?this._memoryConfigurationByResource.get(o.resource)||this._memoryConfiguration:this._memoryConfiguration,v=new Set;for(const f of l.overrides)for(const m of f.identifiers)l.getOverrideValue(h,m)!==void 0&&v.add(m);return new i(h,o,l.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,a||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 l=this.getConsolidatedConfigurationModelForResource(o,c);return o.overrideIdentifier&&(l=l.override(o.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(h)!==void 0&&(l=l.merge(this._policyConfiguration)),l}getConsolidatedConfigurationModelForResource({resource:h},o){let c=this.getWorkspaceConsolidatedConfiguration();if(o&&h){const l=o.getFolder(h);l&&(c=this.getFolderConsolidatedConfiguration(l.uri)||c);const a=this._memoryConfigurationByResource.get(h);a&&(c=c.merge(a))}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(),l=this._folderConfigurations.get(h);l?(o=c.merge(l),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:l,keys:a}=this._folderConfigurations.get(o);return h.push([o,{contents:c,overrides:l,keys:a}]),h},[])}}static parse(h){const o=this.parseConfigurationModel(h.defaults),c=this.parseConfigurationModel(h.policy),l=this.parseConfigurationModel(h.application),a=this.parseConfigurationModel(h.user),u=this.parseConfigurationModel(h.workspace),v=h.folders.reduce((f,m)=>(f.set(w.URI.revive(m[0]),this.parseConfigurationModel(m[1])),f),new k.ResourceMap);return new s(o,c,l,a,new n,u,v,new n,new k.ResourceMap)}static parseConfigurationModel(h){return new n(h.contents,h.keys,h.overrides)}}e.Configuration=s;class r{constructor(h,o,c,l){this.change=h,this.previous=o,this.currentConfiguraiton=c,this.currentWorkspace=l,this._marker=`
- `,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const a of h.keys)this.affectedKeys.add(a);for(const[,a]of h.overrides)for(const u of a)this.affectedKeys.add(u);this._affectsConfigStr=this._marker;for(const a of this.affectedKeys)this._affectsConfigStr+=a+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=s.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(h,o){var c;const l=this._marker+h,a=this._affectsConfigStr.indexOf(l);if(a<0)return!1;const u=a+l.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,m=this.currentConfiguraiton.getValue(h,o,this.currentWorkspace);return!y.equals(f,m)}return!0}}e.ConfigurationChangeEvent=r}),define(X[753],ee([1,0,2,328,91,35]),function(K,e,_,k,y,E){"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=E.Registry.as(y.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(S),S)}updateConfigurationModel(S,g){const p=this.getConfigurationDefaultOverrides();for(const n of S){const t=p[n],i=g[n];t!==void 0?this._configurationModel.addValue(n,t):i?this._configurationModel.addValue(n,i.default):this._configurationModel.removeValue(n)}}}e.DefaultConfiguration=w}),define(X[112],ee([1,0,113,17,25,35,2,60]),function(K,e,_,k,y,E,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(n){if(k.OS===1){if(n&&n.win)return n.win}else if(k.OS===2){if(n&&n.mac)return n.mac}else if(n&&n.linux)return n.linux;return n}registerKeybindingRule(n){const t=S.bindToCurrentPlatform(n),i=new w.DisposableStore;if(t&&t.primary){const s=(0,_.decodeKeybinding)(t.primary,k.OS);s&&i.add(this._registerDefaultKeybinding(s,n.id,n.args,n.weight,0,n.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s<r;s++){const d=t.secondary[s],h=(0,_.decodeKeybinding)(d,k.OS);h&&i.add(this._registerDefaultKeybinding(h,n.id,n.args,n.weight,-s-1,n.when))}return i}registerCommandAndKeybindingRule(n){return(0,w.combinedDisposable)(this.registerKeybindingRule(n),y.CommandsRegistry.registerCommand(n))}_registerDefaultKeybinding(n,t,i,s,r,d){const h=this._coreKeybindings.push({keybinding:n,command:t,commandArgs:i,when:d,weight1:s,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"},E.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function g(p,n){if(p.weight1!==n.weight1)return p.weight1-n.weight1;if(p.command&&n.command){if(p.command<n.command)return-1;if(p.command>n.command)return 1}return p.weight2-n.weight2}});var xn=this&&this.__rest||function(K,e){var _={};for(var k in K)Object.prototype.hasOwnProperty.call(K,k)&&e.indexOf(k)<0&&(_[k]=K[k]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,k=Object.getOwnPropertySymbols(K);y<k.length;y++)e.indexOf(k[y])<0&&Object.prototype.propertyIsEnumerable.call(K,k[y])&&(_[k[y]]=K[k[y]]);return _};define(X[29],ee([1,0,40,30,6,2,60,25,14,8,112]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerAction2=e.Action2=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isISubmenuItem=e.isIMenuItem=void 0;function n(c){return c.command!==void 0}e.isIMenuItem=n;function t(c){return c.submenu!==void 0}e.isISubmenuItem=t;class i{constructor(l){if(i._instances.has(l))throw new TypeError(`MenuId with identifier '${l}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(l,this),this.id=l}}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.ProblemsPanelContext=new i("ProblemsPanelContext"),i.SCMChangeContext=new i("SCMChangeContext"),i.SCMResourceContext=new i("SCMResourceContext"),i.SCMResourceFolderContext=new i("SCMResourceFolderContext"),i.SCMResourceGroupContext=new i("SCMResourceGroupContext"),i.SCMSourceControl=new i("SCMSourceControl"),i.SCMTitle=new i("SCMTitle"),i.SearchContext=new i("SearchContext"),i.SearchActionMenu=new i("SearchActionContext"),i.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu"),i.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu"),i.StickyScrollContext=new i("StickyScrollContext"),i.TestItem=new i("TestItem"),i.TestItemGutter=new i("TestItemGutter"),i.TestPeekElement=new i("TestPeekElement"),i.TestPeekTitle=new i("TestPeekTitle"),i.TouchBarContext=new i("TouchBarContext"),i.TitleBarContext=new i("TitleBarContext"),i.TitleBarTitleContext=new i("TitleBarTitleContext"),i.TunnelContext=new i("TunnelContext"),i.TunnelPrivacy=new i("TunnelPrivacy"),i.TunnelProtocol=new i("TunnelProtocol"),i.TunnelPortInline=new i("TunnelInline"),i.TunnelTitle=new i("TunnelTitle"),i.TunnelLocalAddressInline=new i("TunnelLocalAddressInline"),i.TunnelOriginInline=new i("TunnelOriginInline"),i.ViewItemContext=new i("ViewItemContext"),i.ViewContainerTitle=new i("ViewContainerTitle"),i.ViewContainerTitleContext=new i("ViewContainerTitleContext"),i.ViewTitle=new i("ViewTitle"),i.ViewTitleContext=new i("ViewTitleContext"),i.CommentEditorActions=new i("CommentEditorActions"),i.CommentThreadTitle=new i("CommentThreadTitle"),i.CommentThreadActions=new i("CommentThreadActions"),i.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions"),i.CommentThreadTitleContext=new i("CommentThreadTitleContext"),i.CommentThreadCommentContext=new i("CommentThreadCommentContext"),i.CommentTitle=new i("CommentTitle"),i.CommentActions=new i("CommentActions"),i.InteractiveToolbar=new i("InteractiveToolbar"),i.InteractiveCellTitle=new i("InteractiveCellTitle"),i.InteractiveCellDelete=new i("InteractiveCellDelete"),i.InteractiveCellExecute=new i("InteractiveCellExecute"),i.InteractiveInputExecute=new i("InteractiveInputExecute"),i.NotebookToolbar=new i("NotebookToolbar"),i.NotebookCellTitle=new i("NotebookCellTitle"),i.NotebookCellDelete=new i("NotebookCellDelete"),i.NotebookCellInsert=new i("NotebookCellInsert"),i.NotebookCellBetween=new i("NotebookCellBetween"),i.NotebookCellListTop=new i("NotebookCellTop"),i.NotebookCellExecute=new i("NotebookCellExecute"),i.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary"),i.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle"),i.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle"),i.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle"),i.NotebookOutputToolbar=new i("NotebookOutputToolbar"),i.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure"),i.NotebookKernelSource=new i("NotebookKernelSource"),i.BulkEditTitle=new i("BulkEditTitle"),i.BulkEditContext=new i("BulkEditContext"),i.TimelineItemContext=new i("TimelineItemContext"),i.TimelineTitle=new i("TimelineTitle"),i.TimelineTitleContext=new i("TimelineTitleContext"),i.TimelineFilterSubMenu=new i("TimelineFilterSubMenu"),i.AccountsContext=new i("AccountsContext"),i.PanelTitle=new i("PanelTitle"),i.AuxiliaryBarTitle=new i("AuxiliaryBarTitle"),i.TerminalInstanceContext=new i("TerminalInstanceContext"),i.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext"),i.TerminalNewDropdownContext=new i("TerminalNewDropdownContext"),i.TerminalTabContext=new i("TerminalTabContext"),i.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext"),i.TerminalInlineTabContext=new i("TerminalInlineTabContext"),i.WebviewContext=new i("WebviewContext"),i.InlineCompletionsActions=new i("InlineCompletionsActions"),i.NewFile=new i("NewFile"),i.MergeInput1Toolbar=new i("MergeToolbar1Toolbar"),i.MergeInput2Toolbar=new i("MergeToolbar2Toolbar"),i.MergeBaseToolbar=new i("MergeBaseToolbar"),i.MergeInputResultToolbar=new i("MergeToolbarResultToolbar"),i.InlineSuggestionToolbar=new i("InlineSuggestionToolbar"),i.InteractiveSessionContext=new i("InteractiveSessionContext"),i.InteractiveSessionCodeBlock=new i("InteractiveSessionCodeblock"),i.InteractiveSessionTitle=new i("InteractiveSessionTitle"),i.InteractiveSessionExecute=new i("InteractiveSessionExecute"),e.IMenuService=(0,g.createDecorator)("menuService");class s{static for(l){let a=this._all.get(l);return a||(a=new s(l),this._all.set(l,a)),a}static merge(l){const a=new Set;for(const u of l)u instanceof s&&a.add(u.id);return a}constructor(l){this.id=l,this.has=a=>a===l}}s._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new y.MicrotaskEmitter({merge:s.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(c){return this._commands.set(c.id,c),this._onDidChangeMenu.fire(s.for(i.CommandPalette)),(0,E.toDisposable)(()=>{this._commands.delete(c.id)&&this._onDidChangeMenu.fire(s.for(i.CommandPalette))})}getCommand(c){return this._commands.get(c)}getCommands(){const c=new Map;return this._commands.forEach((l,a)=>c.set(a,l)),c}appendMenuItem(c,l){let a=this._menuItems.get(c);a||(a=new w.LinkedList,this._menuItems.set(c,a));const u=a.push(l);return this._onDidChangeMenu.fire(s.for(c)),(0,E.toDisposable)(u)}appendMenuItems(c){const l=new E.DisposableStore;for(const{id:a,item:u}of c)l.add(this.appendMenuItem(a,u));return l}getMenuItems(c){let l;return this._menuItems.has(c)?l=[...this._menuItems.get(c)]:l=[],c===i.CommandPalette&&this._appendImplicitItems(l),l}_appendImplicitItems(c){const l=new Set;for(const a of c)n(a)&&(l.add(a.command.id),a.alt&&l.add(a.alt.id));this._commands.forEach((a,u)=>{l.has(u)||c.push({command:a})})}};class r extends _.SubmenuAction{constructor(l,a,u){super(`submenuitem.${l.submenu.id}`,typeof l.title=="string"?l.title:l.title.value,u,"submenu"),this.item=l,this.hideActions=a}}e.SubmenuItemAction=r;let d=e.MenuItemAction=class di{static label(l,a){return a?.renderShortTitle&&l.shortTitle?typeof l.shortTitle=="string"?l.shortTitle:l.shortTitle.value:typeof l.title=="string"?l.title:l.title.value}constructor(l,a,u,v,f,m){var C,L;this.hideActions=v,this._commandService=m,this.id=l.id,this.label=di.label(l,u),this.tooltip=(L=typeof l.tooltip=="string"?l.tooltip:(C=l.tooltip)===null||C===void 0?void 0:C.value)!==null&&L!==void 0?L:"",this.enabled=!l.precondition||f.contextMatchesRules(l.precondition),this.checked=void 0;let D;if(l.toggled){const I=l.toggled.condition?l.toggled:{condition:l.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)&&(D=I.icon),I.title&&(this.label=typeof I.title=="string"?I.title:I.title.value)}D||(D=k.ThemeIcon.isThemeIcon(l.icon)?l.icon:void 0),this.item=l,this.alt=a?new di(a,void 0,u,v,f,m):void 0,this._options=u,this.class=D&&k.ThemeIcon.asClassName(D)}run(...l){var a,u;let v=[];return!((a=this._options)===null||a===void 0)&&a.arg&&(v=[...v,this._options.arg]),!((u=this._options)===null||u===void 0)&&u.shouldForwardArgs&&(v=[...v,...l]),this._commandService.executeCommand(this.id,...v)}};e.MenuItemAction=d=Me([fe(4,S.IContextKeyService),fe(5,b.ICommandService)],d);class h{constructor(l){this.desc=l}}e.Action2=h;function o(c){const l=new E.DisposableStore,a=new c,u=a.desc,{f1:v,menu:f,keybinding:m,description:C}=u,L=xn(u,["f1","menu","keybinding","description"]);if(l.add(b.CommandsRegistry.registerCommand({id:L.id,handler:(D,...I)=>a.run(D,...I),description:C})),Array.isArray(f))for(const D of f)l.add(e.MenuRegistry.appendMenuItem(D.id,Object.assign({command:Object.assign(Object.assign({},L),{precondition:D.precondition===null?void 0:L.precondition})},D)));else f&&l.add(e.MenuRegistry.appendMenuItem(f.id,Object.assign({command:Object.assign(Object.assign({},L),{precondition:f.precondition===null?void 0:L.precondition})},f)));if(v&&(l.add(e.MenuRegistry.appendMenuItem(i.CommandPalette,{command:L,when:L.precondition})),l.add(e.MenuRegistry.addCommand(L))),Array.isArray(m))for(const D of m)l.add(p.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},D),{id:L.id,when:L.precondition?S.ContextKeyExpr.and(L.precondition,D.when):D.when})));else m&&l.add(p.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},m),{id:L.id,when:L.precondition?S.ContextKeyExpr.and(L.precondition,m.when):m.when})));return l}e.registerAction2=o}),define(X[329],ee([1,0,49,219,676,29,14]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class b extends E.Action2{constructor(){super({id:b.ID,title:{value:y.localize(0,null),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(g){const p=g.get(w.IContextKeyService).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",t=!k.TabFocus.getTabFocusMode(p);k.TabFocus.setTabFocusMode(t,p),t?(0,_.alert)(y.localize(1,null)):(0,_.alert)(y.localize(2,null))}}e.ToggleTabFocusModeAction=b,b.ID="editor.action.toggleTabFocusMode",(0,E.registerAction2)(b)}),define(X[330],ee([1,0,218,558,14,112,695,2]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new y.RawContextKey("suggestWidgetVisible",!1,(0,w.localize)(0,null));const S="historyNavigationWidgetFocus",g="historyNavigationForwardsEnabled",p="historyNavigationBackwardsEnabled";let n;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 y.RawContextKey(S,!1).bindTo(d),l=new y.RawContextKey(g,!0).bindTo(d),a=new y.RawContextKey(p,!0).bindTo(d),u=()=>{c.set(!0),n=h},v=()=>{c.set(!1),n===h&&(n=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:l,historyNavigationBackwardsEnablement:a,dispose(){o.dispose()}}}e.registerAndCreateHistoryNavigationContext=i;let s=e.ContextScopedFindInput=class extends _.FindInput{constructor(h,o,c,l){super(h,o,c);const a=this._register(l.createScoped(this.inputBox.element));this._register(i(a,this.inputBox))}};e.ContextScopedFindInput=s=Me([fe(3,y.IContextKeyService)],s);let r=e.ContextScopedReplaceInput=class extends k.ReplaceInput{constructor(h,o,c,l,a=!1){super(h,o,a,c);const u=this._register(l.createScoped(this.inputBox.element));this._register(i(u,this.inputBox))}};e.ContextScopedReplaceInput=r=Me([fe(3,y.IContextKeyService)],r),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(S),y.ContextKeyExpr.equals(p,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:d=>{n?.showPreviousValue()}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(S),y.ContextKeyExpr.equals(g,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:d=>{n?.showNextValue()}})}),define(X[126],ee([1,0,21,11,64,2,57,18,20,12,5,62,95,669,29,25,14,19,330]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 s.MenuId("suggestWidgetStatusBar");class c{constructor(A,N,P,x){var F;this.position=A,this.completion=N,this.container=P,this.provider=x,this.isInvalid=!1,this.score=y.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,p.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||p.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==A.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||p.Range.spansMultipleLines(N.range.insert)||p.Range.spansMultipleLines(N.range.replace)||N.range.insert.startLineNumber!==A.lineNumber||N.range.replace.startLineNumber!==A.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(A){return we(this,void 0,void 0,function*(){if(!this._resolveCache){const N=A.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,A)).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 l{constructor(A=2,N=new Set,P=new Set,x=new Map,F=!0){this.snippetSortOrder=A,this.kindFilter=N,this.providerFilter=P,this.providerItemsToReuse=x,this.showDeprecated=F}}e.CompletionOptions=l,l.default=new l;let a;function u(){return a}e.getSnippetSuggestSupport=u;class v{constructor(A,N,P,x){this.items=A,this.needsClipboard=N,this.durations=P,this.disposable=x}}e.CompletionItemModel=v;function f(R,A,N,P=l.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=A.getWordAtPosition(N),$=V?new p.Range(N.lineNumber,V.startColumn,N.lineNumber,V.endColumn):p.Range.fromPositions(N),M={replace:$,insert:$.setEndPosition(N.lineNumber,N.column)},Q=[],ie=new E.DisposableStore,re=[];let ne=!1;const se=(W,q,Z)=>{var Y,oe,ce;let ge=!1;if(!q)return ge;for(const le of q.suggestions)if(!P.kindFilter.has(le.kind)){if(!P.showDeprecated&&(!((Y=le?.tags)===null||Y===void 0)&&Y.includes(1)))continue;le.range||(le.range=M),le.sortText||(le.sortText=typeof le.label=="string"?le.label:le.label.label),!ne&&le.insertTextRules&&le.insertTextRules&4&&(ne=t.SnippetParser.guessNeedsClipboard(le.insertText)),Q.push(new c(N,le,q,W)),ge=!0}return(0,E.isDisposable)(q)&&ie.add(q),re.push({providerName:(oe=W._debugDisplayName)!==null&&oe!==void 0?oe:"unknown_provider",elapsedProvider:(ce=q.duration)!==null&&ce!==void 0?ce:-1,elapsedOverall:Z.elapsed()}),ge},H=(()=>we(this,void 0,void 0,function*(){if(!a||P.kindFilter.has(27))return;const W=P.providerItemsToReuse.get(a);if(W){W.forEach(Y=>Q.push(Y));return}if(P.providerFilter.size>0&&!P.providerFilter.has(a))return;const q=new w.StopWatch(!0),Z=yield a.provideCompletionItems(A,N,x,F);se(a,Z,q)}))();for(const W of R.orderedGroups(A)){let q=!1;if(yield Promise.all(W.map(Z=>we(this,void 0,void 0,function*(){if(P.providerItemsToReuse.has(Z)){const Y=P.providerItemsToReuse.get(Z);Y.forEach(oe=>Q.push(oe)),q=q||Y.length>0;return}if(!(P.providerFilter.size>0&&!P.providerFilter.has(Z)))try{const Y=new w.StopWatch(!0),oe=yield Z.provideCompletionItems(A,N,x,F);q=se(Z,oe,Y)||q}catch(Y){(0,k.onUnexpectedExternalError)(Y)}}))),q||F.isCancellationRequested)break}return yield H,F.isCancellationRequested?(ie.dispose(),Promise.reject(new k.CancellationError)):new v(Q.sort(I(P.snippetSortOrder)),ne,{entries:re,elapsed:B.elapsed()},ie)})}e.provideSuggestionItems=f;function m(R,A){if(R.sortTextLow&&A.sortTextLow){if(R.sortTextLow<A.sortTextLow)return-1;if(R.sortTextLow>A.sortTextLow)return 1}return R.textLabel<A.textLabel?-1:R.textLabel>A.textLabel?1:R.completion.kind-A.completion.kind}function C(R,A){if(R.completion.kind!==A.completion.kind){if(R.completion.kind===27)return-1;if(A.completion.kind===27)return 1}return m(R,A)}function L(R,A){if(R.completion.kind!==A.completion.kind){if(R.completion.kind===27)return 1;if(A.completion.kind===27)return-1}return m(R,A)}const D=new Map;D.set(0,C),D.set(2,L),D.set(1,m);function I(R){return D.get(R)}e.getSuggestionComparator=I,r.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(R,...A)=>we(void 0,void 0,void 0,function*(){const[N,P,x,F]=A;(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(n.ITextModelService).createModelReference(N);try{const $={incomplete:!1,suggestions:[]},M=[],Q=V.object.textEditorModel.validatePosition(P),ie=yield f(B,V.object.textEditorModel,Q,void 0,{triggerCharacter:x??void 0,triggerKind:x?1:0});for(const re of ie.items)M.length<(F??0)&&M.push(re.resolve(_.CancellationToken.None)),$.incomplete=$.incomplete||re.container.incomplete,$.suggestions.push(re.completion);try{return yield Promise.all(M),$}finally{setTimeout(()=>ie.disposable.dispose(),100)}}finally{V.dispose()}}));function T(R,A){var N;(N=R.getContribution("editor.contrib.suggestController"))===null||N===void 0||N.triggerSuggest(new Set().add(A),void 0,!0)}e.showSimpleSuggestions=T;class O{static isAllOff(A){return A.other==="off"&&A.comments==="off"&&A.strings==="off"}static isAllOn(A){return A.other==="on"&&A.comments==="on"&&A.strings==="on"}static valueFor(A,N){switch(N){case 1:return A.comments;case 2:return A.strings;default:return A.other}}}e.QuickSuggestionsOptions=O}),define(X[127],ee([1,0,16,2,35]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var E;(function(b){b[b.PRESERVE=0]="PRESERVE",b[b.LAST=1]="LAST"})(E||(e.DefaultQuickAccessFilterValue=E={})),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,p)=>p.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(p=>S.startsWith(p.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=w,y.Registry.add(e.Extensions.Quickaccess,new w)}),define(X[754],ee([1,0,700,35,2,34,127,79]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let S=e.HelpQuickAccessProvider=class $t{constructor(p,n){this.quickInputService=p,this.keybindingService=n,this.registry=k.Registry.as(w.Extensions.Quickaccess)}provide(p){const n=new y.DisposableStore;return n.add(p.onDidAccept(()=>{const[t]=p.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),n.add(p.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})})),p.items=this.getQuickAccessProviders().filter(t=>t.prefix!==$t.PREFIX),n}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((n,t)=>n.prefix.localeCompare(t.prefix)).flatMap(n=>this.createPicks(n))}createPicks(p){return p.helpEntries.map(n=>{const t=n.prefix||p.prefix,i=t||"\u2026";return{prefix:t,label:i,keybinding:n.commandId?this.keybindingService.lookupKeybinding(n.commandId):void 0,ariaLabel:(0,_.localize)(0,null,i,n.description),description:n.description}})}};S.PREFIX="?",e.HelpQuickAccessProvider=S=Me([fe(0,b.IQuickInputService),fe(1,E.IKeybindingService)],S)}),define(X[755],ee([1,0,35,127,82,754]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:E.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:y.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(X[756],ee([1,0,13,21,93,2,8,127,79,35]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let p=e.QuickAccessController=class extends E.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,s){var r;const[d,h]=this.getOrInstantiateProvider(t),o=this.visibleQuickAccess,c=o?.descriptor;if(o&&h&&c===h){t!==h.prefix&&!s?.preserveValue&&(o.picker.value=t),this.adjustValueSelection(o.picker,h,s);return}if(h&&!s?.preserveValue){let f;if(o&&c&&c!==h){const m=o.value.substr(c.prefix.length);m&&(f=`${h.prefix}${m}`)}if(!f){const m=d?.defaultFilterValue;m===b.DefaultQuickAccessFilterValue.LAST?f=this.lastAcceptedPickerValues.get(h):typeof m=="string"&&(f=`${h.prefix}${m}`)}typeof f=="string"&&(t=f)}const l=new E.DisposableStore,a=l.add(this.quickInputService.createQuickPick());a.value=t,this.adjustValueSelection(a,h,s),a.placeholder=h?.placeholder,a.quickNavigate=s?.quickNavigateConfiguration,a.hideInput=!!a.quickNavigate&&!o,(typeof s?.itemActivation=="number"||s?.quickNavigateConfiguration)&&(a.itemActivation=(r=s?.itemActivation)!==null&&r!==void 0?r:S.ItemActivation.SECOND),a.contextKey=h?.contextKey,a.filterValue=f=>f.substring(h?h.prefix.length:0);let u;i&&(u=new _.DeferredPromise,l.add((0,y.once)(a.onWillAccept)(f=>{f.veto(),a.hide()}))),l.add(this.registerPickerListeners(a,d,h,t,s?.providerOptions));const v=l.add(new k.CancellationTokenSource);if(d&&l.add(d.provide(a,v.token,s?.providerOptions)),(0,y.once)(a.onDidHide)(()=>{a.selectedItems.length===0&&v.cancel(),l.dispose(),u?.complete(a.selectedItems.slice(0))}),a.show(),i)return u?.p}adjustValueSelection(t,i,s){var r;let d;s?.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,s,r,d){const h=new E.DisposableStore,o=this.visibleQuickAccess={picker:t,descriptor:s,value:r};return h.add((0,E.toDisposable)(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),h.add(t.onDidChangeValue(c=>{const[l]=this.getOrInstantiateProvider(c);l!==i?this.show(c,{preserveValue:!0,providerOptions:d}):o.value=c})),s&&h.add(t.onDidAccept(()=>{this.lastAcceptedPickerValues.set(s,t.value)})),h}getOrInstantiateProvider(t){const i=this.registry.getQuickAccessProvider(t);if(!i)return[void 0,void 0];let s=this.mapProviderToDescriptor.get(i);return s||(s=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,s)),[s,i]}};e.QuickAccessController=p=Me([fe(0,S.IQuickInputService),fe(1,w.IInstantiationService)],p)}),define(X[757],ee([1,0,27,30,103,456]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var E;(function(w){function b(S){switch(S){case y.default.Ignore:return"severity-ignore "+k.ThemeIcon.asClassName(_.Codicon.info);case y.default.Info:return k.ThemeIcon.asClassName(_.Codicon.info);case y.default.Warning:return k.ThemeIcon.asClassName(_.Codicon.warning);case y.default.Error:return k.ThemeIcon.asClassName(_.Codicon.error);default:return""}}w.className=b})(E||(e.SeverityIcon=E={}))}),define(X[84],ee([1,0,6,2,18,564,8]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.loadKeyTargets=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=void 0,e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,w.createDecorator)("storageService");var b;(function(n){n[n.NONE=0]="NONE",n[n.SHUTDOWN=1]="SHUTDOWN"})(b||(e.WillSaveStateReason=b={}));function S(n){const t=n.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,s){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.get(t,s)}getBoolean(t,i,s){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.getBoolean(t,s)}getNumber(t,i,s){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.getNumber(t,s)}store(t,i,s,r){if((0,y.isUndefinedOrNull)(i)){this.remove(t,s);return}this.withPausedEmitters(()=>{var d;this.updateKeyTarget(t,s,r),(d=this.getStorage(s))===null||d===void 0||d.set(t,i)})}remove(t,i){this.withPausedEmitters(()=>{var s;this.updateKeyTarget(t,i,void 0),(s=this.getStorage(i))===null||s===void 0||s.delete(t)})}withPausedEmitters(t){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{t()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(t,i,s){var r,d;const h=this.getKeyTargets(i);typeof s=="number"?h[t]!==s&&(h[t]=s,(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 p extends g{constructor(){super(),this.applicationStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase,{hint:E.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase,{hint:E.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase,{hint:E.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=p}),define(X[758],ee([1,0,13,93,56,5,315,50,8,84]),function(K,e,_,k,y,E,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 p{constructor(i,s){this.lineCount=i,this.data=s}}let n=e.CodeLensCache=class{constructor(i){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new y.LRUCache(20,.75);const s="codelens/cache";(0,_.runWhenIdle)(()=>i.remove(s,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,s){const r=s.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 p(i.getLineCount(),d);this._cache.set(i.uri.toString(),h)}get(i){const s=this._cache.get(i.uri.toString());return s&&s.lineCount===i.getLineCount()?s.data:void 0}delete(i){this._cache.delete(i.uri.toString())}_serialize(){const i=Object.create(null);for(const[s,r]of this._cache){const d=new Set;for(const h of r.data.lenses)d.add(h.symbol.range.startLineNumber);i[s]={lineCount:r.lineCount,lines:[...d.values()]}}return JSON.stringify(i)}_deserialize(i){try{const s=JSON.parse(i);for(const r in s){const d=s[r],h=[];for(const c of d.lines)h.push({range:new E.Range(c,1,c,11)});const o=new w.CodeLensModel;o.add({lenses:h,dispose(){}},this._fakeProvider),this._cache.set(r,new p(d.lineCount,o))}}catch{}}};e.CodeLensCache=n=Me([fe(0,g.IStorageService)],n),(0,b.registerSingleton)(e.ICodeLensCache,n,1)}),define(X[331],ee([1,0,13,2,56,189,31,26,50,8,84]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class n{constructor(h){this.name=h}select(h,o,c){if(c.length===0)return 0;const l=c[0].score[0];for(let a=0;a<c.length;a++){const{score:u,completion:v}=c[a];if(u[0]!==l)break;if(v.preselect)return a}return 0}}e.Memory=n;class t extends n{constructor(){super("first")}memorize(h,o,c){}toJSON(){}fromJSON(){}}e.NoMemory=t;class i extends n{constructor(){super("recentlyUsed"),this._cache=new y.LRUCache(300,.66),this._seq=0}memorize(h,o,c){const l=`${h.getLanguageId()}/${c.textLabel}`;this._cache.set(l,{touch:this._seq++,type:c.completion.kind,insertText:c.completion.insertText})}select(h,o,c){if(c.length===0)return 0;const l=h.getLineContent(o.lineNumber).substr(o.column-10,o.column-1);if(/\s$/.test(l))return super.select(h,o,c);const a=c[0].score[0];let u=-1,v=-1,f=-1;for(let m=0;m<c.length&&c[m].score[0]===a;m++){const C=`${h.getLanguageId()}/${c[m].textLabel}`,L=this._cache.peek(C);if(L&&L.touch>f&&L.type===c[m].completion.kind&&L.insertText===c[m].completion.insertText&&(f=L.touch,v=m),c[m].completion.preselect&&u===-1)return u=m}return v!==-1?v:u!==-1?u:0}toJSON(){return this._cache.toJSON()}fromJSON(h){this._cache.clear();const o=0;for(const[c,l]of h)l.touch=o,l.type=typeof l.type=="number"?l.type:w.CompletionItemKinds.fromString(l.type),this._cache.set(c,l);this._seq=this._cache.size}}e.LRUMemory=i;class s extends n{constructor(){super("recentlyUsedByPrefix"),this._trie=E.TernarySearchTree.forStrings(),this._seq=0}memorize(h,o,c){const{word:l}=h.getWordUntilPosition(o),a=`${h.getLanguageId()}/${l}`;this._trie.set(a,{type:c.completion.kind,insertText:c.completion.insertText,touch:this._seq++})}select(h,o,c){const{word:l}=h.getWordUntilPosition(o);if(!l)return super.select(h,o,c);const a=`${h.getLanguageId()}/${l}`;let u=this._trie.get(a);if(u||(u=this._trie.findSubstr(a)),u)for(let v=0;v<c.length;v++){const{kind:f,insertText:m}=c[v].completion;if(f===u.type&&m===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=s;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===p.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 l=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)!==l){this._saveState();const a=Gt._strategyCtors.get(l)||t;this._strategy=new a;try{const v=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,f=this._storageService.get(`${Gt._storagePrefix}/${l}`,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",s],["recentlyUsed",i],["first",t]]),r._storagePrefix="suggest/memories",e.SuggestMemoryService=r=Me([fe(0,p.IStorageService),fe(1,b.IConfigurationService)],r),e.ISuggestMemoryService=(0,g.createDecorator)("ISuggestMemories"),(0,S.registerSingleton)(e.ISuggestMemoryService,r,1)}),define(X[759],ee([1,0,13,6,2,29,25,14,40,84,16,688]),function(K,e,_,k,y,E,w,b,S,g,p,n){"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,l){return new r(o,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},l),this._commandService,c)}resetHiddenStates(o){this._hiddenStates.reset(o)}};e.MenuService=t=Me([fe(0,w.ICommandService),fe(1,g.IStorageService)],t);let i=class Bt{constructor(o){this._storageService=o,this._disposables=new y.DisposableStore,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const 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 l=o.get(Bt._key,0,"{}");this._data=JSON.parse(l)}catch(l){console.log("FAILED to read storage after UPDATE",l)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(o,c){var l;return(l=this._hiddenByDefaultCache.get(`${o.id}/${c}`))!==null&&l!==void 0?l:!1}setDefaultState(o,c,l){this._hiddenByDefaultCache.set(`${o.id}/${c}`,l)}isHidden(o,c){var l,a;const u=this._isHiddenByDefault(o,c),v=(a=(l=this._data[o.id])===null||l===void 0?void 0:l.includes(c))!==null&&a!==void 0?a:!1;return u?!v:v}updateHidden(o,c,l){this._isHiddenByDefault(o,c)&&(l=!l);const u=this._data[o.id];if(l)u?u.indexOf(c)<0&&u.push(c):this._data[o.id]=[c];else if(u){const v=u.indexOf(c);v>=0&&(0,p.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=Me([fe(0,g.IStorageService)],i);let s=class Tt{constructor(o,c,l,a,u){this._id=o,this._hiddenStates=c,this._collectContextKeysForSubmenus=l,this._commandService=a,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=E.MenuRegistry.getMenuItems(this._id);let c;o.sort(Tt._compareMenuItems);for(const l of o){const a=l.group||"";(!c||c[0]!==a)&&(c=[a,[]],this._menuGroups.push(c)),c[1].push(l),this._collectContextKeys(l)}}_collectContextKeys(o){if(Tt._fillInKbExprKeys(o.when,this._structureContextKeys),(0,E.isIMenuItem)(o)){if(o.command.precondition&&Tt._fillInKbExprKeys(o.command.precondition,this._preconditionContextKeys),o.command.toggled){const c=o.command.toggled.condition||o.command.toggled;Tt._fillInKbExprKeys(c,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&E.MenuRegistry.getMenuItems(o.submenu).forEach(this._collectContextKeys,this)}createActionGroups(o){const c=[];for(const l of this._menuGroups){const[a,u]=l,v=[];for(const f of u)if(this._contextKeyService.contextMatchesRules(f.when)){const m=(0,E.isIMenuItem)(f);m&&this._hiddenStates.setDefaultState(this._id,f.command.id,!!f.isHiddenByDefault);const C=d(this._id,m?f.command:f,this._hiddenStates);if(m)v.push(new E.MenuItemAction(f.command,f.alt,o,C,this._contextKeyService,this._commandService));else{const L=new Tt(f.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(o),D=S.Separator.join(...L.map(I=>I[1]));D.length>0&&v.push(new E.SubmenuItemAction(f,C,D))}}v.length>0&&c.push([a,v])}return c}static _fillInKbExprKeys(o,c){if(o)for(const l of o.keys())c.add(l)}static _compareMenuItems(o,c){const l=o.group,a=c.group;if(l!==a){if(l){if(!a)return-1}else return 1;if(l==="navigation")return-1;if(a==="navigation")return 1;const f=l.localeCompare(a);if(f!==0)return f}const u=o.order||0,v=c.order||0;return u<v?-1:u>v?1:Tt._compareTitles((0,E.isIMenuItem)(o)?o.command.title:o.title,(0,E.isIMenuItem)(c)?c.command.title:c.title)}static _compareTitles(o,c){const l=typeof o=="string"?o:o.original,a=typeof c=="string"?c:c.original;return l.localeCompare(a)}};s=Me([fe(3,w.ICommandService),fe(4,b.IContextKeyService)],s);let r=class{constructor(o,c,l,a,u){this._disposables=new y.DisposableStore,this._menuInfo=new s(o,c,l.emitEventsForSubmenuChanges,a,u);const v=new _.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},l.eventDebounceDelay);this._disposables.add(v),this._disposables.add(E.MenuRegistry.onDidChangeMenu(L=>{L.has(o)&&v.schedule()}));const f=this._disposables.add(new y.DisposableStore),m=L=>{let D=!1,I=!1,T=!1;for(const O of L)if(D=D||O.isStructuralChange,I=I||O.isEnablementChange,T=T||O.isToggleChange,D&&I&&T)break;return{menu:this,isStructuralChange:D,isEnablementChange:I,isToggleChange:T}},C=()=>{f.add(u.onDidChangeContext(L=>{const D=L.affectsSome(this._menuInfo.structureContextKeys),I=L.affectsSome(this._menuInfo.preconditionContextKeys),T=L.affectsSome(this._menuInfo.toggledContextKeys);(D||I||T)&&this._onDidChange.fire({menu:this,isStructuralChange:D,isEnablementChange:I,isToggleChange:T})})),f.add(c.onDidChange(L=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new k.DebounceEmitter({onWillAddFirstListener:C,onDidRemoveLastListener:f.clear.bind(f),delay:l.eventDebounceDelay,merge:m}),this.onDidChange=this._onDidChange.event}getActions(o){return this._menuInfo.createActionGroups(o)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};r=Me([fe(3,w.ICommandService),fe(4,b.IContextKeyService)],r);function d(h,o,c){const l=(0,E.isISubmenuItem)(o)?o.submenu.id:o.id,a=typeof o.title=="string"?o.title:o.title.value,u=(0,S.toAction)({id:`hide/${h.id}/${l}`,label:(0,n.localize)(0,null,a),run(){c.updateHidden(h,l,!0)}}),v=(0,S.toAction)({id:`toggle/${h.id}/${l}`,label:a,get checked(){return!c.isHidden(h,l)},run(){c.updateHidden(h,l,!!this.checked)}});return{hide:u,toggle:v,get isHidden(){return!v.checked}}}}),define(X[72],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,_.createDecorator)("telemetryService")}),define(X[15],ee([1,0,587,20,32,12,51,62,29,25,14,8,112,35,72,18,63]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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=p.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 l extends h{static bindToContribution(P){return class extends l{constructor(F){super(F),this._callback=F.handler}runEditorCommand(F,B,V){const $=P(B);$&&this._callback($,V)}}}static runEditorCommand(P,x,F,B){const V=P.get(y.ICodeEditorService),$=V.getFocusedCodeEditor()||V.getActiveCodeEditor();if($)return $.invokeWithinContext(M=>{if(M.get(p.IContextKeyService).contextMatchesRules((0,r.withNullAsUndefined)(F)))return B(M,$,x)})}runCommand(P,x){return l.runEditorCommand(P,x,this.precondition,(F,B,V)=>this.runEditorCommand(F,B,V))}}e.EditorCommand=l;class a extends l{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=p.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(a.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(s.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=a;class u extends a{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(y.ICodeEditorService),B=F.getFocusedCodeEditor()||F.getActiveCodeEditor();if(B)return B.invokeWithinContext(V=>{if(V.get(p.IContextKeyService).contextMatchesRules((0,r.withNullAsUndefined)(this.desc.precondition)))return this.runEditorCommand(V,B,...x)})}}e.EditorAction2=v;function f(N,P){g.CommandsRegistry.registerCommand(N,function(x,...F){const B=x.get(n.IInstantiationService),[V,$]=F;(0,r.assertType)(k.URI.isUri(V)),(0,r.assertType)(E.Position.isIPosition($));const M=x.get(w.IModelService).getModel(V);if(M){const Q=E.Position.lift($);return B.invokeFunction(P,M,Q,...F.slice(2))}return x.get(b.ITextModelService).createModelReference(V).then(Q=>new Promise((ie,re)=>{try{const ne=B.invokeFunction(P,Q.object.textEditorModel,E.Position.lift($),F.slice(2));ie(ne)}catch(ne){re(ne)}}).finally(()=>{Q.dispose()}))})}e.registerModelAndPositionCommand=f;function m(N){return R.INSTANCE.registerEditorCommand(N),N}e.registerEditorCommand=m;function C(N){const P=new N;return R.INSTANCE.registerEditorAction(P),P}e.registerEditorAction=C;function L(N){return R.INSTANCE.registerEditorAction(N),N}e.registerMultiEditorAction=L;function D(N){R.INSTANCE.registerEditorAction(N)}e.registerInstantiatedEditorAction=D;function I(N,P,x){R.INSTANCE.registerEditorContribution(N,P,x)}e.registerEditorContribution=I;var T;(function(N){function P($){return R.INSTANCE.getEditorCommand($)}N.getEditorCommand=P;function x(){return R.INSTANCE.getEditorActions()}N.getEditorActions=x;function F(){return R.INSTANCE.getEditorContributions()}N.getEditorContributions=F;function B($){return R.INSTANCE.getEditorContributions().filter(M=>$.indexOf(M.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 A(N){return N.register(),N}e.UndoCommand=A(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}]})),A(new c(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=A(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}]})),A(new c(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=A(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(X[184],ee([1,0,586,47,18,49,15,32,477,66,194,195,236,12,5,22,14,112]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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,A){const N=R._getViewModel();N&&this.runCoreEditorCommand(N,A||{})}}e.CoreEditorCommand=c;var l;(function(T){const O=function(A){if(!y.isObject(A))return!1;const N=A;return!(!y.isString(N.to)||!y.isUndefined(N.by)&&!y.isString(N.by)||!y.isUndefined(N.value)&&!y.isNumber(N.value)||!y.isUndefined(N.revealCursor)&&!y.isBoolean(N.revealCursor))};T.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint: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(A){let N;switch(A.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(A.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(A.value||1),F=!!A.revealCursor;return{direction:N,unit:P,value:x,revealCursor:F,select:!!A.select}}T.parse=R})(l||(e.EditorScroll_=l={}));var a;(function(T){const O=function(R){if(!y.isObject(R))return!1;const A=R;return!(!y.isNumber(A.lineNumber)&&!y.isString(A.lineNumber)||!y.isUndefined(A.at)&&!y.isString(A.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 * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint: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"}})(a||(e.RevealLine_=a={}));class u{constructor(O){O.addImplementation(1e4,"code-editor",(R,A)=>{const N=R.get(b.ICodeEditorService).getFocusedCodeEditor();return N&&N.hasTextFocus()?this._runEditorCommand(R,N,A):!1}),O.addImplementation(1e3,"generic-dom-input-textarea",(R,A)=>{const N=document.activeElement;return N&&["input","textarea"].indexOf(N.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),O.addImplementation(0,"generic-dom",(R,A)=>{const N=R.get(b.ICodeEditorService).getActiveCodeEditor();return N?(N.focus(),this._runEditorCommand(R,N,A)):!1})}_runEditorCommand(O,R,A){const N=this.runEditorCommand(O,R,A);return N||!0}}var v;(function(T){class O extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){if(!q.position)return;W.model.pushStackElement(),W.setCursorStates(q.source,3,[n.CursorMoveCommands.moveTo(W,W.getPrimaryCursorState(),this._inSelectionMode,q.position,q.viewPosition)])&&q.revealType!==2&&W.revealPrimaryCursor(q.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,q){W.model.pushStackElement();const Z=this._getColumnSelectResult(W,W.getPrimaryCursorState(),W.getCursorColumnSelectData(),q);Z!==null&&(W.setCursorStates(q.source,3,Z.viewStates.map(Y=>g.CursorState.fromViewState(Y))),W.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:Z.fromLineNumber,fromViewVisualColumn:Z.fromVisualColumn,toViewLineNumber:Z.toLineNumber,toViewVisualColumn:Z.toVisualColumn}),Z.reversed?W.revealTopMostCursor(q.source):W.revealBottomMostCursor(q.source))}}T.ColumnSelect=(0,w.registerEditorCommand)(new class extends R{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(H,W,q,Z){if(typeof Z.position>"u"||typeof Z.viewPosition>"u"||typeof Z.mouseColumn>"u")return null;const Y=H.model.validatePosition(Z.position),oe=H.coordinatesConverter.validateViewPosition(new i.Position(Z.viewPosition.lineNumber,Z.viewPosition.column),Y),ce=Z.doColumnSelect?q.fromViewLineNumber:oe.lineNumber,ge=Z.doColumnSelect?q.fromViewVisualColumn:Z.mouseColumn-1;return S.ColumnSelection.columnSelect(H.cursorConfig,H,ce,ge,oe.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,q,Z){return S.ColumnSelection.columnSelectLeft(H.cursorConfig,H,q)}}),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,q,Z){return S.ColumnSelection.columnSelectRight(H.cursorConfig,H,q)}});class A extends R{constructor(W){super(W),this._isPaged=W.isPaged}_getColumnSelectResult(W,q,Z,Y){return S.ColumnSelection.columnSelectUp(W.cursorConfig,W,Z,this._isPaged)}}T.CursorColumnSelectUp=(0,w.registerEditorCommand)(new A({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 A({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,q,Z,Y){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:n.CursorMove.description})}runCoreEditorCommand(W,q){const Z=n.CursorMove.parse(q);Z&&this._runCursorMove(W,q.source,Z)}_runCursorMove(W,q,Z){W.model.pushStackElement(),W.setCursorStates(q,3,P._move(W,W.getCursorStates(),Z)),W.revealPrimaryCursor(q,!0)}static _move(W,q,Z){const Y=Z.select,oe=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 n.CursorMoveCommands.simpleMove(W,q,Z.direction,Y,oe,Z.unit);case 11:case 13:case 12:case 14:return n.CursorMoveCommands.viewportMove(W,q,Z.direction,Y,oe);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,q){let Z=this._staticArgs;this._staticArgs.value===-1&&(Z={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:q.pageSize||W.cursorConfig.pageSize}),W.model.pushStackElement(),W.setCursorStates(q.source,3,n.CursorMoveCommands.simpleMove(W,W.getCursorStates(),Z.direction,Z.select,Z.value,Z.unit)),W.revealPrimaryCursor(q.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 q;W.wholeLine?q=n.CursorMoveCommands.line(H,H.getPrimaryCursorState(),!1,W.position,W.viewPosition):q=n.CursorMoveCommands.moveTo(H,H.getPrimaryCursorState(),!1,W.position,W.viewPosition);const Z=H.getCursorStates();if(Z.length>1){const Y=q.modelState?q.modelState.position:null,oe=q.viewState?q.viewState.position:null;for(let ce=0,ge=Z.length;ce<ge;ce++){const le=Z[ce];if(!(Y&&!le.modelState.selection.containsPosition(Y))&&!(oe&&!le.viewState.selection.containsPosition(oe))){Z.splice(ce,1),H.model.pushStackElement(),H.setCursorStates(W.source,3,Z);return}}}Z.push(q),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 q=H.getLastAddedCursorIndex(),Z=H.getCursorStates(),Y=Z.slice(0);Y[q]=n.CursorMoveCommands.moveTo(H,Z[q],!0,W.position,W.viewPosition),H.model.pushStackElement(),H.setCursorStates(W.source,3,Y)}});class F extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){W.model.pushStackElement(),W.setCursorStates(q.source,3,n.CursorMoveCommands.moveToBeginningOfLine(W,W.getCursorStates(),this._inSelectionMode)),W.revealPrimaryCursor(q.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,q){W.model.pushStackElement(),W.setCursorStates(q.source,3,this._exec(W.getCursorStates())),W.revealPrimaryCursor(q.source,!0)}_exec(W){const q=[];for(let Z=0,Y=W.length;Z<Y;Z++){const oe=W[Z],ce=oe.modelState.position.lineNumber;q[Z]=g.CursorState.fromModelState(oe.modelState.move(this._inSelectionMode,ce,1,0))}return q}}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,q){W.model.pushStackElement(),W.setCursorStates(q.source,3,n.CursorMoveCommands.moveToEndOfLine(W,W.getCursorStates(),this._inSelectionMode,q.sticky||!1)),W.revealPrimaryCursor(q.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 $ extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){W.model.pushStackElement(),W.setCursorStates(q.source,3,this._exec(W,W.getCursorStates())),W.revealPrimaryCursor(q.source,!0)}_exec(W,q){const Z=[];for(let Y=0,oe=q.length;Y<oe;Y++){const ce=q[Y],ge=ce.modelState.position.lineNumber,le=W.model.getLineMaxColumn(ge);Z[Y]=g.CursorState.fromModelState(ce.modelState.move(this._inSelectionMode,ge,le,0))}return Z}}T.CursorLineEnd=(0,w.registerEditorCommand)(new $({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 $({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class M extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){W.model.pushStackElement(),W.setCursorStates(q.source,3,n.CursorMoveCommands.moveToBeginningOfBuffer(W,W.getCursorStates(),this._inSelectionMode)),W.revealPrimaryCursor(q.source,!0)}}T.CursorTop=(0,w.registerEditorCommand)(new M({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 M({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class Q extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){W.model.pushStackElement(),W.setCursorStates(q.source,3,n.CursorMoveCommands.moveToEndOfBuffer(W,W.getCursorStates(),this._inSelectionMode)),W.revealPrimaryCursor(q.source,!0)}}T.CursorBottom=(0,w.registerEditorCommand)(new Q({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),T.CursorBottomSelect=(0,w.registerEditorCommand)(new Q({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class ie extends c{constructor(){super({id:"editorScroll",precondition:void 0,description:l.description})}determineScrollMethod(W){const q=[6],Z=[1,2,3,4,5,6],Y=[4,2],oe=[1,3];return q.includes(W.unit)&&Y.includes(W.direction)?this._runHorizontalEditorScroll.bind(this):Z.includes(W.unit)&&oe.includes(W.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(W,q){const Z=l.parse(q);if(!Z)return;const Y=this.determineScrollMethod(Z);Y&&Y(W,q.source,Z)}_runVerticalEditorScroll(W,q,Z){const Y=this._computeDesiredScrollTop(W,Z);if(Z.revealCursor){const oe=W.getCompletelyVisibleViewRangeAtScrollTop(Y);W.setCursorStates(q,3,[n.CursorMoveCommands.findPositionInViewportIfOutside(W,W.getPrimaryCursorState(),oe,Z.select)])}W.viewLayout.setScrollPosition({scrollTop:Y},0)}_computeDesiredScrollTop(W,q){if(q.unit===1){const oe=W.viewLayout.getFutureViewport(),ce=W.getCompletelyVisibleViewRangeAtScrollTop(oe.top),ge=W.coordinatesConverter.convertViewRangeToModelRange(ce);let le;q.direction===1?le=Math.max(1,ge.startLineNumber-q.value):le=Math.min(W.model.getLineCount(),ge.startLineNumber+q.value);const ue=W.coordinatesConverter.convertModelPositionToViewPosition(new i.Position(le,1));return W.viewLayout.getVerticalOffsetForLineNumber(ue.lineNumber)}if(q.unit===5){let oe=0;return q.direction===3&&(oe=W.model.getLineCount()-W.cursorConfig.pageSize),W.viewLayout.getVerticalOffsetForLineNumber(oe)}let Z;q.unit===3?Z=W.cursorConfig.pageSize*q.value:q.unit===4?Z=Math.round(W.cursorConfig.pageSize/2)*q.value:Z=q.value;const Y=(q.direction===1?-1:1)*Z;return W.viewLayout.getCurrentScrollTop()+Y*W.cursorConfig.lineHeight}_runHorizontalEditorScroll(W,q,Z){const Y=this._computeDesiredScrollLeft(W,Z);W.viewLayout.setScrollPosition({scrollLeft:Y},0)}_computeDesiredScrollLeft(W,q){const Z=(q.direction===4?-1:1)*q.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:l.RawDirection.Up,by:l.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:l.RawDirection.Up,by:l.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:l.RawDirection.Up,by:l.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:l.RawDirection.Down,by:l.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:l.RawDirection.Down,by:l.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:l.RawDirection.Down,by:l.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:l.RawDirection.Left,by:l.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:l.RawDirection.Right,by:l.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:W.source})}});class re extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){q.position&&(W.model.pushStackElement(),W.setCursorStates(q.source,3,[n.CursorMoveCommands.word(W,W.getPrimaryCursorState(),this._inSelectionMode,q.position)]),q.revealType!==2&&W.revealPrimaryCursor(q.source,!0,!0))}}T.WordSelect=(0,w.registerEditorCommand)(new re({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),T.WordSelectDrag=(0,w.registerEditorCommand)(new re({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 q=H.getLastAddedCursorIndex(),Z=H.getCursorStates(),Y=Z.slice(0),oe=Z[q];Y[q]=n.CursorMoveCommands.word(H,oe,oe.modelState.hasSelection(),W.position),H.model.pushStackElement(),H.setCursorStates(W.source,3,Y)}});class ne extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,q){q.position&&(W.model.pushStackElement(),W.setCursorStates(q.source,3,[n.CursorMoveCommands.line(W,W.getPrimaryCursorState(),this._inSelectionMode,q.position,q.viewPosition)]),q.revealType!==2&&W.revealPrimaryCursor(q.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,q){if(!q.position)return;const Z=W.getLastAddedCursorIndex(),Y=W.getCursorStates(),oe=Y.slice(0);oe[Z]=n.CursorMoveCommands.line(W,Y[Z],this._inSelectionMode,q.position,q.viewPosition),W.model.pushStackElement(),W.setCursorStates(q.source,3,oe)}}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,[n.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,E.status)(_.localize(2,null))}}),T.RevealLine=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"revealLine",precondition:void 0,description:a.description})}runCoreEditorCommand(H,W){const q=W,Z=q.lineNumber||0;let Y=typeof Z=="number"?Z+1:parseInt(Z)+1;Y<1&&(Y=1);const oe=H.model.getLineCount();Y>oe&&(Y=oe);const ce=new s.Range(Y,1,Y,H.model.getLineMaxColumn(Y));let ge=0;if(q.at)switch(q.at){case a.RawAtArgument.Top:ge=3;break;case a.RawAtArgument.Center:ge=1;break;case a.RawAtArgument.Bottom:ge=4;break;default:break}const le=H.coordinatesConverter.convertModelRangeToViewRange(ce);H.revealRange(W.source,!1,le,ge,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,q){const Z=W._getViewModel();Z&&this.runCoreEditorCommand(Z,q)}runCoreEditorCommand(H,W){H.model.pushStackElement(),H.setCursorStates("keyboard",3,[n.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 m(T,O){h.KeybindingsRegistry.registerKeybindingRule({id:T,primary:O,when:f,weight:o+1})}m(v.CursorColumnSelectLeft.id,1039),m(v.CursorColumnSelectRight.id,1041),m(v.CursorColumnSelectUp.id,1040),m(v.CursorColumnSelectPageUp.id,1035),m(v.CursorColumnSelectDown.id,1042),m(v.CursorColumnSelectPageDown.id,1036);function C(T){return T.register(),T}var L;(function(T){class O extends w.EditorCommand{runEditorCommand(A,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,A,N){R.pushUndoStop(),R.executeCommands(this.id,t.TypeOperations.lineBreakInsert(A.cursorConfig,A.model,A.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,A,N){R.pushUndoStop(),R.executeCommands(this.id,t.TypeOperations.outdent(A.cursorConfig,A.model,A.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,A,N){R.pushUndoStop(),R.executeCommands(this.id,t.TypeOperations.tab(A.cursorConfig,A.model,A.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,A,N){const[P,x]=p.DeleteOperations.deleteLeft(A.getPrevEditOperationType(),A.cursorConfig,A.model,A.getCursorStates().map(F=>F.modelState.selection),A.getCursorAutoClosedCharacters());P&&R.pushUndoStop(),R.executeCommands(this.id,x),A.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,A,N){const[P,x]=p.DeleteOperations.deleteRight(A.getPrevEditOperationType(),A.cursorConfig,A.model,A.getCursorStates().map(F=>F.modelState.selection));P&&R.pushUndoStop(),R.executeCommands(this.id,x),A.setPrevEditOperationType(3)}}),T.Undo=new class extends u{constructor(){super(w.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(R,A,N){if(!(!A.hasModel()||A.getOption(87)===!0))return A.getModel().undo()}},T.Redo=new class extends u{constructor(){super(w.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(R,A,N){if(!(!A.hasModel()||A.getOption(87)===!0))return A.getModel().redo()}}})(L||(e.CoreEditingCommands=L={}));class D extends w.Command{constructor(O,R,A){super({id:O,precondition:void 0,description:A}),this._handlerId=R}runCommand(O,R){const A=O.get(b.ICodeEditorService).getFocusedCodeEditor();A&&A.trigger("keyboard",this._handlerId,R)}}function I(T,O){C(new D("default:"+T,T)),C(new D(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(X[760],ee([1,0,226,15]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let y=e.MarkerDecorationsContribution=class{constructor(w,b){}dispose(){}};y.ID="editor.contrib.markerDecorations",e.MarkerDecorationsContribution=y=Me([fe(1,_.IMarkerDecorationsService)],y),(0,k.registerEditorContribution)(y.ID,y,0)}),define(X[761],ee([1,0,184,12,17]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class E{constructor(b,S,g,p){this.configuration=b,this.viewModel=S,this.userInputEvents=g,this.commandDelegate=p}paste(b,S,g,p){this.commandDelegate.paste(b,S,g,p)}type(b){this.commandDelegate.type(b)}compositionType(b,S,g,p){this.commandDelegate.compositionType(b,S,g,p)}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=y.isLinux&&S.get(102),p=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):p?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=E}),define(X[762],ee([1,0,6,57,111,72]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let w=e.WorkerBasedDocumentDiffProvider=class{constructor(S,g,p){this.editorWorkerService=g,this.telemetryService=p,this.onDidChangeEventEmitter=new _.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(S)}dispose(){var S;(S=this.diffAlgorithmOnDidChangeSubscription)===null||S===void 0||S.dispose()}computeDiff(S,g,p){var n;return we(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(S,g,p);const t=k.StopWatch.create(!0),i=yield this.editorWorkerService.computeDiff(S.uri,g.uri,p,this.diffAlgorithm),s=t.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:s,timedOut:(n=i?.quitEarly)!==null&&n!==void 0?n:!0}),!i)throw new Error("no diff result available");return i})}setOptions(S){var g;let p=!1;S.diffAlgorithm&&this.diffAlgorithm!==S.diffAlgorithm&&((g=this.diffAlgorithmOnDidChangeSubscription)===null||g===void 0||g.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=S.diffAlgorithm,typeof S.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=S.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),p=!0),p&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=w=Me([fe(1,y.IEditorWorkerService),fe(2,E.ITelemetryService)],w)}),define(X[763],ee([1,0,49,61,59,15,23,22,602,14,417]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new g.RawContextKey("selectionAnchorSet",!1);let p=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()}};p.ID="editor.contrib.selectionAnchorController",p=Me([fe(1,g.IContextKeyService)],p);class n extends E.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,y.KeyChord)(2089,2080),weight:100}})}run(d,h){var o;return we(this,void 0,void 0,function*(){(o=p.get(h))===null||o===void 0||o.setSelectionAnchor()})}}class t extends E.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=p.get(h))===null||o===void 0||o.goToSelectionAnchor()})}}class i extends E.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,y.KeyChord)(2089,2089),weight:100}})}run(d,h){var o;return we(this,void 0,void 0,function*(){(o=p.get(h))===null||o===void 0||o.selectFromAnchorToCursor()})}}class s extends E.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=p.get(h))===null||o===void 0||o.cancelSelectionAnchor()})}}(0,E.registerEditorContribution)(p.ID,p,4),(0,E.registerEditorAction)(n),(0,E.registerEditorAction)(t),(0,E.registerEditorAction)(i),(0,E.registerEditorAction)(s)}),define(X[764],ee([1,0,15,22,516,604]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends _.EditorAction{constructor(p,n){super(n),this.left=p}run(p,n){if(!n.hasModel())return;const t=[],i=n.getSelections();for(const s of i)t.push(new y.MoveCaretCommand(s,this.left));n.pushUndoStop(),n.executeCommands(this.id,t),n.pushUndoStop()}}class b extends w{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:E.localize(0,null),alias:"Move Selected Text Left",precondition:k.EditorContextKeys.writable})}}class S extends w{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:E.localize(1,null),alias:"Move Selected Text Right",precondition:k.EditorContextKeys.writable})}}(0,_.registerEditorAction)(b),(0,_.registerEditorAction)(S)}),define(X[765],ee([1,0,15,119,193,5,22,605]),function(K,e,_,k,y,E,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(p,n){if(!n.hasModel())return;const t=n.getModel(),i=[],s=n.getSelections();for(const r of s){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():y.MoveOperations.rightPosition(t,r.getPosition().lineNumber,r.getPosition().column),l=y.MoveOperations.leftPosition(t,c),a=y.MoveOperations.leftPosition(t,l),u=t.getValueInRange(E.Range.fromPositions(a,l)),v=t.getValueInRange(E.Range.fromPositions(l,c)),f=E.Range.fromPositions(a,c);i.push(new k.ReplaceCommand(f,v+u))}i.length>0&&(n.pushUndoStop(),n.executeCommands(this.id,i),n.pushUndoStop())}}(0,_.registerEditorAction)(S)}),define(X[766],ee([1,0,47,17,220,15,32,22,606,29,97,14]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const t="9_cutcopypaste",i=k.isNative||document.queryCommandSupported("cut"),s=k.isNative||document.queryCommandSupported("copy"),r=typeof navigator.clipboard>"u"||_.isFirefox?document.queryCommandSupported("paste"):!0;function d(c){return c.register(),c}e.CutAction=i?d(new E.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=s?d(new E.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:n.ContextKeyExpr.and(n.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 E.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 E.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(l,a){!a.hasModel()||!a.getOption(35)&&a.getSelection().isEmpty()||(y.CopyOptions.forceCopyWithSyntaxHighlighting=!0,a.focus(),document.execCommand("copy"),y.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function o(c,l){c&&(c.addImplementation(1e4,"code-editor",(a,u)=>{const v=a.get(w.ICodeEditorService).getFocusedCodeEditor();if(v&&v.hasTextFocus()){const f=v.getOption(35),m=v.getSelection();return m&&m.isEmpty()&&!f||document.execCommand(l),!0}return!1}),c.addImplementation(0,"generic-dom",(a,u)=>(document.execCommand(l),!0)))}o(e.CutAction,"cut"),o(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(c,l)=>{const a=c.get(w.ICodeEditorService),u=c.get(p.IClipboardService),v=a.getFocusedCodeEditor();return v&&v.hasTextFocus()?!document.execCommand("paste")&&k.isWeb?(()=>we(void 0,void 0,void 0,function*(){const m=yield u.readText();if(m!==""){const C=y.InMemoryClipboardMetadataManager.INSTANCE.get(m);let L=!1,D=null,I=null;C&&(L=v.getOption(35)&&!!C.isFromEmptySelection,D=typeof C.multicursorText<"u"?C.multicursorText:null,I=C.mode),v.trigger("keyboard","paste",{text:m,pasteOnNewLine:L,multicursorText:D,mode:I})}}))():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(c,l)=>(document.execCommand("paste"),!0))),s&&(0,E.registerEditorAction)(h)}),define(X[767],ee([1,0,59,15,5,22,28,275,517,616,29]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n 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 l=o.getModel(),a=[],u=l.getOptions(),v=o.getOption(21),f=o.getSelections().map((C,L)=>({selection:C,index:L,ignoreFirstLine:!1}));f.sort((C,L)=>y.Range.compareRangesUsingStarts(C.selection,L.selection));let m=f[0];for(let C=1;C<f.length;C++){const L=f[C];m.selection.endLineNumber===L.selection.startLineNumber&&(m.index<L.index?L.ignoreFirstLine=!0:(m.ignoreFirstLine=!0,m=L))}for(const C of f)a.push(new S.LineCommentCommand(c,C.selection,u.tabSize,this._type,v.insertSpace,v.ignoreEmptyLines,C.ignoreFirstLine));o.pushUndoStop(),o.executeCommands(this.id,a),o.pushUndoStop()}}class t extends n{constructor(){super(0,{id:"editor.action.commentLine",label:g.localize(0,null),alias:"Toggle Line Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"5_insert",title:g.localize(1,null),order:1}})}}class i extends n{constructor(){super(1,{id:"editor.action.addCommentLine",label:g.localize(2,null),alias:"Add Line Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2089,2081),weight:100}})}}class s extends n{constructor(){super(2,{id:"editor.action.removeCommentLine",label:g.localize(3,null),alias:"Remove Line Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.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:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:p.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 l=o.getOption(21),a=[],u=o.getSelections();for(const v of u)a.push(new b.BlockCommentCommand(v,l.insertSpace,c));o.pushUndoStop(),o.executeCommands(this.id,a),o.pushUndoStop()}}(0,k.registerEditorAction)(t),(0,k.registerEditorAction)(i),(0,k.registerEditorAction)(s),(0,k.registerEditorAction)(r)}),define(X[768],ee([1,0,2,15,22,620]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class w{constructor(t){this.selections=t}equals(t){const i=this.selections.length,s=t.selections.length;if(i!==s)return!1;for(let r=0;r<i;r++)if(!this.selections[r].equalsSelection(t.selections[r]))return!1;return!0}}class b{constructor(t,i,s){this.cursorState=t,this.scrollTop=i,this.scrollLeft=s}}class 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 s=new w(i.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(s)||(this._undoStack.push(new b(s,t.getScrollTop(),t.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new b(new w(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new b(new w(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(t){this._isCursorUndoRedo=!0,this._editor.setSelections(t.cursorState.selections),this._editor.setScrollPosition({scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=S,S.ID="editor.contrib.cursorUndoRedoController";class g extends k.EditorAction{constructor(){super({id:"cursorUndo",label:E.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(t,i,s){var r;(r=S.get(i))===null||r===void 0||r.cursorUndo()}}e.CursorUndo=g;class p extends k.EditorAction{constructor(){super({id:"cursorRedo",label:E.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(t,i,s){var r;(r=S.get(i))===null||r===void 0||r.cursorRedo()}}e.CursorRedo=p,(0,k.registerEditorContribution)(S.ID,S,0),(0,k.registerEditorAction)(g),(0,k.registerEditorAction)(p)}),define(X[769],ee([1,0,15,14,21,60,8,50,624]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const g=(0,w.createDecorator)("IEditorCancelService"),p=new k.RawContextKey("cancellableOperation",!1,(0,S.localize)(0,null));(0,b.registerSingleton)(g,class{constructor(){this._tokens=new WeakMap}add(t,i){let s=this._tokens.get(t);s||(s=t.invokeWithinContext(d=>{const h=p.bindTo(d.get(k.IContextKeyService)),o=new E.LinkedList;return{key:h,tokens:o}}),this._tokens.set(t,s));let r;return s.key.set(!0),r=s.tokens.push(i),()=>{r&&(r(),s.key.set(!s.tokens.isEmpty()),r=void 0)}}cancel(t){const i=this._tokens.get(t);if(!i)return;const s=i.tokens.pop();s&&(s.cancel(),i.key.set(!i.tokens.isEmpty()))}},1);class n extends y.CancellationTokenSource{constructor(i,s){super(s),this.editor=i,this._unregister=i.invokeWithinContext(r=>r.get(g).add(i,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=n,(0,_.registerEditorCommand)(new class extends _.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(t,i){t.get(g).cancel(i)}})}),define(X[98],ee([1,0,9,5,21,2,769]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class b{constructor(n,t){if(this.flags=t,this.flags&1){const i=n.getModel();this.modelVersionId=i?_.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=n.getPosition():this.position=null,this.flags&2?this.selection=n.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=n.getScrollLeft(),this.scrollTop=n.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(n){if(!(n instanceof b))return!1;const t=n;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(n){return this._equals(new b(n,this.flags))}}e.EditorState=b;class S extends w.EditorKeybindingCancellationTokenSource{constructor(n,t,i,s){super(n,s),this._listener=new E.DisposableStore,t&4&&this._listener.add(n.onDidChangeCursorPosition(r=>{(!i||!k.Range.containsPosition(i,r.position))&&this.cancel()})),t&2&&this._listener.add(n.onDidChangeCursorSelection(r=>{(!i||!k.Range.containsRange(i,r.selection))&&this.cancel()})),t&8&&this._listener.add(n.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(n.onDidChangeModel(r=>this.cancel())),this._listener.add(n.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=S;class g extends y.CancellationTokenSource{constructor(n,t){super(t),this._listener=n.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=g}),define(X[128],ee([1,0,16,21,11,2,20,151,5,23,19,51,98,607,25,43,83,72,108]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 E.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 l={actions:[],documentation:void 0};function a(D,I,T,O,R,A){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,A),B=u(D,I,P),V=new E.DisposableStore,$=B.map(Q=>we(this,void 0,void 0,function*(){try{R.report(Q);const ie=yield Q.provideCodeActions(I,T,x,F.token);if(ie&&V.add(ie),F.token.isCancellationRequested)return l;const re=(ie?.actions||[]).filter(se=>se&&(0,o.filtersAction)(P,se)),ne=f(Q,re,P.include);return{actions:re.map(se=>new o.CodeActionItem(se,Q)),documentation:ne}}catch(ie){if((0,y.isCancellationError)(ie))throw ie;return(0,y.onUnexpectedExternalError)(ie),l}})),M=D.onDidChange(()=>{const Q=D.all(I);(0,_.equals)(Q,B)||F.cancel()});try{const Q=yield Promise.all($),ie=Q.map(ne=>ne.actions).flat(),re=[...(0,_.coalesce)(Q.map(ne=>ne.documentation)),...v(D,I,O,ie)];return new c(ie,re,V)}finally{M.dispose(),F.dispose()}})}e.getCodeActions=a;function u(D,I,T){return D.all(I).filter(O=>O.providedCodeActionKinds?O.providedCodeActionKinds.some(R=>(0,o.mayIncludeActionsOfKind)(T,new o.CodeActionKind(R))):!0)}function*v(D,I,T,O){var R,A,N;if(I&&O.length)for(const P of D.all(I))P._getAdditionalMenuItems&&(yield*(R=P._getAdditionalMenuItems)===null||R===void 0?void 0:R.call(P,{trigger:T.type,only:(N=(A=T.filter)===null||A===void 0?void 0:A.include)===null||N===void 0?void 0:N.value},O.map(x=>x.action)))}function f(D,I,T){if(!D.documentation)return;const O=D.documentation.map(R=>({kind:new o.CodeActionKind(R.kind),command:R.command}));if(T){let R;for(const A of O)A.kind.contains(T)&&(R?R.kind.contains(A.kind)&&(R=A):R=A);if(R)return R?.command}for(const R of I)if(R.kind){for(const A of O)if(A.kind.contains(new o.CodeActionKind(R.kind)))return A.command}}var m;(function(D){D.OnSave="onSave",D.FromProblemsView="fromProblemsView",D.FromCodeActions="fromCodeActions"})(m||(e.ApplyCodeActionReason=m={}));function C(D,I,T,O,R=k.CancellationToken.None){var A;return we(this,void 0,void 0,function*(){const N=D.get(b.IBulkEditService),P=D.get(s.ICommandService),x=D.get(h.ITelemetryService),F=D.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&&!(!((A=I.action.edit)===null||A===void 0)&&A.edits.length&&!(yield N.apply(I.action.edit,{editor:O?.editor,label:I.action.title,quotableLabel:I.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:T!==m.OnSave,showPreview:O?.preview})).isApplied)&&I.action.command)try{yield P.executeCommand(I.action.command.id,...I.action.command.arguments||[])}catch(B){const V=L(B);F.error(typeof V=="string"?V:i.localize(0,null))}})}e.applyCodeAction=C;function L(D){return typeof D=="string"?D:D instanceof Error&&typeof D.message=="string"?D.message:void 0}s.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(D,I,T,O,R){return we(this,void 0,void 0,function*(){if(!(I instanceof w.URI))throw(0,y.illegalArgument)();const{codeActionProvider:A}=D.get(p.ILanguageFeaturesService),N=D.get(n.IModelService).getModel(I);if(!N)throw(0,y.illegalArgument)();const P=g.Selection.isISelection(T)?g.Selection.liftSelection(T):S.Range.isIRange(T)?N.validateRange(T):void 0;if(!P)throw(0,y.illegalArgument)();const x=typeof O=="string"?new o.CodeActionKind(O):void 0,F=yield a(A,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 $=0;$<V;$++)B.push(F.validActions[$].resolve(k.CancellationToken.None));try{return yield Promise.all(B),F.validActions.map($=>$.action)}finally{setTimeout(()=>F.dispose(),100)}})})}),define(X[770],ee([1,0,101,128,108,34]),function(K,e,_,k,y,E){"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 p=g.commandArgs;return g.command===k.organizeImportsCommandId?p={kind:y.CodeActionKind.SourceOrganizeImports.value}:g.command===k.fixAllCommandId&&(p={kind:y.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:g.resolvedKeybinding},y.CodeActionCommandArgs.fromUser(p,{kind:y.CodeActionKind.None,apply:"never"}))}));return g=>{if(g.kind){const p=this.bestKeybindingForCodeAction(g,S.value);return p?.resolvedKeybinding}}}bestKeybindingForCodeAction(S,g){if(!S.kind)return;const p=new y.CodeActionKind(S.kind);return g.filter(n=>n.kind.contains(p)).filter(n=>n.preferred?S.isPreferred:!0).reduceRight((n,t)=>n?n.kind.contains(t.kind)?t:n:t,void 0)}};w.codeActionCommands=[k.refactorCommandId,k.codeActionCommandId,k.sourceActionCommandId,k.organizeImportsCommandId,k.fixAllCommandId],e.CodeActionKeybindingResolver=w=Me([fe(0,E.IKeybindingService)],w)});var xt=this&&this.__classPrivateFieldGet||function(K,e,_,k){if(_==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?K!==e||!k:!e.has(K))throw new TypeError("Cannot read private member from an object whose class did not declare it");return _==="m"?k:_==="a"?k.call(K):k?k.value:e.get(K)},oi=this&&this.__classPrivateFieldSet||function(K,e,_,k,y){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?K!==e||!y:!e.has(K))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?y.call(K,_):y?y.value=_:e.set(K,_),_};define(X[332],ee([1,0,13,11,6,2,42,14,83,108,128]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new b.RawContextKey("supportedCodeAction","");class t extends E.Disposable{constructor(h,o,c,l=250){super(),this._editor=h,this._markerService=o,this._signalChange=c,this._delay=l,this._autoTriggerTimer=this._register(new _.TimeoutTimer),this._register(this._markerService.onMarkerChanged(a=>this._onMarkerChanges(a))),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:l,column:a}=c.getPosition(),u=o.getLineContent(l);if(u.length===0)return;if(a===1){if(/\s/.test(u[0]))return}else if(a===o.getLineMaxColumn(l)){if(/\s/.test(u[u.length-1]))return}else if(/\s/.test(u[a-2])&&/\s/.test(u[a-1]))return}return c}}var i;(function(d){d.Empty={type:0};class h{constructor(c,l,a){this.trigger=c,this.position=l,this._cancellablePromise=a,this.type=1,this.actions=a.catch(u=>{if((0,k.isCancellationError)(u))return s;throw u})}cancel(){this._cancellablePromise.cancel()}}d.Triggered=h})(i||(e.CodeActionsState=i={}));const s=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class r extends E.Disposable{constructor(h,o,c,l,a){super(),this._editor=h,this._registry=o,this._markerService=c,this._progressService=a,this._codeActionOracle=this._register(new E.MutableDisposable),this._state=i.Empty,this._onDidChangeState=this._register(new y.Emitter),this.onDidChangeState=this._onDidChangeState.event,n.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(l),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,n,"f")||(oi(this,n,!0,"f"),super.dispose(),this.setState(i.Empty,!0))}_update(){if(xt(this,n,"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(87)){const o=this._registry.all(h).flatMap(c=>{var l;return(l=c.providedCodeActionKinds)!==null&&l!==void 0?l:[]});this._supportedCodeActions.set(o.join(" ")),this._codeActionOracle.value=new t(this._editor,this._markerService,c=>{var l;if(!c){this.setState(i.Empty);return}const a=(0,_.createCancelablePromise)(u=>(0,p.getCodeActions)(this._registry,h,c.selection,c.trigger,S.Progress.None,u));c.trigger.type===1&&((l=this._progressService)===null||l===void 0||l.showWhile(a,250)),this.setState(new i.Triggered(c.trigger,c.selection.getStartPosition(),a))},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,n,"f")&&this._onDidChangeState.fire(h))}}e.CodeActionModel=r,n=new WeakMap}),define(X[333],ee([1,0,7,58,27,6,2,30,18,198,128,612,34,419]),function(K,e,_,k,y,E,w,b,S,g,p,n,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,l,a){this.actions=o,this.trigger=c,this.editorPosition=l,this.widgetPosition=a,this.type=1}}r.Showing=d})(i||(i={}));let s=e.LightBulbWidget=class Bi extends w.Disposable{constructor(d,h){super(),this._editor=d,this._onClick=this._register(new E.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:l}=_.getDomNodePagePosition(this._domNode),a=this._editor.getOption(64);let u=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(u+=a),this._onClick.fire({x:o.posx,y:c+l+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(E.Event.runAndSubscribe(h.onDidUpdateKeybindings,()=>{var o,c;this._preferredKbLabel=(0,S.withNullAsUndefined)((o=h.lookupKeybinding(p.autoFixCommandId))===null||o===void 0?void 0:o.getLabel()),this._quickFixKbLabel=(0,S.withNullAsUndefined)((c=h.lookupKeybinding(p.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 l=this._editor.getModel();if(!l)return this.hide();const{lineNumber:a,column:u}=l.validatePosition(o),v=l.getOptions().tabSize,f=c.get(48),m=l.getLineContent(a),C=(0,g.computeIndentLevel)(m,v),L=f.spaceWidth*C>22,D=T=>T>2&&this._editor.getTopForLineNumber(T)===this._editor.getTopForLineNumber(T-1);let I=a;if(!L){if(a>1&&!D(a-1))I-=1;else if(!D(a+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(y.Codicon.lightBulb)),this._domNode.classList.add(...b.ThemeIcon.asClassNameArray(y.Codicon.lightbulbAutofix)),this._preferredKbLabel)){this.title=n.localize(0,null,this._preferredKbLabel);return}this._domNode.classList.remove(...b.ThemeIcon.asClassNameArray(y.Codicon.lightbulbAutofix)),this._domNode.classList.add(...b.ThemeIcon.asClassNameArray(y.Codicon.lightBulb)),this._quickFixKbLabel?this.title=n.localize(1,null,this._quickFixKbLabel):this.title=n.localize(2,null)}set title(d){this._domNode.title=d}};s.ID="editor.contrib.lightbulbWidget",s._posPref=[0],e.LightBulbWidget=s=Me([fe(1,t.IKeybindingService)],s)}),define(X[771],ee([1,0,15,148,629]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E extends _.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:y.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(g,p){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class w extends _.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:y.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(g,p){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()-1)}}class b extends _.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:y.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(g,p){k.EditorZoom.setZoomLevel(0)}}(0,_.registerEditorAction)(E),(0,_.registerEditorAction)(w),(0,_.registerEditorAction)(b)}),define(X[334],ee([1,0,49,16,21,11,53,60,18,20,98,172,12,5,23,111,62,278,630,25,712,8,19,63]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m(N,P,x){const F=[],B=new l.ExtensionIdentifierSet,V=N.ordered(x);for(const M of V)F.push(M),M.extensionId&&B.add(M.extensionId);const $=P.ordered(x);for(const M of $){if(M.extensionId){if(B.has(M.extensionId))continue;B.add(M.extensionId)}F.push({displayName:M.displayName,extensionId:M.extensionId,provideDocumentFormattingEdits(Q,ie,re){return M.provideDocumentRangeFormattingEdits(Q,Q.getFullModelRange(),ie,re)}})}return F}e.getRealAndSyntheticDocumentFormattersOrdered=m;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 L(N,P,x,F,B,V){return we(this,void 0,void 0,function*(){const $=N.get(a.IInstantiationService),{documentRangeFormattingEditProvider:M}=N.get(u.ILanguageFeaturesService),Q=(0,n.isCodeEditor)(P)?P.getModel():P,ie=M.ordered(Q),re=yield C.select(ie,Q,F);re&&(B.report(re),yield $.invokeFunction(D,re,P,x,V))})}e.formatDocumentRangesWithSelectedProvider=L;function D(N,P,x,F,B){var V,$;return we(this,void 0,void 0,function*(){const M=N.get(r.IEditorWorkerService),Q=N.get(v.ILogService);let ie,re;(0,n.isCodeEditor)(x)?(ie=x.getModel(),re=new p.EditorStateCancellationTokenSource(x,5,void 0,B)):(ie=x,re=new p.TextModelCancellationTokenSource(x,B));const ne=[];let se=0;for(const Y of(0,k.asArray)(F).sort(i.Range.compareRangesUsingStarts))se>0&&i.Range.areIntersectingOrTouching(ne[se-1],Y)?ne[se-1]=i.Range.fromPositions(ne[se-1].getStartPosition(),Y.getEndPosition()):se=ne.push(Y);const H=Y=>we(this,void 0,void 0,function*(){var oe,ce;Q.trace("[format][provideDocumentRangeFormattingEdits] (request)",(oe=P.extensionId)===null||oe===void 0?void 0:oe.value,Y);const ge=(yield P.provideDocumentRangeFormattingEdits(ie,Y,ie.getFormattingOptions(),re.token))||[];return Q.trace("[format][provideDocumentRangeFormattingEdits] (response)",(ce=P.extensionId)===null||ce===void 0?void 0:ce.value,ge),ge}),W=(Y,oe)=>{if(!Y.length||!oe.length)return!1;const ce=Y.reduce((ge,le)=>i.Range.plusRange(ge,le.range),Y[0].range);if(!oe.some(ge=>i.Range.intersectRanges(ce,ge.range)))return!1;for(const ge of Y)for(const le of oe)if(i.Range.intersectRanges(ge.range,le.range))return!0;return!1},q=[],Z=[];try{if(typeof P.provideDocumentRangesFormattingEdits=="function"){Q.trace("[format][provideDocumentRangeFormattingEdits] (request)",(V=P.extensionId)===null||V===void 0?void 0:V.value,ne);const Y=(yield P.provideDocumentRangesFormattingEdits(ie,ne,ie.getFormattingOptions(),re.token))||[];Q.trace("[format][provideDocumentRangeFormattingEdits] (response)",($=P.extensionId)===null||$===void 0?void 0:$.value,Y),Z.push(Y)}else{for(const Y of ne){if(re.token.isCancellationRequested)return!0;Z.push(yield H(Y))}for(let Y=0;Y<ne.length;++Y)for(let oe=Y+1;oe<ne.length;++oe){if(re.token.isCancellationRequested)return!0;if(W(Z[Y],Z[oe])){const ce=i.Range.plusRange(ne[Y],ne[oe]),ge=yield H(ce);ne.splice(oe,1),ne.splice(Y,1),ne.push(ce),Z.splice(oe,1),Z.splice(Y,1),Z.push(ge),Y=0,oe=0}}}for(const Y of Z){if(re.token.isCancellationRequested)return!0;const oe=yield M.computeMoreMinimalEdits(ie.uri,Y);oe&&q.push(...oe)}}finally{re.dispose()}if(q.length===0)return!1;if((0,n.isCodeEditor)(x))h.FormattingEdit.execute(x,q,!0),f(q),x.revealPositionInCenterIfOutsideViewport(x.getPosition(),1);else{const[{range:Y}]=q,oe=new s.Selection(Y.startLineNumber,Y.startColumn,Y.endLineNumber,Y.endColumn);ie.pushEditOperations([oe],q.map(ce=>({text:ce.text,range:i.Range.lift(ce.range),forceMoveMarkers:!0})),ce=>{for(const{range:ge}of ce)if(i.Range.areIntersectingOrTouching(ge,oe))return[new s.Selection(ge.startLineNumber,ge.startColumn,ge.endLineNumber,ge.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=D;function I(N,P,x,F,B){return we(this,void 0,void 0,function*(){const V=N.get(a.IInstantiationService),$=N.get(u.ILanguageFeaturesService),M=(0,n.isCodeEditor)(P)?P.getModel():P,Q=m($.documentFormattingEditProvider,$.documentRangeFormattingEditProvider,M),ie=yield C.select(Q,M,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 $,M;(0,n.isCodeEditor)(x)?($=x.getModel(),M=new p.EditorStateCancellationTokenSource(x,5,void 0,B)):($=x,M=new p.TextModelCancellationTokenSource(x,B));let Q;try{const ie=yield P.provideDocumentFormattingEdits($,$.getFormattingOptions(),M.token);if(Q=yield V.computeMoreMinimalEdits($.uri,ie),M.token.isCancellationRequested)return!0}finally{M.dispose()}if(!Q||Q.length===0)return!1;if((0,n.isCodeEditor)(x))h.FormattingEdit.execute(x,Q,F!==2),F!==2&&(f(Q),x.revealPositionInCenterIfOutsideViewport(x.getPosition(),1));else{const[{range:ie}]=Q,re=new s.Selection(ie.startLineNumber,ie.startColumn,ie.endLineNumber,ie.endColumn);$.pushEditOperations([re],Q.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,re))return[new s.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 $=P.documentRangeFormattingEditProvider.ordered(x);for(const M of $){const Q=yield Promise.resolve(M.provideDocumentRangeFormattingEdits(x,F,B,V)).catch(E.onUnexpectedExternalError);if((0,k.isNonEmptyArray)(Q))return yield N.computeMoreMinimalEdits(x.uri,Q)}})}e.getDocumentRangeFormattingEditsUntilResult=O;function R(N,P,x,F,B){return we(this,void 0,void 0,function*(){const V=m(P.documentFormattingEditProvider,P.documentRangeFormattingEditProvider,x);for(const $ of V){const M=yield Promise.resolve($.provideDocumentFormattingEdits(x,F,B)).catch(E.onUnexpectedExternalError);if((0,k.isNonEmptyArray)(M))return yield N.computeMoreMinimalEdits(x.uri,M)}})}e.getDocumentFormattingEditsUntilResult=R;function A(N,P,x,F,B,V,$){const M=P.onTypeFormattingEditProvider.ordered(x);return M.length===0||M[0].autoFormatTriggerCharacters.indexOf(B)<0?Promise.resolve(void 0):Promise.resolve(M[0].provideOnTypeFormattingEdits(x,F,B,V,$)).catch(E.onUnexpectedExternalError).then(Q=>N.computeMoreMinimalEdits(x.uri,Q))}e.getOnTypeFormattingEdits=A,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),$=N.get(r.IEditorWorkerService),M=N.get(u.ILanguageFeaturesService),Q=yield V.createModelReference(x);try{return O($,M,Q.object.textEditorModel,i.Range.lift(F),B,y.CancellationToken.None)}finally{Q.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),$=N.get(u.ILanguageFeaturesService),M=yield B.createModelReference(x);try{return R(V,$,M.object.textEditorModel,F,y.CancellationToken.None)}finally{M.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 $=N.get(d.ITextModelService),M=N.get(r.IEditorWorkerService),Q=N.get(u.ILanguageFeaturesService),ie=yield $.createModelReference(x);try{return A(M,Q,ie.object.textEditorModel,t.Position.lift(F),B,V,y.CancellationToken.None)}finally{ie.dispose()}})})}),define(X[772],ee([1,0,16,21,11,59,2,15,32,116,5,22,111,19,334,278,631,25,14,8,83]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class{constructor(C,L,D){this._editor=C,this._languageFeaturesService=L,this._workerService=D,this._disposables=new w.DisposableStore,this._sessionDisposables=new w.DisposableStore,this._disposables.add(L.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(),[L]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(C);if(!L||!L.autoFormatTriggerCharacters)return;const D=new g.CharacterSet;for(const I of L.autoFormatTriggerCharacters)D.add(I.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(I=>{const T=I.charCodeAt(I.length-1);D.has(T)&&this._trigger(String.fromCharCode(T))}))}_trigger(C){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const L=this._editor.getModel(),D=this._editor.getPosition(),I=new k.CancellationTokenSource,T=this._editor.onDidChangeModelContent(O=>{if(O.isFlush){I.cancel(),T.dispose();return}for(let R=0,A=O.changes.length;R<A;R++)if(O.changes[R].range.endLineNumber<=D.lineNumber){I.cancel(),T.dispose();return}});(0,s.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,L,D,C,L.getFormattingOptions(),I.token).then(O=>{I.token.isCancellationRequested||(0,_.isNonEmptyArray)(O)&&(r.FormattingEdit.execute(this._editor,O,!0),(0,s.alertFormattingEdits)(O))}).finally(()=>{T.dispose()})}};a.ID="editor.contrib.autoFormat",a=Me([fe(1,i.ILanguageFeaturesService),fe(2,t.IEditorWorkerService)],a);let u=class{constructor(C,L,D){this.editor=C,this._languageFeaturesService=L,this._instantiationService=D,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(L.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:C})=>this._trigger(C)))}_trigger(C){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(s.formatDocumentRangesWithSelectedProvider,this.editor,C,2,l.Progress.None,k.CancellationToken.None).catch(y.onUnexpectedError))}};u.ID="editor.contrib.formatOnPaste",u=Me([fe(1,i.ILanguageFeaturesService),fe(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(n.EditorContextKeys.notInCompositeEditor,n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(C,L){return we(this,void 0,void 0,function*(){if(L.hasModel()){const D=C.get(c.IInstantiationService);yield C.get(l.IEditorProgressService).showWhile(D.invokeFunction(s.formatDocumentWithSelectedProvider,L,1,l.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(n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:n.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(C,L){return we(this,void 0,void 0,function*(){if(!L.hasModel())return;const D=C.get(c.IInstantiationService),I=L.getModel(),T=L.getSelections().map(R=>R.isEmpty()?new p.Range(R.startLineNumber,1,R.startLineNumber,I.getLineMaxColumn(R.startLineNumber)):R);yield C.get(l.IEditorProgressService).showWhile(D.invokeFunction(s.formatDocumentRangesWithSelectedProvider,L,T,1,l.Progress.None,k.CancellationToken.None),250)})}}(0,b.registerEditorContribution)(a.ID,a,2),(0,b.registerEditorContribution)(u.ID,u,2),(0,b.registerEditorAction)(v),(0,b.registerEditorAction)(f),h.CommandsRegistry.registerCommand("editor.action.format",m=>we(void 0,void 0,void 0,function*(){const C=m.get(S.ICodeEditorService).getFocusedCodeEditor();if(!C||!C.hasModel())return;const L=m.get(h.ICommandService);C.getSelection().isEmpty()?yield L.executeCommand("editor.action.formatDocument"):yield L.executeCommand("editor.action.formatSelection")}))}),define(X[237],ee([1,0,16,21,11,15,19,150]),function(K,e,_,k,y,E,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 l=h.ordered(r).map(u=>Promise.resolve(o(u,r,d)).then(void 0,v=>{(0,y.onUnexpectedExternalError)(v)})),a=yield Promise.all(l);return(0,_.coalesce)(a.flat())})}function g(r,d,h,o){return S(d,h,r,(c,l,a)=>c.provideDefinition(l,a,o))}e.getDefinitionsAtPosition=g;function p(r,d,h,o){return S(d,h,r,(c,l,a)=>c.provideDeclaration(l,a,o))}e.getDeclarationsAtPosition=p;function n(r,d,h,o){return S(d,h,r,(c,l,a)=>c.provideImplementation(l,a,o))}e.getImplementationsAtPosition=n;function t(r,d,h,o){return S(d,h,r,(c,l,a)=>c.provideTypeDefinition(l,a,o))}e.getTypeDefinitionsAtPosition=t;function i(r,d,h,o,c){return S(d,h,r,(l,a,u)=>we(this,void 0,void 0,function*(){const v=yield l.provideReferences(a,u,{includeDeclaration:!0},c);if(!o||!v||v.length!==2)return v;const f=yield l.provideReferences(a,u,{includeDeclaration:!1},c);return f&&f.length===1?f:v}))}e.getReferencesAtPosition=i;function s(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,E.registerModelAndPositionCommand)("_executeDefinitionProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=g(o.definitionProvider,d,h,k.CancellationToken.None);return s(()=>c)}),(0,E.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=t(o.typeDefinitionProvider,d,h,k.CancellationToken.None);return s(()=>c)}),(0,E.registerModelAndPositionCommand)("_executeDeclarationProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=p(o.declarationProvider,d,h,k.CancellationToken.None);return s(()=>c)}),(0,E.registerModelAndPositionCommand)("_executeReferenceProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=i(o.referenceProvider,d,h,!1,k.CancellationToken.None);return s(()=>c)}),(0,E.registerModelAndPositionCommand)("_executeImplementationProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=n(o.implementationProvider,d,h,k.CancellationToken.None);return s(()=>c)})}),define(X[773],ee([1,0,6,2,42,15,32,5,640,14,50,8,34,112,43]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s){"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,n.createDecorator)("ISymbolNavigationService");let r=class{constructor(o,c,l,a){this._editorService=c,this._notificationService=l,this._keybindingService=a,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 l=new d(this._editorService),a=l.onDidChange(u=>{if(this._ignoreEditorChange)return;const v=this._editorService.getActiveCodeEditor();if(!v)return;const f=v.getModel(),m=v.getPosition();if(!f||!m)return;let C=!1,L=!1;for(const D of c.references)if((0,y.isEqual)(D.uri,f.uri))C=!0,L=L||b.Range.containsPosition(D.range,m);else if(C)break;(!C||!L)&&this.reset()});this._currentState=(0,k.combinedDisposable)(l,a)}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"),l=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(l)}};r=Me([fe(0,g.IContextKeyService),fe(1,w.ICodeEditorService),fe(2,s.INotificationService),fe(3,t.IKeybindingService)],r),(0,p.registerSingleton)(e.ISymbolNavigationService,r,1),(0,E.registerEditorCommand)(new class extends E.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=Me([fe(0,w.ICodeEditorService)],d)}),define(X[335],ee([1,0,13,21,11,15,19]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class b{constructor(i,s,r){this.provider=i,this.hover=s,this.ordinal=r}}e.HoverProviderResult=b;function S(t,i,s,r,d){return we(this,void 0,void 0,function*(){try{const h=yield Promise.resolve(t.provideHover(s,r,d));if(h&&n(h))return new b(t,h,i)}catch(h){(0,y.onUnexpectedExternalError)(h)}})}function g(t,i,s,r){const h=t.ordered(i).map((o,c)=>S(o,c,i,s,r));return _.AsyncIterableObject.fromPromises(h).coalesce()}e.getHover=g;function p(t,i,s,r){return g(t,i,s,r).map(d=>d.hover).toPromise()}e.getHoverPromise=p,(0,E.registerModelAndPositionCommand)("_executeHoverProvider",(t,i,s)=>{const r=t.get(w.ILanguageFeaturesService);return p(r.hoverProvider,i,s,k.CancellationToken.None)});function n(t){const i=typeof t.range<"u",s=typeof t.contents<"u"&&t.contents&&t.contents.length>0;return i&&s}}),define(X[238],ee([1,0,7,16,13,61,2,125,12,5,39,335,642,26,52,19]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const d=_.$;class h{constructor(a,u,v,f,m){this.owner=a,this.range=u,this.contents=v,this.isBeforeContent=f,this.ordinal=m}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}}e.MarkdownHover=h;let o=e.MarkdownHoverParticipant=class{constructor(a,u,v,f,m){this._editor=a,this._languageService=u,this._openerService=v,this._configurationService=f,this._languageFeaturesService=m,this.hoverOrdinal=3}createLoadingMessage(a){return new h(this,a.range,[new E.MarkdownString().appendText(t.localize(0,null))],!1,2e3)}computeSync(a,u){if(!this._editor.hasModel()||a.type!==1)return[];const v=this._editor.getModel(),f=a.range.startLineNumber,m=v.getLineMaxColumn(f),C=[];let L=1e3;const D=v.getLineLength(f),I=v.getLanguageIdAtPosition(a.range.startLineNumber,a.range.startColumn),T=this._editor.getOption(112),O=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:I});let R=!1;T>=0&&D>T&&a.range.startColumn>=T&&(R=!0,C.push(new h(this,a.range,[{value:t.localize(1,null)}],!1,L++))),!R&&typeof O=="number"&&D>=O&&C.push(new h(this,a.range,[{value:t.localize(2,null)}],!1,L++));let A=!1;for(const N of u){const P=N.range.startLineNumber===f?N.range.startColumn:1,x=N.range.endLineNumber===f?N.range.endColumn:m,F=N.options.hoverMessage;if(!F||(0,E.isEmptyMarkdownString)(F))continue;N.options.beforeContentClassName&&(A=!0);const B=new g.Range(a.range.startLineNumber,P,a.range.startLineNumber,x);C.push(new h(this,B,(0,k.asArray)(F),A,L++))}return C}computeAsync(a,u,v){if(!this._editor.hasModel()||a.type!==1)return y.AsyncIterableObject.EMPTY;const f=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(f))return y.AsyncIterableObject.EMPTY;const m=new S.Position(a.range.startLineNumber,a.range.startColumn);return(0,n.getHover)(this._languageFeaturesService.hoverProvider,f,m,v).filter(C=>!(0,E.isEmptyMarkdownString)(C.hover.contents)).map(C=>{const L=C.hover.range?g.Range.lift(C.hover.range):a.range;return new h(this,L,C.hover.contents,!1,C.ordinal)})}renderHoverParts(a,u){return c(a,u,this._editor,this._languageService,this._openerService)}};e.MarkdownHoverParticipant=o=Me([fe(1,p.ILanguageService),fe(2,s.IOpenerService),fe(3,i.IConfigurationService),fe(4,r.ILanguageFeaturesService)],o);function c(l,a,u,v,f){a.sort((C,L)=>C.ordinal-L.ordinal);const m=new w.DisposableStore;for(const C of a)for(const L of C.contents){if((0,E.isEmptyMarkdownString)(L))continue;const D=d("div.hover-row.markdown-hover"),I=_.append(D,d("div.hover-contents")),T=m.add(new b.MarkdownRenderer({editor:u},v,f));m.add(T.onDidRenderAsync(()=>{I.className="hover-contents code-hover-contents",l.onContentsChanged()}));const O=m.add(T.render(L));I.appendChild(O.element),l.fragment.appendChild(D)}return m}e.renderMarkdownHovers=c}),define(X[774],ee([1,0,2,9,15,235,65,5,23,22,28,51,279,645,79,191,233]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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,A,N,P,x){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return[];const F=A.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:$}=R.getOptions(),M=(W,q)=>(q=q||1,E.ShiftCommand.shiftIndent(W,W.length+q,B,V,$)),Q=(W,q)=>(q=q||1,E.ShiftCommand.unshiftIndent(W,W.length+q,B,V,$)),ie=[];let re;const ne=R.getLineContent(N);let se=ne;if(x!=null){re=x;const W=k.getLeadingWhitespace(ne);se=re+ne.substring(W.length),F.decreaseIndentPattern&&F.decreaseIndentPattern.test(se)&&(re=Q(re),se=re+ne.substring(W.length)),ne!==se&&ie.push(w.EditOperation.replaceMove(new S.Selection(N,1,N,W.length+1),(0,r.normalizeIndentation)(re,V,$)))}else re=k.getLeadingWhitespace(ne);let H=re;F.increaseIndentPattern&&F.increaseIndentPattern.test(se)?(H=M(H),re=M(re)):F.indentNextLinePattern&&F.indentNextLinePattern.test(se)&&(H=M(H)),N++;for(let W=N;W<=P;W++){const q=R.getLineContent(W),Z=k.getLeadingWhitespace(q),Y=H+q.substring(Z.length);F.decreaseIndentPattern&&F.decreaseIndentPattern.test(Y)&&(H=Q(H),re=Q(re)),Z!==H&&ie.push(w.EditOperation.replaceMove(new S.Selection(W,1,W,Z.length+1),(0,r.normalizeIndentation)(H,V,$))),!(F.unIndentedLinePattern&&F.unIndentedLinePattern.test(q))&&(F.increaseIndentPattern&&F.increaseIndentPattern.test(Y)?(re=M(re),H=re):F.indentNextLinePattern&&F.indentNextLinePattern.test(Y)?H=M(H):H=re)}return ie}e.getReindentEditOperations=h;class o extends y.EditorAction{constructor(){super({id:o.ID,label:i.localize(0,null),alias:"Convert Indentation to Spaces",precondition:g.EditorContextKeys.writable})}run(A,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 y.EditorAction{constructor(){super({id:c.ID,label:i.localize(1,null),alias:"Convert Indentation to Tabs",precondition:g.EditorContextKeys.writable})}run(A,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 l extends y.EditorAction{constructor(A,N,P){super(P),this.insertSpaces=A,this.displaySizeOnly=N}run(A,N){const P=A.get(s.IQuickInputService),x=A.get(n.IModelService),F=N.getModel();if(!F)return;const B=x.getCreationOptions(F.getLanguageId(),F.uri,F.isForSimpleWidget),V=F.getOptions(),$=[1,2,3,4,5,6,7,8].map(Q=>({id:Q.toString(),label:Q.toString(),description:Q===B.tabSize&&Q===V.tabSize?i.localize(2,null):Q===B.tabSize?i.localize(3,null):Q===V.tabSize?i.localize(4,null):void 0})),M=Math.min(F.getOptions().tabSize-1,7);setTimeout(()=>{P.pick($,{placeHolder:i.localize(5,null),activeItem:$[M]}).then(Q=>{if(Q&&F&&!F.isDisposed()){const ie=parseInt(Q.label,10);this.displaySizeOnly?F.updateOptions({tabSize:ie}):F.updateOptions({tabSize:ie,indentSize:ie,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=l;class a extends l{constructor(){super(!1,!1,{id:a.ID,label:i.localize(6,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=a,a.ID="editor.action.indentUsingTabs";class u extends l{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 l{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 y.EditorAction{constructor(){super({id:f.ID,label:i.localize(9,null),alias:"Detect Indentation from Content",precondition:void 0})}run(A,N){const P=A.get(n.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 m extends y.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:i.localize(10,null),alias:"Reindent Lines",precondition:g.EditorContextKeys.writable})}run(A,N){const P=A.get(p.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=m;class C extends y.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:i.localize(11,null),alias:"Reindent Selected Lines",precondition:g.EditorContextKeys.writable})}run(A,N){const P=A.get(p.ILanguageConfigurationService),x=N.getModel();if(!x)return;const F=N.getSelections();if(F===null)return;const B=[];for(const V of F){let $=V.startLineNumber,M=V.endLineNumber;if($!==M&&V.endColumn===1&&M--,$===1){if($===M)continue}else $--;const Q=h(x,P,$,M);B.push(...Q)}B.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,B),N.pushUndoStop())}}e.ReindentSelectedLinesAction=C;class L{constructor(A,N){this._initialSelection=N,this._edits=[],this._selectionId=null;for(const P of A)P.range&&typeof P.text=="string"&&this._edits.push(P)}getEditOperations(A,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(A,N){return N.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=L;let D=e.AutoIndentOnPaste=class{constructor(A,N){this.editor=A,this._languageConfigurationService=N,this.callOnDispose=new _.DisposableStore,this.callOnModel=new _.DisposableStore,this.callOnDispose.add(A.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(A.onDidChangeModel(()=>this.update())),this.callOnDispose.add(A.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:A})=>{this.trigger(A)}))}trigger(A){const N=this.editor.getSelections();if(N===null||N.length>1)return;const P=this.editor.getModel();if(!P||!P.tokenization.isCheapToTokenize(A.getStartPosition().lineNumber))return;const x=this.editor.getOption(10),{tabSize:F,indentSize:B,insertSpaces:V}=P.getOptions(),$=[],M={shiftIndent:ne=>E.ShiftCommand.shiftIndent(ne,ne.length+1,F,B,V),unshiftIndent:ne=>E.ShiftCommand.unshiftIndent(ne,ne.length+1,F,B,V)};let Q=A.startLineNumber;for(;Q<=A.endLineNumber;){if(this.shouldIgnoreLine(P,Q)){Q++;continue}break}if(Q>A.endLineNumber)return;let ie=P.getLineContent(Q);if(!/\S/.test(ie.substring(0,A.startColumn-1))){const ne=(0,d.getGoodIndentForLine)(x,P,P.getLanguageId(),Q,M,this._languageConfigurationService);if(ne!==null){const se=k.getLeadingWhitespace(ie),H=t.getSpaceCnt(ne,F),W=t.getSpaceCnt(se,F);if(H!==W){const q=t.generateIndent(H,F,V);$.push({range:new b.Range(Q,1,Q,se.length+1),text:q}),ie=q+ie.substr(se.length)}else{const q=(0,d.getIndentMetadata)(P,Q,this._languageConfigurationService);if(q===0||q===8)return}}}const re=Q;for(;Q<A.endLineNumber;){if(!/\S/.test(P.getLineContent(Q+1))){Q++;continue}break}if(Q!==A.endLineNumber){const ne={tokenization:{getLineTokens:H=>P.tokenization.getLineTokens(H),getLanguageId:()=>P.getLanguageId(),getLanguageIdAtPosition:(H,W)=>P.getLanguageIdAtPosition(H,W)},getLineContent:H=>H===re?ie:P.getLineContent(H)},se=(0,d.getGoodIndentForLine)(x,ne,P.getLanguageId(),Q+1,M,this._languageConfigurationService);if(se!==null){const H=t.getSpaceCnt(se,F),W=t.getSpaceCnt(k.getLeadingWhitespace(P.getLineContent(Q+1)),F);if(H!==W){const q=H-W;for(let Z=Q+1;Z<=A.endLineNumber;Z++){const Y=P.getLineContent(Z),oe=k.getLeadingWhitespace(Y),ge=t.getSpaceCnt(oe,F)+q,le=t.generateIndent(ge,F,V);le!==oe&&$.push({range:new b.Range(Z,1,Z,oe.length+1),text:le})}}}}if($.length>0){this.editor.pushUndoStop();const ne=new L($,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",ne),this.editor.pushUndoStop()}}shouldIgnoreLine(A,N){A.tokenization.forceTokenization(N);const P=A.getLineFirstNonWhitespaceColumn(N);if(P===0)return!0;const x=A.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()}};D.ID="editor.contrib.autoIndentOnPaste",e.AutoIndentOnPaste=D=Me([fe(1,p.ILanguageConfigurationService)],D);function I(R,A,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 $=R.getLineFirstNonWhitespaceColumn(B);if($===0&&($=R.getLineMaxColumn(B)),$===1)continue;const M=new b.Range(B,1,B,$),Q=R.getValueInRange(M),ie=P?Q.replace(/\t/ig,x):Q.replace(F," ");A.addEditOperation(M,ie)}}class T{constructor(A,N){this.selection=A,this.tabSize=N,this.selectionId=null}getEditOperations(A,N){this.selectionId=N.trackSelection(this.selection),I(A,N,this.tabSize,!0)}computeCursorState(A,N){return N.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=T;class O{constructor(A,N){this.selection=A,this.tabSize=N,this.selectionId=null}getEditOperations(A,N){this.selectionId=N.trackSelection(this.selection),I(A,N,this.tabSize,!1)}computeCursorState(A,N){return N.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=O,(0,y.registerEditorContribution)(D.ID,D,2),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(c),(0,y.registerEditorAction)(a),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(v),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(C)}),define(X[775],ee([1,0,15,195,22,651]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class w extends _.EditorAction{constructor(){super({id:"expandLineSelection",label:E.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:y.EditorContextKeys.textInputFocus,primary:2090}})}run(S,g,p){if(p=p||{},!g.hasModel())return;const n=g._getViewModel();n.model.pushStackElement(),n.setCursorStates(p.source,3,k.CursorMoveCommands.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(p.source,!0)}}e.ExpandLineSelectionAction=w,(0,_.registerEditorAction)(w)}),define(X[776],ee([1,0,59,184,15,119,464,236,65,12,5,23,22,522,751,523,652,29,28]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 y.EditorAction{constructor(Z,Y){super(Y),this.down=Z}run(Z,Y){if(!Y.hasModel())return;const oe=Y.getSelections().map((le,ue)=>({selection:le,index:ue,ignore:!1}));oe.sort((le,ue)=>p.Range.compareRangesUsingStarts(le.selection,ue.selection));let ce=oe[0];for(let le=1;le<oe.length;le++){const ue=oe[le];ce.selection.endLineNumber===ue.selection.startLineNumber&&(ce.index<ue.index?ue.ignore=!0:(ce.ignore=!0,ce=ue))}const ge=[];for(const le of oe)ge.push(new i.CopyLinesCommand(le.selection,this.down,le.ignore));Y.pushUndoStop(),Y.executeCommands(this.id,ge),Y.pushUndoStop()}}class l 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 a 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 y.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,Y,oe){if(!Y.hasModel())return;const ce=[],ge=Y.getSelections(),le=Y.getModel();for(const ue of ge)if(ue.isEmpty())ce.push(new i.CopyLinesCommand(ue,!0));else{const j=new n.Selection(ue.endLineNumber,ue.endColumn,ue.endLineNumber,ue.endColumn);ce.push(new E.ReplaceCommandThatSelectsText(j,le.getValueInRange(ue)))}Y.pushUndoStop(),Y.executeCommands(this.id,ce),Y.pushUndoStop()}}e.DuplicateSelectionAction=u;class v extends y.EditorAction{constructor(Z,Y){super(Y),this.down=Z}run(Z,Y){const oe=Z.get(o.ILanguageConfigurationService),ce=[],ge=Y.getSelections()||[],le=Y.getOption(10);for(const ue of ge)ce.push(new s.MoveLinesCommand(ue,this.down,le,oe));Y.pushUndoStop(),Y.executeCommands(this.id,ce),Y.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 m 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 y.EditorAction{constructor(Z,Y){super(Y),this.descending=Z}run(Z,Y){const oe=Y.getSelections()||[];for(const ge of oe)if(!r.SortLinesCommand.canRun(Y.getModel(),ge,this.descending))return;const ce=[];for(let ge=0,le=oe.length;ge<le;ge++)ce[ge]=new r.SortLinesCommand(oe[ge],this.descending);Y.pushUndoStop(),Y.executeCommands(this.id,ce),Y.pushUndoStop()}}e.AbstractSortLinesAction=C;class L extends C{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:d.localize(10,null),alias:"Sort Lines Ascending",precondition:t.EditorContextKeys.writable})}}e.SortLinesAscendingAction=L;class D extends C{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:d.localize(11,null),alias:"Sort Lines Descending",precondition:t.EditorContextKeys.writable})}}e.SortLinesDescendingAction=D;class I extends y.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:d.localize(12,null),alias:"Delete Duplicate Lines",precondition:t.EditorContextKeys.writable})}run(Z,Y){if(!Y.hasModel())return;const oe=Y.getModel();if(oe.getLineCount()===1&&oe.getLineMaxColumn(1)===1)return;const ce=[],ge=[];let le=0;for(const ue of Y.getSelections()){const j=new Set,z=[];for(let G=ue.startLineNumber;G<=ue.endLineNumber;G++){const ae=oe.getLineContent(G);j.has(ae)||(z.push(ae),j.add(ae))}const U=new n.Selection(ue.startLineNumber,1,ue.endLineNumber,oe.getLineMaxColumn(ue.endLineNumber)),J=ue.startLineNumber-le,te=new n.Selection(J,1,J+z.length-1,z[z.length-1].length);ce.push(S.EditOperation.replace(U,z.join(`
- `))),ge.push(te),le+=ue.endLineNumber-ue.startLineNumber+1-z.length}Y.pushUndoStop(),Y.executeEdits(this.id,ce,ge),Y.pushUndoStop()}}e.DeleteDuplicateLinesAction=I;class T extends y.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,Y,oe){let ce=[];oe.reason==="auto-save"&&(ce=(Y.getSelections()||[]).map(ue=>new g.Position(ue.positionLineNumber,ue.positionColumn)));const ge=Y.getSelection();if(ge===null)return;const le=new w.TrimTrailingWhitespaceCommand(ge,ce);Y.pushUndoStop(),Y.executeCommands(this.id,[le]),Y.pushUndoStop()}}e.TrimTrailingWhitespaceAction=T,T.ID="editor.action.trimTrailingWhitespace";class O extends y.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,Y){if(!Y.hasModel())return;const oe=this._getLinesToRemove(Y),ce=Y.getModel();if(ce.getLineCount()===1&&ce.getLineMaxColumn(1)===1)return;let ge=0;const le=[],ue=[];for(let j=0,z=oe.length;j<z;j++){const U=oe[j];let J=U.startLineNumber,te=U.endLineNumber,G=1,ae=ce.getLineMaxColumn(te);te<ce.getLineCount()?(te+=1,ae=1):J>1&&(J-=1,G=ce.getLineMaxColumn(J)),le.push(S.EditOperation.replace(new n.Selection(J,G,te,ae),"")),ue.push(new n.Selection(J-ge,U.positionColumn,J-ge,U.positionColumn)),ge+=U.endLineNumber-U.startLineNumber+1}Y.pushUndoStop(),Y.executeEdits(this.id,le,ue),Y.pushUndoStop()}_getLinesToRemove(Z){const Y=Z.getSelections().map(ge=>{let le=ge.endLineNumber;return ge.startLineNumber<ge.endLineNumber&&ge.endColumn===1&&(le-=1),{startLineNumber:ge.startLineNumber,selectionStartColumn:ge.selectionStartColumn,endLineNumber:le,positionColumn:ge.positionColumn}});Y.sort((ge,le)=>ge.startLineNumber===le.startLineNumber?ge.endLineNumber-le.endLineNumber:ge.startLineNumber-le.startLineNumber);const oe=[];let ce=Y[0];for(let ge=1;ge<Y.length;ge++)ce.endLineNumber+1>=Y[ge].startLineNumber?ce.endLineNumber=Y[ge].endLineNumber:(oe.push(ce),ce=Y[ge]);return oe.push(ce),oe}}e.DeleteLinesAction=O;class R extends y.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,Y){const oe=Y._getViewModel();oe&&(Y.pushUndoStop(),Y.executeCommands(this.id,b.TypeOperations.indent(oe.cursorConfig,Y.getModel(),Y.getSelections())),Y.pushUndoStop())}}e.IndentLinesAction=R;class A extends y.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,Y){k.CoreEditingCommands.Outdent.runEditorCommand(Z,Y,null)}}class N extends y.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,Y){const oe=Y._getViewModel();oe&&(Y.pushUndoStop(),Y.executeCommands(this.id,b.TypeOperations.lineInsertBefore(oe.cursorConfig,Y.getModel(),Y.getSelections())))}}e.InsertLineBeforeAction=N;class P extends y.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,Y){const oe=Y._getViewModel();oe&&(Y.pushUndoStop(),Y.executeCommands(this.id,b.TypeOperations.lineInsertAfter(oe.cursorConfig,Y.getModel(),Y.getSelections())))}}e.InsertLineAfterAction=P;class x extends y.EditorAction{run(Z,Y){if(!Y.hasModel())return;const oe=Y.getSelection(),ce=this._getRangesToDelete(Y),ge=[];for(let j=0,z=ce.length-1;j<z;j++){const U=ce[j],J=ce[j+1];p.Range.intersectRanges(U,J)===null?ge.push(U):ce[j+1]=p.Range.plusRange(U,J)}ge.push(ce[ce.length-1]);const le=this._getEndCursorState(oe,ge),ue=ge.map(j=>S.EditOperation.replace(j,""));Y.pushUndoStop(),Y.executeEdits(this.id,ue,le),Y.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,Y){let oe=null;const ce=[];let ge=0;return Y.forEach(le=>{let ue;if(le.endColumn===1&&ge>0){const j=le.startLineNumber-ge;ue=new n.Selection(j,le.startColumn,j,le.startColumn)}else ue=new n.Selection(le.startLineNumber,le.startColumn,le.startLineNumber,le.startColumn);ge+=le.endLineNumber-le.startLineNumber,le.intersectRanges(Z)?oe=ue:ce.push(ue)}),oe&&ce.unshift(oe),ce}_getRangesToDelete(Z){const Y=Z.getSelections();if(Y===null)return[];let oe=Y;const ce=Z.getModel();return ce===null?[]:(oe.sort(p.Range.compareRangesUsingStarts),oe=oe.map(ge=>{if(ge.isEmpty())if(ge.startColumn===1){const le=Math.max(1,ge.startLineNumber-1),ue=ge.startLineNumber===1?1:ce.getLineContent(le).length+1;return new p.Range(le,ue,ge.startLineNumber,1)}else return new p.Range(ge.startLineNumber,1,ge.startLineNumber,ge.startColumn);else return new p.Range(ge.startLineNumber,1,ge.endLineNumber,ge.endColumn)}),oe)}}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,Y){let oe=null;const ce=[];for(let ge=0,le=Y.length,ue=0;ge<le;ge++){const j=Y[ge],z=new n.Selection(j.startLineNumber-ue,j.startColumn,j.startLineNumber-ue,j.startColumn);j.intersectRanges(Z)?oe=z:ce.push(z)}return oe&&ce.unshift(oe),ce}_getRangesToDelete(Z){const Y=Z.getModel();if(Y===null)return[];const oe=Z.getSelections();if(oe===null)return[];const ce=oe.map(ge=>{if(ge.isEmpty()){const le=Y.getLineMaxColumn(ge.startLineNumber);return ge.startColumn===le?new p.Range(ge.startLineNumber,ge.startColumn,ge.startLineNumber+1,1):new p.Range(ge.startLineNumber,ge.startColumn,ge.startLineNumber,le)}return ge});return ce.sort(p.Range.compareRangesUsingStarts),ce}}e.DeleteAllRightAction=B;class V extends y.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,Y){const oe=Y.getSelections();if(oe===null)return;let ce=Y.getSelection();if(ce===null)return;oe.sort(p.Range.compareRangesUsingStarts);const ge=[],le=oe.reduce((te,G)=>te.isEmpty()?te.endLineNumber===G.startLineNumber?(ce.equalsSelection(te)&&(ce=G),G):G.startLineNumber>te.endLineNumber+1?(ge.push(te),G):new n.Selection(te.startLineNumber,te.startColumn,G.endLineNumber,G.endColumn):G.startLineNumber>te.endLineNumber?(ge.push(te),G):new n.Selection(te.startLineNumber,te.startColumn,G.endLineNumber,G.endColumn));ge.push(le);const ue=Y.getModel();if(ue===null)return;const j=[],z=[];let U=ce,J=0;for(let te=0,G=ge.length;te<G;te++){const ae=ge[te],me=ae.startLineNumber,Ce=1;let Se=0,ye,Ee;const De=ue.getLineContent(ae.endLineNumber).length-ae.endColumn;if(ae.isEmpty()||ae.startLineNumber===ae.endLineNumber){const he=ae.getStartPosition();he.lineNumber<ue.getLineCount()?(ye=me+1,Ee=ue.getLineMaxColumn(ye)):(ye=he.lineNumber,Ee=ue.getLineMaxColumn(he.lineNumber))}else ye=ae.endLineNumber,Ee=ue.getLineMaxColumn(ye);let ke=ue.getLineContent(me);for(let he=me+1;he<=ye;he++){const ve=ue.getLineContent(he),de=ue.getLineFirstNonWhitespaceColumn(he);if(de>=1){let pe=!0;ke===""&&(pe=!1),pe&&(ke.charAt(ke.length-1)===" "||ke.charAt(ke.length-1)===" ")&&(pe=!1,ke=ke.replace(/[\s\uFEFF\xA0]+$/g," "));const Le=ve.substr(de-1);ke+=(pe?" ":"")+Le,pe?Se=Le.length+1:Se=Le.length}else Se=0}const Ie=new p.Range(me,Ce,ye,Ee);if(!Ie.isEmpty()){let he;ae.isEmpty()?(j.push(S.EditOperation.replace(Ie,ke)),he=new n.Selection(Ie.startLineNumber-J,ke.length-Se+1,me-J,ke.length-Se+1)):ae.startLineNumber===ae.endLineNumber?(j.push(S.EditOperation.replace(Ie,ke)),he=new n.Selection(ae.startLineNumber-J,ae.startColumn,ae.endLineNumber-J,ae.endColumn)):(j.push(S.EditOperation.replace(Ie,ke)),he=new n.Selection(ae.startLineNumber-J,ae.startColumn,ae.startLineNumber-J,ke.length-De)),p.Range.intersectRanges(Ie,ce)!==null?U=he:z.push(he)}J+=Ie.endLineNumber-Ie.startLineNumber}z.unshift(U),Y.pushUndoStop(),Y.executeEdits(this.id,j,z),Y.pushUndoStop()}}e.JoinLinesAction=V;class $ extends y.EditorAction{constructor(){super({id:"editor.action.transpose",label:d.localize(22,null),alias:"Transpose characters around the cursor",precondition:t.EditorContextKeys.writable})}run(Z,Y){const oe=Y.getSelections();if(oe===null)return;const ce=Y.getModel();if(ce===null)return;const ge=[];for(let le=0,ue=oe.length;le<ue;le++){const j=oe[le];if(!j.isEmpty())continue;const z=j.getStartPosition(),U=ce.getLineMaxColumn(z.lineNumber);if(z.column>=U){if(z.lineNumber===ce.getLineCount())continue;const J=new p.Range(z.lineNumber,Math.max(1,z.column-1),z.lineNumber+1,1),te=ce.getValueInRange(J).split("").reverse().join("");ge.push(new E.ReplaceCommand(new n.Selection(z.lineNumber,Math.max(1,z.column-1),z.lineNumber+1,1),te))}else{const J=new p.Range(z.lineNumber,Math.max(1,z.column-1),z.lineNumber,z.column+1),te=ce.getValueInRange(J).split("").reverse().join("");ge.push(new E.ReplaceCommandThatPreservesSelection(J,te,new n.Selection(z.lineNumber,z.column+1,z.lineNumber,z.column+1)))}}Y.pushUndoStop(),Y.executeCommands(this.id,ge),Y.pushUndoStop()}}e.TransposeAction=$;class M extends y.EditorAction{run(Z,Y){const oe=Y.getSelections();if(oe===null)return;const ce=Y.getModel();if(ce===null)return;const ge=Y.getOption(125),le=[];for(const ue of oe)if(ue.isEmpty()){const j=ue.getStartPosition(),z=Y.getConfiguredWordAtPosition(j);if(!z)continue;const U=new p.Range(j.lineNumber,z.startColumn,j.lineNumber,z.endColumn),J=ce.getValueInRange(U);le.push(S.EditOperation.replace(U,this._modifyText(J,ge)))}else{const j=ce.getValueInRange(ue);le.push(S.EditOperation.replace(ue,this._modifyText(j,ge)))}Y.pushUndoStop(),Y.executeEdits(this.id,le),Y.pushUndoStop()}}e.AbstractCaseAction=M;class Q extends M{constructor(){super({id:"editor.action.transformToUppercase",label:d.localize(23,null),alias:"Transform to Uppercase",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Y){return Z.toLocaleUpperCase()}}e.UpperCaseAction=Q;class ie extends M{constructor(){super({id:"editor.action.transformToLowercase",label:d.localize(24,null),alias:"Transform to Lowercase",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Y){return Z.toLocaleLowerCase()}}e.LowerCaseAction=ie;class re{constructor(Z,Y){this._pattern=Z,this._flags=Y,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class ne extends M{constructor(){super({id:"editor.action.transformToTitlecase",label:d.localize(25,null),alias:"Transform to Title Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Y){const oe=ne.titleBoundary.get();return oe?Z.toLocaleLowerCase().replace(oe,ce=>ce.toLocaleUpperCase()):Z}}e.TitleCaseAction=ne,ne.titleBoundary=new re("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class se extends M{constructor(){super({id:"editor.action.transformToSnakecase",label:d.localize(26,null),alias:"Transform to Snake Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Y){const oe=se.caseBoundary.get(),ce=se.singleLetters.get();return!oe||!ce?Z:Z.replace(oe,"$1_$2").replace(ce,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=se,se.caseBoundary=new re("(\\p{Ll})(\\p{Lu})","gmu"),se.singleLetters=new re("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class H extends M{constructor(){super({id:"editor.action.transformToCamelcase",label:d.localize(27,null),alias:"Transform to Camel Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Y){const oe=H.wordBoundary.get();if(!oe)return Z;const ce=Z.split(oe);return ce.shift()+ce.map(le=>le.substring(0,1).toLocaleUpperCase()+le.substring(1)).join("")}}e.CamelCaseAction=H,H.wordBoundary=new re("[_\\s-]","gm");class W extends M{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(Y=>Y.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:d.localize(28,null),alias:"Transform to Kebab Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Y){const oe=W.caseBoundary.get(),ce=W.singleLetters.get(),ge=W.underscoreBoundary.get();return!oe||!ce||!ge?Z:Z.replace(ge,"$1-$3").replace(oe,"$1-$2").replace(ce,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=W,W.caseBoundary=new re("(\\p{Ll})(\\p{Lu})","gmu"),W.singleLetters=new re("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),W.underscoreBoundary=new re("(\\S)(_)(\\S)","gm"),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(a),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(L),(0,y.registerEditorAction)(D),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(R),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(P),(0,y.registerEditorAction)(F),(0,y.registerEditorAction)(B),(0,y.registerEditorAction)(V),(0,y.registerEditorAction)($),(0,y.registerEditorAction)(Q),(0,y.registerEditorAction)(ie),se.caseBoundary.isSupported()&&se.singleLetters.isSupported()&&(0,y.registerEditorAction)(se),H.wordBoundary.isSupported()&&(0,y.registerEditorAction)(H),ne.titleBoundary.isSupported()&&(0,y.registerEditorAction)(ne),W.isSupported()&&(0,y.registerEditorAction)(W)}),define(X[777],ee([1,0,2,15]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends _.Disposable{constructor(w){super(),this._editor=w,this._register(this._editor.onMouseDown(b=>{const S=this._editor.getOption(112);S>=0&&b.target.type===6&&b.target.position.column>=S&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}y.ID="editor.contrib.longLinesHelper",(0,k.registerEditorContribution)(y.ID,y,2)}),define(X[154],ee([1,0,49,13,2,15,5,655,14,437]),function(K,e,_,k,y,E,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,s){this._messageWidget=new y.MutableDisposable,this._messageListeners=new y.DisposableStore,this._editor=i,this._visible=ci.MESSAGE_VISIBLE.bindTo(s)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(i,s){(0,_.alert)(i),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new n(this._editor,s,i),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new k.TimeoutTimer(()=>this.closeMessage(),3e3));let r;this._messageListeners.add(this._editor.onMouseMove(d=>{d.target.position&&(r?r.containsPosition(d.target.position)||this.closeMessage():r=new w.Range(s.lineNumber-3,1,d.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(n.fadeOut(this._messageWidget.value))}};g.ID="editor.contrib.messageController",g.MESSAGE_VISIBLE=new S.RawContextKey("messageVisible",!1,b.localize(0,null)),e.MessageController=g=Me([fe(1,S.IContextKeyService)],g);const p=E.EditorCommand.bindToContribution(g.get);(0,E.registerEditorCommand)(new p({id:"leaveEditorMessage",precondition:g.MESSAGE_VISIBLE,handler:t=>t.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class n{static fadeOut(i){const s=()=>{i.dispose(),clearTimeout(r),i.getDomNode().removeEventListener("animationend",s)},r=setTimeout(s,110);return i.getDomNode().addEventListener("animationend",s),i.getDomNode().classList.add("fadeOut"),{dispose:s}}constructor(i,{lineNumber:s,column:r},d){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=i,this._editor.revealLinesInCenterIfOutsideViewport(s,s,0),this._position={lineNumber:s,column:r},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const 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,E.registerEditorContribution)(g.ID,g,4)}),define(X[778],ee([1,0,2,15,154,662]),function(K,e,_,k,y,E){"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=y.MessageController.get(this.editor);S&&this.editor.hasModel()&&(this.editor.isSimpleWidget?S.showMessage(E.localize(0,null),this.editor.getPosition()):S.showMessage(E.localize(1,null),this.editor.getPosition()))}}e.ReadOnlyMessageController=w,w.ID="editor.contrib.readOnlyMessageController",(0,k.registerEditorContribution)(w.ID,w,2)}),define(X[779],ee([1,0,16,21,11,15,12,5,23,22,282,524,665,29,25,19,62,18,20]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class c{constructor(C,L){this.index=C,this.ranges=L}mov(C){const L=this.index+(C?1:-1);if(L<0||L>=this.ranges.length)return this;const D=new c(L,this.ranges);return D.ranges[L].equalsRange(this.ranges[this.index])?D.mov(C):D}}let l=e.SmartSelectController=class Wi{static get(C){return C.getContribution(Wi.ID)}constructor(C,L){this._editor=C,this._languageFeaturesService=L,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 L=this._editor.getSelections(),D=this._editor.getModel();if(this._state||(yield f(this._languageFeaturesService.selectionRangeProvider,D,L.map(T=>T.getPosition()),this._editor.getOption(108),k.CancellationToken.None).then(T=>{var O;if(!(!_.isNonEmptyArray(T)||T.length!==L.length)&&!(!this._editor.hasModel()||!_.equals(this._editor.getSelections(),L,(R,A)=>R.equalsSelection(A)))){for(let R=0;R<T.length;R++)T[R]=T[R].filter(A=>A.containsPosition(L[R].getStartPosition())&&A.containsPosition(L[R].getEndPosition())),T[R].unshift(L[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}})}};l.ID="editor.contrib.smartSelectController",e.SmartSelectController=l=Me([fe(1,r.ILanguageFeaturesService)],l);class a extends E.EditorAction{constructor(C,L){super(L),this._forward=C}run(C,L){return we(this,void 0,void 0,function*(){const D=l.get(L);D&&(yield D.run(this._forward))})}}class u extends a{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}})}}s.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class v extends a{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,E.registerEditorContribution)(l.ID,l,4),(0,E.registerEditorAction)(u),(0,E.registerEditorAction)(v);function f(m,C,L,D,I){return we(this,void 0,void 0,function*(){const T=m.all(C).concat(new n.WordSelectionRangeProvider);T.length===1&&T.unshift(new p.BracketSelectionRangeProvider);const O=[],R=[];for(const A of T)O.push(Promise.resolve(A.provideSelectionRanges(C,L,I)).then(N=>{if(_.isNonEmptyArray(N)&&N.length===L.length)for(let P=0;P<L.length;P++){R[P]||(R[P]=[]);for(const x of N[P])b.Range.isIRange(x.range)&&b.Range.containsPosition(x.range,L[P])&&R[P].push(b.Range.lift(x.range))}},y.onUnexpectedExternalError));return yield Promise.all(O),R.map(A=>{if(A.length===0)return[];A.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 A)(!P||b.Range.containsRange(F,P)&&!b.Range.equalsRange(F,P))&&(N.push(F),P=F);if(!D.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 $=new b.Range(B.startLineNumber,C.getLineFirstNonWhitespaceColumn(B.startLineNumber),B.endLineNumber,C.getLineLastNonWhitespaceColumn(B.endLineNumber));$.containsRange(B)&&!$.equalsRange(B)&&V.containsRange($)&&!V.equalsRange($)&&x.push($);const M=new b.Range(B.startLineNumber,1,B.endLineNumber,C.getLineMaxColumn(B.endLineNumber));M.containsRange(B)&&!M.equalsRange($)&&V.containsRange(M)&&!V.equalsRange(M)&&x.push(M)}x.push(V)}return x})})}e.provideSelectionRanges=f,s.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",function(m,...C){return we(this,void 0,void 0,function*(){const[L,D]=C;(0,h.assertType)(o.URI.isUri(L));const I=m.get(r.ILanguageFeaturesService).selectionRangeProvider,T=yield m.get(d.ITextModelService).createModelReference(L);try{return f(I,T.object.textEditorModel,D,{selectLeadingAndTrailingWhitespace:!0},k.CancellationToken.None)}finally{T.dispose()}})})}),define(X[780],ee([1,0,21,64,53,2,15,32,5,19,283,126,331,284,97,8]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestInlineCompletions=void 0;class d{constructor(a,u,v,f,m,C){this.range=a,this.insertText=u,this.filterText=v,this.additionalTextEdits=f,this.command=m,this.completion=C}}let h=class extends E.RefCountedDisposable{constructor(a,u,v,f,m,C){super(m.disposable),this.model=a,this.line=u,this.word=v,this.completionModel=f,this._suggestMemoryService=C}canBeReused(a,u,v){return this.model===a&&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 a;const u=[],{items:v}=this.completionModel,f=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},v),m=y.Iterable.slice(v,f),C=y.Iterable.slice(v,0,f);let L=5;for(const D of y.Iterable.concat(m,C)){if(D.score===k.FuzzyScore.Default)continue;const I=new S.Range(D.editStart.lineNumber,D.editStart.column,D.editInsertEnd.lineNumber,D.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),T=D.completion.insertTextRules&&D.completion.insertTextRules&4?{snippet:D.completion.insertText}:D.completion.insertText;u.push(new d(I,T,(a=D.filterTextLow)!==null&&a!==void 0?a:D.labelLow,D.completion.additionalTextEdits,D.completion.command,D)),L-->=0&&D.resolve(_.CancellationToken.None)}return u}};h=Me([fe(5,t.ISuggestMemoryService)],h);let o=e.SuggestInlineCompletions=class{constructor(a,u,v,f){this._getEditorOption=a,this._languageFeatureService=u,this._clipboardService=v,this._suggestMemoryService=f}provideInlineCompletions(a,u,v,f){var m;return we(this,void 0,void 0,function*(){if(v.selectedSuggestionInfo)return;const C=this._getEditorOption(85,a);if(n.QuickSuggestionsOptions.isAllOff(C))return;a.tokenization.tokenizeIfCheap(u.lineNumber);const L=a.tokenization.getLineTokens(u.lineNumber),D=L.getStandardTokenType(L.findTokenIndexAtOffset(Math.max(u.column-1-1,0)));if(n.QuickSuggestionsOptions.valueFor(C,D)!=="inline")return;let I=a.getWordAtPosition(u),T;if(I?.word||(T=this._getTriggerCharacterInfo(a,u)),!I?.word&&!T||(I||(I=a.getWordUntilPosition(u)),I.endColumn!==u.column))return;let O;const R=a.getValueInRange(new S.Range(u.lineNumber,1,u.lineNumber,u.column));if(!T&&(!((m=this._lastResult)===null||m===void 0)&&m.canBeReused(a,u.lineNumber,I))){const A=new p.LineContext(R,u.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=A,this._lastResult.acquire(),O=this._lastResult}else{const A=yield(0,n.provideSuggestionItems)(this._languageFeatureService.completionProvider,a,u,new n.CompletionOptions(void 0,void 0,T?.providers),T&&{triggerKind:1,triggerCharacter:T.ch},f);let N;A.needsClipboard&&(N=yield this._clipboardService.readText());const P=new p.CompletionModel(A.items,u.column,new p.LineContext(R,0),i.WordDistance.None,this._getEditorOption(113,a),this._getEditorOption(107,a),{boostFullMatch:!1,firstMatchCanBeWeak:!1},N);O=new h(a,u.lineNumber,I,P,A,this._suggestMemoryService)}return this._lastResult=O,O})}handleItemDidShow(a,u){u.completion.resolve(_.CancellationToken.None)}freeInlineCompletions(a){a.release()}_getTriggerCharacterInfo(a,u){var v;const f=a.getValueInRange(S.Range.fromPositions({lineNumber:u.lineNumber,column:u.column-1},u)),m=new Set;for(const C of this._languageFeatureService.completionProvider.all(a))!((v=C.triggerCharacters)===null||v===void 0)&&v.includes(f)&&m.add(C);if(m.size!==0)return{providers:m,ch:f}}};e.SuggestInlineCompletions=o=Me([fe(1,g.ILanguageFeaturesService),fe(2,s.IClipboardService),fe(3,t.ISuggestMemoryService)],o);let c=class Pt{constructor(a,u,v,f){if(++Pt._counter===1){const m=f.createInstance(o,(C,L)=>{var D;return((D=v.listCodeEditors().find(T=>T.getModel()===L))!==null&&D!==void 0?D:a).getOption(C)});Pt._disposable=u.inlineCompletionsProvider.register("*",m)}}dispose(){var a;--Pt._counter===0&&((a=Pt._disposable)===null||a===void 0||a.dispose(),Pt._disposable=void 0)}};c._counter=0,c=Me([fe(1,g.ILanguageFeaturesService),fe(2,b.ICodeEditorService),fe(3,r.IInstantiationService)],c),(0,w.registerEditorContribution)("suggest.inlineCompletionsProvider",c,0)}),define(X[781],ee([1,0,13,21,11,6,2,9,23,111,284,97,26,14,63,72,283,126,19,64,18,228]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class u{static shouldAutoTrigger(L){if(!L.hasModel())return!1;const D=L.getModel(),I=L.getPosition();D.tokenization.tokenizeIfCheap(I.lineNumber);const T=D.getWordAtPosition(I);return!(!T||T.endColumn!==I.column||!isNaN(Number(T.word)))}constructor(L,D,I){this.leadingLineContent=L.getLineContent(D.lineNumber).substr(0,D.column-1),this.leadingWord=L.getWordUntilPosition(D),this.lineNumber=D.lineNumber,this.column=D.column,this.triggerOptions=I}}e.LineContext=u;function v(C,L,D){if(!L.getContextKeyValue(a.InlineCompletionContextKeys.inlineSuggestionVisible.key))return!0;const I=L.getContextKeyValue(a.InlineCompletionContextKeys.suppressSuggestions.key);return I!==void 0?!I:!C.getOption(60).suppressSuggestions}function f(C,L,D){if(!L.getContextKeyValue("inlineSuggestionVisible"))return!0;const I=L.getContextKeyValue(a.InlineCompletionContextKeys.suppressSuggestions.key);return I!==void 0?!I:!C.getOption(60).suppressSuggestions}let m=e.SuggestModel=class zi{constructor(L,D,I,T,O,R,A,N){this._editor=L,this._editorWorkerService=D,this._clipboardService=I,this._telemetryService=T,this._logService=O,this._contextKeyService=R,this._configurationService=A,this._languageFeaturesService=N,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 E.Emitter,this._onDidTrigger=new E.Emitter,this._onDidSuggest=new E.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 P=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{P=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{P=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(x=>{P||this._onCursorChange(x)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!P&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){(0,w.dispose)(this._triggerCharacterListener),(0,w.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(87)||!this._editor.hasModel()||!this._editor.getOption(116))return;const L=new Map;for(const I of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const T of I.triggerCharacters||[]){let O=L.get(T);O||(O=new Set,O.add((0,h.getSnippetSuggestSupport)()),L.set(T,O)),O.add(I)}const D=I=>{var T;if(!f(this._editor,this._contextKeyService,this._configurationService)||u.shouldAutoTrigger(this._editor))return;if(!I){const A=this._editor.getPosition();I=this._editor.getModel().getLineContent(A.lineNumber).substr(0,A.column-1)}let O="";(0,b.isLowSurrogate)(I.charCodeAt(I.length-1))?(0,b.isHighSurrogate)(I.charCodeAt(I.length-2))&&(O=I.substr(I.length-2)):O=I.charAt(I.length-1);const R=L.get(O);if(R){const A=new Map;if(this._completionModel)for(const[N,P]of this._completionModel.getItemsByProvider())R.has(N)||A.set(N,P);this.trigger({auto:!0,triggerKind:1,triggerCharacter:O,retrigger:!!this._completionModel,clipboardText:(T=this._completionModel)===null||T===void 0?void 0:T.clipboardText,completionOptions:{providerFilter:R,providerItemsToReuse:A}})}};this._triggerCharacterListener.add(this._editor.onDidType(D)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>D()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(L=!1){var D;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(D=this._requestToken)===null||D===void 0||D.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:L}))}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(L){if(!this._editor.hasModel())return;const D=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!L.selection.isEmpty()||L.reason!==0&&L.reason!==3||L.source!=="keyboard"&&L.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&L.reason===0?(D.containsRange(this._currentSelection)||D.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&L.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){h.QuickSuggestionsOptions.isAllOff(this._editor.getOption(85))||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!u.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const L=this._editor.getModel(),D=this._editor.getPosition(),I=this._editor.getOption(85);if(!h.QuickSuggestionsOptions.isAllOff(I)){if(!h.QuickSuggestionsOptions.isAllOn(I)){L.tokenization.tokenizeIfCheap(D.lineNumber);const T=L.tokenization.getLineTokens(D.lineNumber),O=T.getStandardTokenType(T.findTokenIndexAtOffset(Math.max(D.column-1-1,0)));if(h.QuickSuggestionsOptions.valueFor(I,O)!=="on")return}v(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(L)&&this.trigger({auto:!0})}},this._editor.getOption(86)))}_refilterCompletionItems(){(0,l.assertType)(this._editor.hasModel()),(0,l.assertType)(this._triggerState!==void 0);const L=this._editor.getModel(),D=this._editor.getPosition(),I=new u(L,D,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(I)}trigger(L){var D,I,T,O,R,A;if(!this._editor.hasModel())return;const N=this._editor.getModel(),P=new u(N,this._editor.getPosition(),L);this.cancel(L.retrigger),this._triggerState=L,this._onDidTrigger.fire({auto:L.auto,shy:(D=L.shy)!==null&&D!==void 0?D:!1,position:this._editor.getPosition()}),this._context=P;let x={triggerKind:(I=L.triggerKind)!==null&&I!==void 0?I:0};L.triggerCharacter&&(x={triggerKind:1,triggerCharacter:L.triggerCharacter}),this._requestToken=new k.CancellationTokenSource;const F=this._editor.getOption(107);let B=1;switch(F){case"top":B=0;break;case"bottom":B=2;break}const{itemKind:V,showDeprecated:$}=zi._createSuggestFilter(this._editor),M=new h.CompletionOptions(B,(O=(T=L.completionOptions)===null||T===void 0?void 0:T.kindFilter)!==null&&O!==void 0?O:V,(R=L.completionOptions)===null||R===void 0?void 0:R.providerFilter,(A=L.completionOptions)===null||A===void 0?void 0:A.providerItemsToReuse,$),Q=p.WordDistance.create(this._editorWorkerService,this._editor),ie=(0,h.provideSuggestionItems)(this._languageFeaturesService.completionProvider,N,this._editor.getPosition(),M,x,this._requestToken.token);Promise.all([ie,Q]).then(([re,ne])=>we(this,void 0,void 0,function*(){var se;if((se=this._requestToken)===null||se===void 0||se.dispose(),!this._editor.hasModel())return;let H=L?.clipboardText;if(!H&&re.needsClipboard&&(H=yield this._clipboardService.readText()),this._triggerState===void 0)return;const W=this._editor.getModel(),q=new u(W,this._editor.getPosition(),L),Z=Object.assign(Object.assign({},c.FuzzyScoreOptions.default),{firstMatchCanBeWeak:!this._editor.getOption(113).matchOnWordStartOnly});this._completionModel=new d.CompletionModel(re.items,this._context.column,{leadingLineContent:q.leadingLineContent,characterCountDelta:q.column-this._context.column},ne,this._editor.getOption(113),this._editor.getOption(107),Z,H),this._completionDisposables.add(re.disposable),this._onNewContext(q),this._reportDurationsTelemetry(re.durations)})).catch(y.onUnexpectedError)}_reportDurationsTelemetry(L){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(L)}),this._logService.debug("suggest.durations.json",L)})}static _createSuggestFilter(L){const D=new Set;L.getOption(107)==="none"&&D.add(27);const T=L.getOption(113);return T.showMethods||D.add(0),T.showFunctions||D.add(1),T.showConstructors||D.add(2),T.showFields||D.add(3),T.showVariables||D.add(4),T.showClasses||D.add(5),T.showStructs||D.add(6),T.showInterfaces||D.add(7),T.showModules||D.add(8),T.showProperties||D.add(9),T.showEvents||D.add(10),T.showOperators||D.add(11),T.showUnits||D.add(12),T.showValues||D.add(13),T.showConstants||D.add(14),T.showEnums||D.add(15),T.showEnumMembers||D.add(16),T.showKeywords||D.add(17),T.showWords||D.add(18),T.showColors||D.add(19),T.showFiles||D.add(20),T.showReferences||D.add(21),T.showColors||D.add(22),T.showFolders||D.add(23),T.showTypeParameters||D.add(24),T.showSnippets||D.add(27),T.showUsers||D.add(25),T.showIssues||D.add(26),{itemKind:D,showDeprecated:T.showDeprecated}}_onNewContext(L){if(this._context){if(L.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,b.getLeadingWhitespace)(L.leadingLineContent)!==(0,b.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(L.column<this._context.column){L.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(L.leadingWord.word.length!==0&&L.leadingWord.startColumn>this._context.leadingWord.startColumn){if(u.shouldAutoTrigger(this._editor)&&this._context){const I=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:I}})}return}if(L.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&L.leadingWord.word.length!==0){const D=new Map,I=new Set;for(const[T,O]of this._completionModel.getItemsByProvider())O.length>0&&O[0].container.incomplete?I.add(T):D.set(T,O);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:I,providerItemsToReuse:D}})}else{const D=this._completionModel.lineContext;let I=!1;if(this._completionModel.lineContext={leadingLineContent:L.leadingLineContent,characterCountDelta:L.column-this._context.column},this._completionModel.items.length===0){const T=u.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(T&&this._context.leadingWord.endColumn<L.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=D,I=this._completionModel.items.length>0,I&&L.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:L.triggerOptions,isFrozen:I})}}}}};e.SuggestModel=m=Me([fe(1,g.IEditorWorkerService),fe(2,n.IClipboardService),fe(3,r.ITelemetryService),fe(4,s.ILogService),fe(5,i.IContextKeyService),fe(6,t.IConfigurationService),fe(7,o.ILanguageFeaturesService)],m)}),define(X[782],ee([1,0,57,15,677]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E extends k.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:y.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 p=new _.StopWatch(!0);g.tokenization.forceTokenization(g.getLineCount()),p.stop(),console.log(`tokenization took ${p.elapsed()}`)}}(0,k.registerEditorAction)(E)}),define(X[783],ee([1,0,2,42,15,32,679,152]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const S="ignoreUnusualLineTerminators";function g(t,i,s){t.setModelProperty(i.uri,S,s)}function p(t,i){return t.getModelProperty(i.uri,S)}let n=e.UnusualLineTerminatorsDetector=class extends _.Disposable{constructor(i,s,r){super(),this._editor=i,this._dialogService=s,this._codeEditorService=r,this._isPresentingDialog=!1,this._config=this._editor.getOption(121),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(121)&&(this._config=this._editor.getOption(121),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()||p(this._codeEditorService,i)===!0||this._editor.getOption(87))return;if(this._config==="auto"){i.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let r;try{this._isPresentingDialog=!0,r=yield this._dialogService.confirm({title:w.localize(0,null),message:w.localize(1,null),detail:w.localize(2,null,(0,k.basename)(i.uri)),primaryButton:w.localize(3,null),cancelButton:w.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!r.confirmed){g(this._codeEditorService,i,!0);return}i.removeUnusualLineTerminators(this._editor.getSelections())})}};n.ID="editor.contrib.unusualLineTerminatorsDetector",e.UnusualLineTerminatorsDetector=n=Me([fe(1,b.IDialogService),fe(2,E.ICodeEditorService)],n),(0,y.registerEditorContribution)(n.ID,n,1)}),define(X[336],ee([1,0,15,119,41,66,173,138,12,5,23,22,28,682,89,14,319]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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,q){if(!W.hasModel())return;const Z=(0,b.getMapForWordSeparators)(W.getOption(125)),Y=W.getModel(),ce=W.getSelections().map(ge=>{const le=new S.Position(ge.positionLineNumber,ge.positionColumn),ue=this._move(Z,Y,le,this._wordNavigationType);return this._moveTo(ge,ue,this._inSelectionMode)});if(Y.pushStackElement(),W._getViewModel().setCursorStates("moveWordCommand",3,ce.map(ge=>E.CursorState.fromModelSelection(ge))),ce.length===1){const ge=new S.Position(ce[0].positionLineNumber,ce[0].positionColumn);W.revealPosition(ge,0)}}_moveTo(H,W,q){return q?new p.Selection(H.selectionStartLineNumber,H.selectionStartColumn,W.lineNumber,W.column):new p.Selection(W.lineNumber,W.column,W.lineNumber,W.column)}}e.MoveWordCommand=h;class o extends h{_move(H,W,q,Z){return w.WordOperations.moveWordLeft(H,W,q,Z)}}e.WordLeftCommand=o;class c extends h{_move(H,W,q,Z){return w.WordOperations.moveWordRight(H,W,q,Z)}}e.WordRightCommand=c;class l extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=l;class a extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=a;class u extends o{constructor(){var H;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,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 m extends o{constructor(){var H;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,d.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=m;class C extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(H,W,q,Z){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),W,q,Z)}}e.CursorWordAccessibilityLeft=C;class L extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(H,W,q,Z){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),W,q,Z)}}e.CursorWordAccessibilityLeftSelect=L;class D extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=D;class I extends c{constructor(){var H;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,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(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.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 A extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=A;class N extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(H,W,q,Z){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),W,q,Z)}}e.CursorWordAccessibilityRight=N;class P extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(H,W,q,Z){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),W,q,Z)}}e.CursorWordAccessibilityRightSelect=P;class x extends _.EditorCommand{constructor(H){super(H),this._whitespaceHeuristics=H.whitespaceHeuristics,this._wordNavigationType=H.wordNavigationType}runEditorCommand(H,W,q){const Z=H.get(t.ILanguageConfigurationService);if(!W.hasModel())return;const Y=(0,b.getMapForWordSeparators)(W.getOption(125)),oe=W.getModel(),ce=W.getSelections(),ge=W.getOption(5),le=W.getOption(9),ue=Z.getLanguageConfiguration(oe.getLanguageId()).getAutoClosingPairs(),j=W._getViewModel(),z=ce.map(U=>{const J=this._delete({wordSeparators:Y,model:oe,selection:U,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:W.getOption(7),autoClosingBrackets:ge,autoClosingQuotes:le,autoClosingPairs:ue,autoClosedCharacters:j.getCursorAutoClosedCharacters()},this._wordNavigationType);return new k.ReplaceCommand(J,"")});W.pushUndoStop(),W.executeCommands(this.id,z),W.pushUndoStop()}}e.DeleteWordCommand=x;class F extends x{_delete(H,W){const q=w.WordOperations.deleteWordLeft(H,W);return q||new g.Range(1,1,1,1)}}e.DeleteWordLeftCommand=F;class B extends x{_delete(H,W){const q=w.WordOperations.deleteWordRight(H,W);if(q)return q;const Z=H.model.getLineCount(),Y=H.model.getLineMaxColumn(Z);return new g.Range(Z,Y,Z,Y)}}e.DeleteWordRightCommand=B;class V extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:n.EditorContextKeys.writable})}}e.DeleteWordStartLeft=V;class $ extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:n.EditorContextKeys.writable})}}e.DeleteWordEndLeft=$;class M extends F{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=M;class Q extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:n.EditorContextKeys.writable})}}e.DeleteWordStartRight=Q;class ie extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:n.EditorContextKeys.writable})}}e.DeleteWordEndRight=ie;class re extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=re;class ne extends _.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:n.EditorContextKeys.writable,label:i.localize(0,null),alias:"Delete Word"})}run(H,W,q){if(!W.hasModel())return;const Z=(0,b.getMapForWordSeparators)(W.getOption(125)),Y=W.getModel(),ce=W.getSelections().map(ge=>{const le=w.WordOperations.deleteInsideWord(Z,Y,ge);return new k.ReplaceCommand(le,"")});W.pushUndoStop(),W.executeCommands(this.id,ce),W.pushUndoStop()}}e.DeleteInsideWord=ne,(0,_.registerEditorCommand)(new l),(0,_.registerEditorCommand)(new a),(0,_.registerEditorCommand)(new u),(0,_.registerEditorCommand)(new v),(0,_.registerEditorCommand)(new f),(0,_.registerEditorCommand)(new m),(0,_.registerEditorCommand)(new D),(0,_.registerEditorCommand)(new I),(0,_.registerEditorCommand)(new T),(0,_.registerEditorCommand)(new O),(0,_.registerEditorCommand)(new R),(0,_.registerEditorCommand)(new A),(0,_.registerEditorCommand)(new C),(0,_.registerEditorCommand)(new L),(0,_.registerEditorCommand)(new N),(0,_.registerEditorCommand)(new P),(0,_.registerEditorCommand)(new V),(0,_.registerEditorCommand)(new $),(0,_.registerEditorCommand)(new M),(0,_.registerEditorCommand)(new Q),(0,_.registerEditorCommand)(new ie),(0,_.registerEditorCommand)(new re),(0,_.registerEditorAction)(ne)}),define(X[784],ee([1,0,15,173,5,22,336,25]),function(K,e,_,k,y,E,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:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(h,o){const c=k.WordPartOperations.deleteWordPartLeft(h);return c||new y.Range(1,1,1,1)}}e.DeleteWordPartLeft=S;class g extends w.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(h,o){const c=k.WordPartOperations.deleteWordPartRight(h);if(c)return c;const l=h.model.getLineCount(),a=h.model.getLineMaxColumn(l);return new y.Range(l,a,l,a)}}e.DeleteWordPartRight=g;class p extends w.MoveWordCommand{_move(h,o,c,l){return k.WordPartOperations.moveWordPartLeft(h,o,c)}}e.WordPartLeftCommand=p;class n extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=n,b.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class t extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:E.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,l){return k.WordPartOperations.moveWordPartRight(h,o,c)}}e.WordPartRightCommand=i;class s extends i{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=s;class r extends i{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=r,(0,_.registerEditorCommand)(new S),(0,_.registerEditorCommand)(new g),(0,_.registerEditorCommand)(new n),(0,_.registerEditorCommand)(new t),(0,_.registerEditorCommand)(new s),(0,_.registerEditorCommand)(new r)}),define(X[785],ee([1,0,7,36,49,68,2,17,9,20,15,22,329,14,8,34,52,82,449]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o=new i.RawContextKey("accessibilityHelpWidgetVisible",!1);let c=class Vi extends w.Disposable{static get(m){return m.getContribution(Vi.ID)}constructor(m,C){super(),this._editor=m,this._widget=this._register(C.createInstance(a,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};c.ID="editor.contrib.accessibilityHelpController",c=Me([fe(1,s.IInstantiationService)],c);function l(f,m){return!f||f.length===0?h.AccessibilityHelpNLS.noSelection:f.length===1?m?S.format(h.AccessibilityHelpNLS.singleSelectionRange,f[0].positionLineNumber,f[0].positionColumn,m):S.format(h.AccessibilityHelpNLS.singleSelection,f[0].positionLineNumber,f[0].positionColumn):m?S.format(h.AccessibilityHelpNLS.multiSelectionRange,f.length,m):f.length>0?S.format(h.AccessibilityHelpNLS.multiSelection,f.length):""}let a=class Zt extends E.Widget{constructor(m,C,L,D){super(),this._contextKeyService=C,this._keybindingService=L,this._openerService=D,this._editor=m,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,y.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,y.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(m,C,L){const D=this._keybindingService.lookupKeybinding(m);return D?S.format(C,D.getAriaLabel()):S.format(L,m)}_buildContent(){const m=this._contentDomNode.domNode,C=this._editor.getOptions(),L=this._editor.getSelections();let D=0;if(L){const A=this._editor.getModel();A&&L.forEach(N=>{D+=A.getValueLengthInRange(N)})}(0,_.append)(m,(0,_.$)("p",void 0,l(L,D)));const I=(0,_.append)(m,(0,_.$)("p"));C.get(59)?C.get(87)?I.textContent=h.AccessibilityHelpNLS.readonlyDiffEditor:I.textContent=h.AccessibilityHelpNLS.editableDiffEditor:C.get(87)?I.textContent=h.AccessibilityHelpNLS.readonlyEditor:I.textContent=h.AccessibilityHelpNLS.editableEditor;const T=(0,_.append)(m,(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(138)?(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)(m,(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 m=this._editor.getLayoutInfo(),C=Math.max(5,Math.min(Zt.WIDTH,m.width-40)),L=Math.max(5,Math.min(Zt.HEIGHT,m.height-40));this._domNode.setWidth(C),this._domNode.setHeight(L);const D=Math.round((m.height-L)/2);this._domNode.setTop(D);const I=Math.round((m.width-C)/2);this._domNode.setLeft(I)}};a.ID="editor.contrib.accessibilityHelpWidget",a.WIDTH=500,a.HEIGHT=300,a=Me([fe(1,i.IContextKeyService),fe(2,r.IKeybindingService),fe(3,d.IOpenerService)],a);class u extends p.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(m,C){const L=c.get(C);L?.show()}}(0,p.registerEditorContribution)(c.ID,c,4),(0,p.registerEditorAction)(u);const v=p.EditorCommand.bindToContribution(c.get);(0,p.registerEditorCommand)(new v({id:"closeAccessibilityHelp",precondition:o,handler:f=>f.hide(),kbOpts:{weight:100+100,kbExpr:n.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(X[786],ee([1,0,7,2,15,17,450]),function(K,e,_,k,y,E){"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,E.isIOS&&(this._register(g.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const g=!this.editor.getOption(87);!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",p=>{this.editor.focus()})),this._register(_.addDisposableListener(this._domNode,"focus",p=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return b.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}b.ID="editor.contrib.ShowKeyboardWidget",(0,y.registerEditorContribution)(w.ID,w,3)}),define(X[787],ee([1,0,7,37,2,15,31,120,149,39,123,82,451]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let t=class Hi extends y.Disposable{static get(o){return o.getContribution(Hi.ID)}constructor(o,c,l){super(),this._editor=o,this._languageService=l,this._widget=null,this._register(this._editor.onDidChangeModel(a=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(a=>this.stop())),this._register(w.TokenizationRegistry.onDidChange(a=>this.stop())),this._register(this._editor.onKeyUp(a=>a.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=Me([fe(1,p.IStandaloneThemeService),fe(2,g.ILanguageService)],t);class i extends E.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:n.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(o,c){const l=t.get(c);l?.launch()}}function s(h){let o="";for(let c=0,l=h.length;c<l;c++){const a=h.charCodeAt(c);switch(a){case 9:o+="\u2192";break;case 32:o+="\xB7";break;default:o+=String.fromCharCode(a)}}return o}function r(h,o){const c=w.TokenizationRegistry.get(o);if(c)return c;const l=h.encodeLanguageId(o);return{getInitialState:()=>S.NullState,tokenize:(a,u,v)=>(0,S.nullTokenize)(o,v),tokenizeEncoded:(a,u,v)=>(0,S.nullTokenizeEncoded)(l,v)}}class d extends y.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(l=>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 l=0;for(let m=c.tokens1.length-1;m>=0;m--){const C=c.tokens1[m];if(o.column-1>=C.offset){l=m;break}}let a=0;for(let m=c.tokens2.length>>>1;m>=0;m--)if(o.column-1>=c.tokens2[m<<1]){a=m;break}const u=this._model.getLineContent(o.lineNumber);let v="";if(l<c.tokens1.length){const m=c.tokens1[l].offset,C=l+1<c.tokens1.length?c.tokens1[l+1].offset:u.length;v=u.substring(m,C)}(0,_.reset)(this._domNode,(0,_.$)("h2.tm-token",void 0,s(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=(a<<1)+1<c.tokens2.length?this._decodeMetadata(c.tokens2[(a<<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")),l<c.tokens1.length&&(0,_.append)(this._domNode,(0,_.$)("span.tm-token-type",void 0,c.tokens1[l].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(o){const c=w.TokenizationRegistry.getColorMap(),l=b.TokenMetadata.getLanguageId(o),a=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(l),tokenType:a,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),l=this._tokenizationSupport.tokenize(this._model.getLineContent(o),!0,c),a=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(o),!0,c);return{startState:c,tokens1:l.tokens,tokens2:a.tokens,endState:l.endState}}_getStateBeforeLine(o){let c=this._tokenizationSupport.getInitialState();for(let l=1;l<o;l++)c=this._tokenizationSupport.tokenize(this._model.getLineContent(l),!0,c).endState;return c}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}d._ID="editor.contrib.inspectTokensWidget",(0,E.registerEditorContribution)(t.ID,t,4),(0,E.registerEditorAction)(i)}),define(X[788],ee([1,0,7,560,40,16,2,687,29,14,55,34,72]),function(K,e,_,k,y,E,w,b,S,g,p,n,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,l,a){super(r,c,Object.assign(Object.assign({getKeyBinding:u=>{var v;return(v=l.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=>a.publicLog2("workbenchActionExecuted",{id:u.action.id,from:d.telemetrySource})))}setActions(r,d=[],h){var o,c,l;this._sessionDisposables.clear();const a=r.slice(),u=d.slice(),v=[];let f=0;const m=[];let C=!1;if(((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==-1)for(let L=0;L<a.length;L++){const D=a[L];!(D instanceof S.MenuItemAction)&&!(D instanceof S.SubmenuItemAction)||D.hideActions&&(v.push(D.hideActions.toggle),D.hideActions.toggle.checked&&f++,D.hideActions.isHidden&&(C=!0,a[L]=void 0,((c=this._options)===null||c===void 0?void 0:c.hiddenItemStrategy)!==0&&(m[L]=D)))}if(((l=this._options)===null||l===void 0?void 0:l.maxNumberOfItems)!==void 0){let L=0;for(let D=0;D<a.length;D++){const I=a[D];I&&++L>=this._options.maxNumberOfItems&&(a[D]=void 0,m[D]=I)}}(0,E.coalesceInPlace)(a),(0,E.coalesceInPlace)(m),super.setActions(a,y.Separator.join(m,u)),v.length>0&&this._sessionDisposables.add((0,_.addDisposableListener)(this.getElement(),"contextmenu",L=>{var D,I,T,O;const R=this.getItemAction(L.target);if(!R)return;L.preventDefault(),L.stopPropagation();let A=!1;if(f===1&&((D=this._options)===null||D===void 0?void 0:D.hiddenItemStrategy)===0){A=!0;for(let x=0;x<v.length;x++)if(v[x].checked){v[x]=(0,y.toAction)({id:R.id,label:R.label,checked:!0,enabled:!1,run(){}});break}}let N;if(!A&&(R instanceof S.MenuItemAction||R instanceof S.SubmenuItemAction)){if(!R.hideActions)return;N=R.hideActions.hide}else N=(0,y.toAction)({id:"label",label:(0,b.localize)(0,null),enabled:!1,run(){}});const P=y.Separator.join([N],v);!((I=this._options)===null||I===void 0)&&I.resetMenu&&!h&&(h=[this._options.resetMenu]),C&&h&&(P.push(new y.Separator),P.push((0,y.toAction)({id:"resetThisMenu",label:(0,b.localize)(1,null),run:()=>this._menuService.resetHiddenStates(h)}))),this._contextMenuService.showContextMenu({getAnchor:()=>L,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=Me([fe(2,S.IMenuService),fe(3,g.IContextKeyService),fe(4,p.IContextMenuService),fe(5,n.IKeybindingService),fe(6,t.ITelemetryService)],i)}),define(X[789],ee([1,0,540,11,64,2,56,18,699,25,26,152,8,34,740,84,72]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let h=e.AbstractCommandsQuickAccessProvider=class Yt extends s.PickerQuickAccessProvider{constructor(l,a,u,v,f,m){super(Yt.PREFIX,l),this.instantiationService=a,this.keybindingService=u,this.commandService=v,this.telemetryService=f,this.dialogService=m,this.commandsHistory=this._register(this.instantiationService.createInstance(o)),this.options=l}_getPicks(l,a,u,v){var f,m;return we(this,void 0,void 0,function*(){const C=yield this.getCommandPicks(u);if(u.isCancellationRequested)return[];const L=[];for(const R of C){const A=(0,b.withNullAsUndefined)(Yt.WORD_FILTER(l,R.label)),N=R.commandAlias?(0,b.withNullAsUndefined)(Yt.WORD_FILTER(l,R.commandAlias)):void 0;A||N?(R.highlights={label:A,detail:this.options.showAlias?N:void 0},L.push(R)):l===R.commandId&&L.push(R)}const D=new Map;for(const R of L){const A=D.get(R.label);A?(R.description=R.commandId,A.description=A.commandId):D.set(R.label,R)}L.sort((R,A)=>{const N=this.commandsHistory.peek(R.commandId),P=this.commandsHistory.peek(A.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(A.commandId);if(x&&F)return 0;if(x)return-1;if(F)return 1}return R.label.localeCompare(A.label)});const I=[];let T=!1,O=!!this.options.suggestedCommandIds;for(let R=0;R<L.length;R++){const A=L[R];R===0&&this.commandsHistory.peek(A.commandId)&&(I.push({type:"separator",label:(0,S.localize)(0,null)}),T=!0),O&&!this.commandsHistory.peek(A.commandId)&&(!((f=this.options.suggestedCommandIds)===null||f===void 0)&&f.has(A.commandId))&&(I.push({type:"separator",label:(0,S.localize)(1,null)}),T=!0,O=!1),T&&!this.commandsHistory.peek(A.commandId)&&!(!((m=this.options.suggestedCommandIds)===null||m===void 0)&&m.has(A.commandId))&&(I.push({type:"separator",label:(0,S.localize)(2,null)}),T=!1),I.push(this.toCommandPick(A,v))}return this.hasAdditionalCommandPicks(l,u)?{picks:I,additionalPicks:(()=>we(this,void 0,void 0,function*(){const R=yield this.getAdditionalCommandPicks(C,L,l,u);return u.isCancellationRequested?[]:R.map(A=>this.toCommandPick(A,v))}))()}:I})}toCommandPick(l,a){if(l.type==="separator")return l;const u=this.keybindingService.lookupKeybinding(l.commandId),v=u?(0,S.localize)(3,null,l.label,u.getAriaLabel()):l.label;return Object.assign(Object.assign({},l),{ariaLabel:v,detail:this.options.showAlias&&l.commandAlias!==l.label?l.commandAlias:void 0,keybinding:u,accept:()=>we(this,void 0,void 0,function*(){var f;this.commandsHistory.push(l.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:(f=a?.from)!==null&&f!==void 0?f:"quick open"});try{yield this.commandService.executeCommand(l.commandId)}catch(m){(0,k.isCancellationError)(m)||this.dialogService.error((0,S.localize)(4,null,l.label),(0,_.toErrorMessage)(m))}})})}};h.PREFIX=">",h.WORD_FILTER=(0,y.or)(y.matchesPrefix,y.matchesWords,y.matchesContiguousSubString),e.AbstractCommandsQuickAccessProvider=h=Me([fe(1,t.IInstantiationService),fe(2,i.IKeybindingService),fe(3,g.ICommandService),fe(4,d.ITelemetryService),fe(5,n.IDialogService)],h);let o=e.CommandsHistory=class ct extends E.Disposable{constructor(l,a){super(),this.storageService=l,this.configurationService=a,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(l=>this.updateConfiguration(l)))}updateConfiguration(l){l&&!l.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=ct.getConfiguredCommandHistoryLength(this.configurationService),ct.cache&&ct.cache.limit!==this.configuredCommandsHistoryLength&&(ct.cache.limit=this.configuredCommandsHistoryLength,ct.saveState(this.storageService)))}load(){const l=this.storageService.get(ct.PREF_KEY_CACHE,0);let a;if(l)try{a=JSON.parse(l)}catch{}const u=ct.cache=new w.LRUCache(this.configuredCommandsHistoryLength,1);if(a){let v;a.usesLRU?v=a.entries:v=a.entries.sort((f,m)=>f.value-m.value),v.forEach(f=>u.set(f.key,f.value))}ct.counter=this.storageService.getNumber(ct.PREF_KEY_COUNTER,0,ct.counter)}push(l){ct.cache&&(ct.cache.set(l,ct.counter++),ct.saveState(this.storageService))}peek(l){var a;return(a=ct.cache)===null||a===void 0?void 0:a.peek(l)}static saveState(l){if(!ct.cache)return;const a={usesLRU:!0,entries:[]};ct.cache.forEach((u,v)=>a.entries.push({key:v,value:u})),l.store(ct.PREF_KEY_CACHE,JSON.stringify(a),0,0),l.store(ct.PREF_KEY_COUNTER,ct.counter,0,0)}static getConfiguredCommandHistoryLength(l){var a,u;const f=(u=(a=l.getValue().workbench)===null||a===void 0?void 0:a.commandPalette)===null||u===void 0?void 0:u.history;return typeof f=="number"?f:ct.DEFAULT_COMMANDS_HISTORY_LENGTH}};o.DEFAULT_COMMANDS_HISTORY_LENGTH=50,o.PREF_KEY_CACHE="commandPalette.mru.cache",o.PREF_KEY_COUNTER="commandPalette.mru.counter",o.counter=1,e.CommandsHistory=o=Me([fe(0,r.IStorageService),fe(1,p.IConfigurationService)],o)}),define(X[790],ee([1,0,114,789]),function(K,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class y extends k.AbstractCommandsQuickAccessProvider{constructor(w,b,S,g,p,n){super(w,b,S,g,p,n)}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=y}),define(X[791],ee([1,0,35,127,82,32,790,18,8,34,25,72,152,15,22,79]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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,l,a,u,v,f){super({showAlias:!1},c,a,u,v,f),this.codeEditorService=l}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=Me([fe(0,S.IInstantiationService),fe(1,E.ICodeEditorService),fe(2,g.IKeybindingService),fe(3,p.ICommandService),fe(4,n.ITelemetryService),fe(5,t.IDialogService)],d);class h extends i.EditorAction{constructor(){super({id:h.ID,label:y.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(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:y.QuickCommandNLS.quickCommandHelp,commandId:h.ID}]})}),define(X[33],ee([1,0,13,37,6,85,704,230,35]),function(K,e,_,k,y,E,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.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 p(O){return`var(${g(O)})`}e.asCssVariable=p;function n(O,R){return`var(${g(O)}, ${R})`}e.asCssVariableWithDefault=n,e.Extensions={ColorContribution:"base.contributions.colors"};class t{constructor(){this._onDidChangeSchema=new y.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(R,A,N,P=!1,x){const F={id:R,description:N,defaults:A,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,A){const N=this.colorsById[R];if(N&&N.defaults){const P=N.defaults[A.type];return D(P,A)}}getColorSchema(){return this.colorSchema}toString(){const R=(A,N)=>{const P=A.indexOf(".")===-1?0:1,x=N.indexOf(".")===-1?0:1;return P!==x?P-x:A.localeCompare(N)};return Object.keys(this.colorsById).sort(R).map(A=>`- \`${A}\`: ${this.colorsById[A].description}`).join(`
- `)}}const i=new t;S.Registry.add(e.Extensions.ColorContribution,i);function s(O,R,A,N,P){return i.registerColor(O,R,A,N,P)}e.registerColor=s,e.foreground=s("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},w.localize(0,null)),e.disabledForeground=s("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},w.localize(1,null)),e.errorForeground=s("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},w.localize(2,null)),e.descriptionForeground=s("descriptionForeground",{light:"#717171",dark:f(e.foreground,.7),hcDark:f(e.foreground,.7),hcLight:f(e.foreground,.7)},w.localize(3,null)),e.iconForeground=s("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},w.localize(4,null)),e.focusBorder=s("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},w.localize(5,null)),e.contrastBorder=s("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},w.localize(6,null)),e.activeContrastBorder=s("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(7,null)),e.selectionBackground=s("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},w.localize(8,null)),e.textSeparatorForeground=s("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:k.Color.black,hcLight:"#292929"},w.localize(9,null)),e.textLinkForeground=s("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},w.localize(10,null)),e.textLinkActiveForeground=s("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},w.localize(11,null)),e.textPreformatForeground=s("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},w.localize(12,null)),e.textBlockQuoteBackground=s("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},w.localize(13,null)),e.textBlockQuoteBorder=s("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:k.Color.white,hcLight:"#292929"},w.localize(14,null)),e.textCodeBlockBackground=s("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:k.Color.black,hcLight:"#F2F2F2"},w.localize(15,null)),e.widgetShadow=s("widget.shadow",{dark:f(k.Color.black,.36),light:f(k.Color.black,.16),hcDark:null,hcLight:null},w.localize(16,null)),e.widgetBorder=s("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(17,null)),e.inputBackground=s("input.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(18,null)),e.inputForeground=s("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(19,null)),e.inputBorder=s("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(20,null)),e.inputActiveOptionBorder=s("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(21,null)),e.inputActiveOptionHoverBackground=s("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},w.localize(22,null)),e.inputActiveOptionBackground=s("inputOption.activeBackground",{dark:f(e.focusBorder,.4),light:f(e.focusBorder,.2),hcDark:k.Color.transparent,hcLight:k.Color.transparent},w.localize(23,null)),e.inputActiveOptionForeground=s("inputOption.activeForeground",{dark:k.Color.white,light:k.Color.black,hcDark:e.foreground,hcLight:e.foreground},w.localize(24,null)),e.inputPlaceholderForeground=s("input.placeholderForeground",{light:f(e.foreground,.5),dark:f(e.foreground,.5),hcDark:f(e.foreground,.7),hcLight:f(e.foreground,.7)},w.localize(25,null)),e.inputValidationInfoBackground=s("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(26,null)),e.inputValidationInfoForeground=s("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(27,null)),e.inputValidationInfoBorder=s("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(28,null)),e.inputValidationWarningBackground=s("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(29,null)),e.inputValidationWarningForeground=s("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(30,null)),e.inputValidationWarningBorder=s("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(31,null)),e.inputValidationErrorBackground=s("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(32,null)),e.inputValidationErrorForeground=s("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(33,null)),e.inputValidationErrorBorder=s("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(34,null)),e.selectBackground=s("dropdown.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(35,null)),e.selectListBackground=s("dropdown.listBackground",{dark:null,light:null,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(36,null)),e.selectForeground=s("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:k.Color.white,hcLight:e.foreground},w.localize(37,null)),e.selectBorder=s("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(38,null)),e.buttonForeground=s("button.foreground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:k.Color.white},w.localize(39,null)),e.buttonSeparator=s("button.separator",{dark:f(e.buttonForeground,.4),light:f(e.buttonForeground,.4),hcDark:f(e.buttonForeground,.4),hcLight:f(e.buttonForeground,.4)},w.localize(40,null)),e.buttonBackground=s("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},w.localize(41,null)),e.buttonHoverBackground=s("button.hoverBackground",{dark:v(e.buttonBackground,.2),light:u(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},w.localize(42,null)),e.buttonBorder=s("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(43,null)),e.buttonSecondaryForeground=s("button.secondaryForeground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:e.foreground},w.localize(44,null)),e.buttonSecondaryBackground=s("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:k.Color.white},w.localize(45,null)),e.buttonSecondaryHoverBackground=s("button.secondaryHoverBackground",{dark:v(e.buttonSecondaryBackground,.2),light:u(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},w.localize(46,null)),e.badgeBackground=s("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:k.Color.black,hcLight:"#0F4A85"},w.localize(47,null)),e.badgeForeground=s("badge.foreground",{dark:k.Color.white,light:"#333",hcDark:k.Color.white,hcLight:k.Color.white},w.localize(48,null)),e.scrollbarShadow=s("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},w.localize(49,null)),e.scrollbarSliderBackground=s("scrollbarSlider.background",{dark:k.Color.fromHex("#797979").transparent(.4),light:k.Color.fromHex("#646464").transparent(.4),hcDark:f(e.contrastBorder,.6),hcLight:f(e.contrastBorder,.4)},w.localize(50,null)),e.scrollbarSliderHoverBackground=s("scrollbarSlider.hoverBackground",{dark:k.Color.fromHex("#646464").transparent(.7),light:k.Color.fromHex("#646464").transparent(.7),hcDark:f(e.contrastBorder,.8),hcLight:f(e.contrastBorder,.8)},w.localize(51,null)),e.scrollbarSliderActiveBackground=s("scrollbarSlider.activeBackground",{dark:k.Color.fromHex("#BFBFBF").transparent(.4),light:k.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(52,null)),e.progressBarBackground=s("progressBar.background",{dark:k.Color.fromHex("#0E70C0"),light:k.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(53,null)),e.editorErrorBackground=s("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(54,null),!0),e.editorErrorForeground=s("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},w.localize(55,null)),e.editorErrorBorder=s("editorError.border",{dark:null,light:null,hcDark:k.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},w.localize(56,null)),e.editorWarningBackground=s("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(57,null),!0),e.editorWarningForeground=s("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},w.localize(58,null)),e.editorWarningBorder=s("editorWarning.border",{dark:null,light:null,hcDark:k.Color.fromHex("#FFCC00").transparent(.8),hcLight:k.Color.fromHex("#FFCC00").transparent(.8)},w.localize(59,null)),e.editorInfoBackground=s("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(60,null),!0),e.editorInfoForeground=s("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},w.localize(61,null)),e.editorInfoBorder=s("editorInfo.border",{dark:null,light:null,hcDark:k.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},w.localize(62,null)),e.editorHintForeground=s("editorHint.foreground",{dark:k.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},w.localize(63,null)),e.editorHintBorder=s("editorHint.border",{dark:null,light:null,hcDark:k.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},w.localize(64,null)),e.sashHoverBorder=s("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(65,null)),e.editorBackground=s("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(66,null)),e.editorForeground=s("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:k.Color.white,hcLight:e.foreground},w.localize(67,null)),e.editorStickyScrollBackground=s("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},w.localize(68,null)),e.editorStickyScrollHoverBackground=s("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(69,null)),e.editorWidgetBackground=s("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:k.Color.white},w.localize(70,null)),e.editorWidgetForeground=s("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(71,null)),e.editorWidgetBorder=s("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(72,null)),e.editorWidgetResizeBorder=s("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},w.localize(73,null)),e.quickInputBackground=s("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(74,null)),e.quickInputForeground=s("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},w.localize(75,null)),e.quickInputTitleBackground=s("quickInputTitle.background",{dark:new k.Color(new k.RGBA(255,255,255,.105)),light:new k.Color(new k.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:k.Color.white},w.localize(76,null)),e.pickerGroupForeground=s("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:k.Color.white,hcLight:"#0F4A85"},w.localize(77,null)),e.pickerGroupBorder=s("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:k.Color.white,hcLight:"#0F4A85"},w.localize(78,null)),e.keybindingLabelBackground=s("keybindingLabel.background",{dark:new k.Color(new k.RGBA(128,128,128,.17)),light:new k.Color(new k.RGBA(221,221,221,.4)),hcDark:k.Color.transparent,hcLight:k.Color.transparent},w.localize(79,null)),e.keybindingLabelForeground=s("keybindingLabel.foreground",{dark:k.Color.fromHex("#CCCCCC"),light:k.Color.fromHex("#555555"),hcDark:k.Color.white,hcLight:e.foreground},w.localize(80,null)),e.keybindingLabelBorder=s("keybindingLabel.border",{dark:new k.Color(new k.RGBA(51,51,51,.6)),light:new k.Color(new k.RGBA(204,204,204,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:e.contrastBorder},w.localize(81,null)),e.keybindingLabelBottomBorder=s("keybindingLabel.bottomBorder",{dark:new k.Color(new k.RGBA(68,68,68,.6)),light:new k.Color(new k.RGBA(187,187,187,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:e.foreground},w.localize(82,null)),e.editorSelectionBackground=s("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},w.localize(83,null)),e.editorSelectionForeground=s("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:k.Color.white},w.localize(84,null)),e.editorInactiveSelection=s("editor.inactiveSelectionBackground",{light:f(e.editorSelectionBackground,.5),dark:f(e.editorSelectionBackground,.5),hcDark:f(e.editorSelectionBackground,.7),hcLight:f(e.editorSelectionBackground,.5)},w.localize(85,null),!0),e.editorSelectionHighlight=s("editor.selectionHighlightBackground",{light:L(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:L(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},w.localize(86,null),!0),e.editorSelectionHighlightBorder=s("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(87,null)),e.editorFindMatch=s("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},w.localize(88,null)),e.editorFindMatchHighlight=s("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},w.localize(89,null),!0),e.editorFindRangeHighlight=s("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},w.localize(90,null),!0),e.editorFindMatchBorder=s("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(91,null)),e.editorFindMatchHighlightBorder=s("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(92,null)),e.editorFindRangeHighlightBorder=s("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:f(e.activeContrastBorder,.4),hcLight:f(e.activeContrastBorder,.4)},w.localize(93,null),!0),e.searchEditorFindMatch=s("searchEditor.findMatchBackground",{light:f(e.editorFindMatchHighlight,.66),dark:f(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},w.localize(94,null)),e.searchEditorFindMatchBorder=s("searchEditor.findMatchBorder",{light:f(e.editorFindMatchHighlightBorder,.66),dark:f(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},w.localize(95,null)),e.searchResultsInfoForeground=s("search.resultsInfoForeground",{light:e.foreground,dark:f(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},w.localize(96,null)),e.editorHoverHighlight=s("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},w.localize(97,null),!0),e.editorHoverBackground=s("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(98,null)),e.editorHoverForeground=s("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},w.localize(99,null)),e.editorHoverBorder=s("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},w.localize(100,null)),e.editorHoverStatusBarBackground=s("editorHoverWidget.statusBarBackground",{dark:v(e.editorHoverBackground,.2),light:u(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(101,null)),e.editorActiveLinkForeground=s("editorLink.activeForeground",{dark:"#4E94CE",light:k.Color.blue,hcDark:k.Color.cyan,hcLight:"#292929"},w.localize(102,null)),e.editorInlayHintForeground=s("editorInlayHint.foreground",{dark:e.badgeForeground,light:e.badgeForeground,hcDark:k.Color.black,hcLight:e.badgeForeground},w.localize(103,null)),e.editorInlayHintBackground=s("editorInlayHint.background",{dark:f(e.badgeBackground,.8),light:f(e.badgeBackground,.6),hcDark:"#f38518",hcLight:e.badgeBackground},w.localize(104,null)),e.editorInlayHintTypeForeground=s("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},w.localize(105,null)),e.editorInlayHintTypeBackground=s("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},w.localize(106,null)),e.editorInlayHintParameterForeground=s("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},w.localize(107,null)),e.editorInlayHintParameterBackground=s("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},w.localize(108,null)),e.editorLightBulbForeground=s("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},w.localize(109,null)),e.editorLightBulbAutoFixForeground=s("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w.localize(110,null)),e.defaultInsertColor=new k.Color(new k.RGBA(155,185,85,.2)),e.defaultRemoveColor=new k.Color(new k.RGBA(255,0,0,.2)),e.diffInserted=s("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},w.localize(111,null),!0),e.diffRemoved=s("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},w.localize(112,null),!0),e.diffInsertedLine=s("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},w.localize(113,null),!0),e.diffRemovedLine=s("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},w.localize(114,null),!0),e.diffInsertedLineGutter=s("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(115,null)),e.diffRemovedLineGutter=s("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(116,null)),e.diffOverviewRulerInserted=s("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(117,null)),e.diffOverviewRulerRemoved=s("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(118,null)),e.diffInsertedOutline=s("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},w.localize(119,null)),e.diffRemovedOutline=s("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},w.localize(120,null)),e.diffBorder=s("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(121,null)),e.diffDiagonalFill=s("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},w.localize(122,null)),e.listFocusBackground=s("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(123,null)),e.listFocusForeground=s("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(124,null)),e.listFocusOutline=s("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(125,null)),e.listFocusAndSelectionOutline=s("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(126,null)),e.listActiveSelectionBackground=s("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(127,null)),e.listActiveSelectionForeground=s("list.activeSelectionForeground",{dark:k.Color.white,light:k.Color.white,hcDark:null,hcLight:null},w.localize(128,null)),e.listActiveSelectionIconForeground=s("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(129,null)),e.listInactiveSelectionBackground=s("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(130,null)),e.listInactiveSelectionForeground=s("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(131,null)),e.listInactiveSelectionIconForeground=s("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(132,null)),e.listInactiveFocusBackground=s("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(133,null)),e.listInactiveFocusOutline=s("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(134,null)),e.listHoverBackground=s("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:k.Color.white.transparent(.1),hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(135,null)),e.listHoverForeground=s("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(136,null)),e.listDropBackground=s("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},w.localize(137,null)),e.listHighlightForeground=s("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(138,null)),e.listFocusHighlightForeground=s("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:C(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},w.localize(139,null)),e.listInvalidItemForeground=s("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},w.localize(140,null)),e.listErrorForeground=s("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},w.localize(141,null)),e.listWarningForeground=s("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},w.localize(142,null)),e.listFilterWidgetBackground=s("listFilterWidget.background",{light:u(e.editorWidgetBackground,0),dark:v(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(143,null)),e.listFilterWidgetOutline=s("listFilterWidget.outline",{dark:k.Color.transparent,light:k.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},w.localize(144,null)),e.listFilterWidgetNoMatchesOutline=s("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(145,null)),e.listFilterWidgetShadow=s("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},w.localize(146,null)),e.listFilterMatchHighlight=s("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},w.localize(147,null)),e.listFilterMatchHighlightBorder=s("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},w.localize(148,null)),e.treeIndentGuidesStroke=s("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},w.localize(149,null)),e.treeInactiveIndentGuidesStroke=s("tree.inactiveIndentGuidesStroke",{dark:f(e.treeIndentGuidesStroke,.4),light:f(e.treeIndentGuidesStroke,.4),hcDark:f(e.treeIndentGuidesStroke,.4),hcLight:f(e.treeIndentGuidesStroke,.4)},w.localize(150,null)),e.tableColumnsBorder=s("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},w.localize(151,null)),e.tableOddRowsBackgroundColor=s("tree.tableOddRowsBackground",{dark:f(e.foreground,.04),light:f(e.foreground,.04),hcDark:null,hcLight:null},w.localize(152,null)),e.listDeemphasizedForeground=s("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},w.localize(153,null)),e.checkboxBackground=s("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},w.localize(154,null)),e.checkboxSelectBackground=s("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(155,null)),e.checkboxForeground=s("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},w.localize(156,null)),e.checkboxBorder=s("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},w.localize(157,null)),e.checkboxSelectBorder=s("checkbox.selectBorder",{dark:e.iconForeground,light:e.iconForeground,hcDark:e.iconForeground,hcLight:e.iconForeground},w.localize(158,null)),e._deprecatedQuickInputListFocusBackground=s("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,w.localize(159,null)),e.quickInputListFocusForeground=s("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},w.localize(160,null)),e.quickInputListFocusIconForeground=s("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},w.localize(161,null)),e.quickInputListFocusBackground=s("quickInputList.focusBackground",{dark:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},w.localize(162,null)),e.menuBorder=s("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(163,null)),e.menuForeground=s("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},w.localize(164,null)),e.menuBackground=s("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},w.localize(165,null)),e.menuSelectionForeground=s("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},w.localize(166,null)),e.menuSelectionBackground=s("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},w.localize(167,null)),e.menuSelectionBorder=s("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(168,null)),e.menuSeparatorBackground=s("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(169,null)),e.toolbarHoverBackground=s("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},w.localize(170,null)),e.toolbarHoverOutline=s("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(171,null)),e.toolbarActiveBackground=s("toolbar.activeBackground",{dark:v(e.toolbarHoverBackground,.1),light:u(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},w.localize(172,null)),e.snippetTabstopHighlightBackground=s("editor.snippetTabstopHighlightBackground",{dark:new k.Color(new k.RGBA(124,124,124,.3)),light:new k.Color(new k.RGBA(10,50,100,.2)),hcDark:new k.Color(new k.RGBA(124,124,124,.3)),hcLight:new k.Color(new k.RGBA(10,50,100,.2))},w.localize(173,null)),e.snippetTabstopHighlightBorder=s("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(174,null)),e.snippetFinalTabstopHighlightBackground=s("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(175,null)),e.snippetFinalTabstopHighlightBorder=s("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new k.Color(new k.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},w.localize(176,null)),e.breadcrumbsForeground=s("breadcrumb.foreground",{light:f(e.foreground,.8),dark:f(e.foreground,.8),hcDark:f(e.foreground,.8),hcLight:f(e.foreground,.8)},w.localize(177,null)),e.breadcrumbsBackground=s("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},w.localize(178,null)),e.breadcrumbsFocusForeground=s("breadcrumb.focusForeground",{light:u(e.foreground,.2),dark:v(e.foreground,.1),hcDark:v(e.foreground,.1),hcLight:v(e.foreground,.1)},w.localize(179,null)),e.breadcrumbsActiveSelectionForeground=s("breadcrumb.activeSelectionForeground",{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.breadcrumbsPickerBackground=s("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(181,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,l=1;e.mergeCurrentHeaderBackground=s("merge.currentHeaderBackground",{dark:d,light:d,hcDark:null,hcLight:null},w.localize(182,null),!0),e.mergeCurrentContentBackground=s("merge.currentContentBackground",{dark:f(e.mergeCurrentHeaderBackground,c),light:f(e.mergeCurrentHeaderBackground,c),hcDark:f(e.mergeCurrentHeaderBackground,c),hcLight:f(e.mergeCurrentHeaderBackground,c)},w.localize(183,null),!0),e.mergeIncomingHeaderBackground=s("merge.incomingHeaderBackground",{dark:h,light:h,hcDark:null,hcLight:null},w.localize(184,null),!0),e.mergeIncomingContentBackground=s("merge.incomingContentBackground",{dark:f(e.mergeIncomingHeaderBackground,c),light:f(e.mergeIncomingHeaderBackground,c),hcDark:f(e.mergeIncomingHeaderBackground,c),hcLight:f(e.mergeIncomingHeaderBackground,c)},w.localize(185,null),!0),e.mergeCommonHeaderBackground=s("merge.commonHeaderBackground",{dark:o,light:o,hcDark:null,hcLight:null},w.localize(186,null),!0),e.mergeCommonContentBackground=s("merge.commonContentBackground",{dark:f(e.mergeCommonHeaderBackground,c),light:f(e.mergeCommonHeaderBackground,c),hcDark:f(e.mergeCommonHeaderBackground,c),hcLight:f(e.mergeCommonHeaderBackground,c)},w.localize(187,null),!0),e.mergeBorder=s("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},w.localize(188,null)),e.overviewRulerCurrentContentForeground=s("editorOverviewRuler.currentContentForeground",{dark:f(e.mergeCurrentHeaderBackground,l),light:f(e.mergeCurrentHeaderBackground,l),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(189,null)),e.overviewRulerIncomingContentForeground=s("editorOverviewRuler.incomingContentForeground",{dark:f(e.mergeIncomingHeaderBackground,l),light:f(e.mergeIncomingHeaderBackground,l),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(190,null)),e.overviewRulerCommonContentForeground=s("editorOverviewRuler.commonContentForeground",{dark:f(e.mergeCommonHeaderBackground,l),light:f(e.mergeCommonHeaderBackground,l),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(191,null)),e.overviewRulerFindMatchForeground=s("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},w.localize(192,null),!0),e.overviewRulerSelectionHighlightForeground=s("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},w.localize(193,null),!0),e.minimapFindMatch=s("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},w.localize(194,null),!0),e.minimapSelectionOccurrenceHighlight=s("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},w.localize(195,null),!0),e.minimapSelection=s("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},w.localize(196,null),!0),e.minimapError=s("minimap.errorHighlight",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},w.localize(197,null)),e.minimapWarning=s("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},w.localize(198,null)),e.minimapBackground=s("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(199,null)),e.minimapForegroundOpacity=s("minimap.foregroundOpacity",{dark:k.Color.fromHex("#000f"),light:k.Color.fromHex("#000f"),hcDark:k.Color.fromHex("#000f"),hcLight:k.Color.fromHex("#000f")},w.localize(200,null)),e.minimapSliderBackground=s("minimapSlider.background",{light:f(e.scrollbarSliderBackground,.5),dark:f(e.scrollbarSliderBackground,.5),hcDark:f(e.scrollbarSliderBackground,.5),hcLight:f(e.scrollbarSliderBackground,.5)},w.localize(201,null)),e.minimapSliderHoverBackground=s("minimapSlider.hoverBackground",{light:f(e.scrollbarSliderHoverBackground,.5),dark:f(e.scrollbarSliderHoverBackground,.5),hcDark:f(e.scrollbarSliderHoverBackground,.5),hcLight:f(e.scrollbarSliderHoverBackground,.5)},w.localize(202,null)),e.minimapSliderActiveBackground=s("minimapSlider.activeBackground",{light:f(e.scrollbarSliderActiveBackground,.5),dark:f(e.scrollbarSliderActiveBackground,.5),hcDark:f(e.scrollbarSliderActiveBackground,.5),hcLight:f(e.scrollbarSliderActiveBackground,.5)},w.localize(203,null)),e.problemsErrorIconForeground=s("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},w.localize(204,null)),e.problemsWarningIconForeground=s("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},w.localize(205,null)),e.problemsInfoIconForeground=s("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},w.localize(206,null)),e.chartsForeground=s("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(207,null)),e.chartsLines=s("charts.lines",{dark:f(e.foreground,.5),light:f(e.foreground,.5),hcDark:f(e.foreground,.5),hcLight:f(e.foreground,.5)},w.localize(208,null)),e.chartsRed=s("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},w.localize(209,null)),e.chartsBlue=s("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},w.localize(210,null)),e.chartsYellow=s("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},w.localize(211,null)),e.chartsOrange=s("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},w.localize(212,null)),e.chartsGreen=s("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},w.localize(213,null)),e.chartsPurple=s("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w.localize(214,null));function a(O,R){var A,N,P,x;switch(O.op){case 0:return(A=D(O.value,R))===null||A===void 0?void 0:A.darken(O.factor);case 1:return(N=D(O.value,R))===null||N===void 0?void 0:N.lighten(O.factor);case 2:return(P=D(O.value,R))===null||P===void 0?void 0:P.transparent(O.factor);case 3:{const F=D(O.background,R);return F?(x=D(O.value,R))===null||x===void 0?void 0:x.makeOpaque(F):D(O.value,R)}case 4:for(const F of O.values){const B=D(F,R);if(B)return B}return;case 6:return D(R.defines(O.if)?O.then:O.else,R);case 5:{const F=D(O.value,R);if(!F)return;const B=D(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,E.assertNever)(O)}}e.executeTransform=a;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 m(...O){return{op:4,values:O}}e.oneOf=m;function C(O,R,A){return{op:6,if:O,then:R,else:A}}e.ifDefinedThenElse=C;function L(O,R,A,N){return{op:5,value:O,background:R,factor:A,transparency:N}}function D(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 a(O,R)}}e.resolveColorValue=D,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(X[155],ee([1,0,7,143,67,13,2,33]),function(K,e,_,k,y,E,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 p{constructor(u,v,f,m){this.x=u,this.y=v,this.width=f,this.height=m,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=p;class n{constructor(u,v){this.x=u,this.y=v,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=n;function t(a){const u=_.getDomNodePagePosition(a);return new p(u.left,u.top,u.width,u.height)}e.createEditorPagePosition=t;function i(a,u,v){const f=u.width/a.offsetWidth,m=u.height/a.offsetHeight,C=(v.x-u.x)/f,L=(v.y-u.y)/m;return new n(C,L)}e.createCoordinatesRelativeToEditor=i;class s extends y.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=s;class r{constructor(u){this._editorViewDomNode=u}_create(u){return new s(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 s(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,m,C){this._keydownListener=_.addStandardDisposableListener(document,"keydown",L=>{L.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,L.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(u,v,f,L=>{m(new s(L,!0,this._editorViewDomNode))},L=>{this._keydownListener.dispose(),C(L)})}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 E.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 m=this._counter++;f=new c(v,`dyn-rule-${this._instanceId}-${m}`,_.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,m){this.key=u,this.className=v,this.properties=m,this._referenceCount=0,this._styleElement=_.createStyleSheet(f),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(u,v){let f=`.${u} {`;for(const m in v){const C=v[m];let L;typeof C=="object"?L=(0,b.asCssVariable)(C.id):L=C;const D=l(m);f+=`
- ${D}: ${L};`}return f+=`
- }`,f}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function l(a){return a.replace(/(^[A-Z])/,([u])=>u.toLowerCase()).replace(/([A-Z])/g,([u])=>`-${u.toLowerCase()}`)}}),define(X[792],ee([1,0,7,36,143,2,17,9,221,54,41,5,260,308,81,33,23,58,463,46,93,407]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const a=140,u=2;class v{constructor(A,N,P){const x=A.options,F=x.get(137),B=x.get(139),V=B.minimap,$=x.get(48),M=x.get(70);this.renderMinimap=V.renderMinimap,this.size=M.size,this.minimapHeightIsEditorHeight=V.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=x.get(100),this.paddingTop=x.get(81).top,this.paddingBottom=x.get(81).bottom,this.showSlider=M.showSlider,this.autohide=M.autohide,this.pixelRatio=F,this.typicalHalfwidthCharacterWidth=$.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,l.once)(()=>o.MinimapCharRendererFactory.create(this.fontScale,$.fontFamily)),this.defaultBackgroundColor=P.getColor(2),this.backgroundColor=v._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=v._getMinimapForegroundOpacity(N)}static _getMinimapBackground(A,N){const P=A.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(A){const N=A.getColor(r.minimapForegroundOpacity);return N?t.RGBA8._clamp(Math.round(255*N.rgba.a)):255}equals(A){return this.renderMinimap===A.renderMinimap&&this.size===A.size&&this.minimapHeightIsEditorHeight===A.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===A.scrollBeyondLastLine&&this.paddingTop===A.paddingTop&&this.paddingBottom===A.paddingBottom&&this.showSlider===A.showSlider&&this.autohide===A.autohide&&this.pixelRatio===A.pixelRatio&&this.typicalHalfwidthCharacterWidth===A.typicalHalfwidthCharacterWidth&&this.lineHeight===A.lineHeight&&this.minimapLeft===A.minimapLeft&&this.minimapWidth===A.minimapWidth&&this.minimapHeight===A.minimapHeight&&this.canvasInnerWidth===A.canvasInnerWidth&&this.canvasInnerHeight===A.canvasInnerHeight&&this.canvasOuterWidth===A.canvasOuterWidth&&this.canvasOuterHeight===A.canvasOuterHeight&&this.isSampling===A.isSampling&&this.editorHeight===A.editorHeight&&this.fontScale===A.fontScale&&this.minimapLineHeight===A.minimapLineHeight&&this.minimapCharWidth===A.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(A.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(A.backgroundColor)&&this.foregroundAlpha===A.foregroundAlpha}}class f{constructor(A,N,P,x,F,B,V,$,M){this.scrollTop=A,this.scrollHeight=N,this.sliderNeeded=P,this._computedSliderRatio=x,this.sliderTop=F,this.sliderHeight=B,this.topPaddingLineCount=V,this.startLineNumber=$,this.endLineNumber=M}getDesiredScrollTopFromDelta(A){return Math.round(this.scrollTop+A/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(A){return Math.round((A-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(A){const N=Math.max(this.startLineNumber,A.startLineNumber),P=Math.min(this.endLineNumber,A.endLineNumber);return N>P?null:[N,P]}getYForLineNumber(A,N){return+(A-this.startLineNumber+this.topPaddingLineCount)*N}static create(A,N,P,x,F,B,V,$,M,Q,ie){const re=A.pixelRatio,ne=A.minimapLineHeight,se=Math.floor(A.canvasInnerHeight/ne),H=A.lineHeight;if(A.minimapHeightIsEditorHeight){let ge=$*A.lineHeight+A.paddingTop+A.paddingBottom;A.scrollBeyondLastLine&&(ge+=Math.max(0,F-A.lineHeight-A.paddingBottom));const le=Math.max(1,Math.floor(F*F/ge)),ue=Math.max(0,A.minimapHeight-le),j=ue/(Q-F),z=M*j,U=ue>0,J=Math.floor(A.canvasInnerHeight/A.minimapLineHeight),te=Math.floor(A.paddingTop/A.lineHeight);return new f(M,Q,U,j,z,le,te,1,Math.min(V,J))}let W;if(B&&P!==V){const ge=P-N+1;W=Math.floor(ge*ne/re)}else{const ge=F/H;W=Math.floor(ge*ne/re)}const q=Math.floor(A.paddingTop/H);let Z=Math.floor(A.paddingBottom/H);if(A.scrollBeyondLastLine){const ge=F/H;Z=Math.max(Z,ge-1)}let Y;if(Z>0){const ge=F/H;Y=(q+V+Z-ge-1)*ne/re}else Y=Math.max(0,(q+V)*ne/re-W);Y=Math.min(A.minimapHeight-W,Y);const oe=Y/(Q-F),ce=M*oe;if(se>=q+V+Z){const ge=Y>0;return new f(M,Q,ge,oe,ce,W,q,1,V)}else{let ge;N>1?ge=N+q:ge=Math.max(1,M/H);let le,ue=Math.max(1,Math.floor(ge-ce*re/ne));ue<q?(le=q-ue+1,ue=1):(le=0,ue=Math.max(1,ue-q)),ie&&ie.scrollHeight===Q&&(ie.scrollTop>M&&(ue=Math.min(ue,ie.startLineNumber),le=Math.max(le,ie.topPaddingLineCount)),ie.scrollTop<M&&(ue=Math.max(ue,ie.startLineNumber),le=Math.min(le,ie.topPaddingLineCount)));const j=Math.min(V,ue-le+se-1),z=(M-x)/H;let U;return M>A.paddingTop?U=(N-ue+le+z)*ne/re:U=M/A.paddingTop*(le+z)*ne/re,new f(M,Q,!0,oe,U,W,le,ue,j)}}}class m{constructor(A){this.dy=A}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}m.INVALID=new m(-1);class C{constructor(A,N,P){this.renderedLayout=A,this._imageData=N,this._renderedLines=new S.RenderedLinesCollection(()=>m.INVALID),this._renderedLines._set(A.startLineNumber,P)}linesEquals(A){if(!this.scrollEquals(A))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(A){return this.renderedLayout.startLineNumber===A.startLineNumber&&this.renderedLayout.endLineNumber===A.endLineNumber}_get(){const A=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:A.rendLineNumberStart,lines:A.lines}}onLinesChanged(A,N){return this._renderedLines.onLinesChanged(A,N)}onLinesDeleted(A,N){this._renderedLines.onLinesDeleted(A,N)}onLinesInserted(A,N){this._renderedLines.onLinesInserted(A,N)}onTokensChanged(A){return this._renderedLines.onTokensChanged(A)}}class L{constructor(A,N,P,x){this._backgroundFillData=L._createBackgroundFillData(N,P,x),this._buffers=[A.createImageData(N,P),A.createImageData(N,P)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const A=this._buffers[this._lastUsedBuffer];return A.data.set(this._backgroundFillData),A}static _createBackgroundFillData(A,N,P){const x=P.r,F=P.g,B=P.b,V=P.a,$=new Uint8ClampedArray(A*N*4);let M=0;for(let Q=0;Q<N;Q++)for(let ie=0;ie<A;ie++)$[M]=x,$[M+1]=F,$[M+2]=B,$[M+3]=V,M+=4;return $}}class D{static compute(A,N,P){if(A.renderMinimap===0||!A.isSampling)return[null,[]];const{minimapLineCount:x}=p.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:N,scrollBeyondLastLine:A.scrollBeyondLastLine,paddingTop:A.paddingTop,paddingBottom:A.paddingBottom,height:A.editorHeight,lineHeight:A.lineHeight,pixelRatio:A.pixelRatio}),F=N/x,B=F/2;if(!P||P.minimapLines.length===0){const W=[];if(W[0]=1,x>1){for(let q=0,Z=x-1;q<Z;q++)W[q]=Math.round(q*F+B);W[x-1]=N}return[new D(F,W),[]]}const V=P.minimapLines,$=V.length,M=[];let Q=0,ie=0,re=1;const ne=10;let se=[],H=null;for(let W=0;W<x;W++){const q=Math.max(re,Math.round(W*F)),Z=Math.max(q,Math.round((W+1)*F));for(;Q<$&&V[Q]<q;){if(se.length<ne){const oe=Q+1+ie;H&&H.type==="deleted"&&H._oldIndex===Q-1?H.deleteToLineNumber++:(H={type:"deleted",_oldIndex:Q,deleteFromLineNumber:oe,deleteToLineNumber:oe},se.push(H)),ie--}Q++}let Y;if(Q<$&&V[Q]<=Z)Y=V[Q],Q++;else if(W===0?Y=1:W+1===x?Y=N:Y=Math.round(W*F+B),se.length<ne){const oe=Q+1+ie;H&&H.type==="inserted"&&H._i===W-1?H.insertToLineNumber++:(H={type:"inserted",_i:W,insertFromLineNumber:oe,insertToLineNumber:oe},se.push(H)),ie++}M[W]=Y,re=Y}if(se.length<ne)for(;Q<$;){const W=Q+1+ie;H&&H.type==="deleted"&&H._oldIndex===Q-1?H.deleteToLineNumber++:(H={type:"deleted",_oldIndex:Q,deleteFromLineNumber:W,deleteToLineNumber:W},se.push(H)),ie--,Q++}else se=[{type:"flush"}];return[new D(F,M),se]}constructor(A,N){this.samplingRatio=A,this.minimapLines=N}modelLineToMinimapLine(A){return Math.min(this.minimapLines.length,Math.max(1,Math.round(A/this.samplingRatio)))}modelLineRangeToMinimapLineRange(A,N){let P=this.modelLineToMinimapLine(A)-1;for(;P>0&&this.minimapLines[P-1]>=A;)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<A||F>N)return null}return[P+1,x+1]}decorationLineRangeToMinimapLineRange(A,N){let P=this.modelLineToMinimapLine(A),x=this.modelLineToMinimapLine(N);return A!==N&&x===P&&(x===this.minimapLines.length?P>1&&P--:x++),[P,x]}onLinesDeleted(A){const N=A.toLineNumber-A.fromLineNumber+1;let P=this.minimapLines.length,x=0;for(let F=this.minimapLines.length-1;F>=0&&!(this.minimapLines[F]<A.fromLineNumber);F--)this.minimapLines[F]<=A.toLineNumber?(this.minimapLines[F]=Math.max(1,A.fromLineNumber-1),P=Math.min(P,F),x=Math.max(x,F)):this.minimapLines[F]-=N;return[P,x]}onLinesInserted(A){const N=A.toLineNumber-A.fromLineNumber+1;for(let P=this.minimapLines.length-1;P>=0&&!(this.minimapLines[P]<A.fromLineNumber);P--)this.minimapLines[P]+=N}}class I extends g.ViewPart{constructor(A){super(A),this.tokensColorTracker=i.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new v(this._context.configuration,this._context.theme,this.tokensColorTracker);const[N]=D.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=N,this._shouldCheckSampling=!1,this._actual=new T(A.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const A=new v(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(A)?!1:(this.options=A,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(A){return this._onOptionsMaybeChanged()}onCursorStateChanged(A){return this._selections=A.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(A){return A.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(A){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(A){if(this._samplingState){const N=this._samplingState.modelLineRangeToMinimapLineRange(A.fromLineNumber,A.fromLineNumber+A.count-1);return N?this._actual.onLinesChanged(N[0],N[1]-N[0]+1):!1}else return this._actual.onLinesChanged(A.fromLineNumber,A.count)}onLinesDeleted(A){if(this._samplingState){const[N,P]=this._samplingState.onLinesDeleted(A);return N<=P&&this._actual.onLinesChanged(N+1,P-N+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(A.fromLineNumber,A.toLineNumber)}onLinesInserted(A){return this._samplingState?(this._samplingState.onLinesInserted(A),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(A.fromLineNumber,A.toLineNumber)}onScrollChanged(A){return this._actual.onScrollChanged()}onThemeChanged(A){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(A){if(this._samplingState){const N=[];for(const P of A.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(A.ranges)}onTokensColorsChanged(A){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(A){return this._actual.onZonesChanged()}prepareRender(A){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(A){let N=A.visibleRange.startLineNumber,P=A.visibleRange.endLineNumber;this._samplingState&&(N=this._samplingState.modelLineToMinimapLine(N),P=this._samplingState.modelLineToMinimapLine(P));const x={viewportContainsWhitespaceGaps:A.viewportData.whitespaceViewportData.length>0,scrollWidth:A.scrollWidth,scrollHeight:A.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:P,viewportStartLineNumberVerticalOffset:A.getVerticalOffsetForLineNumber(N),scrollTop:A.scrollTop,scrollLeft:A.scrollLeft,viewportWidth:A.viewportWidth,viewportHeight:A.viewportHeight};this._actual.render(x)}_recreateLineSampling(){this._minimapSelections=null;const A=!!this._samplingState,[N,P]=D.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,A&&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(A){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[A-1]):this._context.viewModel.getLineContent(A)}getLineMaxColumn(A){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[A-1]):this._context.viewModel.getLineMaxColumn(A)}getMinimapLinesRenderingData(A,N,P){if(this._samplingState){const x=[];for(let F=0,B=N-A+1;F<B;F++)P[F]?x[F]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[A+F-1]):x[F]=null;return x}return this._context.viewModel.getMinimapLinesRenderingData(A,N,P).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const A of this._selections){const[N,P]=this._samplingState.decorationLineRangeToMinimapLineRange(A.startLineNumber,A.endLineNumber);this._minimapSelections.push(new d.Selection(N,A.startColumn,P,A.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(A,N){let P;if(this._samplingState){const F=this._samplingState.minimapLines[A-1],B=this._samplingState.minimapLines[N-1];P=new n.Range(F,1,B,this._context.viewModel.getLineMaxColumn(B))}else P=new n.Range(A,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,$=this._samplingState.modelLineToMinimapLine(V.startLineNumber),M=this._samplingState.modelLineToMinimapLine(V.endLineNumber);F.push(new s.ViewModelDecoration(new n.Range($,V.startColumn,M,V.endColumn),B.options))}return F}return x}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(A){this._samplingState&&(A=this._samplingState.minimapLines[A-1]),this._context.viewModel.revealRange("mouse",!1,new n.Range(A,1,A,1),1,0)}setScrollTop(A){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:A},1)}}e.Minimap=I;class T extends E.Disposable{constructor(A,N){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=A,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 M=_.getDomNodePagePosition(this._slider.domNode),Q=M.top+M.height/2;this._startSliderDragging(P,Q,this._lastRenderData.renderedLayout)}return}const F=this._model.options.minimapLineHeight,B=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*P.offsetY;let $=Math.floor(B/F)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;$=Math.min($,this._model.getLineCount()),this._model.revealLineNumber($)}),this._sliderPointerMoveMonitor=new y.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(A,N,P){if(!A.target||!(A.target instanceof Element))return;const x=A.pageX;this._slider.toggleClassName("active",!0);const F=(B,V)=>{const $=_.getDomNodePagePosition(this._domNode.domNode),M=Math.min(Math.abs(V-x),Math.abs(V-$.left),Math.abs(V-$.left-$.width));if(w.isWindows&&M>a){this._model.setScrollTop(P.scrollTop);return}const Q=B-N;this._model.setScrollTop(P.getDesiredScrollTopFromDelta(Q))};A.pageY!==N&&F(A.pageY,x),this._sliderPointerMoveMonitor.startMonitoring(A.target,A.pointerId,A.buttons,B=>F(B.pageY,B.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(A){const N=this._domNode.domNode.getBoundingClientRect().top,P=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(A.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 A=["minimap"];return this._model.options.showSlider==="always"?A.push("slider-always"):A.push("slider-mouseover"),this._model.options.autohide&&A.push("autohide"),A.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new L(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(A,N){return this._lastRenderData?this._lastRenderData.onLinesChanged(A,N):!1}onLinesDeleted(A,N){var P;return(P=this._lastRenderData)===null||P===void 0||P.onLinesDeleted(A,N),!0}onLinesInserted(A,N){var P;return(P=this._lastRenderData)===null||P===void 0||P.onLinesInserted(A,N),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(r.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(A){return this._lastRenderData?this._lastRenderData.onTokensChanged(A):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(A){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}A.scrollLeft+A.viewportWidth>=A.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const P=f.create(this._model.options,A.viewportStartLineNumber,A.viewportEndLineNumber,A.viewportStartLineNumberVerticalOffset,A.viewportHeight,A.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),A.scrollTop,A.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(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(A){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(n.Range.compareRangesUsingStarts);const P=this._model.getMinimapDecorationsInViewport(A.startLineNumber,A.endLineNumber);P.sort((re,ne)=>(re.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,$=this._model.getOptions().tabSize,M=this._decorationsCanvas.domNode.getContext("2d");M.clearRect(0,0,x,F);const Q=new O(A.startLineNumber,A.endLineNumber,!1);this._renderSelectionLineHighlights(M,N,Q,A,B),this._renderDecorationsLineHighlights(M,P,Q,A,B);const ie=new O(A.startLineNumber,A.endLineNumber,null);this._renderSelectionsHighlights(M,N,ie,A,B,$,V,x),this._renderDecorationsHighlights(M,P,ie,A,B,$,V,x)}}_renderSelectionLineHighlights(A,N,P,x,F){if(!this._selectionColor||this._selectionColor.isTransparent())return;A.fillStyle=this._selectionColor.transparent(.5).toString();let B=0,V=0;for(const $ of N){const M=x.intersectWithViewport($);if(!M)continue;const[Q,ie]=M;for(let se=Q;se<=ie;se++)P.set(se,!0);const re=x.getYForLineNumber(Q,F),ne=x.getYForLineNumber(ie,F);V>=re||(V>B&&A.fillRect(p.MINIMAP_GUTTER_WIDTH,B,A.canvas.width,V-B),B=re),V=ne}V>B&&A.fillRect(p.MINIMAP_GUTTER_WIDTH,B,A.canvas.width,V-B)}_renderDecorationsLineHighlights(A,N,P,x,F){const B=new Map;for(let V=N.length-1;V>=0;V--){const $=N[V],M=$.options.minimap;if(!M||M.position!==c.MinimapPosition.Inline)continue;const Q=x.intersectWithViewport($.range);if(!Q)continue;const[ie,re]=Q,ne=M.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)),A.fillStyle=se;for(let H=ie;H<=re;H++){if(P.has(H))continue;P.set(H,!0);const W=x.getYForLineNumber(ie,F);A.fillRect(p.MINIMAP_GUTTER_WIDTH,W,A.canvas.width,F)}}}_renderSelectionsHighlights(A,N,P,x,F,B,V,$){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const M of N){const Q=x.intersectWithViewport(M);if(!Q)continue;const[ie,re]=Q;for(let ne=ie;ne<=re;ne++)this.renderDecorationOnLine(A,P,M,this._selectionColor,x,ne,F,F,B,V,$)}}_renderDecorationsHighlights(A,N,P,x,F,B,V,$){for(const M of N){const Q=M.options.minimap;if(!Q)continue;const ie=x.intersectWithViewport(M.range);if(!ie)continue;const[re,ne]=ie,se=Q.getColor(this._theme.value);if(!(!se||se.isTransparent()))for(let H=re;H<=ne;H++)switch(Q.position){case c.MinimapPosition.Inline:this.renderDecorationOnLine(A,P,M.range,se,x,H,F,F,B,V,$);continue;case c.MinimapPosition.Gutter:{const W=x.getYForLineNumber(H,F),q=2;this.renderDecoration(A,se,q,W,u,F);continue}}}}renderDecorationOnLine(A,N,P,x,F,B,V,$,M,Q,ie){const re=F.getYForLineNumber(B,$);if(re+V<0||re>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),q=this.getXOffsetForPosition(N,B,H,M,Q,ie),Z=this.getXOffsetForPosition(N,B,W,M,Q,ie);this.renderDecoration(A,x,q,re,Z-q,V)}getXOffsetForPosition(A,N,P,x,F,B){if(P===1)return p.MINIMAP_GUTTER_WIDTH;if((P-1)*F>=B)return B;let $=A.get(N);if(!$){const M=this._model.getLineContent(N);$=[p.MINIMAP_GUTTER_WIDTH];let Q=p.MINIMAP_GUTTER_WIDTH;for(let ie=1;ie<M.length+1;ie++){const re=M.charCodeAt(ie-1),ne=re===9?x*F:b.isFullWidthCharacter(re)?2*F:F,se=Q+ne;if(se>=B){$[ie]=B;break}$[ie]=se,Q=se}A.set(N,$)}return P-1<$.length?$[P-1]:B}renderDecoration(A,N,P,x,F,B){A.fillStyle=N&&N.toString()||"",A.fillRect(P,x,F,B)}renderLines(A){const N=A.startLineNumber,P=A.endLineNumber,x=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(A)){const ae=this._lastRenderData._get();return new C(A,ae.imageData,ae.lines)}const F=this._getBuffer();if(!F)return null;const[B,V,$]=T._renderUntouchedLines(F,A.topPaddingLineCount,N,P,x,this._lastRenderData),M=this._model.getMinimapLinesRenderingData(N,P,$),Q=this._model.getOptions().tabSize,ie=this._model.options.defaultBackgroundColor,re=this._model.options.backgroundColor,ne=this._model.options.foregroundAlpha,se=this._model.tokensColorTracker,H=se.backgroundIsLight(),W=this._model.options.renderMinimap,q=this._model.options.charRenderer(),Z=this._model.options.fontScale,Y=this._model.options.minimapCharWidth,ce=(W===1?2:2+1)*Z,ge=x>ce?Math.floor((x-ce)/2):0,le=re.a/255,ue=new t.RGBA8(Math.round((re.r-ie.r)*le+ie.r),Math.round((re.g-ie.g)*le+ie.g),Math.round((re.b-ie.b)*le+ie.b),255);let j=A.topPaddingLineCount*x;const z=[];for(let ae=0,me=P-N+1;ae<me;ae++)$[ae]&&T._renderLine(F,ue,re.a,H,W,Y,se,ne,q,j,ge,Q,M[ae],Z,x),z[ae]=new m(j),j+=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(A,F,z)}static _renderUntouchedLines(A,N,P,x,F,B){const V=[];if(!B){for(let j=0,z=x-P+1;j<z;j++)V[j]=!0;return[-1,-1,V]}const $=B._get(),M=$.imageData.data,Q=$.rendLineNumberStart,ie=$.lines,re=ie.length,ne=A.width,se=A.data,H=(x-P+1)*F*ne*4;let W=-1,q=-1,Z=-1,Y=-1,oe=-1,ce=-1,ge=N*F;for(let j=P;j<=x;j++){const z=j-P,U=j-Q,J=U>=0&&U<re?ie[U].dy:-1;if(J===-1){V[z]=!0,ge+=F;continue}const te=J*ne*4,G=(J+F)*ne*4,ae=ge*ne*4,me=(ge+F)*ne*4;Y===te&&ce===ae?(Y=G,ce=me):(Z!==-1&&(se.set(M.subarray(Z,Y),oe),W===-1&&Z===0&&Z===oe&&(W=Y),q===-1&&Y===H&&Z===oe&&(q=Z)),Z=te,Y=G,oe=ae,ce=me),V[z]=!1,ge+=F}Z!==-1&&(se.set(M.subarray(Z,Y),oe),W===-1&&Z===0&&Z===oe&&(W=Y),q===-1&&Y===H&&Z===oe&&(q=Z));const le=W===-1?-1:W/(ne*4),ue=q===-1?-1:q/(ne*4);return[le,ue,V]}static _renderLine(A,N,P,x,F,B,V,$,M,Q,ie,re,ne,se,H){const W=ne.content,q=ne.tokens,Z=A.width-B,Y=H===1;let oe=p.MINIMAP_GUTTER_WIDTH,ce=0,ge=0;for(let le=0,ue=q.getCount();le<ue;le++){const j=q.getEndOffset(le),z=q.getForeground(le),U=V.getColor(z);for(;ce<j;ce++){if(oe>Z)return;const J=W.charCodeAt(ce);if(J===9){const te=re-(ce+ge)%re;ge+=te-1,oe+=te*B}else if(J===32)oe+=B;else{const te=b.isFullWidthCharacter(J)?2:1;for(let G=0;G<te;G++)if(F===2?M.blockRenderChar(A,oe,Q+ie,U,$,N,P,Y):M.renderChar(A,oe,Q+ie,J,U,$,N,P,se,x,Y),oe+=B,oe>Z)return}}}}}class O{constructor(A,N,P){this._startLineNumber=A,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(A){return this.get(A)!==this._defaultValue}set(A,N){A<this._startLineNumber||A>this._endLineNumber||(this._values[A-this._startLineNumber]=N)}get(A){return A<this._startLineNumber||A>this._endLineNumber?this._defaultValue:this._values[A-this._startLineNumber]}}}),define(X[239],ee([1,0,675,33,444]),function(K,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(X[793],ee([1,0,27,108,610,165,239]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMenuItems=void 0;const E=Object.freeze({kind:k.CodeActionKind.Empty,title:(0,y.localize)(0,null)}),w=Object.freeze([{kind:k.CodeActionKind.QuickFix,title:(0,y.localize)(1,null)},{kind:k.CodeActionKind.RefactorExtract,title:(0,y.localize)(2,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.RefactorInline,title:(0,y.localize)(3,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.RefactorRewrite,title:(0,y.localize)(4,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.RefactorMove,title:(0,y.localize)(5,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.SurroundWith,title:(0,y.localize)(6,null),icon:_.Codicon.symbolSnippet},{kind:k.CodeActionKind.Source,title:(0,y.localize)(7,null),icon:_.Codicon.symbolFile},E]);function b(S,g,p){if(!g)return S.map(i=>({kind:"action",item:i,group:E,disabled:!!i.action.disabled,label:i.action.disabled||i.action.title}));const n=w.map(i=>({group:i,actions:[]}));for(const i of S){const s=i.action.kind?new k.CodeActionKind(i.action.kind):k.CodeActionKind.None;for(const r of n)if(r.group.kind.contains(s)){r.actions.push(i);break}}const t=[];for(const i of n)if(i.actions.length){t.push({kind:"header",group:i.group});for(const s of i.actions)t.push({kind:"action",item:s,group:i.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:p(s.action)})}return t}e.toMenuItems=b}),define(X[99],ee([1,0,33,37]),function(K,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 y(w,b){const S=Object.assign({},b);for(const g in w){const p=w[g];S[g]=p!==void 0?(0,_.asCssVariable)(p):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 E(w){return y(w,e.defaultListStyles)}e.getListStyles=E,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(X[794],ee([1,0,7,291,292,216,64,2,42,62,637,8,34,153,99,150]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let 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(L=>L.children);throw new Error("bad tree")}};e.DataSource=d=Me([fe(0,g.ITextModelService)],d);class h{getHeight(){return 23}getTemplateId(C){return C instanceof r.FileReferences?a.id:v.id}}e.Delegate=h;let o=e.StringRepresentationProvider=class{constructor(C){this._keybindingService=C}getKeyboardNavigationLabel(C){var L;if(C instanceof r.OneReference){const D=(L=C.parent.getPreview(C))===null||L===void 0?void 0:L.preview(C.range);if(D)return D.value}return(0,S.basename)(C.uri)}};e.StringRepresentationProvider=o=Me([fe(0,t.IKeybindingService)],o);class c{getId(C){return C instanceof r.OneReference?C.id:C.uri}}e.IdentityProvider=c;let l=class extends b.Disposable{constructor(C,L){super(),this._labelService=L;const D=document.createElement("div");D.classList.add("reference-file"),this.file=this._register(new E.IconLabel(D,{supportHighlights:!0})),this.badge=new k.CountBadge(_.append(D,_.$(".count")),{},s.defaultCountBadgeStyles),C.appendChild(D)}set(C,L){const D=(0,S.dirname)(C.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(C.uri),this._labelService.getUriLabel(D,{relative:!0}),{title:this._labelService.getUriLabel(C.uri),matches:L});const I=C.children.length;this.badge.setCount(I),I>1?this.badge.setTitleFormat((0,p.localize)(0,null,I)):this.badge.setTitleFormat((0,p.localize)(1,null,I))}};l=Me([fe(1,i.ILabelService)],l);let a=e.FileReferencesRenderer=class Ui{constructor(C){this._instantiationService=C,this.templateId=Ui.id}renderTemplate(C){return this._instantiationService.createInstance(l,C)}renderElement(C,L,D){D.set(C.element,(0,w.createMatches)(C.filterData))}disposeTemplate(C){C.dispose()}};a.id="FileReferencesRenderer",e.FileReferencesRenderer=a=Me([fe(0,n.IInstantiationService)],a);class u{constructor(C){this.label=new y.HighlightedLabel(C)}set(C,L){var D;const I=(D=C.parent.getPreview(C))===null||D===void 0?void 0:D.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;L&&!w.FuzzyScore.isDefault(L)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(T,(0,w.createMatches)(L))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(T,[O]))}}}class v{constructor(){this.templateId=v.id}renderTemplate(C){return new u(C)}renderElement(C,L,D){D.set(C.element,C.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=v,v.id="OneReferenceRenderer";class f{getWidgetAriaLabel(){return(0,p.localize)(2,null)}getAriaLabel(C){return C.ariaMessage}}e.AccessibilityProvider=f}),define(X[795],ee([1,0,7,212,109,27,2,17,30,684,55,34,99,33,256]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionList=e.previewSelectedActionCommand=e.acceptSelectedActionCommand=void 0,e.acceptSelectedActionCommand="acceptSelectedCodeAction",e.previewSelectedActionCommand="previewSelectedCodeAction";class s{get templateId(){return"header"}renderTemplate(a){a.classList.add("group-header");const u=document.createElement("span");return a.append(u),{container:a,text:u}}renderElement(a,u,v){var f,m;v.text.textContent=(m=(f=a.group)===null||f===void 0?void 0:f.title)!==null&&m!==void 0?m:""}disposeTemplate(a){}}let r=class{get templateId(){return"action"}constructor(a,u){this._supportsPreview=a,this._keybindingService=u}renderTemplate(a){a.classList.add(this.templateId);const u=document.createElement("div");u.className="icon",a.append(u);const v=document.createElement("span");v.className="title",a.append(v);const f=new k.KeybindingLabel(a,b.OS);return{container:a,icon:u,text:v,keybinding:f}}renderElement(a,u,v){var f,m,C;if(!((f=a.group)===null||f===void 0)&&f.icon?(v.icon.className=S.ThemeIcon.asClassName(a.group.icon),a.group.icon.color&&(v.icon.style.color=(0,i.asCssVariable)(a.group.icon.color.id))):(v.icon.className=S.ThemeIcon.asClassName(E.Codicon.lightBulb),v.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!a.item||!a.label)return;v.text.textContent=c(a.label),v.keybinding.set(a.keybinding),_.setVisibility(!!a.keybinding,v.keybinding.element);const L=(m=this._keybindingService.lookupKeybinding(e.acceptSelectedActionCommand))===null||m===void 0?void 0:m.getLabel(),D=(C=this._keybindingService.lookupKeybinding(e.previewSelectedActionCommand))===null||C===void 0?void 0:C.getLabel();v.container.classList.toggle("option-disabled",a.disabled),a.disabled?v.container.title=a.label:L&&D?this._supportsPreview?v.container.title=(0,g.localize)(0,null,L,D):v.container.title=(0,g.localize)(1,null,L):v.container.title=""}disposeTemplate(a){}};r=Me([fe(1,n.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(a,u,v,f,m,C){super(),this._delegate=f,this._contextViewService=m,this._keybindingService=C,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const L={getHeight:D=>D.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:D=>D.kind};this._list=this._register(new y.List(a,this.domNode,L,[new r(u,this._keybindingService),new s],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:D=>{if(D.kind==="action"){let I=D.label?c(D?.label):"";return D.disabled&&(I=(0,g.localize)(2,null,I,D.disabled)),I}return null},getWidgetAriaLabel:()=>(0,g.localize)(3,null),getRole:D=>D.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(t.defaultListStyles),this._register(this._list.onMouseClick(D=>this.onListClick(D))),this._register(this._list.onMouseOver(D=>this.onListHover(D))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(D=>this.onListSelection(D))),this._allMenuItems=v,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(a){return!a.disabled&&a.kind==="action"}hide(a){this._delegate.onHide(a),this._contextViewService.hideContextView()}layout(a){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 m=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(...m,a),L=.7,D=Math.min(f,document.body.clientHeight*L);return this._list.layout(D,C),this.domNode.style.height=`${D}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(a){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 m=a?new h:new d;this._list.setSelection([v],m)}onListSelection(a){if(!a.elements.length)return;const u=a.elements[0];u.item&&this.focusCondition(u)?this._delegate.onSelect(u.item,a.browserEvent instanceof h):this._list.setSelection([])}onListHover(a){this._list.setFocus(typeof a.index=="number"?[a.index]:[])}onListClick(a){a.element&&this.focusCondition(a.element)&&this._list.setFocus([])}};e.ActionList=o=Me([fe(4,p.IContextViewService),fe(5,n.IKeybindingService)],o);function c(l){return l.replace(/\r\n|\r|\n/g," ")}}),define(X[796],ee([1,0,7,69,2,685,795,29,14,55,50,8,256]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActionWidgetService=void 0;const t={Visible:new S.RawContextKey("codeActionMenuVisible",!1,(0,E.localize)(0,null))};e.IActionWidgetService=(0,n.createDecorator)("actionWidgetService");let i=class extends y.Disposable{get isVisible(){return t.Visible.getValue(this._contextKeyService)||!1}constructor(d,h,o){super(),this._contextViewService=d,this._contextKeyService=h,this._instantiationService=o,this._list=this._register(new y.MutableDisposable)}show(d,h,o,c,l,a,u){const v=t.Visible.bindTo(this._contextKeyService),f=this._instantiationService.createInstance(w.ActionList,d,h,o,c);this._contextViewService.showContextView({getAnchor:()=>l,render:m=>(v.set(!0),this._renderWidget(m,f,u??[])),onHide:m=>{v.reset(),this._onWidgetClosed(m)}},a,!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 l=document.createElement("div");if(l.classList.add("action-widget"),d.appendChild(l),this._list.value=h,this._list.value)l.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new y.DisposableStore,u=document.createElement("div"),v=d.appendChild(u);v.classList.add("context-view-block"),a.add(_.addDisposableListener(v,_.EventType.MOUSE_DOWN,I=>I.stopPropagation()));const f=document.createElement("div"),m=d.appendChild(f);m.classList.add("context-view-pointerBlock"),a.add(_.addDisposableListener(m,_.EventType.POINTER_MOVE,()=>m.remove())),a.add(_.addDisposableListener(m,_.EventType.MOUSE_DOWN,()=>m.remove()));let C=0;if(o.length){const I=this._createActionBar(".action-widget-action-bar",o);I&&(l.appendChild(I.getContainer().parentElement),a.add(I),C=I.getContainer().offsetWidth)}const L=(c=this._list.value)===null||c===void 0?void 0:c.layout(C);l.style.width=`${L}px`;const D=a.add(_.trackFocus(d));return a.add(D.onDidBlur(()=>this.hide())),a}_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=Me([fe(0,g.IContextViewService),fe(1,S.IContextKeyService),fe(2,n.IInstantiationService)],i),(0,p.registerSingleton)(e.IActionWidgetService,i,1);const s=100+1e3;(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,E.localize)(1,null),original:"Hide action widget"},precondition:t.Visible,keybinding:{weight:s,primary:9,secondary:[1033]}})}run(r){r.get(e.IActionWidgetService).hide()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,E.localize)(2,null),original:"Select previous action"},precondition:t.Visible,keybinding:{weight:s,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(r){const d=r.get(e.IActionWidgetService);d instanceof i&&d.focusPrevious()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"selectNextCodeAction",title:{value:(0,E.localize)(3,null),original:"Select next action"},precondition:t.Visible,keybinding:{weight:s,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(r){const 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,E.localize)(4,null),original:"Accept selected action"},precondition:t.Visible,keybinding:{weight:s,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,E.localize)(5,null),original:"Preview selected action"},precondition:t.Visible,keybinding:{weight:s,primary:2051}})}run(r){const d=r.get(e.IActionWidgetService);d instanceof i&&d.acceptSelected(!0)}})});var oi=this&&this.__classPrivateFieldSet||function(K,e,_,k,y){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?K!==e||!y:!e.has(K))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?y.call(K,_):y?y.value=_:e.set(K,_),_},xt=this&&this.__classPrivateFieldGet||function(K,e,_,k){if(_==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?K!==e||!k:!e.has(K))throw new TypeError("Cannot read private member from an object whose class did not declare it");return _==="m"?k:_==="a"?k.call(K):k?k.value:e.get(K)};define(X[797],ee([1,0,7,11,101,2,12,770,793,154,611,796,25,26,8,333]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let h=e.CodeActionUi=class extends E.Disposable{constructor(c,l,a,u,v,f){super(),this._editor=c,this.delegate=l,this._configurationService=u,this._actionWidgetService=v,this._commandService=f,this._activeCodeActions=this._register(new E.MutableDisposable),d.set(this,!1),this._showDisabled=!1,this._lightBulbWidget=new y.Lazy(()=>{const m=this._editor.getContribution(r.LightBulbWidget.ID);return m&&this._register(m.onClick(C=>this.showCodeActionList(C.actions,C,{includeDisabledActions:!1,fromLightbulb:!0}))),m}),this._resolver=a.createInstance(b.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){oi(this,d,!0,"f"),super.dispose()}update(c){var l,a,u,v,f,m,C;return we(this,void 0,void 0,function*(){if(c.type!==1){(l=this._lightBulbWidget.rawValue)===null||l===void 0||l.hide();return}let L;try{L=yield c.actions}catch(D){(0,k.onUnexpectedError)(D);return}if(!xt(this,d,"f"))if((a=this._lightBulbWidget.value)===null||a===void 0||a.update(L,c.trigger,c.position),c.trigger.type===1){if(!((u=c.trigger.filter)===null||u===void 0)&&u.include){const I=this.tryGetValidActionToApply(c.trigger,L);if(I){try{(v=this._lightBulbWidget.value)===null||v===void 0||v.hide(),yield this.delegate.applyCodeAction(I,!1,!1)}finally{L.dispose()}return}if(c.trigger.context){const T=this.getInvalidActionThatWouldHaveBeenApplied(c.trigger,L);if(T&&T.action.disabled){(f=g.MessageController.get(this._editor))===null||f===void 0||f.showMessage(T.action.disabled,c.trigger.context.position),L.dispose();return}}}const D=!!(!((m=c.trigger.filter)===null||m===void 0)&&m.include);if(c.trigger.context&&(!L.allActions.length||!D&&!L.validActions.length)){(C=g.MessageController.get(this._editor))===null||C===void 0||C.showMessage(c.trigger.context.notAvailableMessage,c.trigger.context.position),this._activeCodeActions.value=L,L.dispose();return}this._activeCodeActions.value=L,this.showCodeActionList(L,this.toCoords(c.position),{includeDisabledActions:D,fromLightbulb:!1})}else this._actionWidgetService.isVisible?L.dispose():this._activeCodeActions.value=L})}getInvalidActionThatWouldHaveBeenApplied(c,l){if(l.allActions.length&&(c.autoApply==="first"&&l.validActions.length===0||c.autoApply==="ifSingle"&&l.allActions.length===1))return l.allActions.find(({action:a})=>a.disabled)}tryGetValidActionToApply(c,l){if(l.validActions.length&&(c.autoApply==="first"&&l.validActions.length>0||c.autoApply==="ifSingle"&&l.validActions.length===1))return l.validActions[0]}showCodeActionList(c,l,a){return we(this,void 0,void 0,function*(){const u=this._editor.getDomNode();if(!u)return;const v=a.includeDisabledActions&&(this._showDisabled||c.validActions.length===0)?c.allActions:c.validActions;if(!v.length)return;const f=w.Position.isIPosition(l)?this.toCoords(l):l,m={onSelect:(C,L)=>we(this,void 0,void 0,function*(){this.delegate.applyCodeAction(C,!0,!!L),this._actionWidgetService.hide()}),onHide:()=>{var C;(C=this._editor)===null||C===void 0||C.focus()}};this._actionWidgetService.show("codeActionWidget",!0,(0,S.toMenuItems)(v,this._shouldShowHeaders(),this._resolver.getResolver()),m,f,u,this._getActionBarActions(c,l,a))})}toCoords(c){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(c,1),this._editor.render();const l=this._editor.getScrolledVisiblePosition(c),a=(0,_.getDomNodePagePosition)(this._editor.getDomNode()),u=a.left+l.left,v=a.top+l.top+l.height;return{x:u,y:v}}_shouldShowHeaders(){var c;const l=(c=this._editor)===null||c===void 0?void 0:c.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:l?.uri})}_getActionBarActions(c,l,a){if(a.fromLightbulb)return[];const u=c.documentation.map(v=>{var f;return{id:v.id,label:v.title,tooltip:(f=v.tooltip)!==null&&f!==void 0?f:"",class:void 0,enabled:!0,run:()=>{var m;return this._commandService.executeCommand(v.id,...(m=v.arguments)!==null&&m!==void 0?m:[])}}});return a.includeDisabledActions&&c.validActions.length>0&&c.allActions.length!==c.validActions.length&&u.push(this._showDisabled?{id:"hideMoreActions",label:(0,p.localize)(0,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(c,l,a))}:{id:"showMoreActions",label:(0,p.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(c,l,a))}),u}};d=new WeakMap,e.CodeActionUi=h=Me([fe(2,s.IInstantiationService),fe(3,i.IConfigurationService),fe(4,n.IActionWidgetService),fe(5,t.ICommandService)],h)}),define(X[240],ee([1,0,101,2,19,128,797,154,14,8,90,83,108,332]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;let s=e.CodeActionController=class Ki extends k.Disposable{static get(d){return d.getContribution(Ki.ID)}constructor(d,h,o,c,l,a){super(),this._instantiationService=l,this._editor=d,this._model=this._register(new i.CodeActionModel(this._editor,a.codeActionProvider,h,o,c)),this._register(this._model.onDidChangeState(u=>this._ui.value.update(u))),this._ui=new _.Lazy(()=>this._register(l.createInstance(w.CodeActionUi,d,{applyCodeAction:(u,v,f)=>we(this,void 0,void 0,function*(){try{yield this._applyCodeAction(u,f)}finally{v&&this._trigger({type:2,triggerAction:t.CodeActionTriggerSource.QuickFix,filter:{}})}})})))}showCodeActions(d,h,o){return this._ui.value.showCodeActionList(h,o,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(d,h,o,c){var l;if(!this._editor.hasModel())return;(l=b.MessageController.get(this._editor))===null||l===void 0||l.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:h,filter:o,autoApply:c,context:{notAvailableMessage:d,position:a}})}_trigger(d){return this._model.trigger(d)}_applyCodeAction(d,h){return this._instantiationService.invokeFunction(E.applyCodeAction,d,E.ApplyCodeActionReason.FromCodeActions,{preview:h,editor:this._editor})}};s.ID="editor.contrib.codeActionController",e.CodeActionController=s=Me([fe(1,p.IMarkerService),fe(2,S.IContextKeyService),fe(3,n.IEditorProgressService),fe(4,g.IInstantiationService),fe(5,y.ILanguageFeaturesService)],s)}),define(X[798],ee([1,0,9,15,22,128,608,14,108,240,332]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function n(a){return b.ContextKeyExpr.regex(p.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,_.escapeRegExpCharacters)(a.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(a,u,v,f,m=S.CodeActionTriggerSource.Default){if(a.hasModel()){const C=g.CodeActionController.get(a);C?.manualTriggerAtCurrentPosition(u,m,v,f)}}class s extends k.EditorAction{constructor(){super({id:E.quickFixCommandId,label:w.localize(6,null),alias:"Quick Fix...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(u,v){return i(v,w.localize(7,null),void 0,void 0,S.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=s;class r extends k.EditorCommand{constructor(){super({id:E.codeActionCommandId,precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:t}]}})}runEditorCommand(u,v,f){const m=S.CodeActionCommandArgs.fromUser(f,{kind:S.CodeActionKind.Empty,apply:"ifSingle"});return i(v,typeof f?.kind=="string"?m.preferred?w.localize(8,null,f.kind):w.localize(9,null,f.kind):m.preferred?w.localize(10,null):w.localize(11,null),{include:m.kind,includeSourceActions:!0,onlyIncludePreferredActions:m.preferred},m.apply)}}e.CodeActionCommand=r;class d extends k.EditorAction{constructor(){super({id:E.refactorCommandId,label:w.localize(12,null),alias:"Refactor...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(S.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:t}]}})}run(u,v,f){const m=S.CodeActionCommandArgs.fromUser(f,{kind:S.CodeActionKind.Refactor,apply:"never"});return i(v,typeof f?.kind=="string"?m.preferred?w.localize(13,null,f.kind):w.localize(14,null,f.kind):m.preferred?w.localize(15,null):w.localize(16,null),{include:S.CodeActionKind.Refactor.contains(m.kind)?m.kind:S.CodeActionKind.None,onlyIncludePreferredActions:m.preferred},m.apply,S.CodeActionTriggerSource.Refactor)}}e.RefactorAction=d;class h extends k.EditorAction{constructor(){super({id:E.sourceActionCommandId,label:w.localize(17,null),alias:"Source Action...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(S.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:t}]}})}run(u,v,f){const m=S.CodeActionCommandArgs.fromUser(f,{kind:S.CodeActionKind.Source,apply:"never"});return i(v,typeof f?.kind=="string"?m.preferred?w.localize(18,null,f.kind):w.localize(19,null,f.kind):m.preferred?w.localize(20,null):w.localize(21,null),{include:S.CodeActionKind.Source.contains(m.kind)?m.kind:S.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:m.preferred},m.apply,S.CodeActionTriggerSource.SourceAction)}}e.SourceAction=h;class o extends k.EditorAction{constructor(){super({id:E.organizeImportsCommandId,label:w.localize(22,null),alias:"Organize Imports",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(S.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:y.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:E.fixAllCommandId,label:w.localize(24,null),alias:"Fix All",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(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 l extends k.EditorAction{constructor(){super({id:E.autoFixCommandId,label:w.localize(26,null),alias:"Auto Fix...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(S.CodeActionKind.QuickFix)),kbOpts:{kbExpr:y.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=l}),define(X[799],ee([1,0,15,231,798,240,333,609,91,35]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(E.CodeActionController.ID,E.CodeActionController,3),(0,_.registerEditorContribution)(w.LightBulbWidget.ID,w.LightBulbWidget,4),(0,_.registerEditorAction)(y.QuickFixAction),(0,_.registerEditorAction)(y.RefactorAction),(0,_.registerEditorAction)(y.SourceAction),(0,_.registerEditorAction)(y.OrganizeImportsAction),(0,_.registerEditorAction)(y.AutoFixAction),(0,_.registerEditorAction)(y.FixAllAction),(0,_.registerEditorCommand)(new y.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(X[800],ee([1,0,7,67,559,40,11,2,99]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class g{constructor(n,t,i,s){this.contextViewService=n,this.telemetryService=t,this.notificationService=i,this.keybindingService=s,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(n){this.options=n}showContextMenu(n){const t=n.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const s=(0,_.isHTMLElement)(n.domForShadowRoot)?n.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>n.getAnchor(),canRelayout:!1,anchorAlignment:n.anchorAlignment,anchorAxisAlignment:n.anchorAxisAlignment,render:r=>{var d;this.lastContainer=r;const h=n.getMenuClassName?n.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,l=>l.stopPropagation()));const o=new b.DisposableStore,c=n.actionRunner||new E.ActionRunner;return c.onWillRun(l=>this.onActionRun(l,!n.skipTelemetry),this,o),c.onDidRun(this.onDidActionRun,this,o),i=new y.Menu(r,t,{actionViewItemProvider:n.getActionViewItem,context:n.getActionsContext?n.getActionsContext():null,actionRunner:c,getKeyBinding:n.getKeyBinding?n.getKeyBinding:l=>this.keybindingService.lookupKeybinding(l.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,l=>{if(l.defaultPrevented)return;const a=new k.StandardMouseEvent(l);let u=a.target;if(!a.rightButton){for(;u;){if(u===r)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),(0,b.combinedDisposable)(o,i)},focus:()=>{i?.focus(!!n.autoSelectFirstItem)},onHide:r=>{var d,h,o;(d=n.onHide)===null||d===void 0||d.call(n,!!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}},s,!!s)}onActionRun(n,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:n.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(n){n.error&&!(0,w.isCancellationError)(n.error)&&this.notificationService.error(n.error)}}e.ContextMenuHandler=g}),define(X[185],ee([1,0,7,554,109,555,178,562,561,301,6,2,697,26,91,14,319,55,8,34,35,99]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.WorkbenchTreeFindOpen=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSupportsFind=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.RawWorkbenchListFocusContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,o.createDecorator)("listService");class u{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new n.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(G){var ae,me;G!==this._lastFocusedWidget&&((ae=this._lastFocusedWidget)===null||ae===void 0||ae.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=G,(me=this._lastFocusedWidget)===null||me===void 0||me.getHTMLElement().classList.add("last-focused"))}register(G,ae){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new y.DefaultStyleController((0,_.createStyleSheet)(),"").style(a.defaultListStyles)),this.lists.some(Ce=>Ce.widget===G))throw new Error("Cannot register the same widget multiple times");const me={widget:G,extraContextKeys:ae};return this.lists.push(me),G.getHTMLElement()===document.activeElement&&this.setLastFocusedList(G),(0,n.combinedDisposable)(G.onDidFocus(()=>this.setLastFocusedList(G)),(0,n.toDisposable)(()=>this.lists.splice(this.lists.indexOf(me),1)),G.onDidDispose(()=>{this.lists=this.lists.filter(Ce=>Ce!==me),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 m(te,G){const ae=te.createScoped(G.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(ae),ae}const C="workbench.list.multiSelectModifier",L="workbench.list.openMode",D="workbench.list.horizontalScrolling",I="workbench.list.defaultFindMode",T="workbench.list.typeNavigationMode",O="workbench.list.keyboardNavigation",R="workbench.list.scrollByPage",A="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 $(te){return te.getValue(C)==="alt"}class M extends n.Disposable{constructor(G){super(),this.configurationService=G,this.useAltAsMultipleSelectionModifier=$(G),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(G=>{G.affectsConfiguration(C)&&(this.useAltAsMultipleSelectionModifier=$(this.configurationService))}))}isSelectionSingleChangeEvent(G){return this.useAltAsMultipleSelectionModifier?G.browserEvent.altKey:(0,y.isSelectionSingleChangeEvent)(G)}isSelectionRangeChangeEvent(G){return(0,y.isSelectionRangeChangeEvent)(G)}}function Q(te,G){var ae;const me=te.get(i.IConfigurationService),Ce=te.get(c.IKeybindingService),Se=new n.DisposableStore;return[Object.assign(Object.assign({},G),{keyboardNavigationDelegate:{mightProducePrintableCharacter(Ee){return Ce.mightProducePrintableCharacter(Ee)}},smoothScrolling:!!me.getValue(x),mouseWheelScrollSensitivity:me.getValue(F),fastScrollSensitivity:me.getValue(B),multipleSelectionController:(ae=G.multipleSelectionController)!==null&&ae!==void 0?ae:Se.add(new M(me)),keyboardNavigationEventFilter:Z(Ce),scrollByPage:!!me.getValue(R)}),Se]}let ie=e.WorkbenchList=class extends y.List{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke){const Ie=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!De.getValue(D),[he,ve]=ke.invokeFunction(Q,Se);super(G,ae,me,Ce,Object.assign(Object.assign({keyboardSupport:!1},he),{horizontalScrolling:Ie})),this.disposables.add(ve),this.contextKeyService=m(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=$(De),this.disposables.add(this.contextKeyService),this.disposables.add(Ee.register(this)),this.updateStyles(Se.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(De.onDidChangeConfiguration(pe=>{pe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=$(De));let Le={};if(pe.affectsConfiguration(D)&&this.horizontalScrolling===void 0){const Ne=!!De.getValue(D);Le=Object.assign(Object.assign({},Le),{horizontalScrolling:Ne})}if(pe.affectsConfiguration(R)){const Ne=!!De.getValue(R);Le=Object.assign(Object.assign({},Le),{scrollByPage:Ne})}if(pe.affectsConfiguration(x)){const Ne=!!De.getValue(x);Le=Object.assign(Object.assign({},Le),{smoothScrolling:Ne})}if(pe.affectsConfiguration(F)){const Ne=De.getValue(F);Le=Object.assign(Object.assign({},Le),{mouseWheelScrollSensitivity:Ne})}if(pe.affectsConfiguration(B)){const Ne=De.getValue(B);Le=Object.assign(Object.assign({},Le),{fastScrollSensitivity:Ne})}Object.keys(Le).length>0&&this.updateOptions(Le)})),this.navigator=new H(this,Object.assign({configurationService:De},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,a.getListStyles)(G):a.defaultListStyles)}};e.WorkbenchList=ie=Me([fe(5,r.IContextKeyService),fe(6,e.IListService),fe(7,i.IConfigurationService),fe(8,o.IInstantiationService)],ie);let re=e.WorkbenchPagedList=class extends k.PagedList{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke){const Ie=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!De.getValue(D),[he,ve]=ke.invokeFunction(Q,Se);super(G,ae,me,Ce,Object.assign(Object.assign({keyboardSupport:!1},he),{horizontalScrolling:Ie})),this.disposables=new n.DisposableStore,this.disposables.add(ve),this.contextKeyService=m(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=$(De),this.disposables.add(this.contextKeyService),this.disposables.add(Ee.register(this)),this.updateStyles(Se.overrideStyles),this.disposables.add(De.onDidChangeConfiguration(pe=>{pe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=$(De));let Le={};if(pe.affectsConfiguration(D)&&this.horizontalScrolling===void 0){const Ne=!!De.getValue(D);Le=Object.assign(Object.assign({},Le),{horizontalScrolling:Ne})}if(pe.affectsConfiguration(R)){const Ne=!!De.getValue(R);Le=Object.assign(Object.assign({},Le),{scrollByPage:Ne})}if(pe.affectsConfiguration(x)){const Ne=!!De.getValue(x);Le=Object.assign(Object.assign({},Le),{smoothScrolling:Ne})}if(pe.affectsConfiguration(F)){const Ne=De.getValue(F);Le=Object.assign(Object.assign({},Le),{mouseWheelScrollSensitivity:Ne})}if(pe.affectsConfiguration(B)){const Ne=De.getValue(B);Le=Object.assign(Object.assign({},Le),{fastScrollSensitivity:Ne})}Object.keys(Le).length>0&&this.updateOptions(Le)})),this.navigator=new H(this,Object.assign({configurationService:De},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,a.getListStyles)(G):a.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchPagedList=re=Me([fe(5,r.IContextKeyService),fe(6,e.IListService),fe(7,i.IConfigurationService),fe(8,o.IInstantiationService)],re);let ne=e.WorkbenchTable=class extends E.Table{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke,Ie){const he=typeof ye.horizontalScrolling<"u"?ye.horizontalScrolling:!!ke.getValue(D),[ve,de]=Ie.invokeFunction(Q,ye);super(G,ae,me,Ce,Se,Object.assign(Object.assign({keyboardSupport:!1},ve),{horizontalScrolling:he})),this.disposables.add(de),this.contextKeyService=m(Ee,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=$(ke),this.disposables.add(this.contextKeyService),this.disposables.add(De.register(this)),this.updateStyles(ye.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Le=this.getSelection(),Ne=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Le.length>0||Ne.length>0),this.listMultiSelection.set(Le.length>1),this.listDoubleSelection.set(Le.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Le=this.getSelection(),Ne=this.getFocus();this.listHasSelectionOrFocus.set(Le.length>0||Ne.length>0)})),this.disposables.add(ke.onDidChangeConfiguration(Le=>{Le.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=$(ke));let Ne={};if(Le.affectsConfiguration(D)&&this.horizontalScrolling===void 0){const be=!!ke.getValue(D);Ne=Object.assign(Object.assign({},Ne),{horizontalScrolling:be})}if(Le.affectsConfiguration(R)){const be=!!ke.getValue(R);Ne=Object.assign(Object.assign({},Ne),{scrollByPage:be})}if(Le.affectsConfiguration(x)){const be=!!ke.getValue(x);Ne=Object.assign(Object.assign({},Ne),{smoothScrolling:be})}if(Le.affectsConfiguration(F)){const be=ke.getValue(F);Ne=Object.assign(Object.assign({},Ne),{mouseWheelScrollSensitivity:be})}if(Le.affectsConfiguration(B)){const be=ke.getValue(B);Ne=Object.assign(Object.assign({},Ne),{fastScrollSensitivity:be})}Object.keys(Ne).length>0&&this.updateOptions(Ne)})),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,a.getListStyles)(G):a.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchTable=ne=Me([fe(6,r.IContextKeyService),fe(7,e.IListService),fe(8,i.IConfigurationService),fe(9,o.IInstantiationService)],ne);class se extends n.Disposable{constructor(G,ae){var me;super(),this.widget=G,this._onDidOpen=this._register(new p.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(p.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(L)!=="doubleClick",this._register(ae?.configurationService.onDidChangeConfiguration(Ce=>{Ce.affectsConfiguration(L)&&(this.openOnSingleClick=ae?.configurationService.getValue(L)!=="doubleClick")}))):this.openOnSingleClick=(me=ae?.openOnSingleClick)!==null&&me!==void 0?me:!0}onSelectionFromKeyboard(G){if(G.elements.length!==1)return;const ae=G.browserEvent,me=typeof ae.preserveFocus=="boolean"?ae.preserveFocus:!0,Ce=typeof ae.pinned=="boolean"?ae.pinned:!me,Se=!1;this._open(this.getSelectedElement(),me,Ce,Se,G.browserEvent)}onPointer(G,ae){if(!this.openOnSingleClick||ae.detail===2)return;const Ce=ae.button===1,Se=!0,ye=Ce,Ee=ae.ctrlKey||ae.metaKey||ae.altKey;this._open(G,Se,ye,Ee,ae)}onMouseDblClick(G,ae){if(!ae)return;const me=ae.target;if(me.classList.contains("monaco-tl-twistie")||me.classList.contains("monaco-icon-label")&&me.classList.contains("folder-icon")&&ae.offsetX<16)return;const Se=!1,ye=!0,Ee=ae.ctrlKey||ae.metaKey||ae.altKey;this._open(G,Se,ye,Ee,ae)}_open(G,ae,me,Ce,Se){G&&this._onDidOpen.fire({editorOptions:{preserveFocus:ae,pinned:me,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 q 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 me=te.softDispatch(ae,ae.target);return me?.kind===1?(G=!0,!1):(G=!1,!me)}}let Y=e.WorkbenchObjectTree=class extends g.ObjectTree{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke){const{options:Ie,getTypeNavigationMode:he,disposable:ve}=ye.invokeFunction(z,Se);super(G,ae,me,Ce,Ie),this.disposables.add(ve),this.internals=new U(this,Se,he,Se.overrideStyles,Ee,De,ke),this.disposables.add(this.internals)}updateOptions(G){super.updateOptions(G),this.internals.updateOptions(G)}};e.WorkbenchObjectTree=Y=Me([fe(5,o.IInstantiationService),fe(6,r.IContextKeyService),fe(7,e.IListService),fe(8,i.IConfigurationService)],Y);let oe=e.WorkbenchCompressibleObjectTree=class extends g.CompressibleObjectTree{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke){const{options:Ie,getTypeNavigationMode:he,disposable:ve}=ye.invokeFunction(z,Se);super(G,ae,me,Ce,Ie),this.disposables.add(ve),this.internals=new U(this,Se,he,Se.overrideStyles,Ee,De,ke),this.disposables.add(this.internals)}updateOptions(G={}){super.updateOptions(G),G.overrideStyles&&this.internals.updateStyleOverrides(G.overrideStyles),this.internals.updateOptions(G)}};e.WorkbenchCompressibleObjectTree=oe=Me([fe(5,o.IInstantiationService),fe(6,r.IContextKeyService),fe(7,e.IListService),fe(8,i.IConfigurationService)],oe);let ce=e.WorkbenchDataTree=class extends S.DataTree{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke,Ie){const{options:he,getTypeNavigationMode:ve,disposable:de}=Ee.invokeFunction(z,ye);super(G,ae,me,Ce,Se,he),this.disposables.add(de),this.internals=new U(this,ye,ve,ye.overrideStyles,De,ke,Ie),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=Me([fe(6,o.IInstantiationService),fe(7,r.IContextKeyService),fe(8,e.IListService),fe(9,i.IConfigurationService)],ce);let ge=e.WorkbenchAsyncDataTree=class extends b.AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(G,ae,me,Ce,Se,ye,Ee,De,ke,Ie){const{options:he,getTypeNavigationMode:ve,disposable:de}=Ee.invokeFunction(z,ye);super(G,ae,me,Ce,Se,he),this.disposables.add(de),this.internals=new U(this,ye,ve,ye.overrideStyles,De,ke,Ie),this.disposables.add(this.internals)}updateOptions(G={}){super.updateOptions(G),G.overrideStyles&&this.internals.updateStyleOverrides(G.overrideStyles),this.internals.updateOptions(G)}};e.WorkbenchAsyncDataTree=ge=Me([fe(6,o.IInstantiationService),fe(7,r.IContextKeyService),fe(8,e.IListService),fe(9,i.IConfigurationService)],ge);let le=e.WorkbenchCompressibleAsyncDataTree=class extends b.CompressibleAsyncDataTree{constructor(G,ae,me,Ce,Se,ye,Ee,De,ke,Ie,he){const{options:ve,getTypeNavigationMode:de,disposable:pe}=De.invokeFunction(z,Ee);super(G,ae,me,Ce,Se,ye,ve),this.disposables.add(pe),this.internals=new U(this,Ee,de,Ee.overrideStyles,ke,Ie,he),this.disposables.add(this.internals)}updateOptions(G){super.updateOptions(G),this.internals.updateOptions(G)}};e.WorkbenchCompressibleAsyncDataTree=le=Me([fe(7,o.IInstantiationService),fe(8,r.IContextKeyService),fe(9,e.IListService),fe(10,i.IConfigurationService)],le);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 j(te){const G=te.getValue(A);if(G==="fuzzy")return w.TreeFindMatchType.Fuzzy;if(G==="contiguous")return w.TreeFindMatchType.Contiguous}function z(te,G){var ae;const me=te.get(i.IConfigurationService),Ce=te.get(h.IContextViewService),Se=te.get(r.IContextKeyService),ye=te.get(o.IInstantiationService),Ee=()=>{const de=Se.getContextKeyValue(v);if(de==="automatic")return y.TypeNavigationMode.Automatic;if(de==="trigger"||Se.getContextKeyValue(f)===!1)return y.TypeNavigationMode.Trigger;const Le=me.getValue(T);if(Le==="automatic")return y.TypeNavigationMode.Automatic;if(Le==="trigger")return y.TypeNavigationMode.Trigger},De=G.horizontalScrolling!==void 0?G.horizontalScrolling:!!me.getValue(D),[ke,Ie]=ye.invokeFunction(Q,G),he=G.additionalScrollHeight,ve=G.renderIndentGuides!==void 0?G.renderIndentGuides:me.getValue(P);return{getTypeNavigationMode:Ee,disposable:Ie,options:Object.assign(Object.assign({keyboardSupport:!1},ke),{indent:typeof me.getValue(N)=="number"?me.getValue(N):void 0,renderIndentGuides:ve,smoothScrolling:!!me.getValue(x),defaultFindMode:ue(me),defaultFindMatchType:j(me),horizontalScrolling:De,scrollByPage:!!me.getValue(R),additionalScrollHeight:he,hideTwistiesOfChildlessElements:G.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(ae=G.expandOnlyOnTwistieClick)!==null&&ae!==void 0?ae:me.getValue(V)==="doubleClick",contextViewProvider:Ce,findWidgetStyles:a.defaultFindWidgetStyles})}}let U=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(G,ae,me,Ce,Se,ye,Ee){var De;this.tree=G,this.disposables=[],this.contextKeyService=m(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((De=ae.findWidgetEnabled)!==null&&De!==void 0?De:!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=$(Ee),this.updateStyleOverrides(Ce);const Ie=()=>{const ve=G.getFocus()[0];if(!ve)return;const de=G.getNode(ve);this.treeElementCanCollapse.set(de.collapsible&&!de.collapsed),this.treeElementHasParent.set(!!G.getParentElement(ve)),this.treeElementCanExpand.set(de.collapsible&&de.collapsed),this.treeElementHasChild.set(!!G.getFirstElementChild(ve))},he=new Set;he.add(v),he.add(f),this.disposables.push(this.contextKeyService,ye.register(G),G.onDidChangeSelection(()=>{const ve=G.getSelection(),de=G.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(ve.length>0||de.length>0),this.hasMultiSelection.set(ve.length>1),this.hasDoubleSelection.set(ve.length===2)})}),G.onDidChangeFocus(()=>{const ve=G.getSelection(),de=G.getFocus();this.hasSelectionOrFocus.set(ve.length>0||de.length>0),Ie()}),G.onDidChangeCollapseState(Ie),G.onDidChangeModel(Ie),G.onDidChangeFindOpenState(ve=>this.treeFindOpen.set(ve)),Ee.onDidChangeConfiguration(ve=>{let de={};if(ve.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=$(Ee)),ve.affectsConfiguration(N)){const pe=Ee.getValue(N);de=Object.assign(Object.assign({},de),{indent:pe})}if(ve.affectsConfiguration(P)&&ae.renderIndentGuides===void 0){const pe=Ee.getValue(P);de=Object.assign(Object.assign({},de),{renderIndentGuides:pe})}if(ve.affectsConfiguration(x)){const pe=!!Ee.getValue(x);de=Object.assign(Object.assign({},de),{smoothScrolling:pe})}if(ve.affectsConfiguration(I)||ve.affectsConfiguration(O)){const pe=ue(Ee);de=Object.assign(Object.assign({},de),{defaultFindMode:pe})}if(ve.affectsConfiguration(T)||ve.affectsConfiguration(O)){const pe=me();de=Object.assign(Object.assign({},de),{typeNavigationMode:pe})}if(ve.affectsConfiguration(A)){const pe=j(Ee);de=Object.assign(Object.assign({},de),{defaultFindMatchType:pe})}if(ve.affectsConfiguration(D)&&ae.horizontalScrolling===void 0){const pe=!!Ee.getValue(D);de=Object.assign(Object.assign({},de),{horizontalScrolling:pe})}if(ve.affectsConfiguration(R)){const pe=!!Ee.getValue(R);de=Object.assign(Object.assign({},de),{scrollByPage:pe})}if(ve.affectsConfiguration(V)&&ae.expandOnlyOnTwistieClick===void 0&&(de=Object.assign(Object.assign({},de),{expandOnlyOnTwistieClick:Ee.getValue(V)==="doubleClick"})),ve.affectsConfiguration(F)){const pe=Ee.getValue(F);de=Object.assign(Object.assign({},de),{mouseWheelScrollSensitivity:pe})}if(ve.affectsConfiguration(B)){const pe=Ee.getValue(B);de=Object.assign(Object.assign({},de),{fastScrollSensitivity:pe})}Object.keys(de).length>0&&G.updateOptions(de)}),this.contextKeyService.onDidChangeContext(ve=>{ve.affectsSome(he)&&G.updateOptions({typeNavigationMode:me()})})),this.navigator=new q(G,Object.assign({configurationService:Ee},ae)),this.disposables.push(this.navigator)}updateOptions(G){G.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!G.multipleSelectionSupport)}updateStyleOverrides(G){this.tree.style(G?(0,a.getListStyles)(G):a.defaultListStyles)}dispose(){this.disposables=(0,n.dispose)(this.disposables)}};U=Me([fe(4,r.IContextKeyService),fe(5,e.IListService),fe(6,i.IConfigurationService)],U),l.Registry.as(s.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)},[L]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(4,null)},[D]:{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)},[A]:{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(X[73],ee([1,0,13,27,30,6,18,20,705,230,35]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spinningLoading=e.syncing=e.gotoNextLocation=e.gotoPreviousLocation=e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.IconFontDefinition=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var n;(function(l){function a(u,v){let f=u.defaults;for(;y.ThemeIcon.isThemeIcon(f);){const m=s.getIcon(f.id);if(!m)return;f=m.defaults}return f}l.getDefinition=a})(n||(e.IconContribution=n={}));var t;(function(l){function a(v){return{weight:v.weight,style:v.style,src:v.src.map(f=>({format:f.format,location:f.location.toString()}))}}l.toJSONObject=a;function u(v){const f=m=>(0,w.isString)(m)?m:void 0;if(v&&Array.isArray(v.src)&&v.src.every(m=>(0,w.isString)(m.format)&&(0,w.isString)(m.location)))return{weight:f(v.weight),style:f(v.style),src:v.src.map(m=>({format:m.format,location:b.URI.parse(m.location)}))}}l.fromJSONObject=u})(t||(e.IconFontDefinition=t={}));class i{constructor(){this._onDidChange=new E.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:`^${y.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(a,u,v,f){const m=this.iconsById[a];if(m){if(v&&!m.description){m.description=v,this.iconSchema.properties[a].markdownDescription=`${v} $(${a})`;const D=this.iconReferenceSchema.enum.indexOf(a);D!==-1&&(this.iconReferenceSchema.enumDescriptions[D]=v),this._onDidChange.fire()}return m}const C={id:a,description:v,defaults:u,deprecationMessage:f};this.iconsById[a]=C;const L={$ref:"#/definitions/icons"};return f&&(L.deprecationMessage=f),v&&(L.markdownDescription=`${v}: $(${a})`),this.iconSchema.properties[a]=L,this.iconReferenceSchema.enum.push(a),this.iconReferenceSchema.enumDescriptions.push(v||""),this._onDidChange.fire(),{id:a}}getIcons(){return Object.keys(this.iconsById).map(a=>this.iconsById[a])}getIcon(a){return this.iconsById[a]}getIconSchema(){return this.iconSchema}toString(){const a=(m,C)=>m.id.localeCompare(C.id),u=m=>{for(;y.ThemeIcon.isThemeIcon(m.defaults);)m=this.iconsById[m.defaults.id];return`codicon codicon-${m?m.id:""}`},v=[];v.push("| preview | identifier | default codicon ID | description"),v.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const f=Object.keys(this.iconsById).map(m=>this.iconsById[m]);for(const m of f.filter(C=>!!C.description).sort(a))v.push(`|<i class="${u(m)}"></i>|${m.id}|${y.ThemeIcon.isThemeIcon(m.defaults)?m.defaults.id:m.id}|${m.description||""}|`);v.push("| preview | identifier "),v.push("| ----------- | --------------------------------- |");for(const m of f.filter(C=>!y.ThemeIcon.isThemeIcon(C.defaults)).sort(a))v.push(`|<i class="${u(m)}"></i>|${m.id}|`);return v.join(`
- `)}}const s=new i;p.Registry.add(e.Extensions.IconContribution,s);function r(l,a,u,v){return s.registerIcon(l,a,u,v)}e.registerIcon=r;function d(){return s}e.getIconRegistry=d;function h(){const l=(0,k.getCodiconFontCharacters)();for(const a in l){const u="\\"+l[a].toString(16);s.registerIcon(a,{fontCharacter:u})}}h(),e.iconsSchemaId="vscode://schemas/icons";const o=p.Registry.as(g.Extensions.JSONContribution);o.registerSchema(e.iconsSchemaId,s.getIconSchema());const c=new _.RunOnceScheduler(()=>o.notifySchemaChanged(e.iconsSchemaId),200);s.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=y.ThemeIcon.modify(k.Codicon.sync,"spin"),e.spinningLoading=y.ThemeIcon.modify(k.Codicon.loading,"spin")}),define(X[801],ee([1,0,590,7,36,69,78,40,2,75,15,32,41,87,12,110,81,14,30,27,73,39,181,26,415]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const m=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 L{constructor(x){this.entries=x}}const D=(0,l.registerIcon)("diff-review-insert",c.Codicon.add,_.localize(0,null)),I=(0,l.registerIcon)("diff-review-remove",c.Codicon.remove,_.localize(1,null)),T=(0,l.registerIcon)("diff-review-close",c.Codicon.close,_.localize(2,null));let O=e.DiffReview=class Nt extends S.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,y.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,y.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new E.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new b.Action("diffreview.close",_.localize(3,null),"close-diff-review "+o.ThemeIcon.asClassName(T),!0,()=>we(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,y.createFastDomNode)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new w.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(x.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(x.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(k.addStandardDisposableListener(this.domNode.domNode,"click",$=>{$.preventDefault();const M=k.findParentWithClass($.target,"diff-review-row");M&&this._goToRow(M)})),this._register(k.addStandardDisposableListener(this.domNode.domNode,"keydown",$=>{($.equals(18)||$.equals(2066)||$.equals(530))&&($.preventDefault(),this._goToRow(this._getNextRow(),"next")),($.equals(16)||$.equals(2064)||$.equals(528))&&($.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),($.equals(9)||$.equals(2057)||$.equals(521)||$.equals(1033)||$.equals(10)||$.equals(3))&&($.preventDefault(),this.accept())})),this._register(this._configurationService.onDidChangeConfiguration($=>{$.affectsConfiguration("accessibility.verbosity.diff-editor")&&this._diffEditor.updateOptions({accessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.diff-editor")})})),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,$=this._diffs.length;V<$;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 s.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,$=this._diffs.length;V<$;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 s.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 s.Position(x,1)),this._diffEditor.revealPosition(new s.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(u.AudioCue.diffLineInserted,!0):V?.classList.contains("line-delete")&&this._audioCueService.playAudioCue(u.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?[]:Nt._mergeAdjacent(x,F.getLineCount(),B.getLineCount())}static _mergeAdjacent(x,F,B){if(!x||x.length===0)return[];const V=[];let $=0;for(let re=0,ne=x.length;re<ne;re++){const se=x[re],H=se.originalStartLineNumber,W=se.originalEndLineNumber,q=se.modifiedStartLineNumber,Z=se.modifiedEndLineNumber,Y=[];let oe=0;{const ce=W===0?H:H-1,ge=Z===0?q:q-1;let le=1,ue=1;if(re>0){const U=x[re-1];U.originalEndLineNumber===0?le=U.originalStartLineNumber+1:le=U.originalEndLineNumber+1,U.modifiedEndLineNumber===0?ue=U.modifiedStartLineNumber+1:ue=U.modifiedEndLineNumber+1}let j=ce-m+1,z=ge-m+1;if(j<le){const U=le-j;j=j+U,z=z+U}if(z<ue){const U=ue-z;j=j+U,z=z+U}Y[oe++]=new C(j,ce,z,ge)}W!==0&&(Y[oe++]=new C(H,W,0,0)),Z!==0&&(Y[oe++]=new C(0,0,q,Z));{const ce=W===0?H+1:W+1,ge=Z===0?q+1:Z+1;let le=F,ue=B;if(re+1<ne){const U=x[re+1];U.originalEndLineNumber===0?le=U.originalStartLineNumber:le=U.originalStartLineNumber-1,U.modifiedEndLineNumber===0?ue=U.modifiedStartLineNumber:ue=U.modifiedStartLineNumber-1}let j=ce+m-1,z=ge+m-1;if(j>le){const U=le-j;j=j+U,z=z+U}if(z>ue){const U=ue-z;j=j+U,z=z+U}Y[oe++]=new C(ce,j,ge,z)}V[$++]=new L(Y)}let M=V[0].entries;const Q=[];let ie=0;for(let re=1,ne=V.length;re<ne;re++){const se=V[re].entries,H=M[M.length-1],W=se[0];if(H.getType()===0&&W.getType()===0&&W.originalLineStart<=H.originalLineEnd){M[M.length-1]=new C(H.originalLineStart,W.originalLineEnd,H.modifiedLineStart,W.modifiedLineEnd),M=M.concat(se.slice(1));continue}Q[ie++]=new L(M),M=se}return Q[ie++]=new L(M),Q}_findDiffIndex(x){const F=x.lineNumber;for(let B=0,V=this._diffs.length;B<V;B++){const $=this._diffs[B].entries,M=$[$.length-1].modifiedLineEnd;if(F<=M)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(),$=B.getOptions(),M=V.getOptions();if(!this._isVisible||!B||!V){k.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const Q=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[Q]===this._currentDiff)return;this._currentDiff=this._diffs[Q];const ie=this._diffs[Q].entries,re=document.createElement("div");re.className="diff-review-table",re.setAttribute("role","list"),re.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,g.applyFontInfo)(re,F.get(48));let ne=0,se=0,H=0,W=0;for(let z=0,U=ie.length;z<U;z++){const J=ie[z],te=J.originalLineStart,G=J.originalLineEnd,ae=J.modifiedLineStart,me=J.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),me!==0&&(W===0||me>W)&&(W=me)}const q=document.createElement("div");q.className="diff-review-row";const Z=document.createElement("div");Z.className="diff-review-cell diff-review-summary";const Y=se-ne+1,oe=W-H+1;Z.appendChild(document.createTextNode(`${Q+1}/${this._diffs.length}: @@ -${ne},${Y} +${H},${oe} @@`)),q.setAttribute("data-line",String(H));const ce=z=>z===0?_.localize(4,null):z===1?_.localize(5,null):_.localize(6,null,z),ge=ce(Y),le=ce(oe);q.setAttribute("aria-label",_.localize(7,null,Q+1,this._diffs.length,ne,ge,H,le)),q.appendChild(Z),q.setAttribute("role","listitem"),re.appendChild(q);const ue=F.get(64);let j=H;for(let z=0,U=ie.length;z<U;z++){const J=ie[z];Nt._renderSection(re,J,j,ue,this._width,x,B,$,F,V,M,this._languageService.languageIdCodec),J.modifiedLineStart!==0&&(j=J.modifiedLineEnd)}k.clearNode(this._content.domNode),this._content.domNode.appendChild(re),this.scrollbar.scanDomNode()}static _renderSection(x,F,B,V,$,M,Q,ie,re,ne,se,H){const W=F.getType();let q="diff-review-row",Z="";const Y="diff-review-spacer";let oe=null;switch(W){case 1:q="diff-review-row line-insert",Z=" char-insert",oe=D;break;case 2:q="diff-review-row line-delete",Z=" char-delete",oe=I;break}const ce=F.originalLineStart,ge=F.originalLineEnd,le=F.modifiedLineStart,ue=F.modifiedLineEnd,j=Math.max(ue-le,ge-ce),z=M.get(139),U=z.glyphMarginWidth+z.lineNumbersWidth,J=re.get(139),te=10+J.glyphMarginWidth+J.lineNumbersWidth;for(let G=0;G<=j;G++){const ae=ce===0?0:ce+G,me=le===0?0:le+G,Ce=document.createElement("div");Ce.style.minWidth=$+"px",Ce.className=q,Ce.setAttribute("role","listitem"),me!==0&&(B=me),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 Ee=document.createElement("span");Ee.style.width=te+"px",Ee.style.minWidth=te+"px",Ee.style.paddingRight="10px",Ee.className="diff-review-line-number"+Z,me!==0?Ee.appendChild(document.createTextNode(String(me))):Ee.innerText="\xA0",Se.appendChild(Ee);const De=document.createElement("span");if(De.className=Y,oe){const he=document.createElement("span");he.className=o.ThemeIcon.asClassName(oe),he.innerText="\xA0\xA0",De.appendChild(he)}else De.innerText="\xA0\xA0";Se.appendChild(De);let ke;if(me!==0){let he=this._renderLine(ne,re,se.tabSize,me,H);Nt._ttPolicy&&(he=Nt._ttPolicy.createHTML(he)),Se.insertAdjacentHTML("beforeend",he),ke=ne.getLineContent(me)}else{let he=this._renderLine(Q,M,ie.tabSize,ae,H);Nt._ttPolicy&&(he=Nt._ttPolicy.createHTML(he)),Se.insertAdjacentHTML("beforeend",he),ke=Q.getLineContent(ae)}ke.length===0&&(ke=_.localize(8,null));let Ie="";switch(W){case 0:ae===me?Ie=_.localize(9,null,ke,ae):Ie=_.localize(10,null,ke,ae,me);break;case 1:Ie=_.localize(11,null,ke,me);break;case 2:Ie=_.localize(12,null,ke,ae);break}Ce.setAttribute("aria-label",Ie),x.appendChild(Ce)}}static _renderLine(x,F,B,V,$){const M=x.getLineContent(V),Q=F.get(48),ie=i.LineTokens.createEmpty(M,$),re=d.ViewLineRenderingData.isBasicASCII(M,x.mightContainNonBasicASCII()),ne=d.ViewLineRenderingData.containsRTL(M,re,x.mightContainRTL());return(0,r.renderViewLine2)(new r.RenderLineInput(Q.isMonospace&&!F.get(31),Q.canUseHalfwidthRightwardsArrow,M,!1,re,ne,0,ie,[],B,0,Q.spaceWidth,Q.middotWidth,Q.wsmiddotWidth,F.get(112),F.get(94),F.get(89),F.get(49)!==t.EditorFontLigatures.OFF,null)).html}};O._ttPolicy=(f=window.trustedTypes)===null||f===void 0?void 0:f.createPolicy("diffReview",{createHTML:P=>P}),e.DiffReview=O=Me([fe(1,a.ILanguageService),fe(2,u.IAudioCueService),fe(3,v.IConfigurationService)],O);class R extends p.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:_.localize(13,null),alias:"Go to Next Difference",precondition:h.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(x,F){const B=N(x);B?.diffReviewNext()}}class A extends p.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:_.localize(14,null),alias:"Go to Previous Difference",precondition:h.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(x,F){const B=N(x);B?.diffReviewPrev()}}function N(P){const x=P.get(n.ICodeEditorService),F=x.listDiffEditors(),B=x.getActiveCodeEditor();if(!B)return null;for(let V=0,$=F.length;V<$;V++){const M=F[V];if(M.getModifiedEditor().getId()===B.getId()||M.getOriginalEditor().getId()===B.getId())return M}return null}(0,p.registerEditorAction)(R),(0,p.registerEditorAction)(A)}),define(X[802],ee([1,0,47,7,143,68,27,37,6,2,30,614,33,73,190]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.InsertButton=e.ColorPickerBody=e.ColorPickerHeader=void 0;const s=k.$;class r extends g.Disposable{constructor(m,C,L,D=!1){super(),this.model=C,this.showingStandaloneColorPicker=D,this._closeButton=null,this._domNode=s(".colorpicker-header"),k.append(m,this._domNode),this._pickedColorNode=k.append(this._domNode,s(".picked-color"));const I=(0,n.localize)(0,null);this._pickedColorNode.setAttribute("title",I),this._originalColorNode=k.append(this._domNode,s(".original-color")),this._originalColorNode.style.backgroundColor=b.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=L.getColorTheme().getColor(t.editorHoverBackground)||b.Color.white,this._register(L.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(m){this._pickedColorNode.style.backgroundColor=b.Color.Format.CSS.format(m)||"",this._pickedColorNode.classList.toggle("light",m.rgba.a<.5?this.backgroundColor.isLighter():m.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this._pickedColorNode.prepend(s(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=r;class d extends g.Disposable{constructor(m){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(m,this._button);const C=document.createElement("div");C.classList.add("close-button-inner-div"),k.append(this._button,C),k.append(C,s(".button"+p.ThemeIcon.asCSSSelector((0,i.registerIcon)("color-picker-close",w.Codicon.close,(0,n.localize)(1,null))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class h extends g.Disposable{constructor(m,C,L,D=!1){super(),this.model=C,this.pixelRatio=L,this._insertButton=null,this._domNode=s(".colorpicker-body"),k.append(m,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 l(this._domNode,this.model,D),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new a(this._domNode,this.model,D),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),D&&(this._insertButton=this._register(new u(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:m,v:C}){const L=this.model.color.hsva;this.model.color=new b.Color(new b.HSVA(L.h,m,C,L.a))}onDidOpacityChange(m){const C=this.model.color.hsva;this.model.color=new b.Color(new b.HSVA(C.h,C.s,C.v,m))}onDidHueChange(m){const C=this.model.color.hsva,L=(1-m)*360;this.model.color=new b.Color(new b.HSVA(L===360?0:L,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(m,C,L){super(),this.model=C,this.pixelRatio=L,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._domNode=s(".saturation-wrap"),k.append(m,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",k.append(this._domNode,this._canvas),this.selection=s(".saturation-selection"),k.append(this._domNode,this.selection),this.layout(),this._register(k.addDisposableListener(this._domNode,k.EventType.POINTER_DOWN,D=>this.onPointerDown(D))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(m){if(!m.target||!(m.target instanceof Element))return;this.monitor=this._register(new y.GlobalPointerMoveMonitor);const C=k.getDomNodePagePosition(this._domNode);m.target!==this.selection&&this.onDidChangePosition(m.offsetX,m.offsetY),this.monitor.startMonitoring(m.target,m.pointerId,m.buttons,D=>this.onDidChangePosition(D.pageX-C.left,D.pageY-C.top),()=>null);const L=k.addDisposableListener(document,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),L.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(m,C){const L=Math.max(0,Math.min(1,m/this.width)),D=Math.max(0,Math.min(1,1-C/this.height));this.paintSelection(L,D),this._onDidChange.fire({s:L,v:D})}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 m=this.model.color.hsva;this.paintSelection(m.s,m.v)}paint(){const m=this.model.color.hsva,C=new b.Color(new b.HSVA(m.h,1,1,1)),L=this._canvas.getContext("2d"),D=L.createLinearGradient(0,0,this._canvas.width,0);D.addColorStop(0,"rgba(255, 255, 255, 1)"),D.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),D.addColorStop(1,"rgba(255, 255, 255, 0)");const I=L.createLinearGradient(0,0,0,this._canvas.height);I.addColorStop(0,"rgba(0, 0, 0, 0)"),I.addColorStop(1,"rgba(0, 0, 0, 1)"),L.rect(0,0,this._canvas.width,this._canvas.height),L.fillStyle=b.Color.Format.CSS.format(C),L.fill(),L.fillStyle=D,L.fill(),L.fillStyle=I,L.fill()}paintSelection(m,C){this.selection.style.left=`${m*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(m,C,L=!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,L?(this.domNode=k.append(m,s(".standalone-strip")),this.overlay=k.append(this.domNode,s(".standalone-overlay"))):(this.domNode=k.append(m,s(".strip")),this.overlay=k.append(this.domNode,s(".overlay"))),this.slider=k.append(this.domNode,s(".slider")),this.slider.style.top="0px",this._register(k.addDisposableListener(this.domNode,k.EventType.POINTER_DOWN,D=>this.onPointerDown(D))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const m=this.getValue(this.model.color);this.updateSliderPosition(m)}onPointerDown(m){if(!m.target||!(m.target instanceof Element))return;const C=this._register(new y.GlobalPointerMoveMonitor),L=k.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),m.target!==this.slider&&this.onDidChangeTop(m.offsetY),C.startMonitoring(m.target,m.pointerId,m.buttons,I=>this.onDidChangeTop(I.pageY-L.top),()=>null);const D=k.addDisposableListener(document,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),D.dispose(),C.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(m){const C=Math.max(0,Math.min(1,1-m/this.height));this.updateSliderPosition(C),this._onDidChange.fire(C)}updateSliderPosition(m){this.slider.style.top=`${(1-m)*this.height}px`}}class l extends c{constructor(m,C,L=!1){super(m,C,L),this.domNode.classList.add("opacity-strip"),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(m){const{r:C,g:L,b:D}=m.rgba,I=new b.Color(new b.RGBA(C,L,D,1)),T=new b.Color(new b.RGBA(C,L,D,0));this.overlay.style.background=`linear-gradient(to bottom, ${I} 0%, ${T} 100%)`}getValue(m){return m.hsva.a}}class a extends c{constructor(m,C,L=!1){super(m,C,L),this.domNode.classList.add("hue-strip")}getValue(m){return 1-m.hsva.h/360}}class u extends g.Disposable{constructor(m){super(),this._onClicked=this._register(new S.Emitter),this.onClicked=this._onClicked.event,this._button=k.append(m,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 E.Widget{constructor(m,C,L,D,I=!1){super(),this.model=C,this.pixelRatio=L,this._register(_.PixelRatio.onDidChange(()=>this.layout()));const T=s(".colorpicker-widget");m.appendChild(T),this.header=this._register(new r(T,this.model,D,I)),this.body=this._register(new h(T,this.model,this.pixelRatio,I))}layout(){this.body.layout()}}e.ColorPickerWidget=v}),define(X[803],ee([1,0,7,49,78,27,6,2,9,18,39,125,229,658,14,52,33,73,30,438]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const c=_.$,l=(0,h.registerIcon)("parameter-hints-next",E.Codicon.chevronDown,i.localize(0,null)),a=(0,h.registerIcon)("parameter-hints-previous",E.Codicon.chevronUp,i.localize(1,null));let u=e.ParameterHintsWidget=class ji extends b.Disposable{constructor(f,m,C,L,D){super(),this.editor=f,this.model=m,this.renderDisposeables=this._register(new b.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new n.MarkdownRenderer({editor:f},D,L)),this.keyVisible=t.Context.Visible.bindTo(C),this.keyMultipleSignatures=t.Context.MultipleSignatures.bindTo(C)}createParameterHintDOMNodes(){const f=c(".editor-widget.parameter-hints-widget"),m=_.append(f,c(".phwrapper"));m.tabIndex=-1;const C=_.append(m,c(".controls")),L=_.append(C,c(".button"+o.ThemeIcon.asCSSSelector(a))),D=_.append(C,c(".overloads")),I=_.append(C,c(".button"+o.ThemeIcon.asCSSSelector(l)));this._register(_.addDisposableListener(L,"click",P=>{_.EventHelper.stop(P),this.previous()})),this._register(_.addDisposableListener(I,"click",P=>{_.EventHelper.stop(P),this.next()}));const T=c(".body"),O=new y.DomScrollableElement(T,{alwaysConsumeMouseWheel:!0});this._register(O),m.appendChild(O.getDomNode());const R=_.append(T,c(".signature")),A=_.append(T,c(".docs"));f.style.userSelect="text",this.domNodes={element:f,signature:R,overloads:D,docs:A,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 m;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 L=f.signatures[f.activeSignature];if(!L)return;const D=_.append(this.domNodes.signature,c(".code")),I=this.editor.getOption(48);D.style.fontSize=`${I.fontSize}px`,D.style.fontFamily=I.fontFamily;const T=L.parameters.length>0,O=(m=L.activeParameter)!==null&&m!==void 0?m:f.activeParameter;if(T)this.renderParameters(D,L,O);else{const N=_.append(D,c("span"));N.textContent=L.label}const R=L.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(L.documentation!==void 0)if(typeof L.documentation=="string")_.append(this.domNodes.docs,c("p",{},L.documentation));else{const N=this.renderMarkdownDocs(L.documentation);_.append(this.domNodes.docs,N.element)}const A=this.hasDocs(L,R);if(this.domNodes.signature.classList.toggle("has-docs",A),this.domNodes.docs.classList.toggle("empty",!A),this.domNodes.overloads.textContent=String(f.activeSignature+1).padStart(f.signatures.length.toString().length,"0")+"/"+f.signatures.length,R){let N="";const P=L.parameters[O];Array.isArray(P.label)?N=L.label.substring(P.label[0],P.label[1]):N=P.label,P.documentation&&(N+=typeof P.documentation=="string"?`, ${P.documentation}`:`, ${P.documentation.value}`),L.documentation&&(N+=typeof L.documentation=="string"?`, ${L.documentation}`:`, ${L.documentation.value}`),this.announcedLabel!==N&&(k.alert(i.localize(2,null,N)),this.announcedLabel=N)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(f){const m=this.renderDisposeables.add(this.markdownRenderer.render(f,{asyncRenderCallback:()=>{var C;(C=this.domNodes)===null||C===void 0||C.scrollbar.scanDomNode()}}));return m.element.classList.add("markdown-docs"),m}hasDocs(f,m){return!!(m&&typeof m.documentation=="string"&&(0,g.assertIsDefined)(m.documentation).length>0||m&&typeof m.documentation=="object"&&(0,g.assertIsDefined)(m.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,m,C){const[L,D]=this.getParameterLabelOffsets(m,C),I=document.createElement("span");I.textContent=m.label.substring(0,L);const T=document.createElement("span");T.textContent=m.label.substring(L,D),T.className="parameter active";const O=document.createElement("span");O.textContent=m.label.substring(D),_.append(f,I,T,O)}getParameterLabelOffsets(f,m){const C=f.parameters[m];if(C){if(Array.isArray(C.label))return C.label;if(C.label.length){const L=new RegExp(`(\\W|^)${(0,S.escapeRegExpCharacters)(C.label)}(?=\\W|$)`,"g");L.test(f.label);const D=L.lastIndex-C.label.length;return D>=0?[D,L.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return ji.ID}updateMaxHeight(){if(!this.domNodes)return;const m=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=m;const C=this.domNodes.element.getElementsByClassName("phwrapper");C.length&&(C[0].style.maxHeight=m)}};u.ID="editor.widget.parameterHintsWidget",e.ParameterHintsWidget=u=Me([fe(2,s.IContextKeyService),fe(3,r.IOpenerService),fe(4,p.ILanguageService)],u),(0,d.registerColor)("editorHoverWidget.highlightForeground",{dark:d.listHighlightForeground,light:d.listHighlightForeground,hcDark:d.listHighlightForeground,hcLight:d.listHighlightForeground},i.localize(3,null))}),define(X[804],ee([1,0,101,2,15,22,31,19,720,229,657,14,8,803]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let s=class qi extends k.Disposable{static get(c){return c.getContribution(qi.ID)}constructor(c,l,a){super(),this.editor=c,this.model=this._register(new S.ParameterHintsModel(c,a.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(l.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)}};s.ID="editor.controller.parameterHints",s=Me([fe(1,t.IInstantiationService),fe(2,b.ILanguageFeaturesService)],s);class r extends y.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:p.localize(0,null),alias:"Trigger Parameter Hints",precondition:E.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(c,l){const a=s.get(l);a?.trigger({triggerKind:w.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=r,(0,y.registerEditorContribution)(s.ID,s,2),(0,y.registerEditorAction)(r);const d=100+75,h=y.EditorCommand.bindToContribution(s.get);(0,y.registerEditorCommand)(new h({id:"closeParameterHints",precondition:g.Context.Visible,handler:o=>o.cancel(),kbOpts:{weight:d,kbExpr:E.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new h({id:"showPrevParameterHint",precondition:n.ContextKeyExpr.and(g.Context.Visible,g.Context.MultipleSignatures),handler:o=>o.previous(),kbOpts:{weight:d,kbExpr:E.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,y.registerEditorCommand)(new h({id:"showNextParameterHint",precondition:n.ContextKeyExpr.and(g.Context.Visible,g.Context.MultipleSignatures),handler:o=>o.next(),kbOpts:{weight:d,kbExpr:E.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(X[805],ee([1,0,7,69,40,2,125,8,739,73,30,445]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const n=26;let t=e.BannerController=class extends E.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,n)}};e.BannerController=t=Me([fe(1,b.IInstantiationService)],t);let i=class extends E.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${p.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 l of r.actions)this._register(this.instantiationService.createInstance(S.Link,this.messageActionsContainer,Object.assign(Object.assign({},l),{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 y.Action("banner.close","Close Banner",p.ThemeIcon.asClassName(g.widgetClose),!0,()=>{typeof r.onClose=="function"&&r.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};i=Me([fe(0,b.IInstantiationService)],i)}),define(X[806],ee([1,0,7,6,30,73]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function w(S){const g=new k.Emitter,p=(0,E.getIconRegistry)();return p.onDidChange(()=>g.fire()),S?.onDidProductIconThemeChange(()=>g.fire()),{onDidChange:g.event,getCSS(){const n=S?S.getProductIconTheme():new b,t={},i=r=>{const d=n.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}'; }`},s=[];for(const r of p.getIcons()){const d=i(r);d&&s.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(l=>`${(0,_.asCSSUrl)(l.location)} format('${l.format}')`).join(", ");s.push(`@font-face { src: ${c}; font-family: ${(0,_.asCSSPropertyValue)(r)};${h}${o} font-display: block; }`)}return s.join(`
- `)}}}e.getIconsStyleSheet=w;class b{getIcon(g){const p=(0,E.getIconRegistry)();let n=g.defaults;for(;y.ThemeIcon.isThemeIcon(n);){const t=p.getIcon(n.id);if(!t)return;n=t.defaults}return n}}e.UnthemedProductIconTheme=b}),define(X[92],ee([1,0]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var _;(function(E){E.DARK="dark",E.LIGHT="light",E.HIGH_CONTRAST_DARK="hcDark",E.HIGH_CONTRAST_LIGHT="hcLight"})(_||(e.ColorScheme=_={}));function k(E){return E===_.HIGH_CONTRAST_DARK||E===_.HIGH_CONTRAST_LIGHT}e.isHighContrast=k;function y(E){return E===_.DARK||E===_.HIGH_CONTRAST_DARK}e.isDark=y}),define(X[337],ee([1,0,47,36,17,460,137,141,110,92,41]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=void 0;const n=function(){return y.isNative?!0:!(y.isLinux||_.isFirefox||_.isSafari)}();let t=!0;class i{constructor(u,v){this.themeType=v;const f=u.options,m=f.get(48);f.get(36)==="off"?this.renderWhitespace=f.get(94):this.renderWhitespace="none",this.renderControlCharacters=f.get(89),this.spaceWidth=m.spaceWidth,this.middotWidth=m.middotWidth,this.wsmiddotWidth=m.wsmiddotWidth,this.useMonospaceOptimizations=m.isMonospace&&!f.get(31),this.canUseHalfwidthRightwardsArrow=m.canUseHalfwidthRightwardsArrow,this.lineHeight=f.get(64),this.stopRenderingLineAfter=f.get(112),this.fontLigatures=f.get(49)}equals(u){return this.themeType===u.themeType&&this.renderWhitespace===u.renderWhitespace&&this.renderControlCharacters===u.renderControlCharacters&&this.spaceWidth===u.spaceWidth&&this.middotWidth===u.middotWidth&&this.wsmiddotWidth===u.wsmiddotWidth&&this.useMonospaceOptimizations===u.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===u.canUseHalfwidthRightwardsArrow&&this.lineHeight===u.lineHeight&&this.stopRenderingLineAfter===u.stopRenderingLineAfter&&this.fontLigatures===u.fontLigatures}}e.ViewLineOptions=i;class s{constructor(u){this._options=u,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(u){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,k.createFastDomNode)(u);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(u){this._isMaybeInvalid=!0,this._options=u}onSelectionChanged(){return(0,g.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(u,v,f,m){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const C=f.getViewLineRenderingData(u),L=this._options,D=b.LineDecoration.filter(C.inlineDecorations,u,C.minColumn,C.maxColumn);let I=null;if((0,g.isHighContrast)(L.themeType)||this._options.renderWhitespace==="selection"){const A=f.selections;for(const N of A){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)(L.themeType)&&D.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(L.useMonospaceOptimizations,L.canUseHalfwidthRightwardsArrow,C.content,C.continuesWithWrappedLine,C.isBasicASCII,C.containsRTL,C.minColumn-1,C.tokens,D,C.tabSize,C.startVisibleColumn,L.spaceWidth,L.middotWidth,L.wsmiddotWidth,L.stopRenderingLineAfter,L.renderWhitespace,L.renderControlCharacters,L.fontLigatures!==p.EditorFontLigatures.OFF,I);if(this._renderedViewLine&&this._renderedViewLine.input.equals(T))return!1;m.appendString('<div style="top:'),m.appendString(String(v)),m.appendString("px;height:"),m.appendString(String(this._options.lineHeight)),m.appendString('px;" class="'),m.appendString(s.CLASS_NAME),m.appendString('">');const O=(0,S.renderViewLine)(T,m);m.appendString("</div>");let R=null;return t&&n&&C.isBasicASCII&&L.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,m){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(m),0)]);C!==-1&&v>C+1&&(v=C+1),C!==-1&&f>C+1&&(f=C+1);const L=this._renderedViewLine.getVisibleRangesForRange(u,v,f,m);return L&&L.length>0?new w.VisibleRanges(!1,L):null}getColumnOfNodeOffset(u,v,f){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(u,v,f):1}}e.ViewLine=s,s.CLASS_NAME="view-line";class r{constructor(u,v,f){this._cachedWidth=-1,this.domNode=u,this.input=v;const m=Math.floor(v.lineContent.length/300);if(m>0){this._keyColumnPixelOffsetCache=new Float32Array(m);for(let C=0;C<m;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,m){const C=this._getColumnPixelOffset(u,v,m),L=this._getColumnPixelOffset(u,f,m);return[new w.FloatHorizontalRange(C,L-C)]}_getColumnPixelOffset(u,v,f){if(v<=300){const T=this._characterMapping.getHorizontalOffset(v);return this._charWidth*T}const m=Math.floor((v-1)/300)-1,C=(m+1)*300+1;let L=-1;if(this._keyColumnPixelOffsetCache&&(L=this._keyColumnPixelOffsetCache[m],L===-1&&(L=this._actualReadPixelOffset(u,C,f),this._keyColumnPixelOffsetCache[m]=L)),L===-1){const T=this._characterMapping.getHorizontalOffset(v);return this._charWidth*T}const D=this._characterMapping.getHorizontalOffset(C),I=this._characterMapping.getHorizontalOffset(v);return L+this._charWidth*(I-D)}_getReadingTarget(u){return u.domNode.firstChild}_actualReadPixelOffset(u,v,f){if(!this.domNode)return-1;const m=this._characterMapping.getDomPosition(v),C=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),m.partIndex,m.charIndex,m.partIndex,m.charIndex,f);return!C||C.length===0?-1:C[0].left}getColumnOfNodeOffset(u,v,f){const m=v.textContent.length;let C=-1;for(;v;)v=v.previousSibling,C++;return this._characterMapping.getColumn(new S.DomPosition(C,f),m)}}class d{constructor(u,v,f,m,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,!m||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let L=0,D=this._characterMapping.length;L<=D;L++)this._pixelOffsetCache[L]=-1}}_getReadingTarget(u){return u.domNode.firstChild}getWidth(u){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,u?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(u,v,f,m){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const C=this._readPixelOffset(this.domNode,u,v,m);if(C===-1)return null;const L=this._readPixelOffset(this.domNode,u,f,m);return L===-1?null:[new w.FloatHorizontalRange(C,L-C)]}return this._readVisibleRangesForRange(this.domNode,u,v,f,m)}_readVisibleRangesForRange(u,v,f,m,C){if(f===m){const L=this._readPixelOffset(u,v,f,C);return L===-1?null:[new w.FloatHorizontalRange(L,0)]}else return this._readRawVisibleRangesForRange(u,f,m,C)}_readPixelOffset(u,v,f,m){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(m);const C=this._getReadingTarget(u);return C.firstChild?(m.markDidDomLayout(),C.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const C=this._pixelOffsetCache[f];if(C!==-1)return C;const L=this._actualReadPixelOffset(u,v,f,m);return this._pixelOffsetCache[f]=L,L}return this._actualReadPixelOffset(u,v,f,m)}_actualReadPixelOffset(u,v,f,m){if(this._characterMapping.length===0){const I=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),0,0,0,0,m);return!I||I.length===0?-1:I[0].left}if(f===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(m);const C=this._characterMapping.getDomPosition(f),L=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),C.partIndex,C.charIndex,C.partIndex,C.charIndex,m);if(!L||L.length===0)return-1;const D=L[0].left;if(this.input.isBasicASCII){const I=this._characterMapping.getHorizontalOffset(f),T=Math.round(this.input.spaceWidth*I);if(Math.abs(T-D)<=1)return T}return D}_readRawVisibleRangesForRange(u,v,f,m){if(v===1&&f===this._characterMapping.length)return[new w.FloatHorizontalRange(0,this.getWidth(m))];const C=this._characterMapping.getDomPosition(v),L=this._characterMapping.getDomPosition(f);return E.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),C.partIndex,C.charIndex,L.partIndex,L.charIndex,m)}getColumnOfNodeOffset(u,v,f){const m=v.textContent.length;let C=-1;for(;v;)v=v.previousSibling,C++;return this._characterMapping.getColumn(new S.DomPosition(C,f),m)}}class h extends d{_readVisibleRangesForRange(u,v,f,m,C){const L=super._readVisibleRangesForRange(u,v,f,m,C);if(!L||L.length===0||f===m||f===1&&m===this._characterMapping.length)return L;if(!this.input.containsRTL){const D=this._readPixelOffset(u,v,m,C);if(D!==-1){const I=L[L.length-1];I.left<D&&(I.width=D-I.left)}}return L}}const o=function(){return _.isWebKit?c:l}();function c(a,u,v,f,m){return new h(a,u,v,f,m)}function l(a,u,v,f,m){return new d(a,u,v,f,m)}}),define(X[338],ee([1,0,155,54,337,12,5,76,7,261]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class p{constructor(m=null){this.hitTarget=m,this.type=0}}class n{constructor(m,C,L){this.position=m,this.spanNode=C,this.injectedText=L,this.type=1}}var t;(function(f){function m(C,L,D){const I=C.getPositionFromDOMInfo(L,D);return I?new n(I,L,null):new p(L)}f.createFromDOMInfo=m})(t||(t={}));class i{constructor(m,C){this.lastViewCursorsRenderData=m,this.lastTextareaPosition=C}}e.PointerHandlerLastRenderData=i;class s{static _deduceRage(m,C=null){return!C&&m?new w.Range(m.lineNumber,m.column,m.lineNumber,m.column):C??null}static createUnknown(m,C,L){return{type:0,element:m,mouseColumn:C,position:L,range:this._deduceRage(L)}}static createTextarea(m,C){return{type:1,element:m,mouseColumn:C,position:null,range:null}}static createMargin(m,C,L,D,I,T){return{type:m,element:C,mouseColumn:L,position:D,range:I,detail:T}}static createViewZone(m,C,L,D,I){return{type:m,element:C,mouseColumn:L,position:D,range:this._deduceRage(D),detail:I}}static createContentText(m,C,L,D,I){return{type:6,element:m,mouseColumn:C,position:L,range:this._deduceRage(L,D),detail:I}}static createContentEmpty(m,C,L,D){return{type:7,element:m,mouseColumn:C,position:L,range:this._deduceRage(L),detail:D}}static createContentWidget(m,C,L){return{type:9,element:m,mouseColumn:C,position:null,range:null,detail:L}}static createScrollbar(m,C,L){return{type:11,element:m,mouseColumn:C,position:L,range:this._deduceRage(L)}}static createOverlayWidget(m,C,L){return{type:12,element:m,mouseColumn:C,position:null,range:null,detail:L}}static createOutsideEditor(m,C,L,D){return{type:13,element:null,mouseColumn:m,position:C,range:this._deduceRage(C),outsidePosition:L,outsideDistance:D}}static _typeToString(m){return m===1?"TEXTAREA":m===2?"GUTTER_GLYPH_MARGIN":m===3?"GUTTER_LINE_NUMBERS":m===4?"GUTTER_LINE_DECORATIONS":m===5?"GUTTER_VIEW_ZONE":m===6?"CONTENT_TEXT":m===7?"CONTENT_EMPTY":m===8?"CONTENT_VIEW_ZONE":m===9?"CONTENT_WIDGET":m===10?"OVERVIEW_RULER":m===11?"SCROLLBAR":m===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(m){return this._typeToString(m.type)+": "+m.position+" - "+m.range+" - "+JSON.stringify(m.detail)}}e.MouseTarget=s;class r{static isTextArea(m){return m.length===2&&m[0]===3&&m[1]===6}static isChildOfViewLines(m){return m.length>=4&&m[0]===3&&m[3]===7}static isStrictChildOfViewLines(m){return m.length>4&&m[0]===3&&m[3]===7}static isChildOfScrollableElement(m){return m.length>=2&&m[0]===3&&m[1]===5}static isChildOfMinimap(m){return m.length>=2&&m[0]===3&&m[1]===8}static isChildOfContentWidgets(m){return m.length>=4&&m[0]===3&&m[3]===1}static isChildOfOverflowingContentWidgets(m){return m.length>=1&&m[0]===2}static isChildOfOverlayWidgets(m){return m.length>=2&&m[0]===3&&m[1]===4}}class d{constructor(m,C,L){this.viewModel=m.viewModel;const D=m.configuration.options;this.layoutInfo=D.get(139),this.viewDomNode=C.viewDomNode,this.lineHeight=D.get(64),this.stickyTabStops=D.get(111),this.typicalHalfwidthCharacterWidth=D.get(48).typicalHalfwidthCharacterWidth,this.lastRenderData=L,this._context=m,this._viewHelper=C}getZoneAtCoord(m){return d.getZoneAtCoord(this._context,m)}static getZoneAtCoord(m,C){const L=m.viewLayout.getWhitespaceAtVerticalOffset(C);if(L){const D=L.verticalOffset+L.height/2,I=m.viewModel.getLineCount();let T=null,O,R=null;return L.afterLineNumber!==I&&(R=new E.Position(L.afterLineNumber+1,1)),L.afterLineNumber>0&&(T=new E.Position(L.afterLineNumber,m.viewModel.getLineMaxColumn(L.afterLineNumber))),R===null?O=T:T===null?O=R:C<D?O=T:O=R,{viewZoneId:L.id,afterLineNumber:L.afterLineNumber,positionBefore:T,positionAfter:R,position:O}}return null}getFullLineRangeAtCoord(m){if(this._context.viewLayout.isAfterLines(m)){const D=this._context.viewModel.getLineCount(),I=this._context.viewModel.getLineMaxColumn(D);return{range:new w.Range(D,I,D,I),isAfterLines:!0}}const C=this._context.viewLayout.getLineNumberAtVerticalOffset(m),L=this._context.viewModel.getLineMaxColumn(C);return{range:new w.Range(C,1,C,L),isAfterLines:!1}}getLineNumberAtVerticalOffset(m){return this._context.viewLayout.getLineNumberAtVerticalOffset(m)}isAfterLines(m){return this._context.viewLayout.isAfterLines(m)}isInTopPadding(m){return this._context.viewLayout.isInTopPadding(m)}isInBottomPadding(m){return this._context.viewLayout.isInBottomPadding(m)}getVerticalOffsetForLineNumber(m){return this._context.viewLayout.getVerticalOffsetForLineNumber(m)}findAttribute(m,C){return d._findAttribute(m,C,this._viewHelper.viewDomNode)}static _findAttribute(m,C,L){for(;m&&m!==document.body;){if(m.hasAttribute&&m.hasAttribute(C))return m.getAttribute(C);if(m===L)return null;m=m.parentNode}return null}getLineWidth(m){return this._viewHelper.getLineWidth(m)}visibleRangeForPosition(m,C){return this._viewHelper.visibleRangeForPosition(m,C)}getPositionFromDOMInfo(m,C){return this._viewHelper.getPositionFromDOMInfo(m,C)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=d;class h{constructor(m,C,L,D){this.editorPos=C,this.pos=L,this.relativePos=D,this.mouseVerticalOffset=Math.max(0,m.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=m.getCurrentScrollLeft()+this.relativePos.x-m.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<m.layoutInfo.contentLeft&&this.relativePos.x>=m.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,a._getMouseColumn(this.mouseContentHorizontalOffset,m.typicalHalfwidthCharacterWidth))}}class o extends h{constructor(m,C,L,D,I){super(m,C,L,D),this._ctx=m,I?(this.target=I,this.targetPath=k.PartFingerprints.collect(I,m.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
- target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(m=null){return m&&m.column<this._ctx.viewModel.getLineMaxColumn(m.lineNumber)?b.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(m.lineNumber),m.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(m=null){return s.createUnknown(this.target,this._getMouseColumn(m),m)}fulfillTextarea(){return s.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(m,C,L,D){return s.createMargin(m,this.target,this._getMouseColumn(C),C,L,D)}fulfillViewZone(m,C,L){return s.createViewZone(m,this.target,this._getMouseColumn(C),C,L)}fulfillContentText(m,C,L){return s.createContentText(this.target,this._getMouseColumn(m),m,C,L)}fulfillContentEmpty(m,C){return s.createContentEmpty(this.target,this._getMouseColumn(m),m,C)}fulfillContentWidget(m){return s.createContentWidget(this.target,this._getMouseColumn(),m)}fulfillScrollbar(m){return s.createScrollbar(this.target,this._getMouseColumn(m),m)}fulfillOverlayWidget(m){return s.createOverlayWidget(this.target,this._getMouseColumn(),m)}withTarget(m){return new o(this._ctx,this.editorPos,this.pos,this.relativePos,m)}}const c={isAfterLines:!0};function l(f){return{isAfterLines:!1,horizontalDistanceToText:f}}class a{constructor(m,C){this._context=m,this._viewHelper=C}mouseTargetIsWidget(m){const C=m.target,L=k.PartFingerprints.collect(C,this._viewHelper.viewDomNode);return!!(r.isChildOfContentWidgets(L)||r.isChildOfOverflowingContentWidgets(L)||r.isChildOfOverlayWidgets(L))}createMouseTarget(m,C,L,D,I){const T=new d(this._context,this._viewHelper,m),O=new o(T,C,L,D,I);try{const R=a._createMouseTarget(T,O,!1);if(R.type===6&&T.stickyTabStops&&R.position!==null){const A=a._snapToSoftTabBoundary(R.position,T.viewModel),N=w.Range.fromPositions(A,A).plusRange(R.range);return O.fulfillContentText(A,N,R.detail)}return R}catch{return O.fulfillUnknown()}}static _createMouseTarget(m,C,L){if(C.target===null){if(L)return C.fulfillUnknown();const T=a._doHitTest(m,C);return T.type===1?a.createMouseTargetFromHitTestPosition(m,C,T.spanNode,T.position,T.injectedText):this._createMouseTarget(m,C.withTarget(T.hitTarget),!0)}const D=C;let I=null;return I=I||a._hitTestContentWidget(m,D),I=I||a._hitTestOverlayWidget(m,D),I=I||a._hitTestMinimap(m,D),I=I||a._hitTestScrollbarSlider(m,D),I=I||a._hitTestViewZone(m,D),I=I||a._hitTestMargin(m,D),I=I||a._hitTestViewCursor(m,D),I=I||a._hitTestTextArea(m,D),I=I||a._hitTestViewLines(m,D,L),I=I||a._hitTestScrollbar(m,D),I||C.fulfillUnknown()}static _hitTestContentWidget(m,C){if(r.isChildOfContentWidgets(C.targetPath)||r.isChildOfOverflowingContentWidgets(C.targetPath)){const L=m.findAttribute(C.target,"widgetId");return L?C.fulfillContentWidget(L):C.fulfillUnknown()}return null}static _hitTestOverlayWidget(m,C){if(r.isChildOfOverlayWidgets(C.targetPath)){const L=m.findAttribute(C.target,"widgetId");return L?C.fulfillOverlayWidget(L):C.fulfillUnknown()}return null}static _hitTestViewCursor(m,C){if(C.target){const L=m.lastRenderData.lastViewCursorsRenderData;for(const D of L)if(C.target===D.domNode)return C.fulfillContentText(D.position,null,{mightBeForeignElement:!1,injectedText:null})}if(C.isInContentArea){const L=m.lastRenderData.lastViewCursorsRenderData,D=C.mouseContentHorizontalOffset,I=C.mouseVerticalOffset;for(const T of L){if(D<T.contentLeft||D>T.contentLeft+T.width)continue;const O=m.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(m,C){const L=m.getZoneAtCoord(C.mouseVerticalOffset);if(L){const D=C.isInContentArea?8:5;return C.fulfillViewZone(D,L.position,L)}return null}static _hitTestTextArea(m,C){return r.isTextArea(C.targetPath)?m.lastRenderData.lastTextareaPosition?C.fulfillContentText(m.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):C.fulfillTextarea():null}static _hitTestMargin(m,C){if(C.isInMarginArea){const L=m.getFullLineRangeAtCoord(C.mouseVerticalOffset),D=L.range.getStartPosition();let I=Math.abs(C.relativePos.x);const T={isAfterLines:L.isAfterLines,glyphMarginLeft:m.layoutInfo.glyphMarginLeft,glyphMarginWidth:m.layoutInfo.glyphMarginWidth,lineNumbersWidth:m.layoutInfo.lineNumbersWidth,offsetX:I};return I-=m.layoutInfo.glyphMarginLeft,I<=m.layoutInfo.glyphMarginWidth?C.fulfillMargin(2,D,L.range,T):(I-=m.layoutInfo.glyphMarginWidth,I<=m.layoutInfo.lineNumbersWidth?C.fulfillMargin(3,D,L.range,T):(I-=m.layoutInfo.lineNumbersWidth,C.fulfillMargin(4,D,L.range,T)))}return null}static _hitTestViewLines(m,C,L){if(!r.isChildOfViewLines(C.targetPath))return null;if(m.isInTopPadding(C.mouseVerticalOffset))return C.fulfillContentEmpty(new E.Position(1,1),c);if(m.isAfterLines(C.mouseVerticalOffset)||m.isInBottomPadding(C.mouseVerticalOffset)){const I=m.viewModel.getLineCount(),T=m.viewModel.getLineMaxColumn(I);return C.fulfillContentEmpty(new E.Position(I,T),c)}if(L){if(r.isStrictChildOfViewLines(C.targetPath)){const I=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset);if(m.viewModel.getLineLength(I)===0){const O=m.getLineWidth(I),R=l(C.mouseContentHorizontalOffset-O);return C.fulfillContentEmpty(new E.Position(I,1),R)}const T=m.getLineWidth(I);if(C.mouseContentHorizontalOffset>=T){const O=l(C.mouseContentHorizontalOffset-T),R=new E.Position(I,m.viewModel.getLineMaxColumn(I));return C.fulfillContentEmpty(R,O)}}return C.fulfillUnknown()}const D=a._doHitTest(m,C);return D.type===1?a.createMouseTargetFromHitTestPosition(m,C,D.spanNode,D.position,D.injectedText):this._createMouseTarget(m,C.withTarget(D.hitTarget),!0)}static _hitTestMinimap(m,C){if(r.isChildOfMinimap(C.targetPath)){const L=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),D=m.viewModel.getLineMaxColumn(L);return C.fulfillScrollbar(new E.Position(L,D))}return null}static _hitTestScrollbarSlider(m,C){if(r.isChildOfScrollableElement(C.targetPath)&&C.target&&C.target.nodeType===1){const L=C.target.className;if(L&&/\b(slider|scrollbar)\b/.test(L)){const D=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),I=m.viewModel.getLineMaxColumn(D);return C.fulfillScrollbar(new E.Position(D,I))}}return null}static _hitTestScrollbar(m,C){if(r.isChildOfScrollableElement(C.targetPath)){const L=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),D=m.viewModel.getLineMaxColumn(L);return C.fulfillScrollbar(new E.Position(L,D))}return null}getMouseColumn(m){const C=this._context.configuration.options,L=C.get(139),D=this._context.viewLayout.getCurrentScrollLeft()+m.x-L.contentLeft;return a._getMouseColumn(D,C.get(48).typicalHalfwidthCharacterWidth)}static _getMouseColumn(m,C){return m<0?1:Math.round(m/C)+1}static createMouseTargetFromHitTestPosition(m,C,L,D,I){const T=D.lineNumber,O=D.column,R=m.getLineWidth(T);if(C.mouseContentHorizontalOffset>R){const M=l(C.mouseContentHorizontalOffset-R);return C.fulfillContentEmpty(D,M)}const A=m.visibleRangeForPosition(T,O);if(!A)return C.fulfillUnknown(D);const N=A.left;if(Math.abs(C.mouseContentHorizontalOffset-N)<1)return C.fulfillContentText(D,null,{mightBeForeignElement:!!I,injectedText:I});const P=[];if(P.push({offset:A.left,column:O}),O>1){const M=m.visibleRangeForPosition(T,O-1);M&&P.push({offset:M.left,column:O-1})}const x=m.viewModel.getLineMaxColumn(T);if(O<x){const M=m.visibleRangeForPosition(T,O+1);M&&P.push({offset:M.left,column:O+1})}P.sort((M,Q)=>M.offset-Q.offset);const F=C.pos.toClientCoordinates(),B=L.getBoundingClientRect(),V=B.left<=F.clientX&&F.clientX<=B.right;let $=null;for(let M=1;M<P.length;M++){const Q=P[M-1],ie=P[M];if(Q.offset<=C.mouseContentHorizontalOffset&&C.mouseContentHorizontalOffset<=ie.offset){$=new w.Range(T,Q.column,T,ie.column);const re=Math.abs(Q.offset-C.mouseContentHorizontalOffset),ne=Math.abs(ie.offset-C.mouseContentHorizontalOffset);D=re<ne?new E.Position(T,Q.column):new E.Position(T,ie.column);break}}return C.fulfillContentText(D,$,{mightBeForeignElement:!V||!!I,injectedText:I})}static _doHitTestWithCaretRangeFromPoint(m,C){const L=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),D=m.getVerticalOffsetForLineNumber(L),I=D+m.lineHeight;if(!(L===m.viewModel.getLineCount()&&C.mouseVerticalOffset>I)){const O=Math.floor((D+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 A=new _.PageCoordinates(C.pos.x,R),N=this._actualDoHitTestWithCaretRangeFromPoint(m,A.toClientCoordinates());if(N.type===1)return N}return this._actualDoHitTestWithCaretRangeFromPoint(m,C.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(m,C){const L=S.getShadowRoot(m.viewDomNode);let D;if(L?typeof L.caretRangeFromPoint>"u"?D=u(L,C.clientX,C.clientY):D=L.caretRangeFromPoint(C.clientX,C.clientY):D=document.caretRangeFromPoint(C.clientX,C.clientY),!D||!D.startContainer)return new p;const I=D.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)===y.ViewLine.CLASS_NAME?t.createFromDOMInfo(m,T,D.startOffset):new p(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)===y.ViewLine.CLASS_NAME?t.createFromDOMInfo(m,I,I.textContent.length):new p(I)}return new p}static _doHitTestWithCaretPositionFromPoint(m,C){const L=document.caretPositionFromPoint(C.clientX,C.clientY);if(L.offsetNode.nodeType===L.offsetNode.TEXT_NODE){const D=L.offsetNode.parentNode,I=D?D.parentNode:null,T=I?I.parentNode:null;return(T&&T.nodeType===T.ELEMENT_NODE?T.className:null)===y.ViewLine.CLASS_NAME?t.createFromDOMInfo(m,L.offsetNode.parentNode,L.offset):new p(L.offsetNode.parentNode)}if(L.offsetNode.nodeType===L.offsetNode.ELEMENT_NODE){const D=L.offsetNode.parentNode,I=D&&D.nodeType===D.ELEMENT_NODE?D.className:null,T=D?D.parentNode:null,O=T&&T.nodeType===T.ELEMENT_NODE?T.className:null;if(I===y.ViewLine.CLASS_NAME){const R=L.offsetNode.childNodes[Math.min(L.offset,L.offsetNode.childNodes.length-1)];if(R)return t.createFromDOMInfo(m,R,0)}else if(O===y.ViewLine.CLASS_NAME)return t.createFromDOMInfo(m,L.offsetNode,0)}return new p(L.offsetNode)}static _snapToSoftTabBoundary(m,C){const L=C.getLineContent(m.lineNumber),{tabSize:D}=C.model.getOptions(),I=g.AtomicTabMoveOperations.atomicPosition(L,m.column-1,D,2);return I!==-1?new E.Position(m.lineNumber,I+1):m}static _doHitTest(m,C){let L=new p;if(typeof document.caretRangeFromPoint=="function"?L=this._doHitTestWithCaretRangeFromPoint(m,C):document.caretPositionFromPoint&&(L=this._doHitTestWithCaretPositionFromPoint(m,C.pos.toClientCoordinates())),L.type===1){const D=m.viewModel.getInjectedTextAt(L.position),I=m.viewModel.normalizePosition(L.position,2);(D||!I.equals(L.position))&&(L=new n(I,L.spanNode,D))}return L}}e.MouseTargetFactory=a;function u(f,m,C){const L=document.createRange();let D=f.elementFromPoint(m,C);if(D!==null){for(;D&&D.firstChild&&D.firstChild.nodeType!==D.firstChild.TEXT_NODE&&D.lastChild&&D.lastChild.firstChild;)D=D.lastChild;const I=D.getBoundingClientRect(),T=window.getComputedStyle(D,null).getPropertyValue("font-style"),O=window.getComputedStyle(D,null).getPropertyValue("font-variant"),R=window.getComputedStyle(D,null).getPropertyValue("font-weight"),A=window.getComputedStyle(D,null).getPropertyValue("font-size"),N=window.getComputedStyle(D,null).getPropertyValue("line-height"),P=window.getComputedStyle(D,null).getPropertyValue("font-family"),x=`${T} ${O} ${R} ${A}/${N} ${P}`,F=D.innerText;let B=I.left,V=0,$;if(m>I.left+I.width)V=F.length;else{const M=v.getInstance();for(let Q=0;Q<F.length+1;Q++){if($=M.getCharWidth(F.charAt(Q),x)/2,B+=$,m<B){V=Q;break}B+=$}}L.setStart(D.firstChild,V),L.setEnd(D.firstChild,V)}return L}class v{static getInstance(){return v._INSTANCE||(v._INSTANCE=new v),v._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(m,C){const L=m+C;if(this._cache[L])return this._cache[L];const D=this._canvas.getContext("2d");D.font=C;const T=D.measureText(m).width;return this._cache[L]=T,T}}v._INSTANCE=null}),define(X[807],ee([1,0,7,67,2,17,338,155,148,12,23,140,78]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=void 0;class i extends n.ViewEventHandler{constructor(c,l,a){super(),this._mouseLeaveMonitor=null,this._context=c,this.viewController=l,this.viewHelper=a,this.mouseTargetFactory=new w.MouseTargetFactory(this._context,a),this._mouseDownOperation=this._register(new s(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(f,m)=>this._createMouseTarget(f,m),f=>this._getMouseColumn(f))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(139).height;const u=new b.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(u.onContextMenu(this.viewHelper.viewDomNode,f=>this._onContextMenu(f,!0))),this._register(u.onMouseMove(this.viewHelper.viewDomNode,f=>{this._onMouseMove(f),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=_.addDisposableListener(document,"mousemove",m=>{this.viewHelper.viewDomNode.contains(m.target)||this._onMouseLeave(new b.EditorMouseEvent(m,!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,m)=>{v=m})),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 l=0,a=S.EditorZoom.getZoomLevel(),u=!1,v=0;const f=C=>{if(this.viewController.emitMouseWheel(C),!this._context.configuration.options.get(73))return;const L=new k.StandardWheelEvent(C);if(c.acceptStandardWheelEvent(L),c.isPhysicalMouseWheel()){if(m(C)){const D=S.EditorZoom.getZoomLevel(),I=L.deltaY>0?1:-1;S.EditorZoom.setZoomLevel(D+I),L.preventDefault(),L.stopPropagation()}}else Date.now()-l>50&&(a=S.EditorZoom.getZoomLevel(),u=m(C),v=0),l=Date.now(),v+=L.deltaY,u&&(S.EditorZoom.setZoomLevel(a+v/5),L.preventDefault(),L.stopPropagation())};this._register(_.addDisposableListener(this.viewHelper.viewDomNode,_.EventType.MOUSE_WHEEL,f,{capture:!0,passive:!1}));function m(C){return E.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(139)){const l=this._context.configuration.options.get(139).height;this._height!==l&&(this._height=l,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(c){return this._mouseDownOperation.onCursorStateChanged(c),!1}onFocusChanged(c){return!1}getTargetAtClientPoint(c,l){const u=new b.ClientCoordinates(c,l).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,l){let a=c.target;if(!this.viewHelper.viewDomNode.contains(a)){const u=_.getShadowRoot(this.viewHelper.viewDomNode);u&&(a=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,l?a:null)}_getMouseColumn(c){return this.mouseTargetFactory.getMouseColumn(c.relativePos)}_onContextMenu(c,l){this.viewController.emitContextMenu({event:c,target:this._createMouseTarget(c,l)})}_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,l){const a=this._createMouseTarget(c,!0),u=a.type===6||a.type===7,v=a.type===2||a.type===3||a.type===4,f=a.type===3,m=this._context.configuration.options.get(104),C=a.type===8||a.type===5,L=a.type===9;let D=c.leftButton||c.middleButton;E.isMacintosh&&c.leftButton&&c.ctrlKey&&(D=!1);const I=()=>{c.preventDefault(),this.viewHelper.focusTextArea()};if(D&&(u||f&&m))I(),this._mouseDownOperation.start(a.type,c,l);else if(v)c.preventDefault();else if(C){const T=a.detail;D&&this.viewHelper.shouldSuppressMouseDownOnViewZone(T.viewZoneId)&&(I(),this._mouseDownOperation.start(a.type,c,l),c.preventDefault())}else L&&this.viewHelper.shouldSuppressMouseDownOnWidget(a.detail)&&(I(),c.preventDefault());this.viewController.emitMouseDown({event:c,target:a})}}e.MouseHandler=i;class s extends y.Disposable{constructor(c,l,a,u,v,f){super(),this._context=c,this._viewController=l,this._viewHelper=a,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,(m,C,L)=>this._dispatchMouse(m,C,L))),this._mouseState=new h,this._currentSelection=new p.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 l=this._findMousePosition(c,!1);l&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:c,target:l}):l.type===13&&(l.outsidePosition==="above"||l.outsidePosition==="below")?this._topBottomDragScrolling.start(l,c):(this._topBottomDragScrolling.stop(),this._dispatchMouse(l,!0,1)))}start(c,l,a){this._lastMouseEvent=l,this._mouseState.setStartedOnLineNumbers(c===3),this._mouseState.setStartButtons(l),this._mouseState.setModifiers(l);const u=this._findMousePosition(l,!0);if(!u||!u.position)return;this._mouseState.trySetCount(l.detail,u.position),l.detail=this._mouseState.count;const v=this._context.configuration.options;if(!v.get(87)&&v.get(33)&&!v.get(20)&&!this._mouseState.altKey&&l.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,a,l.buttons,f=>this._onMouseDownThenMove(f),f=>{const m=this._findMousePosition(this._lastMouseEvent,!1);f&&f instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:m?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(u,l.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,a,l.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 l=c.editorPos,a=this._context.viewModel,u=this._context.viewLayout,v=this._getMouseColumn(c);if(c.posy<l.y){const m=l.y-c.posy,C=Math.max(u.getCurrentScrollTop()-m,0),L=w.HitTestContext.getZoneAtCoord(this._context,C);if(L){const I=this._helpPositionJumpOverViewZone(L);if(I)return w.MouseTarget.createOutsideEditor(v,I,"above",m)}const D=u.getLineNumberAtVerticalOffset(C);return w.MouseTarget.createOutsideEditor(v,new g.Position(D,1),"above",m)}if(c.posy>l.y+l.height){const m=c.posy-l.y-l.height,C=u.getCurrentScrollTop()+c.relativePos.y,L=w.HitTestContext.getZoneAtCoord(this._context,C);if(L){const I=this._helpPositionJumpOverViewZone(L);if(I)return w.MouseTarget.createOutsideEditor(v,I,"below",m)}const D=u.getLineNumberAtVerticalOffset(C);return w.MouseTarget.createOutsideEditor(v,new g.Position(D,a.getLineMaxColumn(D)),"below",m)}const f=u.getLineNumberAtVerticalOffset(u.getCurrentScrollTop()+c.relativePos.y);if(c.posx<l.x){const m=l.x-c.posx;return w.MouseTarget.createOutsideEditor(v,new g.Position(f,1),"left",m)}if(c.posx>l.x+l.width){const m=c.posx-l.x-l.width;return w.MouseTarget.createOutsideEditor(v,new g.Position(f,a.getLineMaxColumn(f)),"right",m)}return null}_findMousePosition(c,l){const a=this._getPositionOutsideEditor(c);if(a)return a;const u=this._createMouseTarget(c,l);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 l=new g.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),a=c.positionBefore,u=c.positionAfter;return a&&u?a.isBefore(l)?a:u:null}_dispatchMouse(c,l,a){c.position&&this._viewController.dispatchMouse({position:c.position,mouseColumn:c.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:a,inSelectionMode:l,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 y.Disposable{constructor(c,l,a,u){super(),this._context=c,this._viewHelper=l,this._mouseTargetFactory=a,this._dispatchMouse=u,this._operation=null}dispose(){super.dispose(),this.stop()}start(c,l){this._operation?this._operation.setPosition(c,l):this._operation=new d(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,c,l)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class d extends y.Disposable{constructor(c,l,a,u,v,f){super(),this._context=c,this._viewHelper=l,this._mouseTargetFactory=a,this._dispatchMouse=u,this._position=v,this._mouseEvent=f,this._lastTime=Date.now(),this._animationFrameDisposable=_.scheduleAtNextAnimationFrame(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(c,l){this._position=c,this._mouseEvent=l}_tick(){const c=Date.now(),l=c-this._lastTime;return this._lastTime=c,l}_getScrollSpeed(){const c=this._context.configuration.options.get(64),l=this._context.configuration.options.get(139).height/c,a=this._position.outsideDistance/c;return a<=1.5?Math.max(30,l*(1+a)):a<=3?Math.max(60,l*(2+a)):Math.max(200,l*(7+a))}_execute(){const c=this._context.configuration.options.get(64),l=this._getScrollSpeed(),a=this._tick(),u=l*(a/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(),m=this._position.outsidePosition==="above"?f.startLineNumber:f.endLineNumber;let C;{const L=(0,b.createEditorPagePosition)(this._viewHelper.viewDomNode),D=this._context.configuration.options.get(139).horizontalScrollbarHeight,I=new b.PageCoordinates(this._mouseEvent.pos.x,L.y+L.height-D-.1),T=(0,b.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,L,I);C=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),L,I,T,null)}(!C.position||C.position.lineNumber!==m)&&(this._position.outsidePosition==="above"?C=w.MouseTarget.createOutsideEditor(this._position.mouseColumn,new g.Position(m,1),"above",this._position.outsideDistance):C=w.MouseTarget.createOutsideEditor(this._position.mouseColumn,new g.Position(m,this._context.viewModel.getLineMaxColumn(m)),"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,l){const a=new Date().getTime();a-this._lastSetMouseDownCountTime>h.CLEAR_MOUSE_DOWN_COUNT_TIME&&(c=1),this._lastSetMouseDownCountTime=a,c>this._lastMouseDownCount+1&&(c=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(l)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=l,this._lastMouseDownCount=Math.min(c,this._lastMouseDownPositionEqualCount)}}h.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(X[808],ee([1,0,7,17,58,2,807,155,208,220]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class p extends w.MouseHandler{constructor(s,r,d){super(s,r,d),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,o=>this.onTap(o))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,o=>this.onChange(o))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,y.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(s){if(!s.initialTarget||!this.viewHelper.linesContentDomNode.contains(s.initialTarget))return;s.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new b.EditorMouseEvent(s,!1,this.viewHelper.viewDomNode),!1);r.position&&this.viewController.dispatchMouse({position:r.position,mouseColumn:r.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:s.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:r.type===6&&r.detail.injectedText!==null})}onChange(s){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-s.translationX,-s.translationY)}_onMouseDown(s,r){s.browserEvent.pointerType!=="touch"&&super._onMouseDown(s,r)}}e.PointerEventHandler=p;class n extends w.MouseHandler{constructor(s,r,d){super(s,r,d),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,h=>this.onTap(h))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,h=>this.onChange(h))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,h=>this._onContextMenu(new b.EditorMouseEvent(h,!1,this.viewHelper.viewDomNode),!1)))}onTap(s){s.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new b.EditorMouseEvent(s,!1,this.viewHelper.viewDomNode),!1);if(r.position){const d=document.createEvent("CustomEvent");d.initEvent(g.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(d),this.viewController.moveTo(r.position,1)}}onChange(s){this._context.viewModel.viewLayout.deltaScrollNow(-s.translationX,-s.translationY)}}class t extends E.Disposable{constructor(s,r,d){super(),k.isIOS&&S.BrowserFeatures.pointerEvents?this.handler=this._register(new p(s,r,d)):window.TouchEvent?this.handler=this._register(new n(s,r,d)):this.handler=this._register(new w.MouseHandler(s,r,d))}getTargetAtClientPoint(s,r){return this.handler.getTargetAtClientPoint(s,r)}}e.PointerHandler=t}),define(X[809],ee([1,0,17,13,75,221,54,337,12,5,137,166,459,403]),function(K,e,_,k,y,E,w,b,S,g,p,n,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 s{constructor(o,c,l,a,u,v,f){this.minimalReveal=o,this.lineNumber=c,this.startColumn=l,this.endColumn=a,this.startScrollTop=u,this.stopScrollTop=v,this.scrollType=f,this.type="range",this.minLineNumber=c,this.maxLineNumber=c}}class r{constructor(o,c,l,a,u){this.minimalReveal=o,this.selections=c,this.startScrollTop=l,this.stopScrollTop=a,this.scrollType=u,this.type="selections";let v=c[0].startLineNumber,f=c[0].endLineNumber;for(let m=1,C=c.length;m<C;m++){const L=c[m];v=Math.min(v,L.startLineNumber),f=Math.max(f,L.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 E.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const l=this._context.configuration,a=this._context.configuration.options,u=a.get(48),v=a.get(140);this._lineHeight=a.get(64),this._typicalHalfwidthCharacterWidth=u.typicalHalfwidthCharacterWidth,this._isViewportWrapping=v.isViewportWrapping,this._revealHorizontalRightPadding=a.get(95),this._cursorSurroundingLines=a.get(27),this._cursorSurroundingLinesStyle=a.get(28),this._canUseLayerHinting=!a.get(30),this._viewLineOptions=new b.ViewLineOptions(l,this._context.theme.type),w.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,y.applyFontInfo)(this.domNode,u),this._maxLineWidth=0,this._asyncUpdateLineWidths=new k.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new k.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new i,this._horizontalRevealRequest=null,this._stickyScrollEnabled=a.get(110).enabled,this._maxNumberStickyLines=a.get(110).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new b.ViewLine(this._viewLineOptions)}onConfigurationChanged(o){this._visibleLines.onConfigurationChanged(o),o.hasChanged(140)&&(this._maxLineWidth=0);const c=this._context.configuration.options,l=c.get(48),a=c.get(140);return this._lineHeight=c.get(64),this._typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this._isViewportWrapping=a.isViewportWrapping,this._revealHorizontalRightPadding=c.get(95),this._cursorSurroundingLines=c.get(27),this._cursorSurroundingLinesStyle=c.get(28),this._canUseLayerHinting=!c.get(30),this._stickyScrollEnabled=c.get(110).enabled,this._maxNumberStickyLines=c.get(110).maxLineCount,(0,y.applyFontInfo)(this.domNode,l),this._onOptionsMaybeChanged(),o.hasChanged(139)&&(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 l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let u=l;u<=a;u++)this._visibleLines.getVisibleLine(u).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(o){const c=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();let a=!1;for(let u=c;u<=l;u++)a=this._visibleLines.getVisibleLine(u).onSelectionChanged()||a;return a}onDecorationsChanged(o){{const c=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let a=c;a<=l;a++)this._visibleLines.getVisibleLine(a).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 l=this._context.viewLayout.validateScrollPosition({scrollTop:c});o.revealHorizontal?o.range&&o.range.startLineNumber!==o.range.endLineNumber?l={scrollTop:l.scrollTop,scrollLeft:0}:o.range?this._horizontalRevealRequest=new s(o.minimalReveal,o.range.startLineNumber,o.range.startColumn,o.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),l.scrollTop,o.scrollType):o.selections&&o.selections.length>0&&(this._horizontalRevealRequest=new r(o.minimalReveal,o.selections,this._context.viewLayout.getCurrentScrollTop(),l.scrollTop,o.scrollType)):this._horizontalRevealRequest=null;const u=Math.abs(this._context.viewLayout.getCurrentScrollTop()-l.scrollTop)<=this._lineHeight?1:o.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(l,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),l=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(o.scrollTop<c||o.scrollTop>l)&&(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 l=this._getViewLineDomNode(o);if(l===null)return null;const a=this._getLineNumberFor(l);if(a===-1||a<1||a>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(a)===1)return new S.Position(a,1);const u=this._visibleLines.getStartLineNumber(),v=this._visibleLines.getEndLineNumber();if(a<u||a>v)return null;let f=this._visibleLines.getVisibleLine(a).getColumnOfNodeOffset(a,o,c);const m=this._context.viewModel.getLineMinColumn(a);return f<m&&(f=m),new S.Position(a,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(),l=this._visibleLines.getEndLineNumber();for(let a=c;a<=l;a++){const u=this._visibleLines.getVisibleLine(a);if(o===u.getDomNode())return a}return-1}getLineWidth(o){const c=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();if(o<c||o>l)return-1;const a=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),u=this._visibleLines.getVisibleLine(o).getWidth(a);return this._updateLineWidthsSlowIfDomDidLayout(a),u}linesVisibleRangesForRange(o,c){if(this.shouldRender())return null;const l=o.endLineNumber,a=g.Range.intersectRanges(o,this._lastRenderedData.getCurrentVisibleRange());if(!a)return null;const u=[];let v=0;const f=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let m=0;c&&(m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(a.startLineNumber,1)).lineNumber);const C=this._visibleLines.getStartLineNumber(),L=this._visibleLines.getEndLineNumber();for(let D=a.startLineNumber;D<=a.endLineNumber;D++){if(D<C||D>L)continue;const I=D===a.startLineNumber?a.startColumn:1,T=D===a.endLineNumber?a.endColumn:this._context.viewModel.getLineMaxColumn(D),O=this._visibleLines.getVisibleLine(D).getVisibleRangesForRange(D,I,T,f);if(O){if(c&&D<l){const R=m;m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(D+1,1)).lineNumber,R!==m&&(O.ranges[O.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}u[v++]=new p.LineVisibleRanges(O.outsideRenderedLine,D,p.HorizontalRange.from(O.ranges))}}return this._updateLineWidthsSlowIfDomDidLayout(f),v===0?null:u}_visibleRangesForLineRange(o,c,l){if(this.shouldRender()||o<this._visibleLines.getStartLineNumber()||o>this._visibleLines.getEndLineNumber())return null;const a=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),u=this._visibleLines.getVisibleLine(o).getVisibleRangesForRange(o,c,l,a);return this._updateLineWidthsSlowIfDomDidLayout(a),u}visibleRangeForPosition(o){const c=this._visibleRangesForLineRange(o.lineNumber,o.column,o.column);return c?new p.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(),l=this._visibleLines.getEndLineNumber();let a=1,u=!0;for(let v=c;v<=l;v++){const f=this._visibleLines.getVisibleLine(v);if(o&&!f.getWidthIsFast()){u=!1;continue}a=Math.max(a,f.getWidth(null))}return u&&c===1&&l===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(a),u}_checkMonospaceFontAssumptions(){let o=-1,c=-1;const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let u=l;u<=a;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=l;u<=a;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 l=this._horizontalRevealRequest;if(o.startLineNumber<=l.minLineNumber&&l.maxLineNumber<=o.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const a=this._computeScrollLeftToReveal(l);a&&(this._isViewportWrapping||this._ensureMaxLineWidth(a.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:a.scrollLeft},l.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),_.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let u=l;u<=a;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,l,a,u,v){const f=o.top,m=o.height,C=f+m;let L,D,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)}L=!1,D=this._context.viewLayout.getVerticalOffsetForLineNumber(N),I=this._context.viewLayout.getVerticalOffsetForLineNumber(P)+this._lineHeight}else if(a)L=!0,D=this._context.viewLayout.getVerticalOffsetForLineNumber(a.startLineNumber),I=this._context.viewLayout.getVerticalOffsetForLineNumber(a.endLineNumber)+this._lineHeight;else return-1;const T=(c==="mouse"||l)&&this._cursorSurroundingLinesStyle==="default";let O=0,R=0;if(T)l||(O=this._lineHeight);else{const N=Math.min(m/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}l||(v===0||v===4)&&(R+=this._lineHeight),D-=O,I+=R;let A;if(I-D>m){if(!L)return-1;A=D}else if(v===5||v===6)if(v===6&&f<=D&&I<=C)A=f;else{const N=Math.max(5*this._lineHeight,m*.2),P=D-N,x=I-m;A=Math.max(x,P)}else if(v===1||v===2)if(v===2&&f<=D&&I<=C)A=f;else{const N=(D+I)/2;A=Math.max(0,N-m/2)}else A=this._computeMinimumScrolling(f,C,D,I,v===3,v===4);return A}_computeScrollLeftToReveal(o){const c=this._context.viewLayout.getCurrentViewport(),l=this._context.configuration.options.get(139),a=c.left,u=a+c.width-l.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 L of C.ranges)v=Math.min(v,Math.round(L.left)),f=Math.max(f,Math.round(L.left+L.width))}else for(const C of o.selections){if(C.startLineNumber!==C.endLineNumber)return null;const L=this._visibleRangesForLineRange(C.startLineNumber,C.startColumn,C.endColumn);if(!L)return null;for(const D of L.ranges)v=Math.min(v,Math.round(D.left)),f=Math.max(f,Math.round(D.left+D.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(a,u,v,f),maxHorizontalOffset:f}}_computeMinimumScrolling(o,c,l,a,u,v){o=o|0,c=c|0,l=l|0,a=a|0,u=!!u,v=!!v;const f=c-o;if(a-l<f){if(u)return l;if(v)return Math.max(0,a-f);if(l<o)return l;if(a>c)return Math.max(0,a-f)}else return l;return o}}e.ViewLines=d,d.HORIZONTAL_EXTRA_PX=30}),define(X[24],ee([1,0,6,2,8,35,92]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.themeColorFromId=e.IThemeService=void 0,e.IThemeService=(0,y.createDecorator)("themeService");function b(i){return{id:i}}e.themeColorFromId=b;function 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(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),(0,k.toDisposable)(()=>{const r=this.themingParticipants.indexOf(s);this.themingParticipants.splice(r,1)})}getThemingParticipants(){return this.themingParticipants}}const p=new g;E.Registry.add(e.Extensions.ThemingContribution,p);function n(i){return p.onColorThemeChange(i)}e.registerThemingParticipant=n;class t extends k.Disposable{constructor(s){super(),this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(r=>this.onThemeChange(r)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}e.Themable=t}),define(X[810],ee([1,0,6,2,60,24]),function(K,e,_,k,y,E){"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 y.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 p=this.listCodeEditors();for(const n of p){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(g=n)}return g}removeDecorationType(g){const p=this._decorationOptionProviders.get(g);p&&(p.refCount--,p.refCount<=0&&(this._decorationOptionProviders.delete(g),p.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(g))))}setModelProperty(g,p,n){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(p,n)}getModelProperty(g,p){const n=g.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(p)}openCodeEditor(g,p,n){return we(this,void 0,void 0,function*(){for(const t of this._codeEditorOpenHandlers){const i=yield t(g,p,n);if(i!==null)return i}return null})}registerCodeEditorOpenHandler(g){const p=this._codeEditorOpenHandlers.unshift(g);return(0,k.toDisposable)(p)}};e.AbstractCodeEditorService=w=Me([fe(0,E.IThemeService)],w);class b{constructor(g){this._styleSheet=g}}e.GlobalStyleSheet=b}),define(X[811],ee([1,0,7,36,78,54,24]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class b extends E.ViewPart{constructor(g,p,n,t){super(g);const i=this._context.configuration.options,s=i.get(98),r=i.get(72),d=i.get(38),h=i.get(101),o={listenOnDomNode:n.domNode,className:"editor-scrollable "+(0,w.getThemeTypeSelector)(g.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:d,scrollPredominantAxis:h,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new y.SmoothScrollableElement(p.domNode,o,this._context.viewLayout.getScrollable())),E.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,k.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(l,a,u)=>{const v={};if(a){const f=l.scrollTop;f&&(v.scrollTop=this._context.viewLayout.getCurrentScrollTop()+f,l.scrollTop=0)}if(u){const f=l.scrollLeft;f&&(v.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+f,l.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(v,1)};this._register(_.addDisposableListener(n.domNode,"scroll",l=>c(n.domNode,!0,!0))),this._register(_.addDisposableListener(p.domNode,"scroll",l=>c(p.domNode,!0,!1))),this._register(_.addDisposableListener(t.domNode,"scroll",l=>c(t.domNode,!0,!1))),this._register(_.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",l=>c(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const g=this._context.configuration.options,p=g.get(139);this.scrollbarDomNode.setLeft(p.contentLeft),g.get(70).side==="right"?this.scrollbarDomNode.setWidth(p.contentWidth+p.minimap.minimapWidth):this.scrollbarDomNode.setWidth(p.contentWidth),this.scrollbarDomNode.setHeight(p.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(g){this.scrollbar.delegateVerticalScrollbarPointerDown(g)}delegateScrollFromMouseWheelEvent(g){this.scrollbar.delegateScrollFromMouseWheelEvent(g)}onConfigurationChanged(g){if(g.hasChanged(98)||g.hasChanged(72)||g.hasChanged(38)){const p=this._context.configuration.options,n=p.get(98),t=p.get(72),i=p.get(38),s=p.get(101),r={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:t,fastScrollSensitivity:i,scrollPredominantAxis:s};this.scrollbar.updateOptions(r)}return g.hasChanged(139)&&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(X[812],ee([1,0,107,33,24,411]),function(K,e,_,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class E{constructor(t){this.left=t.left,this.width=t.width,this.startStyle=null,this.endStyle=null}}class w{constructor(t,i){this.lineNumber=t,this.ranges=i}}function b(n){return new E(n)}function S(n){return new w(n.lineNumber,n.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(96),this._typicalHalfwidthCharacterWidth=i.get(48).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){const i=this._context.configuration.options;return this._lineHeight=i.get(64),this._roundedSelection=i.get(96),this._typicalHalfwidthCharacterWidth=i.get(48).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(t){return this._selections=t.selections.slice(0),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged}onZonesChanged(t){return!0}_visibleRangesHaveGaps(t){for(let i=0,s=t.length;i<s;i++)if(t[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(t,i,s){const r=this._typicalHalfwidthCharacterWidth/4;let d=null,h=null;if(s&&s.length>0&&i.length>0){const o=i[0].lineNumber;if(o===t.startLineNumber)for(let l=0;!d&&l<s.length;l++)s[l].lineNumber===o&&(d=s[l].ranges[0]);const c=i[i.length-1].lineNumber;if(c===t.endLineNumber)for(let l=s.length-1;!h&&l>=0;l--)s[l].lineNumber===c&&(h=s[l].ranges[0]);d&&!d.startStyle&&(d=null),h&&!h.startStyle&&(h=null)}for(let o=0,c=i.length;o<c;o++){const l=i[o].ranges[0],a=l.left,u=l.left+l.width,v={top:0,bottom:0},f={top:0,bottom:0};if(o>0){const m=i[o-1].ranges[0].left,C=i[o-1].ranges[0].left+i[o-1].ranges[0].width;p(a-m)<r?v.top=2:a>m&&(v.top=1),p(u-C)<r?f.top=2:m<u&&u<C&&(f.top=1)}else d&&(v.top=d.startStyle.top,f.top=d.endStyle.top);if(o+1<c){const m=i[o+1].ranges[0].left,C=i[o+1].ranges[0].left+i[o+1].ranges[0].width;p(a-m)<r?v.bottom=2:m<a&&a<C&&(v.bottom=1),p(u-C)<r?f.bottom=2:u<C&&(f.bottom=1)}else h&&(v.bottom=h.startStyle.bottom,f.bottom=h.endStyle.bottom);l.startStyle=v,l.endStyle=f}}_getVisibleRangesWithStyle(t,i,s){const d=(i.linesVisibleRangesForRange(t,!0)||[]).map(S);return!this._visibleRangesHaveGaps(d)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,d,s),d}_createSelectionPiece(t,i,s,r,d){return'<div class="cslr '+s+'" style="top:'+t.toString()+"px;left:"+r.toString()+"px;width:"+d.toString()+"px;height:"+i+'px;"></div>'}_actualRenderOneSelection(t,i,s,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,l=r[r.length-1].lineNumber;for(let a=0,u=r.length;a<u;a++){const v=r[a],f=v.lineNumber,m=f-i,C=s&&(f===l||f===c)?o:h,L=s&&f===c?1:0;let D="",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){D+=this._createSelectionPiece(L,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),D+=this._createSelectionPiece(L,C,x,R.left-g.ROUNDED_PIECE_WIDTH,g.ROUNDED_PIECE_WIDTH)}if(P.top===1||P.bottom===1){D+=this._createSelectionPiece(L,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),D+=this._createSelectionPiece(L,C,x,R.left+R.width,g.ROUNDED_PIECE_WIDTH)}}let A=g.SELECTION_CLASS_NAME;if(d){const N=R.startStyle,P=R.endStyle;N.top===0&&(A+=" "+g.SELECTION_TOP_LEFT),N.bottom===0&&(A+=" "+g.SELECTION_BOTTOM_LEFT),P.top===0&&(A+=" "+g.SELECTION_TOP_RIGHT),P.bottom===0&&(A+=" "+g.SELECTION_BOTTOM_RIGHT)}I+=this._createSelectionPiece(L,C,A,R.left,R.width)}t[m][0]+=D,t[m][1]+=I}}prepareRender(t){const i=[],s=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber;for(let h=s;h<=r;h++){const o=h-s;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 l=this._getVisibleRangesWithStyle(c,t,this._previousFrameVisibleRangesWithStyle[h]);d[h]=l,this._actualRenderOneSelection(i,s,this._selections.length>1,l)}this._previousFrameVisibleRangesWithStyle=d,this._renderResult=i.map(([h,o])=>h+o)}render(t,i){if(!this._renderResult)return"";const s=i-t;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}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,y.registerThemingParticipant)((n,t)=>{const i=n.getColor(k.editorSelectionForeground);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)});function p(n){return n<0?-n:n}}),define(X[74],ee([1,0,596,37,33,24]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorUnicodeHighlightBackground=e.editorUnicodeHighlightBorder=e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextBackground=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorDimmedLineNumber=e.editorActiveLineNumber=e.editorLineNumbers=e.editorActiveIndentGuides=e.editorIndentGuides=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,y.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(0,null)),e.editorLineHighlightBorder=(0,y.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:y.contrastBorder},_.localize(1,null)),e.editorRangeHighlight=(0,y.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},_.localize(2,null),!0),e.editorRangeHighlightBorder=(0,y.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},_.localize(3,null),!0),e.editorSymbolHighlight=(0,y.registerColor)("editor.symbolHighlightBackground",{dark:y.editorFindMatchHighlight,light:y.editorFindMatchHighlight,hcDark:null,hcLight:null},_.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,y.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},_.localize(5,null),!0),e.editorCursorForeground=(0,y.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:k.Color.black,hcDark:k.Color.white,hcLight:"#0F4A85"},_.localize(6,null)),e.editorCursorBackground=(0,y.registerColor)("editorCursor.background",null,_.localize(7,null)),e.editorWhitespaces=(0,y.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},_.localize(8,null)),e.editorIndentGuides=(0,y.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},_.localize(9,null)),e.editorActiveIndentGuides=(0,y.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},_.localize(10,null)),e.editorLineNumbers=(0,y.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:k.Color.white,hcLight:"#292929"},_.localize(11,null));const w=(0,y.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},_.localize(12,null),!1,_.localize(13,null));e.editorActiveLineNumber=(0,y.registerColor)("editorLineNumber.activeForeground",{dark:w,light:w,hcDark:w,hcLight:w},_.localize(14,null)),e.editorDimmedLineNumber=(0,y.registerColor)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(15,null)),e.editorRuler=(0,y.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:k.Color.lightgrey,hcDark:k.Color.white,hcLight:"#292929"},_.localize(16,null)),e.editorCodeLensForeground=(0,y.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},_.localize(17,null)),e.editorBracketMatchBackground=(0,y.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},_.localize(18,null)),e.editorBracketMatchBorder=(0,y.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:y.contrastBorder,hcLight:y.contrastBorder},_.localize(19,null)),e.editorOverviewRulerBorder=(0,y.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},_.localize(20,null)),e.editorOverviewRulerBackground=(0,y.registerColor)("editorOverviewRuler.background",null,_.localize(21,null)),e.editorGutter=(0,y.registerColor)("editorGutter.background",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},_.localize(22,null)),e.editorUnnecessaryCodeBorder=(0,y.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:y.contrastBorder},_.localize(23,null)),e.editorUnnecessaryCodeOpacity=(0,y.registerColor)("editorUnnecessaryCode.opacity",{dark:k.Color.fromHex("#000a"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},_.localize(24,null)),e.ghostTextBorder=(0,y.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:k.Color.fromHex("#292929").transparent(.8)},_.localize(25,null)),e.ghostTextForeground=(0,y.registerColor)("editorGhostText.foreground",{dark:k.Color.fromHex("#ffffff56"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},_.localize(26,null)),e.ghostTextBackground=(0,y.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,y.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:b,light:b,hcDark:b,hcLight:b},_.localize(28,null),!0),e.overviewRulerError=(0,y.registerColor)("editorOverviewRuler.errorForeground",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},_.localize(29,null)),e.overviewRulerWarning=(0,y.registerColor)("editorOverviewRuler.warningForeground",{dark:y.editorWarningForeground,light:y.editorWarningForeground,hcDark:y.editorWarningBorder,hcLight:y.editorWarningBorder},_.localize(30,null)),e.overviewRulerInfo=(0,y.registerColor)("editorOverviewRuler.infoForeground",{dark:y.editorInfoForeground,light:y.editorInfoForeground,hcDark:y.editorInfoBorder,hcLight:y.editorInfoBorder},_.localize(31,null)),e.editorBracketHighlightingForeground1=(0,y.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},_.localize(32,null)),e.editorBracketHighlightingForeground2=(0,y.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},_.localize(33,null)),e.editorBracketHighlightingForeground3=(0,y.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},_.localize(34,null)),e.editorBracketHighlightingForeground4=(0,y.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(35,null)),e.editorBracketHighlightingForeground5=(0,y.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(36,null)),e.editorBracketHighlightingForeground6=(0,y.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(37,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,y.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new k.Color(new k.RGBA(255,18,18,.8)),light:new k.Color(new k.RGBA(255,18,18,.8)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:""},_.localize(38,null)),e.editorBracketPairGuideBackground1=(0,y.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(39,null)),e.editorBracketPairGuideBackground2=(0,y.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(40,null)),e.editorBracketPairGuideBackground3=(0,y.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(41,null)),e.editorBracketPairGuideBackground4=(0,y.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(42,null)),e.editorBracketPairGuideBackground5=(0,y.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(43,null)),e.editorBracketPairGuideBackground6=(0,y.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(44,null)),e.editorBracketPairGuideActiveBackground1=(0,y.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(45,null)),e.editorBracketPairGuideActiveBackground2=(0,y.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(46,null)),e.editorBracketPairGuideActiveBackground3=(0,y.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(47,null)),e.editorBracketPairGuideActiveBackground4=(0,y.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(48,null)),e.editorBracketPairGuideActiveBackground5=(0,y.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(49,null)),e.editorBracketPairGuideActiveBackground6=(0,y.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(50,null)),e.editorUnicodeHighlightBorder=(0,y.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},_.localize(51,null)),e.editorUnicodeHighlightBackground=(0,y.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},_.localize(52,null)),(0,E.registerThemingParticipant)((S,g)=>{const p=S.getColor(y.editorBackground),n=S.getColor(e.editorLineHighlight),t=n&&!n.isTransparent()?n:p;t&&g.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${t}; }`)})}),define(X[813],ee([1,0,107,74,16,24,23,92,398]),function(K,e,_,k,y,E,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,s=i.get(139);this._lineHeight=i.get(64),this._renderLineHighlight=i.get(91),this._renderLineHighlightOnlyWhenFocus=i.get(92),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new w.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let t=!1;const i=this._selections.map(r=>r.positionLineNumber);i.sort((r,d)=>r-d),y.equals(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,t=!0);const s=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,t=!0),t}onThemeChanged(t){return this._readFromSelections()}onConfigurationChanged(t){const i=this._context.configuration.options,s=i.get(139);return this._lineHeight=i.get(64),this._renderLineHighlight=i.get(91),this._renderLineHighlightOnlyWhenFocus=i.get(92),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,!0}onCursorStateChanged(t){return this._selections=t.selections,this._readFromSelections()}onFlushed(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollWidthChanged||t.scrollTopChanged}onZonesChanged(t){return!0}onFocusChanged(t){return this._renderLineHighlightOnlyWhenFocus?(this._focused=t.isFocused,!0):!1}prepareRender(t){if(!this._shouldRenderThis()){this._renderData=null;return}const i=this._renderOne(t),s=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber,d=this._cursorLineNumbers.length;let h=0;const o=[];for(let c=s;c<=r;c++){const l=c-s;for(;h<d&&this._cursorLineNumbers[h]<c;)h++;h<d&&this._cursorLineNumbers[h]===c?o[l]=i:o[l]=""}this._renderData=o}render(t,i){if(!this._renderData)return"";const s=i-t;return s>=this._renderData.length?"":this._renderData[s]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.AbstractLineHighlightOverlay=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 p 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=p,(0,E.registerThemingParticipant)((n,t)=>{const i=n.getColor(k.editorLineHighlight);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||n.defines(k.editorLineHighlightBorder)){const s=n.getColor(k.editorLineHighlightBorder);s&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${s}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${s}; }`),(0,b.isHighContrast)(n.type)&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(X[814],ee([1,0,107,74,24,12,16,18,271,200,401]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class p extends _.DynamicViewOverlay{constructor(i){super(),this._context=i,this._primaryPosition=null;const s=this._context.configuration.options,r=s.get(140),d=s.get(48);this._lineHeight=s.get(64),this._spaceWidth=d.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=s.get(14),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(i){const s=this._context.configuration.options,r=s.get(140),d=s.get(48);return this._lineHeight=s.get(64),this._spaceWidth=d.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=s.get(14),!0}onCursorStateChanged(i){var s;const d=i.selections[0].getPosition();return!((s=this._primaryPosition)===null||s===void 0)&&s.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 s,r,d,h;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const o=i.visibleRange.startLineNumber,c=i.visibleRange.endLineNumber,l=i.scrollWidth,a=this._lineHeight,u=this._primaryPosition,v=this.getGuidesByLine(o,Math.min(c+1,this._context.viewModel.getLineCount()),u),f=[];for(let m=o;m<=c;m++){const C=m-o,L=v[C];let D="";const I=(r=(s=i.visibleRangeForPosition(new E.Position(m,1)))===null||s===void 0?void 0:s.left)!==null&&r!==void 0?r:0;for(const T of L){const O=T.column===-1?I+(T.visibleColumn-1)*this._spaceWidth:i.visibleRangeForPosition(new E.Position(m,T.column)).left;if(O>l||this._maxIndentLeft>0&&O>this._maxIndentLeft)break;const R=T.horizontalLine?T.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",A=T.horizontalLine?((h=(d=i.visibleRangeForPosition(new E.Position(m,T.horizontalLine.endColumn)))===null||d===void 0?void 0:d.left)!==null&&h!==void 0?h:O+this._spaceWidth)-O:this._spaceWidth;D+=`<div class="core-guide ${T.className} ${R}" style="left:${O}px;height:${a}px;width:${A}px"></div>`}f[C]=D}this._renderResult=f}getGuidesByLine(i,s,r){const d=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(i,s,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,s):null;let o=0,c=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&r){const v=this._context.viewModel.getActiveIndentGuide(r.lineNumber,i,s);o=v.startLineNumber,c=v.endLineNumber,l=v.indent}const{indentSize:a}=this._context.viewModel.model.getOptions(),u=[];for(let v=i;v<=s;v++){const f=new Array;u.push(f);const m=d?d[v-i]:[],C=new w.ArrayQueue(m),L=h?h[v-i]:0;for(let D=1;D<=L;D++){const I=(D-1)*a+1,T=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||m.length===0)&&o<=v&&v<=c&&D===l;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(D=>!0)||[])}return u}render(i,s){if(!this._renderResult)return"";const r=s-i;return r<0||r>=this._renderResult.length?"":this._renderResult[r]}}e.IndentGuidesOverlay=p;function n(t){if(!(t&&t.isTransparent()))return t}(0,y.registerThemingParticipant)((t,i)=>{const s=[{bracketColor:k.editorBracketHighlightingForeground1,guideColor:k.editorBracketPairGuideBackground1,guideColorActive:k.editorBracketPairGuideActiveBackground1},{bracketColor:k.editorBracketHighlightingForeground2,guideColor:k.editorBracketPairGuideBackground2,guideColorActive:k.editorBracketPairGuideActiveBackground2},{bracketColor:k.editorBracketHighlightingForeground3,guideColor:k.editorBracketPairGuideBackground3,guideColorActive:k.editorBracketPairGuideActiveBackground3},{bracketColor:k.editorBracketHighlightingForeground4,guideColor:k.editorBracketPairGuideBackground4,guideColorActive:k.editorBracketPairGuideActiveBackground4},{bracketColor:k.editorBracketHighlightingForeground5,guideColor:k.editorBracketPairGuideBackground5,guideColorActive:k.editorBracketPairGuideActiveBackground5},{bracketColor:k.editorBracketHighlightingForeground6,guideColor:k.editorBracketPairGuideBackground6,guideColorActive:k.editorBracketPairGuideActiveBackground6}],r=new S.BracketPairGuidesClassNames,d=s.map(h=>{var o,c;const l=t.getColor(h.bracketColor),a=t.getColor(h.guideColor),u=t.getColor(h.guideColorActive),v=n((o=n(a))!==null&&o!==void 0?o:l?.transparent(.3)),f=n((c=n(u))!==null&&c!==void 0?c:l);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(X[339],ee([1,0,17,107,12,24,74,402]),function(K,e,_,k,y,E,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 y.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 p=g.get(65);this._renderLineNumbers=p.renderType,this._renderCustomLineNumbers=p.renderFn,this._renderFinalNewline=g.get(90);const n=g.get(139);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(g){return this._readConfig(),!0}onCursorStateChanged(g){const p=g.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(p);let n=!1;return this._activeLineNumber!==p.lineNumber&&(this._activeLineNumber=p.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(g){return!0}onLinesChanged(g){return!0}onLinesDeleted(g){return!0}onLinesInserted(g){return!0}onScrollChanged(g){return g.scrollTopChanged}onZonesChanged(g){return!0}_getLineRenderLineNumber(g){const p=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new y.Position(g,1));if(p.column!==1)return"";const n=p.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const t=Math.abs(this._lastCursorModelPosition.lineNumber-n);return t===0?'<span class="relative-current-line-number">'+n+"</span>":String(t)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(g){if(this._renderLineNumbers===0){this._renderResult=null;return}const p=_.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=g.visibleRange.startLineNumber,t=g.visibleRange.endLineNumber,i=this._context.viewModel.getLineCount(),s=[];for(let r=n;r<=t;r++){const d=r-n,h=this._getLineRenderLineNumber(r);if(!h){s[d]="";continue}let o="";if(r===i&&this._context.viewModel.getLineLength(r)===0){if(this._renderFinalNewline==="off"){s[d]="";continue}this._renderFinalNewline==="dimmed"&&(o=" dimmed-line-number")}r===this._activeLineNumber&&(o=" active-line-number"),s[d]=`<div class="${b.CLASS_NAME}${p}${o}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${h}</div>`}this._renderResult=s}render(g,p){if(!this._renderResult)return"";const n=p-g;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}e.LineNumbersOverlay=b,b.CLASS_NAME="line-numbers",(0,E.registerThemingParticipant)((S,g)=>{const p=S.getColor(w.editorLineNumbers),n=S.getColor(w.editorDimmedLineNumber);n?g.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):p&&g.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${p.transparent(.4)}; }`)})}),define(X[815],ee([1,0,585,47,36,17,9,75,220,259,54,339,273,41,138,12,5,23,166,31,37,287,396]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class u{constructor(L,D,I,T,O){this._context=L,this.modelLineNumber=D,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(L){const D=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(D),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(I),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=L.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=L.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(L){return this._previousPresentation||(L?this._previousPresentation=L:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const v=k.isFirefox;class f extends p.ViewPart{constructor(L,D,I){super(L),this._primaryCursorPosition=new r.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=D,this._visibleRangeProvider=I,this._scrollLeft=0,this._scrollTop=0;const T=this._context.configuration.options,O=T.get(139);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,y.createFastDomNode)(document.createElement("textarea")),p.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:R}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${R*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(T)),this.textArea.setAttribute("tabindex",String(T.get(119))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",_.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,y.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const A={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,E.isWindows),F=this._context.viewModel.model.getEOL(),B=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),V=Array.isArray(x)?x:null,$=Array.isArray(x)?x.join(F):x;let M,Q=null;if(S.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&$.length<65536){const ie=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);ie&&(M=ie.html,Q=ie.mode)}return{isFromEmptySelection:B,multicursorText:V,text:$,html:M,mode:Q}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const x=this._selections[0];if(E.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(E.isMacintosh&&!x.isEmpty()&&A.getValueLengthInRange(x,0)<F){const B=A.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(A,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,E.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:$}=(()=>{const Q=F.value.substring(0,Math.min(F.selectionStart,F.selectionEnd)),ie=Q.lastIndexOf(`
- `),re=Q.substring(ie+1),ne=re.lastIndexOf(" "),se=re.length-ne-1,H=B.getStartPosition(),W=Math.min(H.column-1,se),q=H.column-1-W,Z=re.substring(0,re.length-W),{tabSize:Y}=this._context.viewModel.model.getOptions(),oe=m(Z,this._fontInfo,Y);return{distanceToModelLineStart:q,widthOfHiddenTextBefore:oe}})(),{distanceToModelLineEnd:M}=(()=>{const Q=F.value.substring(Math.max(F.selectionStart,F.selectionEnd)),ie=Q.indexOf(`
- `),re=ie===-1?Q:Q.substring(0,ie),ne=re.indexOf(" "),se=ne===-1?re.length:re.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,$,M),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(a.IME.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(L){this._textAreaInput.writeScreenReaderContent(L)}dispose(){super.dispose()}_getAndroidWordAtPosition(L){const D='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',I=this._context.viewModel.getLineContent(L.lineNumber),T=(0,s.getMapForWordSeparators)(D);let O=!0,R=L.column,A=!0,N=L.column,P=0;for(;P<50&&(O||A);){if(O&&R<=1&&(O=!1),O){const x=I.charCodeAt(R-2);T.get(x)!==0?O=!1:R--}if(A&&N>I.length&&(A=!1),A){const x=I.charCodeAt(N-1);T.get(x)!==0?A=!1:N++}P++}return[I.substring(R-1,N-1),L.column-R]}_getWordBeforePosition(L){const D=this._context.viewModel.getLineContent(L.lineNumber),I=(0,s.getMapForWordSeparators)(this._context.configuration.options.get(125));let T=L.column,O=0;for(;T>1;){const R=D.charCodeAt(T-2);if(I.get(R)!==0||O>50)return D.substring(T-1,L.column-1);O++,T--}return D.substring(0,L.column-1)}_getCharacterBeforePosition(L){if(L.column>1){const I=this._context.viewModel.getLineContent(L.lineNumber).charAt(L.column-2);if(!w.isHighSurrogate(I.charCodeAt(0)))return I}return""}_getAriaLabel(L){return L.get(2)===1?_.localize(1,null,E.isLinux?"Shift+Alt+F1":"Alt+F1"):L.get(4)}_setAccessibilityOptions(L){this._accessibilitySupport=L.get(2);const D=L.get(3);this._accessibilitySupport===2&&D===i.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=D;const T=L.get(139).wrappingColumn;if(T!==-1&&this._accessibilitySupport!==1){const O=L.get(48);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(T*O.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=v?0:1}onConfigurationChanged(L){const D=this._context.configuration.options,I=D.get(139);this._setAccessibilityOptions(D),this._contentLeft=I.contentLeft,this._contentWidth=I.contentWidth,this._contentHeight=I.height,this._fontInfo=D.get(48),this._lineHeight=D.get(64),this._emptySelectionClipboard=D.get(35),this._copyWithSyntaxHighlighting=D.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(D)),this.textArea.setAttribute("tabindex",String(D.get(119))),(L.hasChanged(32)||L.hasChanged(87))&&this._ensureReadOnlyAttribute(),L.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(L){return this._selections=L.selections.slice(0),this._modelSelections=L.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(L){return!0}onFlushed(L){return!0}onLinesChanged(L){return!0}onLinesDeleted(L){return!0}onLinesInserted(L){return!0}onScrollChanged(L){return this._scrollLeft=L.scrollLeft,this._scrollTop=L.scrollTop,!0}onZonesChanged(L){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(L){L.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",L.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),L.role&&this.textArea.setAttribute("role",L.role)}_ensureReadOnlyAttribute(){const L=this._context.configuration.options;!a.IME.enabled||L.get(32)&&L.get(87)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(L){var D;this._primaryCursorPosition=new r.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=L.visibleRangeForPosition(this._primaryCursorPosition),(D=this._visibleTextArea)===null||D===void 0||D.prepareRender(L)}render(L){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var L;if(this._visibleTextArea){const T=this._visibleTextArea.visibleTextareaStart,O=this._visibleTextArea.visibleTextareaEnd,R=this._visibleTextArea.startPosition,A=this._visibleTextArea.endPosition;if(R&&A&&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 re=this._contentLeft-F;F+=re,x+=re,B-=re}B>this._contentWidth&&(B=this._contentWidth);const V=this._context.viewModel.getViewLineData(R.lineNumber),$=V.tokens.findTokenIndexAtOffset(R.column-1),M=V.tokens.findTokenIndexAtOffset(A.column-1),Q=$===M,ie=this._visibleTextArea.definePresentation(Q?V.tokens.getPresentation($):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 D=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(D<this._contentLeft||D>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(E.isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:I,left:this._textAreaWrapping?this._contentLeft:D,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const T=(L=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&L!==void 0?L:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=T*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:I,left:this._textAreaWrapping?this._contentLeft:D,width:this._textAreaWidth,height:v?0:1,useCover:!1})}_newlinecount(L){let D=0,I=-1;do{if(I=L.indexOf(`
- `,I+1),I===-1)break;D++}while(!0);return D}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:v?0:1,useCover:!0})}_doRender(L){this._lastRenderPosition=L.lastRenderPosition;const D=this.textArea,I=this.textAreaCover;(0,b.applyFontInfo)(D,this._fontInfo),D.setTop(L.top),D.setLeft(L.left),D.setWidth(L.width),D.setHeight(L.height),D.setColor(L.color?l.Color.Format.CSS.formatHex(L.color):""),D.setFontStyle(L.italic?"italic":""),L.bold&&D.setFontWeight("bold"),D.setTextDecoration(`${L.underline?" underline":""}${L.strikethrough?" line-through":""}`),I.setTop(L.useCover?L.top:0),I.setLeft(L.useCover?L.left:0),I.setWidth(L.useCover?L.width:0),I.setHeight(L.useCover?L.height:0);const T=this._context.configuration.options;T.get(55)?I.setClassName("monaco-editor-background textAreaCover "+t.Margin.OUTER_CLASS_NAME):T.get(65).renderType!==0?I.setClassName("monaco-editor-background textAreaCover "+n.LineNumbersOverlay.CLASS_NAME):I.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=f;function m(C,L,D){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,L),T.style.whiteSpace="pre",T.style.tabSize=`${D*L.spaceWidth}px`,T.append(C),I.appendChild(T),document.body.appendChild(I);const O=T.offsetWidth;return document.body.removeChild(I),O}}),define(X[816],ee([1,0,36,37,54,12,31,74,81]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class g{constructor(t,i){const s=t.options;this.lineHeight=s.get(64),this.pixelRatio=s.get(137),this.overviewRulerLanes=s.get(80),this.renderBorder=s.get(79);const r=i.getColor(b.editorOverviewRulerBorder);this.borderColor=r?r.toString():null,this.hideCursor=s.get(57);const d=i.getColor(b.editorCursorForeground);this.cursorColor=d?d.transparent(.7).toString():null,this.themeType=i.type;const h=s.get(70),o=h.enabled,c=h.side,l=i.getColor(b.editorOverviewRulerBackground),a=w.TokenizationRegistry.getDefaultBackground();l?this.backgroundColor=l:o&&c==="right"?this.backgroundColor=a:this.backgroundColor=null;const v=s.get(139).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,m]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=f,this.w=m}_initLanes(t,i,s){const r=i-t;if(s>=3){const d=Math.floor(r/3),h=Math.floor(r/3),o=r-d-h,c=t,l=c+d,a=c+d+o;return[[0,c,l,c,a,c,l,c],[0,d,o,d+o,h,d+o+h,o+h,d+o+h]]}else if(s===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 p extends y.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,s=t.selections.length;i<s;i++)this._cursorPositions[i]=t.selections[i].getPosition();return this._cursorPositions.sort(E.Position.compare),!0}onDecorationsChanged(t){return!!t.affectsOverviewRuler}onFlushed(t){return!0}onScrollChanged(t){return t.scrollHeightChanged}onZonesChanged(t){return!0}onThemeChanged(t){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(t){}render(t){this._render()}_render(){const t=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(t?k.Color.Format.CSS.formatHexA(t):""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const i=this._settings.canvasWidth,s=this._settings.canvasHeight,r=this._settings.lineHeight,d=this._context.viewLayout,h=this._context.viewLayout.getScrollHeight(),o=s/h,c=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),l=6*this._settings.pixelRatio|0,a=l/2|0,u=this._domNode.domNode.getContext("2d");t?t.isOpaque()?(u.fillStyle=k.Color.Format.CSS.formatHexA(t),u.fillRect(0,0,i,s)):(u.clearRect(0,0,i,s),u.fillStyle=k.Color.Format.CSS.formatHexA(t),u.fillRect(0,0,i,s)):u.clearRect(0,0,i,s);const v=this._settings.x,f=this._settings.w;c.sort(S.OverviewRulerDecorationsGroup.cmp);for(const m of c){const C=m.color,L=m.data;u.fillStyle=C;let D=0,I=0,T=0;for(let O=0,R=L.length/3;O<R;O++){const A=L[3*O],N=L[3*O+1],P=L[3*O+2];let x=d.getVerticalOffsetForLineNumber(N)*o|0,F=(d.getVerticalOffsetForLineNumber(P)+r)*o|0;if(F-x<l){let V=(x+F)/2|0;V<a?V=a:V+a>s&&(V=s-a),x=V-a,F=V+a}x>T+1||A!==D?(O!==0&&u.fillRect(v[D],I,f[D],T-I),D=A,I=x,T=F):F>T&&(T=F)}u.fillRect(v[D],I,f[D],T-I)}if(!this._settings.hideCursor&&this._settings.cursorColor){const m=2*this._settings.pixelRatio|0,C=m/2|0,L=this._settings.x[7],D=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 A=this._cursorPositions[O];let N=d.getVerticalOffsetForLineNumber(A.lineNumber)*o|0;N<C?N=C:N+C>s&&(N=s-C);const P=N-C,x=P+m;P>T+1?(O!==0&&u.fillRect(L,I,D,T-I),I=P,T=x):x>T&&(T=x)}u.fillRect(L,I,D,T-I)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,s),u.stroke(),u.moveTo(0,0),u.lineTo(i,0),u.stroke())}}e.DecorationsOverviewRuler=p}),define(X[817],ee([1,0,36,13,54,595,41,74,24,92,412]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class p extends y.ViewPart{constructor(t){super(t);const i=this._context.configuration.options;this._readOnly=i.get(87),this._cursorBlinking=i.get(24),this._cursorStyle=i.get(26),this._cursorSmoothCaretAnimation=i.get(25),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new E.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(87),this._cursorBlinking=i.get(24),this._cursorStyle=i.get(26),this._cursorSmoothCaretAnimation=i.get(25),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(t);for(let s=0,r=this._secondaryCursors.length;s<r;s++)this._secondaryCursors[s].onConfigurationChanged(t);return!0}_onCursorPositionChanged(t,i,s){const r=this._secondaryCursors.length!==i.length||this._cursorSmoothCaretAnimation==="explicit"&&s!==3;if(this._primaryCursor.onCursorPositionChanged(t,r),this._updateBlinking(),this._secondaryCursors.length<i.length){const d=i.length-this._secondaryCursors.length;for(let h=0;h<d;h++){const o=new E.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 s=t.selections[0].isEmpty();return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,this._updateDomClassName()),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onFocusChanged(t){return this._editorHasFocus=t.isFocused,this._updateBlinking(),!1}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return!0}onTokensChanged(t){const i=s=>{for(let r=0,d=t.ranges.length;r<d;r++)if(t.ranges[r].fromLineNumber<=s.lineNumber&&s.lineNumber<=t.ranges[r].toLineNumber)return!0;return!1};if(i(this._primaryCursor.getPosition()))return!0;for(const s of this._secondaryCursors)if(i(s.getPosition()))return!0;return!1}onZonesChanged(t){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const t=this._getCursorBlinking(),i=t===0,s=t===5;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!i&&!s&&(t===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},p.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},p.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let t="cursors-layer";switch(this._selectionIsEmpty||(t+=" has-selection"),this._cursorStyle){case w.TextEditorCursorStyle.Line:t+=" cursor-line-style";break;case w.TextEditorCursorStyle.Block:t+=" cursor-block-style";break;case w.TextEditorCursorStyle.Underline:t+=" cursor-underline-style";break;case w.TextEditorCursorStyle.LineThin:t+=" cursor-line-thin-style";break;case w.TextEditorCursorStyle.BlockOutline:t+=" cursor-block-outline-style";break;case w.TextEditorCursorStyle.UnderlineThin:t+=" cursor-underline-thin-style";break;default:t+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:t+=" cursor-blink";break;case 2:t+=" cursor-smooth";break;case 3:t+=" cursor-phase";break;case 4:t+=" cursor-expand";break;case 5:t+=" cursor-solid";break;default:t+=" cursor-solid"}else t+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(t+=" cursor-smooth-caret-animation"),t}_show(){this._primaryCursor.show();for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].hide();this._isVisible=!1}prepareRender(t){this._primaryCursor.prepareRender(t);for(let i=0,s=this._secondaryCursors.length;i<s;i++)this._secondaryCursors[i].prepareRender(t)}render(t){const i=[];let s=0;const r=this._primaryCursor.render(t);r&&(i[s++]=r);for(let d=0,h=this._secondaryCursors.length;d<h;d++){const o=this._secondaryCursors[d].render(t);o&&(i[s++]=o)}this._renderData=i}getLastRenderData(){return this._renderData}}e.ViewCursors=p,p.BLINK_INTERVAL=500,(0,S.registerThemingParticipant)((n,t)=>{const i=n.getColor(b.editorCursorForeground);if(i){let s=n.getColor(b.editorCursorBackground);s||(s=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${s}; }`),(0,g.isHighContrast)(n.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}})}),define(X[818],ee([1,0,107,9,110,12,74,413]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WhitespaceOverlay=void 0;class b extends _.DynamicViewOverlay{constructor(p){super(),this._context=p,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(p){const n=new S(this._context.configuration);return this._options.equals(n)?p.hasChanged(139):(this._options=n,!0)}onCursorStateChanged(p){return this._selection=p.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(p){return!0}onFlushed(p){return!0}onLinesChanged(p){return!0}onLinesDeleted(p){return!0}onLinesInserted(p){return!0}onScrollChanged(p){return p.scrollTopChanged}onZonesChanged(p){return!0}prepareRender(p){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const n=p.visibleRange.startLineNumber,i=p.visibleRange.endLineNumber-n+1,s=new Array(i);for(let d=0;d<i;d++)s[d]=!0;const r=this._context.viewModel.getMinimapLinesRenderingData(p.viewportData.startLineNumber,p.viewportData.endLineNumber,s);this._renderResult=[];for(let d=p.viewportData.startLineNumber;d<=p.viewportData.endLineNumber;d++){const h=d-p.viewportData.startLineNumber,o=r.data[h];let c=null;if(this._options.renderWhitespace==="selection"){const l=this._selection;for(const a of l){if(a.endLineNumber<d||a.startLineNumber>d)continue;const u=a.startLineNumber===d?a.startColumn:o.minColumn,v=a.endLineNumber===d?a.endColumn:o.maxColumn;u<v&&(c||(c=[]),c.push(new y.LineRange(u-1,v-1)))}}this._renderResult[h]=this._applyRenderWhitespace(p,d,c,o)}}_applyRenderWhitespace(p,n,t,i){if(this._options.renderWhitespace==="selection"&&!t||this._options.renderWhitespace==="trailing"&&i.continuesWithWrappedLine)return"";const s=this._context.theme.getColor(w.editorWhitespaces),r=this._options.renderWithSVG,d=i.content,h=this._options.stopRenderingLineAfter===-1?d.length:Math.min(this._options.stopRenderingLineAfter,d.length),o=i.continuesWithWrappedLine,c=i.minColumn-1,l=this._options.renderWhitespace==="boundary",a=this._options.renderWhitespace==="trailing",u=this._options.lineHeight,v=this._options.middotWidth,f=this._options.wsmiddotWidth,m=this._options.spaceWidth,C=Math.abs(f-m),L=Math.abs(v-m),D=C<L?11825:183,I=this._options.canUseHalfwidthRightwardsArrow;let T="",O=!1,R=k.firstNonWhitespaceIndex(d),A;R===-1?(O=!0,R=h,A=h):A=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||a&&!O&&F<=A)continue;if(l&&F>=R&&F<=A&&B===32){const $=F-1>=0?d.charCodeAt(F-1):0,M=F+1<h?d.charCodeAt(F+1):0;if($!==32&&M!==32)continue}if(l&&o&&F===h-1){const $=F-1>=0?d.charCodeAt(F-1):0;if(B===32&&$!==32&&$!==9)continue}if(t&&(!P||P.startOffset>F||P.endOffset<=F))continue;const V=p.visibleRangeForPosition(new E.Position(n,F+1));V&&(r?(x=Math.max(x,V.left),B===9?T+=this._renderArrow(u,m,V.left):T+=`<circle cx="${(V.left+m/2).toFixed(2)}" cy="${(u/2).toFixed(2)}" r="${(m/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(D)}</div>`)}return r?(x=Math.round(x+m),`<svg style="position:absolute;width:${x}px;height:${u}px" viewBox="0 0 ${x} ${u}" xmlns="http://www.w3.org/2000/svg" fill="${s}">`+T+"</svg>"):T}_renderArrow(p,n,t){const i=n/7,s=n,r=p/2,d=t,h={x:0,y:i/2},o={x:100/125*s,y:h.y},c={x:o.x-.2*o.x,y:o.y+.2*o.x},l={x:c.x+.1*o.x,y:c.y+.1*o.x},a={x:l.x+.35*o.x,y:l.y-.35*o.x},u={x:a.x,y:-a.y},v={x:l.x,y:-l.y},f={x:c.x,y:-c.y},m={x:o.x,y:-o.y},C={x:h.x,y:-h.y};return`<path d="M ${[h,o,c,l,a,u,v,f,m,C].map(I=>`${(d+I.x).toFixed(2)} ${(r+I.y).toFixed(2)}`).join(" L ")}" />`}render(p,n){if(!this._renderResult)return"";const t=n-p;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.WhitespaceOverlay=b;class S{constructor(p){const n=p.options,t=n.get(48),i=n.get(36);i==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):i==="svg"?(this.renderWhitespace=n.get(94),this.renderWithSVG=!0):(this.renderWhitespace=n.get(94),this.renderWithSVG=!1),this.spaceWidth=t.spaceWidth,this.middotWidth=t.middotWidth,this.wsmiddotWidth=t.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(64),this.stopRenderingLineAfter=n.get(112)}equals(p){return this.renderWhitespace===p.renderWhitespace&&this.renderWithSVG===p.renderWithSVG&&this.spaceWidth===p.spaceWidth&&this.middotWidth===p.middotWidth&&this.wsmiddotWidth===p.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===p.canUseHalfwidthRightwardsArrow&&this.lineHeight===p.lineHeight&&this.stopRenderingLineAfter===p.stopRenderingLineAfter}}}),define(X[819],ee([1,0,7,23,36,11,808,815,761,258,568,54,565,813,502,811,201,814,339,809,503,273,504,792,505,816,514,506,507,812,817,508,12,137,515,511,140,24,338,501,248,818]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R,A,N,P,x,F,B,V,$,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class Q extends x.ViewEventHandler{constructor(ne,se,H,W,q,Z){super(),this._selections=[new k.Selection(1,1,1,1)],this._renderAnimationFrame=null;const Y=new S.ViewController(se,W,q,ne);this._context=new N.ViewContext(se,H,W),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new b.TextAreaHandler(this._context,Y,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,y.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,y.createFastDomNode)(document.createElement("div")),n.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new r.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new c.ViewLines(this._context,this._linesContent),this._viewZones=new O.ViewZones(this._context),this._viewParts.push(this._viewZones);const oe=new m.DecorationsOverviewRuler(this._context);this._viewParts.push(oe);const ce=new D.ScrollDecorationViewPart(this._context);this._viewParts.push(ce);const ge=new p.ContentViewOverlays(this._context);this._viewParts.push(ge),ge.addDynamicOverlay(new i.CurrentLineHighlightOverlay(this._context)),ge.addDynamicOverlay(new I.SelectionsOverlay(this._context)),ge.addDynamicOverlay(new h.IndentGuidesOverlay(this._context)),ge.addDynamicOverlay(new s.DecorationsOverlay(this._context)),ge.addDynamicOverlay(new M.WhitespaceOverlay(this._context));const le=new p.MarginViewOverlays(this._context);this._viewParts.push(le),le.addDynamicOverlay(new i.CurrentLineMarginHighlightOverlay(this._context)),le.addDynamicOverlay(new d.GlyphMarginOverlay(this._context)),le.addDynamicOverlay(new u.MarginViewLineDecorationsOverlay(this._context)),le.addDynamicOverlay(new l.LinesDecorationsOverlay(this._context)),le.addDynamicOverlay(new o.LineNumbersOverlay(this._context));const ue=new a.Margin(this._context);ue.getDomNode().appendChild(this._viewZones.marginDomNode),ue.getDomNode().appendChild(le.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 j=new L.Rulers(this._context);this._viewParts.push(j);const z=new V.BlockDecorations(this._context);this._viewParts.push(z);const U=new v.Minimap(this._context);if(this._viewParts.push(U),oe){const J=this._scrollbar.getOverviewRulerLayoutInfo();J.parent.insertBefore(oe.getDomNode(),J.insertBefore)}this._linesContent.appendChild(ge.getDomNode()),this._linesContent.appendChild(j.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,Y,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){$.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(139);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(136)+" "+(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 A.RenderingContext(this._context.viewLayout,H,this._viewLines);for(const q of ne)q.prepareRender(W);for(const q of ne)q.render(W),q.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 q=this._viewLines.visibleRangeForPosition(new R.Position(W.lineNumber,W.column));return q?q.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,q,Z,Y,oe,ce;this._contentWidgets.setWidgetPosition(ne.widget,(H=(se=ne.position)===null||se===void 0?void 0:se.position)!==null&&H!==void 0?H:null,(q=(W=ne.position)===null||W===void 0?void 0:W.secondaryPosition)!==null&&q!==void 0?q:null,(Y=(Z=ne.position)===null||Z===void 0?void 0:Z.preference)!==null&&Y!==void 0?Y:null,(ce=(oe=ne.position)===null||oe===void 0?void 0:oe.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=Q;function ie(re){try{return re()}catch(ne){(0,E.onUnexpectedError)(ne)}}}),define(X[820],ee([1,0,6,2,5,74,24]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class b extends k.Disposable{constructor(p){super(),this.textModel=p,this.colorProvider=new S,this.onDidChangeEmitter=new _.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=p.getOptions().bracketPairColorizationOptions,this._register(p.bracketPairs.onDidChange(n=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(p){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(p,n,t,i){return i?[]:n===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(p,!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(p,n){return p===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new y.Range(1,1,this.textModel.getLineCount(),1),p,n):[]}}e.ColorizedBracketPairsDecorationProvider=b;class S{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(p,n){return p.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(n?p.nestingLevelOfEqualBracketType:p.nestingLevel)}getInlineClassNameOfLevel(p){return`bracket-highlighting-${p%30}`}}(0,w.registerThemingParticipant)((g,p)=>{const n=[E.editorBracketHighlightingForeground1,E.editorBracketHighlightingForeground2,E.editorBracketHighlightingForeground3,E.editorBracketHighlightingForeground4,E.editorBracketHighlightingForeground5,E.editorBracketHighlightingForeground6],t=new S;p.addRule(`.monaco-editor .${t.unexpectedClosingBracketClassName} { color: ${g.getColor(E.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const i=n.map(s=>g.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=i[s%i.length];p.addRule(`.monaco-editor .${t.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}})}),define(X[821],ee([1,0,90,2,46,24,74,51,5,48,6,33,56]),function(K,e,_,k,y,E,w,b,S,g,p,n,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 l=0;l<c.length;l++)this._markersData.set(c[l],d[l]);return o.length!==0||c.length!==0}getMarker(d){return this._markersData.get(d.id)}}let s=e.MarkerDecorationsService=class extends k.Disposable{constructor(d,h){super(),this._markerService=h,this._onDidChangeMarker=this._register(new p.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 l=d.getWordAtPosition(o.getStartPosition());l&&(o=new S.Range(o.startLineNumber,l.startColumn,o.endLineNumber,l.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,l,a;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,E.themeColorFromId)(w.overviewRulerWarning),c=20,a={color:(0,E.themeColorFromId)(n.minimapWarning),position:y.MinimapPosition.Inline};break;case _.MarkerSeverity.Info:h="squiggly-info",o=(0,E.themeColorFromId)(w.overviewRulerInfo),c=10;break;case _.MarkerSeverity.Error:default:h="squiggly-error",o=(0,E.themeColorFromId)(w.overviewRulerError),c=30,a={color:(0,E.themeColorFromId)(n.minimapError),position:y.MinimapPosition.Inline};break}return d.tags&&(d.tags.indexOf(1)!==-1&&(l="squiggly-inline-unnecessary"),d.tags.indexOf(2)!==-1&&(l="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:h,showIfCollapsed:!0,overviewRuler:{color:o,position:y.OverviewRulerLane.Right},minimap:a,zIndex:c,inlineClassName:l}}_hasMarkerTag(d,h){return d.tags?d.tags.indexOf(h)>=0:!1}};e.MarkerDecorationsService=s=Me([fe(0,b.IModelService),fe(1,_.IMarkerService)],s)}),define(X[241],ee([1,0,120,24,63,499,39]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let b=e.SemanticTokensProviderStyling=class{constructor(t,i,s,r){this._legend=t,this._themeService=i,this._languageService=s,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new p}getMetadata(t,i,s){const r=this._languageService.languageIdCodec.encodeLanguageId(s),d=this._hashTable.get(t,i,r);let h;if(d)h=d.metadata,this._logService.getLevel()===y.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 l=i;for(let u=0;l>0&&u<this._legend.tokenModifiers.length;u++)l&1&&c.push(this._legend.tokenModifiers[u]),l=l>>1;l>0&&this._logService.getLevel()===y.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${i.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),c.push("not-in-legend"));const a=this._themeService.getColorTheme().getTokenStyleMetadata(o,c,s);if(typeof a>"u")h=2147483647;else{if(h=0,typeof a.italic<"u"){const u=(a.italic?1:0)<<11;h|=u|1}if(typeof a.bold<"u"){const u=(a.bold?2:0)<<11;h|=u|2}if(typeof a.underline<"u"){const u=(a.underline?4:0)<<11;h|=u|4}if(typeof a.strikethrough<"u"){const u=(a.strikethrough?8:0)<<11;h|=u|8}if(a.foreground){const u=a.foreground<<15;h|=u|16}h===0&&(h=2147483647)}}else this._logService.getLevel()===y.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()===y.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,s,r,d){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${t}, resultId: ${i}) at edit #${s}: The provided start offset ${r} is outside the previous data (length ${d}).`))}};e.SemanticTokensProviderStyling=b=Me([fe(1,k.IThemeService),fe(2,w.ILanguageService),fe(3,y.ILogService)],b);function S(n,t,i){const s=n.data,r=n.data.length/5|0,d=Math.max(Math.ceil(r/1024),400),h=[];let o=0,c=1,l=0;for(;o<r;){const a=o;let u=Math.min(a+d,r);if(u<r){let I=u;for(;I-1>a&&s[5*I]===0;)I--;if(I-1===a){let T=u;for(;T+1<r&&s[5*T]===0;)T++;u=T}else u=I}let v=new Uint32Array((u-a)*4),f=0,m=0,C=0,L=0;for(;o<u;){const I=5*o,T=s[I],O=s[I+1],R=c+T|0,A=T===0?l+O|0:O,N=s[I+2],P=A+N|0,x=s[I+3],F=s[I+4];if(P<=A)t.warnInvalidLengthSemanticTokens(R,A+1);else if(C===R&&L>A)t.warnOverlappingSemanticTokens(R,A+1);else{const B=t.getMetadata(x,F,i);B!==2147483647&&(m===0&&(m=R),v[f]=R-m,v[f+1]=A,v[f+2]=P,v[f+3]=B,f+=4,C=R,L=P)}c=R,l=A,o++}f!==v.length&&(v=v.subarray(0,f));const D=E.SparseMultilineTokens.create(m,v);h.push(D)}return h}e.toMultilineTokens2=S;class g{constructor(t,i,s,r){this.tokenTypeIndex=t,this.tokenModifierSet=i,this.languageId=s,this.metadata=r,this.next=null}}class p{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=p._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<p._SIZES.length?2/3*this._currentLength:0),this._elements=[],p._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(t,i){for(let s=0;s<i;s++)t[s]=null}_hash2(t,i){return(t<<5)-t+i|0}_hashFunc(t,i,s){return this._hash2(this._hash2(t,i),s)%this._currentLength}get(t,i,s){const r=this._hashFunc(t,i,s);let d=this._elements[r];for(;d;){if(d.tokenTypeIndex===t&&d.tokenModifierSet===i&&d.languageId===s)return d;d=d.next}return null}add(t,i,s,r){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const d=this._elements;this._currentLengthIndex++,this._currentLength=p._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<p._SIZES.length?2/3*this._currentLength:0),this._elements=[],p._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,s,r))}_add(t){const i=this._hashFunc(t.tokenTypeIndex,t.tokenModifierSet,t.languageId);t.next=this._elements[i],this._elements[i]=t}}p._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(X[822],ee([1,0,2,39,24,63,241,227,50]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensStylingService=void 0;let g=e.SemanticTokensStylingService=class extends _.Disposable{constructor(n,t,i){super(),this._themeService=n,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(n){return this._caches.has(n)||this._caches.set(n,new w.SemanticTokensProviderStyling(n.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(n)}};e.SemanticTokensStylingService=g=Me([fe(0,y.IThemeService),fe(1,E.ILogService),fe(2,k.ILanguageService)],g),(0,S.registerSingleton)(b.ISemanticTokensStylingService,g,1)}),define(X[340],ee([1,0,93,2,18,172,46,74,24,49]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class p{constructor(t){this.options=t,this.rangeHighlightDecorationId=void 0}provide(t,i){var s;const r=new k.DisposableStore;t.canAcceptInBackground=!!(!((s=this.options)===null||s===void 0)&&s.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 s=new k.DisposableStore,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const d={editor:r},h=(0,E.getCodeEditor)(r);if(h){let o=(0,y.withNullAsUndefined)(r.saveViewState());s.add(h.onDidChangeCursorPosition(()=>{o=(0,y.withNullAsUndefined)(r.saveViewState())})),d.restoreViewState=()=>{o&&r===this.activeTextEditorControl&&r.restoreViewState(o)},s.add((0,_.once)(i.onCancellationRequested)(()=>{var c;return(c=d.restoreViewState)===null||c===void 0?void 0:c.call(d)}))}s.add((0,k.toDisposable)(()=>this.clearDecorations(r))),s.add(this.provideWithTextEditor(d,t,i))}else s.add(this.provideWithoutTextEditor(t,i));return s}canProvideWithTextEditor(t){return!0}gotoLocation({editor:t},i){t.setSelection(i.range),t.revealRangeInCenter(i.range,0),i.preserveFocus||t.focus();const s=t.getModel();s&&"getLineContent"in s&&(0,g.alert)(`${s.getLineContent(i.range.startLineNumber)}`)}getModel(t){var i;return(0,E.isDiffEditor)(t)?(i=t.getModel())===null||i===void 0?void 0:i.modified:t.getModel()}addDecorations(t,i){t.changeDecorations(s=>{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]=s.deltaDecorations(r,d);this.rangeHighlightDecorationId={rangeHighlightId:h,overviewRulerDecorationId:o}})}clearDecorations(t){const i=this.rangeHighlightDecorationId;i&&(t.changeDecorations(s=>{s.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=p}),define(X[823],ee([1,0,2,172,340,660]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class w extends y.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(S){const g=(0,E.localize)(0,null);return S.items=[{label:g}],S.ariaLabel=g,_.Disposable.None}provideWithTextEditor(S,g,p){const n=S.editor,t=new _.DisposableStore;t.add(g.onDidAccept(r=>{const[d]=g.selectedItems;if(d){if(!this.isValidLineNumber(n,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(n,g.value.trim().substr(w.PREFIX.length)),d=this.getPickLabel(n,r.lineNumber,r.column);if(g.items=[{lineNumber:r.lineNumber,column:r.column,label:d}],g.ariaLabel=d,!this.isValidLineNumber(n,r.lineNumber)){this.clearDecorations(n);return}const h=this.toRange(r.lineNumber,r.column);n.revealRangeInCenter(h,0),this.addDecorations(n,h)};i(),t.add(g.onDidChangeValue(()=>i()));const s=(0,k.getCodeEditor)(n);return s&&s.getOptions().get(65).renderType===2&&(s.updateOptions({lineNumbers:"on"}),t.add((0,_.toDisposable)(()=>s.updateOptions({lineNumbers:"relative"})))),t}toRange(S=1,g=1){return{startLineNumber:S,startColumn:g,endLineNumber:S,endColumn:g}}parsePosition(S,g){const p=g.split(/,|:|#/).map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),n=this.lineCount(S)+1;return{lineNumber:p[0]>0?p[0]:n+p[0],column:p[1]}}getPickLabel(S,g,p){if(this.isValidLineNumber(S,g))return this.isValidColumn(S,g,p)?(0,E.localize)(1,null,g,p):(0,E.localize)(2,null,g);const n=S.getPosition()||{lineNumber:1,column:1},t=this.lineCount(S);return t>1?(0,E.localize)(3,null,n.lineNumber,n.column,t):(0,E.localize)(4,null,n.lineNumber,n.column)}isValidLineNumber(S,g){return!g||typeof g!="number"?!1:g>0&&g<=this.lineCount(S)}isValidColumn(S,g,p){if(!p||typeof p!="number")return!1;const n=this.getModel(S);if(!n)return!1;const t={lineNumber:g,column:p};return n.validatePosition(t).equals(t)}lineCount(S){var g,p;return(p=(g=this.getModel(S))===null||g===void 0?void 0:g.getLineCount())!==null&&p!==void 0?p:0}}e.AbstractGotoLineQuickAccessProvider=w,w.PREFIX=":"}),define(X[824],ee([1,0,13,21,27,30,544,2,9,5,31,183,340,661,19,16]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let d=e.AbstractGotoSymbolQuickAccessProvider=class ui extends t.AbstractEditorNavigationQuickAccessProvider{constructor(l,a,u=Object.create(null)){super(u),this._languageFeaturesService=l,this._outlineModelService=a,this.options=u,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(l){return this.provideLabelPick(l,(0,i.localize)(0,null)),b.Disposable.None}provideWithTextEditor(l,a,u){const v=l.editor,f=this.getModel(v);return f?this._languageFeaturesService.documentSymbolProvider.has(f)?this.doProvideWithEditorSymbols(l,f,a,u):this.doProvideWithoutEditorSymbols(l,f,a,u):b.Disposable.None}doProvideWithoutEditorSymbols(l,a,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(a,f))||v.isCancellationRequested||f.add(this.doProvideWithEditorSymbols(l,a,u,v))}),f}provideLabelPick(l,a){l.items=[{label:a,index:0,kind:14}],l.ariaLabel=a}waitForLanguageSymbolRegistry(l,a){return we(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(l))return!0;const u=new _.DeferredPromise,v=a.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(l)&&(v.dispose(),u.complete(!0))}));return a.add((0,b.toDisposable)(()=>u.complete(!1))),u.p})}doProvideWithEditorSymbols(l,a,u,v){var f;const m=l.editor,C=new b.DisposableStore;C.add(u.onDidAccept(T=>{const[O]=u.selectedItems;O&&O.range&&(this.gotoLocation(l,{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(l,{range:T.range.selection,keyMods:u.keyMods,forceSideBySide:!0}),u.hide())}));const L=this.getDocumentSymbols(a,v);let D;const I=T=>we(this,void 0,void 0,function*(){D?.dispose(!0),u.busy=!1,D=new k.CancellationTokenSource(v),u.busy=!0;try{const O=(0,w.prepareQuery)(u.value.substr(ui.PREFIX.length).trim()),R=yield this.doGetSymbolPicks(L,O,void 0,D.token);if(v.isCancellationRequested)return;if(R.length>0){if(u.items=R,T&&O.original.length===0){const A=(0,r.findLast)(R,N=>!!(N.type!=="separator"&&N.range&&g.Range.containsPosition(N.range.decoration,T)));A&&(u.activeItems=[A])}}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=m.getSelection())===null||f===void 0?void 0:f.getPosition()),C.add(u.onDidChangeActive(()=>{const[T]=u.activeItems;T&&T.range&&(m.revealRangeInCenter(T.range.selection,0),this.addDecorations(m,T.range.decoration))})),C}doGetSymbolPicks(l,a,u,v){var f,m;return we(this,void 0,void 0,function*(){const C=yield l;if(v.isCancellationRequested)return[];const L=a.original.indexOf(ui.SCOPE_PREFIX)===0,D=L?1:0;let I,T;a.values&&a.values.length>1?(I=(0,w.pieceToQuery)(a.values[0]),T=(0,w.pieceToQuery)(a.values.slice(1))):I=a;let O;const R=(m=(f=this.options)===null||f===void 0?void 0:f.openSideBySideDirection)===null||m===void 0?void 0:m.call(f);R&&(O=[{iconClass:R==="right"?E.ThemeIcon.asClassName(y.Codicon.splitHorizontal):E.ThemeIcon.asClassName(y.Codicon.splitVertical),tooltip:R==="right"?(0,i.localize)(4,null):(0,i.localize)(5,null)}]);const A=[];for(let x=0;x<C.length;x++){const F=C[x],B=(0,S.trim)(F.name),V=`$(${p.SymbolKinds.toIcon(F.kind).id}) ${B}`,$=V.length-B.length;let M=F.containerName;u?.extraContainerLabel&&(M?M=`${u.extraContainerLabel} \u2022 ${M}`:M=u.extraContainerLabel);let Q,ie,re,ne;if(a.original.length>D){let H=!1;if(I!==a&&([Q,ie]=(0,w.scoreFuzzy2)(V,Object.assign(Object.assign({},a),{values:void 0}),D,$),typeof Q=="number"&&(H=!0)),typeof Q!="number"&&([Q,ie]=(0,w.scoreFuzzy2)(V,I,D,$),typeof Q!="number"))continue;if(!H&&T){if(M&&T.original.length>0&&([re,ne]=(0,w.scoreFuzzy2)(M,T)),typeof re!="number")continue;typeof Q=="number"&&(Q+=re)}}const se=F.tags&&F.tags.indexOf(1)>=0;A.push({index:x,kind:F.kind,score:Q,label:V,ariaLabel:B,description:M,highlights:se?void 0:{label:ie,description:ne},range:{selection:g.Range.collapseToStart(F.selectionRange),decoration:F.range},strikethrough:se,buttons:O})}const N=A.sort((x,F)=>L?this.compareByKindAndScore(x,F):this.compareByScore(x,F));let P=[];if(L){let V=function(){F&&typeof x=="number"&&B>0&&(F.label=(0,S.format)(o[x]||h,B))},x,F,B=0;for(const $ of N)x!==$.kind?(V(),x=$.kind,B=1,F={type:"separator"},P.push(F)):B++,P.push($);V()}else N.length>0&&(P=[{label:(0,i.localize)(6,null,A.length),type:"separator"},...N]);return P})}compareByScore(l,a){if(typeof l.score!="number"&&typeof a.score=="number")return 1;if(typeof l.score=="number"&&typeof a.score!="number")return-1;if(typeof l.score=="number"&&typeof a.score=="number"){if(l.score>a.score)return-1;if(l.score<a.score)return 1}return l.index<a.index?-1:l.index>a.index?1:0}compareByKindAndScore(l,a){const u=o[l.kind]||h,v=o[a.kind]||h,f=u.localeCompare(v);return f===0?this.compareByScore(l,a):f}getDocumentSymbols(l,a){return we(this,void 0,void 0,function*(){const u=yield this._outlineModelService.getOrCreate(l,a);return a.isCancellationRequested?[]:u.asListOfDocumentSymbols()})}};d.PREFIX="@",d.SCOPE_PREFIX=":",d.PREFIX_BY_CATEGORY=`${d.PREFIX}${d.SCOPE_PREFIX}`,e.AbstractGotoSymbolQuickAccessProvider=d=Me([fe(0,s.ILanguageFeaturesService),fe(1,n.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(X[825],ee([1,0,2,12,664,14,34,33,24,440]),function(K,e,_,k,y,E,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 E.RawContextKey("renameInputVisible",!1,(0,y.localize)(0,null));let g=e.RenameInputField=class{constructor(n,t,i,s,r){this._editor=n,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=s,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,y.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(n){var t,i,s,r;if(!this._input||!this._domNode)return;const d=n.getColor(b.widgetShadow),h=n.getColor(b.widgetBorder);this._domNode.style.backgroundColor=String((t=n.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=n.getColor(b.inputForeground))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((s=n.getColor(b.inputBackground))!==null&&s!==void 0?s:"");const o=n.getColor(b.inputBorder);this._input.style.borderWidth=o?"1px":"0px",this._input.style.borderStyle=o?"solid":"none",this._input.style.borderColor=(r=o?.toString())!==null&&r!==void 0?r:"none"}_updateFont(){if(!this._input||!this._label)return;const n=this._editor.getOption(48);this._input.style.fontFamily=n.fontFamily,this._input.style.fontWeight=n.fontWeight,this._input.style.fontSize=`${n.fontSize}px`,this._label.style.fontSize=`${n.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var n,t;const[i,s]=this._acceptKeybindings;return this._label.innerText=(0,y.localize)(2,null,(n=this._keybindingService.lookupKeybinding(i))===null||n===void 0?void 0:n.getLabel(),(t=this._keybindingService.lookupKeybinding(s))===null||t===void 0?void 0:t.getLabel()),null}afterRender(n){n||this.cancelInput(!0)}acceptInput(n){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,n)}cancelInput(n){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,n)}getInput(n,t,i,s,r,d){this._domNode.classList.toggle("preview",r),this._position=new k.Position(n.startLineNumber,n.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",s.toString()),this._input.size=Math.max((n.endColumn-n.startColumn)*1.1,20);const 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=Me([fe(2,S.IThemeService),fe(3,w.IKeybindingService),fe(4,E.IContextKeyService)],g)}),define(X[826],ee([1,0,49,13,21,11,2,18,20,98,15,151,32,12,5,22,180,154,663,91,14,8,63,43,83,35,825,19]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class D{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 s.Range(this.position.lineNumber,x.startColumn,this.position.lineNumber,x.endColumn),text:x.word,rejectReason:P.length>0?P.join(`
- `):void 0}:{range:s.Range.fromPositions(this.position),text:"",rejectReason:P.length>0?P.join(`
- `):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(`
- `)};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(A,N,P,x){return we(this,void 0,void 0,function*(){const F=new D(N,P,A),B=yield F.resolveRenameLocation(y.CancellationToken.None);return B?.rejectReason?{edits:[],rejectReason:B.rejectReason}:F.provideRenameEdits(x,y.CancellationToken.None)})}e.rename=I;let T=class $i{static get(N){return N.getContribution($i.ID)}constructor(N,P,x,F,B,V,$,M){this.editor=N,this._instaService=P,this._notificationService=x,this._bulkEditService=F,this._progressService=B,this._logService=V,this._configService=$,this._languageFeaturesService=M,this._disposableStore=new w.DisposableStore,this._cts=new y.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 y.CancellationTokenSource,!this.editor.hasModel())return;const x=this.editor.getPosition(),F=new D(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 $=new g.EditorStateCancellationTokenSource(this.editor,5,V.range,this._cts.token),M=this.editor.getSelection();let Q=0,ie=V.text.length;!s.Range.isEmpty(M)&&!s.Range.spansMultipleLines(M)&&s.Range.containsRange(V.range,M)&&(Q=Math.max(0,M.startColumn-V.range.startColumn),ie=Math.min(V.range.endColumn,M.endColumn)-V.range.startColumn);const re=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),ne=yield this._renameInputField.getInput(V.range,V.text,Q,ie,re,$.token);if(typeof ne=="boolean"){ne&&this.editor.focus(),$.dispose();return}this.editor.focus();const se=(0,k.raceCancellation)(F.provideRenameEdits(ne.newName,$.token),$.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(s.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(()=>{$.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=Me([fe(1,a.IInstantiationService),fe(2,v.INotificationService),fe(3,n.IBulkEditService),fe(4,f.IEditorProgressService),fe(5,u.ILogService),fe(6,d.ITextResourceConfigurationService),fe(7,L.ILanguageFeaturesService)],T);class O extends p.EditorAction{constructor(){super({id:"editor.action.rename",label:o.localize(7,null),alias:"Rename Symbol",precondition:l.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($=>(this.reportTelemetry($,V),this.run($,V))))},E.onUnexpectedError):super.runCommand(N,P)}run(N,P){const x=T.get(P);return x?x.run():Promise.resolve()}}e.RenameAction=O,(0,p.registerEditorContribution)(T.ID,T,4),(0,p.registerEditorAction)(O);const R=p.EditorCommand.bindToContribution(T.get);(0,p.registerEditorCommand)(new R({id:"acceptRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:A=>A.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:l.ContextKeyExpr.and(r.EditorContextKeys.focus,l.ContextKeyExpr.not("isComposing")),primary:3}})),(0,p.registerEditorCommand)(new R({id:"acceptRenameInputWithPreview",precondition:l.ContextKeyExpr.and(C.CONTEXT_RENAME_INPUT_VISIBLE,l.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:A=>A.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:l.ContextKeyExpr.and(r.EditorContextKeys.focus,l.ContextKeyExpr.not("isComposing")),primary:1024+3}})),(0,p.registerEditorCommand)(new R({id:"cancelRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:A=>A.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:r.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,p.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(A,N,P,...x){const[F]=x;(0,b.assertType)(typeof F=="string");const{renameProvider:B}=A.get(L.ILanguageFeaturesService);return I(B,N,P,F)}),(0,p.registerModelAndPositionCommand)("_executePrepareRename",function(A,N,P){return we(this,void 0,void 0,function*(){const{renameProvider:x}=A.get(L.ILanguageFeaturesService),B=yield new D(N,P,x).resolveRenameLocation(y.CancellationToken.None);if(B?.rejectReason)throw new Error(B.rejectReason);return B})}),m.Registry.as(c.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:o.localize(8,null),default:!0,type:"boolean"}}})}),define(X[827],ee([1,0,2,11,51,26,13,21,24,241,316,70,57,19,227,192,281]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let h=e.DocumentSemanticTokensFeature=class extends _.Disposable{constructor(a,u,v,f,m,C){super(),this._watchers=Object.create(null);const L=T=>{this._watchers[T.uri.toString()]=new o(T,a,v,m,C)},D=(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||L(T):O&&D(T,O)}};this._register(u.onModelAdded(T=>{(0,d.isSemanticColoringEnabled)(T,v,f)&&L(T)})),this._register(u.onModelRemoved(T=>{const O=this._watchers[T.uri.toString()];O&&D(T,O)})),this._register(f.onDidChangeConfiguration(T=>{T.affectsConfiguration(d.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&I()})),this._register(v.onDidColorThemeChange(I))}dispose(){for(const a of Object.values(this._watchers))a.dispose();super.dispose()}};e.DocumentSemanticTokensFeature=h=Me([fe(0,s.ISemanticTokensStylingService),fe(1,y.IModelService),fe(2,S.IThemeService),fe(3,E.IConfigurationService),fe(4,n.ILanguageFeatureDebounceService),fe(5,i.ILanguageFeaturesService)],h);let o=class Mt extends _.Disposable{constructor(a,u,v,f,m){super(),this._semanticTokensStylingService=u,this._isDisposed=!1,this._model=a,this._provider=m.documentSemanticTokensProvider,this._debounceInformation=f.for(this._provider,"DocumentSemanticTokens",{min:Mt.REQUEST_MIN_DELAY,max:Mt.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new w.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),Mt.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 L of this._provider.all(a))typeof L.onDidChange=="function"&&this._documentProvidersChangeListeners.push(L.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(L=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,p.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const a=new b.CancellationTokenSource,u=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,v=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,f=(0,p.getDocumentSemanticTokens)(this._provider,this._model,u,v,a.token);this._currentDocumentRequestCancellationTokenSource=a,this._providersChangedDuringRequest=!1;const m=[],C=this._model.onDidChangeContent(D=>{m.push(D)}),L=new t.StopWatch(!1);f.then(D=>{if(this._debounceInformation.update(this._model,L.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,C.dispose(),!D)this._setDocumentSemanticTokens(null,null,null,m);else{const{provider:I,tokens:T}=D,O=this._semanticTokensStylingService.getStyling(I);this._setDocumentSemanticTokens(I,T||null,O,m)}},D=>{D&&(k.isCancellationError(D)||typeof D.message=="string"&&D.message.indexOf("busy")!==-1)||k.onUnexpectedError(D),this._currentDocumentRequestCancellationTokenSource=null,C.dispose(),(m.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(a,u,v,f,m){m=Math.min(m,v.length-f,a.length-u);for(let C=0;C<m;C++)v[f+C]=a[u+C]}_setDocumentSemanticTokens(a,u,v,f){const m=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){a&&u&&a.releaseDocumentSemanticTokens(u.resultId);return}if(!a||!v){this._model.tokenization.setSemanticTokens(null,!1);return}if(!u){this._model.tokenization.setSemanticTokens(null,!0),C();return}if((0,p.isSemanticTokensEdits)(u)){if(!m){this._model.tokenization.setSemanticTokens(null,!0);return}if(u.edits.length===0)u={resultId:u.resultId,data:m.data};else{let L=0;for(const R of u.edits)L+=(R.data?R.data.length:0)-R.deleteCount;const D=m.data,I=new Uint32Array(D.length+L);let T=D.length,O=I.length;for(let R=u.edits.length-1;R>=0;R--){const A=u.edits[R];if(A.start>D.length){v.warnInvalidEditStart(m.resultId,u.resultId,R,A.start,D.length),this._model.tokenization.setSemanticTokens(null,!0);return}const N=T-(A.start+A.deleteCount);N>0&&(Mt._copy(D,T-N,I,O-N,N),O-=N),A.data&&(Mt._copy(A.data,0,I,O-A.data.length,A.data.length),O-=A.data.length),T=A.start}T>0&&Mt._copy(D,0,I,0,T),u={resultId:u.resultId,data:I}}}if((0,p.isSemanticTokens)(u)){this._currentDocumentResponse=new c(a,u.resultId,u.data);const L=(0,g.toMultilineTokens2)(u,v,this._model.getLanguageId());if(f.length>0)for(const D of f)for(const I of L)for(const T of D.changes)I.applyEdit(T.range,T.text);this._model.tokenization.setSemanticTokens(L,!0)}else this._model.tokenization.setSemanticTokens(null,!0);C()}};o.REQUEST_MIN_DELAY=300,o.REQUEST_MAX_DELAY=2e3,o=Me([fe(1,s.ISemanticTokensStylingService),fe(2,S.IThemeService),fe(3,n.ILanguageFeatureDebounceService),fe(4,i.ILanguageFeaturesService)],o);class c{constructor(a,u,v){this.provider=a,this.resultId=u,this.data=v}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,r.registerEditorFeature)(h)}),define(X[828],ee([1,0,13,2,15,316,281,241,26,24,70,57,19,227]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportSemanticTokensContribution=void 0;let s=e.ViewportSemanticTokensContribution=class extends k.Disposable{constructor(d,h,o,c,l,a){super(),this._semanticTokensStylingService=h,this._themeService=o,this._configurationService=c,this._editor=d,this._provider=a.documentRangeSemanticTokensProvider,this._debounceInformation=l.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,E.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)(a=>Promise.resolve((0,E.getDocumentRangeSemanticTokens)(this._provider,d,h,a))),l=new n.StopWatch(!1);return c.then(a=>{if(this._debounceInformation.update(d,l.elapsed()),!a||!a.tokens||d.isDisposed()||d.getVersionId()!==o)return;const{provider:u,tokens:v}=a,f=this._semanticTokensStylingService.getStyling(u);d.tokenization.setPartialSemanticTokens(h,(0,b.toMultilineTokens2)(v,f,d.getLanguageId()))}).then(()=>this._removeOutstandingRequest(c),()=>this._removeOutstandingRequest(c)),c}};s.ID="editor.contrib.viewportSemanticTokens",e.ViewportSemanticTokensContribution=s=Me([fe(1,i.ISemanticTokensStylingService),fe(2,g.IThemeService),fe(3,S.IConfigurationService),fe(4,p.ILanguageFeatureDebounceService),fe(5,t.ILanguageFeaturesService)],s),(0,y.registerEditorContribution)(s.ID,s,1)}),define(X[829],ee([1,0,7,216,27,30,6,64,2,20,31,746,51,39,673,314,73,24,327]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function l(m){return`suggest-aria-id:${m}`}e.getAriaId=l;const a=(0,d.registerIcon)("suggest-more-info",y.Codicon.chevronRight,s.localize(0,null)),u=new(c=class Qt{extract(C,L){if(C.textLabel.match(Qt._regexStrict))return L[0]=C.textLabel,!0;if(C.completion.detail&&C.completion.detail.match(Qt._regexStrict))return L[0]=C.completion.detail,!0;if(typeof C.completion.documentation=="string"){const D=Qt._regexRelaxed.exec(C.completion.documentation);if(D&&(D.index===0||D.index+D[0].length===C.completion.documentation.length))return L[0]=D[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,L,D,I){this._editor=C,this._modelService=L,this._languageService=D,this._themeService=I,this._onDidToggleDetails=new w.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(C){const L=new S.DisposableStore,D=C;D.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")),A=(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});L.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")),$=(0,_.append)(P,(0,_.$)("span.readMore"+E.ThemeIcon.asCSSSelector(a)));$.title=s.localize(1,null);const M=()=>{const Q=this._editor.getOptions(),ie=Q.get(48),re=ie.getMassagedFontFamily(),ne=ie.fontFeatureSettings,se=Q.get(114)||ie.fontSize,H=Q.get(115)||ie.lineHeight,W=ie.fontWeight,q=ie.letterSpacing,Z=`${se}px`,Y=`${H}px`,oe=`${q}px`;D.style.fontSize=Z,D.style.fontWeight=W,D.style.letterSpacing=oe,R.style.fontFamily=re,R.style.fontFeatureSettings=ne,R.style.lineHeight=Y,I.style.height=Y,I.style.width=Y,$.style.height=Y,$.style.width=Y};return M(),L.add(this._editor.onDidChangeConfiguration(Q=>{(Q.hasChanged(48)||Q.hasChanged(114)||Q.hasChanged(115))&&M()})),{root:D,left:N,right:P,icon:I,colorspan:T,iconLabel:x,iconContainer:A,parametersLabel:F,qualifierLabel:B,detailsLabel:V,readMore:$,disposables:L}}renderElement(C,L,D){const{completion:I}=C;D.root.id=l(L),D.colorspan.style.backgroundColor="";const T={labelEscapeNewLines:!0,matches:(0,b.createMatches)(C.score)},O=[];if(I.kind===19&&u.extract(C,O))D.icon.className="icon customcolor",D.iconContainer.className="icon hide",D.colorspan.style.backgroundColor=O[0];else if(I.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){D.icon.className="icon hide",D.iconContainer.className="icon hide";const R=(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:C.textLabel}),r.FileKind.FILE),A=(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:I.detail}),r.FileKind.FILE);T.extraClasses=R.length>A.length?R:A}else I.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(D.icon.className="icon hide",D.iconContainer.className="icon hide",T.extraClasses=[(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:C.textLabel}),r.FileKind.FOLDER),(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:I.detail}),r.FileKind.FOLDER)].flat()):(D.icon.className="icon hide",D.iconContainer.className="",D.iconContainer.classList.add("suggest-icon",...E.ThemeIcon.asClassNameArray(p.CompletionItemKinds.toIcon(I.kind))));I.tags&&I.tags.indexOf(1)>=0&&(T.extraClasses=(T.extraClasses||[]).concat(["deprecated"]),T.matches=[]),D.iconLabel.setLabel(C.textLabel,void 0,T),typeof I.label=="string"?(D.parametersLabel.textContent="",D.detailsLabel.textContent=f(I.detail||""),D.root.classList.add("string-label")):(D.parametersLabel.textContent=f(I.label.detail||""),D.detailsLabel.textContent=f(I.label.description||""),D.root.classList.remove("string-label")),this._editor.getOption(113).showInlineDetails?(0,_.show)(D.detailsLabel):(0,_.hide)(D.detailsLabel),(0,o.canExpandCompletionItem)(C)?(D.right.classList.add("can-expand-details"),(0,_.show)(D.readMore),D.readMore.onmousedown=R=>{R.stopPropagation(),R.preventDefault()},D.readMore.onclick=R=>{R.stopPropagation(),R.preventDefault(),this._onDidToggleDetails.fire()}):(D.right.classList.remove("can-expand-details"),(0,_.hide)(D.readMore),D.readMore.onmousedown=null,D.readMore.onclick=null)}disposeTemplate(C){C.disposables.dispose()}};e.ItemRenderer=v=Me([fe(1,t.IModelService),fe(2,i.ILanguageService),fe(3,h.IThemeService)],v);function f(m){return m.replace(/\r\n|\r|\n/g,"")}}),define(X[830],ee([1,0,823,35,127,32,18,82,6,15,22,79]),function(K,e,_,k,y,E,w,b,S,g,p,n){"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=Me([fe(0,E.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:p.EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})}run(r){r.get(n.IQuickInputService).quickAccess.show(t.PREFIX)}}e.GotoLineAction=i,i.ID="editor.action.gotoLine",(0,g.registerEditorAction)(i),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:t,prefix:t.PREFIX,helpEntries:[{description:b.GoToLineNLS.gotoLineActionLabel,commandId:i.ID}]})}),define(X[831],ee([1,0,824,35,127,32,18,82,6,15,22,79,183,19,165,239]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let s=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=s=Me([fe(0,E.ICodeEditorService),fe(1,i.ILanguageFeaturesService),fe(2,t.IOutlineModelService)],s);class r extends g.EditorAction{constructor(){super({id:r.ID,label:b.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:p.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(h){h.get(n.IQuickInputService).quickAccess.show(_.AbstractGotoSymbolQuickAccessProvider.PREFIX,{itemActivation:n.ItemActivation.NONE})}}e.GotoSymbolAction=r,r.ID="editor.action.quickOutline",(0,g.registerEditorAction)(r),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:s,prefix:_.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:b.QuickOutlineNLS.quickOutlineActionLabel,prefix:_.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:r.ID},{description:b.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:_.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(X[341],ee([1,0,7,48,810,32,14,50,24]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let g=e.StandaloneCodeEditorService=class extends y.AbstractCodeEditorService{constructor(n,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=n.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((i,s,r)=>we(this,void 0,void 0,function*(){return s?this.doOpenEditor(s,i):null}))}_checkContextKey(){let n=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){n=!0;break}this._editorIsOpen.set(n)}setActiveCodeEditor(n){this._activeCodeEditor=n}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(n,t){if(!this.findModel(n,t.resource)){if(t.resource){const r=t.resource.scheme;if(r===k.Schemas.http||r===k.Schemas.https)return(0,_.windowOpenNoOpener)(t.resource.toString()),n}return null}const s=t.options?t.options.selection:null;if(s)if(typeof s.endLineNumber=="number"&&typeof s.endColumn=="number")n.setSelection(s),n.revealRangeInCenter(s,1);else{const r={lineNumber:s.startLineNumber,column:s.startColumn};n.setPosition(r),n.revealPositionInCenter(r,1)}return n}findModel(n,t){const i=n.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};e.StandaloneCodeEditorService=g=Me([fe(0,w.IContextKeyService),fe(1,S.IThemeService)],g),(0,b.registerSingleton)(E.ICodeEditorService,g,0)}),define(X[832],ee([1,0,74,33]),function(K,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(X[342],ee([1,0,7,47,37,6,31,120,485,832,35,33,24,2,92,806]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeService=e.HC_LIGHT_THEME_NAME=e.HC_BLACK_THEME_NAME=e.VS_DARK_THEME_NAME=e.VS_LIGHT_THEME_NAME=void 0,e.VS_LIGHT_THEME_NAME="vs",e.VS_DARK_THEME_NAME="vs-dark",e.HC_BLACK_THEME_NAME="hc-black",e.HC_LIGHT_THEME_NAME="hc-light";const d=p.Registry.as(n.Extensions.ColorContribution),h=p.Registry.as(t.Extensions.ThemingContribution);class o{constructor(f,m){this.semanticHighlighting=!1,this.themeData=m;const C=m.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 m in this.themeData.colors)f.set(m,y.Color.fromHex(this.themeData.colors[m]));if(this.themeData.inherit){const m=l(this.themeData.base);for(const C in m.colors)f.has(C)||f.set(C,y.Color.fromHex(m.colors[C]))}this.colors=f}return this.colors}getColor(f,m){const C=this.getColors().get(f);if(C)return C;if(m!==!1)return this.getDefault(f)}getDefault(f){let m=this.defaultColors[f];return m||(m=d.resolveDefaultColor(f,this),this.defaultColors[f]=m,m)}defines(f){return this.getColors().has(f)}get type(){switch(this.base){case e.VS_LIGHT_THEME_NAME:return s.ColorScheme.LIGHT;case e.HC_BLACK_THEME_NAME:return s.ColorScheme.HIGH_CONTRAST_DARK;case e.HC_LIGHT_THEME_NAME:return s.ColorScheme.HIGH_CONTRAST_LIGHT;default:return s.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let f=[],m=[];if(this.themeData.inherit){const D=l(this.themeData.base);f=D.rules,D.encodedTokensColors&&(m=D.encodedTokensColors)}const C=this.themeData.colors["editor.foreground"],L=this.themeData.colors["editor.background"];if(C||L){const D={token:""};C&&(D.foreground=C),L&&(D.background=L),f.push(D)}f=f.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(m=this.themeData.encodedTokensColors),this._tokenTheme=S.TokenTheme.createFromRawTokenTheme(f,m)}return this._tokenTheme}getTokenStyleMetadata(f,m,C){const D=this.tokenTheme._match([f].concat(m).join(".")).metadata,I=b.TokenMetadata.getForeground(D),T=b.TokenMetadata.getFontStyle(D);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 l(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 a(v){const f=l(v);return new o(v,f)}class u extends i.Disposable{constructor(){super(),this._onColorThemeChange=this._register(new E.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new E.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,a(e.VS_LIGHT_THEME_NAME)),this._knownThemes.set(e.VS_DARK_THEME_NAME,a(e.VS_DARK_THEME_NAME)),this._knownThemes.set(e.HC_BLACK_THEME_NAME,a(e.HC_BLACK_THEME_NAME)),this._knownThemes.set(e.HC_LIGHT_THEME_NAME,a(e.HC_LIGHT_THEME_NAME));const f=(0,r.getIconsStyleSheet)(this);this._codiconCSS=f.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
- ${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 m=_.createStyleSheet(f,C=>{C.className="monaco-colors",C.textContent=this._allCSS});return this._styleElements.push(m),{dispose:()=>{for(let C=0;C<this._styleElements.length;C++)if(this._styleElements[C]===m){this._styleElements.splice(C,1);return}}}}defineTheme(f,m){if(!/^[a-z0-9\-]+$/i.test(f))throw new Error("Illegal theme name!");if(!c(m.base)&&!c(f))throw new Error("Illegal theme base!");this._knownThemes.set(f,new o(f,m)),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 m;this._knownThemes.has(f)?m=this._knownThemes.get(f):m=this._knownThemes.get(e.VS_LIGHT_THEME_NAME),this._updateActualTheme(m)}_updateActualTheme(f){!f||this._theme===f||(this._theme=f,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const f=window.matchMedia("(forced-colors: active)").matches;if(f!==(0,s.isHighContrast)(this._theme.type)){let m;(0,s.isDark)(this._theme.type)?m=f?e.HC_BLACK_THEME_NAME:e.VS_DARK_THEME_NAME:m=f?e.HC_LIGHT_THEME_NAME:e.VS_LIGHT_THEME_NAME,this._updateActualTheme(this._knownThemes.get(m))}}}setAutoDetectHighContrast(f){this._autoDetectHighContrast=f,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const f=[],m={},C={addRule:I=>{m[I]||(f.push(I),m[I]=!0)}};h.getThemingParticipants().forEach(I=>I(this._theme,C,this._environment));const L=[];for(const I of d.getColors()){const T=this._theme.getColor(I.id,!0);T&&L.push(`${(0,n.asCssVariableName)(I.id)}: ${T.toString()};`)}C.addRule(`.monaco-editor { ${L.join(`
- `)} }`);const D=this._colorMapOverride||this._theme.tokenTheme.getColorMap();C.addRule((0,S.generateTokensCSSForColorMap)(D)),this._themeCSS=f.join(`
- `),this._updateCSS(),w.TokenizationRegistry.setColorMap(D),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
- ${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(X[833],ee([1,0,15,123,82,92,342]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class b extends _.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:y.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(g,p){const n=g.get(k.IStandaloneThemeService),t=n.getColorTheme();(0,E.isHighContrast)(t.type)?(n.setTheme(this._originalThemeName||((0,E.isDark)(t.type)?w.VS_DARK_THEME_NAME:w.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(n.setTheme((0,E.isDark)(t.type)?w.HC_BLACK_THEME_NAME:w.HC_LIGHT_THEME_NAME),this._originalThemeName=t.themeName)}}(0,_.registerEditorAction)(b)}),define(X[156],ee([1,0,7,44,147,300,40,206,2,17,686,29,708,14,55,8,34,43,84,24,30,92,18,33,99,454]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m(A,N,P,x){const F=A.getActions(N),B=_.ModifierKeyEmitter.getInstance(),V=B.keyStatus.altKey||(g.isWindows||g.isLinux)&&B.keyStatus.shiftKey;L(F,P,V,x?$=>$===x:$=>$==="navigation")}e.createAndFillInContextMenuActions=m;function C(A,N,P,x,F,B){const V=A.getActions(N);L(V,P,!1,typeof x=="string"?M=>M===x:x,F,B)}e.createAndFillInActionBarActions=C;function L(A,N,P,x=V=>V==="navigation",F=()=>!1,B=!1){let V,$;Array.isArray(N)?(V=N,$=N):(V=N.primary,$=N.secondary);const M=new Set;for(const[Q,ie]of A){let re;x(Q)?(re=V,re.length>0&&B&&re.push(new w.Separator)):(re=$,re.length>0&&re.push(new w.Separator));for(let ne of ie){P&&(ne=ne instanceof n.MenuItemAction&&ne.alt?ne.alt:ne);const se=re.push(ne);ne instanceof w.SubmenuAction&&M.add({group:Q,action:ne,index:se-1})}}for(const{group:Q,action:ie,index:re}of M){const ne=x(Q)?V:$,se=ie.actions;se.length<=1&&F(ie,Q,ne.length)&&ne.splice(re,1,...se)}}let D=e.MenuEntryActionViewItem=class extends y.ActionViewItem{constructor(N,P,x,F,B,V,$){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=$,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._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,p.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,$=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),M=$&&$.getLabel(),Q=M?(0,p.localize)(1,null,V,M):V;B=(0,p.localize)(2,null,B,b.UILabelProvider.modifierLabels[g.OS].altKey,Q)}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(l.ThemeIcon.isThemeIcon(F)){const B=l.ThemeIcon.asClassNameArray(F);x.classList.add(...B),this._itemClassDispose.value=(0,S.toDisposable)(()=>{x.classList.remove(...B)})}else x.style.backgroundImage=(0,a.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=D=Me([fe(2,d.IKeybindingService),fe(3,h.INotificationService),fe(4,i.IContextKeyService),fe(5,c.IThemeService),fe(6,s.IContextMenuService)],D);let I=e.SubmenuEntryActionViewItem=class extends E.DropdownMenuActionViewItem{constructor(N,P,x,F,B){var V,$,M;const Q=Object.assign(Object.assign({},P),{menuAsChild:(V=P?.menuAsChild)!==null&&V!==void 0?V:!1,classNames:($=P?.classNames)!==null&&$!==void 0?$:l.ThemeIcon.isThemeIcon(N.item.icon)?l.ThemeIcon.asClassName(N.item.icon):void 0,keybindingProvider:(M=P?.keybindingProvider)!==null&&M!==void 0?M:ie=>x.lookupKeybinding(ie.id)});super(N,{getActions:()=>N.actions},F,Q),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&&!l.ThemeIcon.isThemeIcon(x)){this.element.classList.add("icon");const F=()=>{this.element&&(this.element.style.backgroundImage=(0,a.isDark)(this._themeService.getColorTheme().type)?(0,_.asCSSUrl)(x.dark):(0,_.asCSSUrl)(x.light))};F(),this._register(this._themeService.onDidColorThemeChange(()=>{F()}))}}};e.SubmenuEntryActionViewItem=I=Me([fe(2,d.IKeybindingService),fe(3,s.IContextMenuService),fe(4,c.IThemeService)],I);let T=e.DropdownWithDefaultActionViewItem=class extends y.BaseActionViewItem{constructor(N,P,x,F,B,V,$,M){var Q,ie,re;super(null,N),this._keybindingService=x,this._notificationService=F,this._contextMenuService=B,this._menuService=V,this._instaService=$,this._storageService=M,this._container=null,this._options=P,this._storageKey=`${N.item.submenu.id}_lastActionId`;let ne;const se=M.get(this._storageKey,1);se&&(ne=N.actions.find(W=>se===W.id)),ne||(ne=N.actions[0]),this._defaultAction=this._instaService.createInstance(D,ne,{keybinding:this._getDefaultActionKeybindingLabel(ne)});const H=Object.assign({},P??Object.create(null),{menuAsChild:(Q=P?.menuAsChild)!==null&&Q!==void 0?Q:!0,classNames:(ie=P?.classNames)!==null&&ie!==void 0?ie:["codicon","codicon-chevron-down"],actionRunner:(re=P?.actionRunner)!==null&&re!==void 0?re:new w.ActionRunner});this._dropdown=new E.DropdownMenuActionViewItem(N,N.actions,this._contextMenuService,H),this._dropdown.actionRunner.onDidRun(W=>{W.action instanceof n.MenuItemAction&&this.update(W.action)})}update(N){this._storageService.store(this._storageKey,N.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(D,N,{keybinding:this._getDefaultActionKeybindingLabel(N)}),this._defaultAction.actionRunner=new class extends w.ActionRunner{runAction(P,x){return we(this,void 0,void 0,function*(){yield P.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=Me([fe(2,d.IKeybindingService),fe(3,h.INotificationService),fe(4,s.IContextMenuService),fe(5,n.IMenuService),fe(6,r.IInstantiationService),fe(7,o.IStorageService)],T);let O=class extends y.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=Me([fe(1,s.IContextViewService)],O);function R(A,N,P){return N instanceof n.MenuItemAction?A.createInstance(D,N,P):N instanceof n.SubmenuItemAction?N.item.isSelection?A.createInstance(O,N):N.item.rememberDefaultAction?A.createInstance(T,N,P):A.createInstance(I,N,P):void 0}e.createActionViewItem=R}),define(X[242],ee([1,0,7,69,212,40,16,13,27,2,80,17,30,203,650,156,788,29,25,14,55,8,34,72,73,432]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomizedMenuWorkbenchToolBar=e.InlineSuggestionHintsContentWidget=void 0;const m=(0,f.registerIcon)("inline-suggestion-hints-next",S.Codicon.chevronRight,(0,s.localize)(0,null)),C=(0,f.registerIcon)("inline-suggestion-hints-previous",S.Codicon.chevronLeft,(0,s.localize)(1,null));let L=e.InlineSuggestionHintsContentWidget=class hi extends g.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(O,R,A){const N=new E.Action(O,R,A,!0,()=>this._commandService.executeCommand(O)),P=this.keybindingService.lookupKeybinding(O,this._contextKeyService);let x=R;return P&&(x=(0,s.localize)(2,null,R,P.getLabel())),N.tooltip=x,N}constructor(O,R,A,N,P,x,F,B,V,$,M){super(),this.editor=O,this.withBorder=R,this._position=A,this._currentSuggestionIdx=N,this._suggestionCount=P,this._extraCommands=x,this._commandService=F,this.keybindingService=V,this._contextKeyService=$,this._menuService=M,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(i.showPreviousInlineSuggestionActionId,(0,s.localize)(3,null),t.ThemeIcon.asClassName(C)),this.availableSuggestionCountAction=new E.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(i.showNextInlineSuggestionActionId,(0,s.localize)(4,null),t.ThemeIcon.asClassName(m)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(h.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 Q=this._register(new k.ActionBar(this.nodes.actionBar));Q.push(this.previousAction,{icon:!0,label:!1}),Q.push(this.availableSuggestionCountAction),Q.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(B.createInstance(I,this.nodes.toolBar,h.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:ie=>ie.startsWith("primary")},actionViewItemProvider:(ie,re)=>ie instanceof h.MenuItemAction?B.createInstance(D,ie,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(ie=>{hi._dropDownVisible=ie})),this._register((0,p.autorun)("update position",ie=>{this._position.read(ie),this.editor.layoutContentWidget(this)})),this._register((0,p.autorun)("counts",ie=>{const re=this._suggestionCount.read(ie),ne=this._currentSuggestionIdx.read(ie);re!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${ne+1}/${re}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),re!==void 0&&re>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register((0,p.autorun)("extra commands",ie=>{const re=this._extraCommands.read(ie);if((0,w.equals)(this.lastCommands,re))return;this.lastCommands=re;const ne=re.map(se=>({class:void 0,id:se.id,enabled:!0,tooltip:se.tooltip||"",label:se.title,run:H=>this._commandService.executeCommand(se.id)}));for(const[se,H]of this.inlineCompletionsActionsMenus.getActions())for(const W of H)W instanceof h.MenuItemAction&&ne.push(W);ne.length>0&&ne.unshift(new E.Separator),this.toolBar.setAdditionalSecondaryActions(ne)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};L._dropDownVisible=!1,L.id=0,e.InlineSuggestionHintsContentWidget=L=Me([fe(6,o.ICommandService),fe(7,a.IInstantiationService),fe(8,u.IKeybindingService),fe(9,c.IContextKeyService),fe(10,h.IMenuService)],L);class D extends r.MenuEntryActionViewItem{updateLabel(){const O=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!O)return super.updateLabel();if(this.label){const R=(0,_.h)("div.keybinding").root;new y.KeybindingLabel(R,n.OS,Object.assign({disableTitle:!0},y.unthemedKeybindingLabelOptions)).set(O),this.label.textContent=this._action.label,this.label.appendChild(R),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let I=e.CustomizedMenuWorkbenchToolBar=class extends d.WorkbenchToolBar{constructor(O,R,A,N,P,x,F,B){super(O,Object.assign({resetMenu:R},A),N,P,x,F,B),this.menuId=R,this.options2=A,this.menuService=N,this.contextKeyService=P,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 O,R,A,N,P,x,F;const B=[],V=[];(0,r.createAndFillInActionBarActions)(this.menu,(O=this.options2)===null||O===void 0?void 0:O.menuOptions,{primary:B,secondary:V},(A=(R=this.options2)===null||R===void 0?void 0:R.toolbarOptions)===null||A===void 0?void 0:A.primaryGroup,(P=(N=this.options2)===null||N===void 0?void 0:N.toolbarOptions)===null||P===void 0?void 0:P.shouldInlineSubmenu,(F=(x=this.options2)===null||x===void 0?void 0:x.toolbarOptions)===null||F===void 0?void 0:F.useSeparatorsInPrimaryActions),V.push(...this.additionalActions),this.setActions(B,V)}setAdditionalSecondaryActions(O){(0,w.equals)(this.additionalActions,O,(R,A)=>R===A)||(this.additionalActions=O,this.updateToolbar())}};e.CustomizedMenuWorkbenchToolBar=I=Me([fe(3,h.IMenuService),fe(4,c.IContextKeyService),fe(5,l.IContextMenuService),fe(6,u.IKeybindingService),fe(7,v.ITelemetryService)],I)}),define(X[834],ee([1,0,7,69,2,674,156,29,14,8]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class p 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,E.localize)(0,null,this._action.label,p.symbolPrintEnter(i)))}static symbolPrintEnter(i){var s;return(s=i.getLabel())===null||s===void 0?void 0:s.replace(/\benter\b/gi,"\u23CE")}}let n=e.SuggestWidgetStatus=class{constructor(i,s,r,d,h){this._menuId=s,this._menuService=d,this._contextKeyService=h,this._menuDisposables=new y.DisposableStore,this.element=_.append(i,_.$(".suggest-status-bar"));const o=c=>c instanceof b.MenuItemAction?r.createInstance(p,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),s=()=>{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(()=>s())),this._menuDisposables.add(i)}hide(){this._menuDisposables.clear()}};e.SuggestWidgetStatus=n=Me([fe(2,g.IInstantiationService),fe(3,b.IMenuService),fe(4,S.IContextKeyService)],n)}),define(X[835],ee([1,0,7,40,6,2,156,29,14,34,43,72,800,55]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let s=e.ContextMenuService=class extends E.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,l,a,u){super(),this.telemetryService=h,this.notificationService=o,this.contextViewService=c,this.keybindingService=l,this.menuService=a,this.contextKeyService=u,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new y.Emitter),this._onDidHideContextMenu=this._store.add(new y.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=s=Me([fe(0,n.ITelemetryService),fe(1,p.INotificationService),fe(2,i.IContextViewService),fe(3,g.IKeybindingService),fe(4,b.IMenuService),fe(5,S.IContextKeyService)],s);var r;(function(d){function h(c){return c&&c.menuId instanceof b.MenuId}function o(c,l,a){if(!h(c))return c;const{menuId:u,menuActionOptions:v,contextKeyService:f}=c;return Object.assign(Object.assign({},c),{getActions:()=>{const m=[];if(u){const C=l.createMenu(u,f??a);(0,w.createAndFillInContextMenuActions)(C,v,m),C.dispose()}return c.getActions?k.Separator.join(c.getActions(),m):m}})}d.transform=o})(r||(e.ContextMenuMenuDelegate=r={}))}),define(X[836],ee([1,0,21,6,14,8,124,185,52,756,99,33,24,743]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let s=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:l=>this.setContextKey(l),linkOpenerDelegate:l=>{this.instantiationService.invokeFunction(a=>{a.get(S.IOpenerService).open(l,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>d.focus(),createList:(l,a,u,v,f)=>this.instantiationService.createInstance(b.WorkbenchList,l,a,u,v,f),hoverDelegate:{showHover(l,a){},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(l=>c.layout(l,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 y.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,n.asCssVariable)(n.quickInputBackground),quickInputForeground:(0,n.asCssVariable)(n.quickInputForeground),quickInputTitleBackground:(0,n.asCssVariable)(n.quickInputTitleBackground),widgetBorder:(0,n.asCssVariable)(n.widgetBorder),widgetShadow:(0,n.asCssVariable)(n.widgetShadow)},inputBox:p.defaultInputBoxStyles,toggle:p.defaultToggleStyles,countBadge:p.defaultCountBadgeStyles,button:p.defaultButtonStyles,progressBar:p.defaultProgressBarStyles,keybindingLabel:p.defaultKeybindingLabelStyles,list:(0,p.getListStyles)({listBackground:n.quickInputBackground,listFocusBackground:n.quickInputListFocusBackground,listFocusForeground:n.quickInputListFocusForeground,listInactiveFocusForeground:n.quickInputListFocusForeground,listInactiveSelectionIconForeground:n.quickInputListFocusIconForeground,listInactiveFocusBackground:n.quickInputListFocusBackground,listFocusOutline:n.activeContrastBorder,listInactiveFocusOutline:n.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,n.asCssVariable)(n.pickerGroupBorder),pickerGroupForeground:(0,n.asCssVariable)(n.pickerGroupForeground)}}}};e.QuickInputService=s=Me([fe(0,E.IInstantiationService),fe(1,y.IContextKeyService),fe(2,t.IThemeService),fe(3,w.ILayoutService)],s)}),define(X[837],ee([1,0,15,24,21,8,14,321,32,836,93,452]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=void 0;let n=class extends g.QuickInputService{constructor(d,h,o,c,l){super(h,o,c,new b.EditorScopedLayoutService(d.getContainerDomNode(),l)),this.host=void 0;const a=i.get(d);if(a){const u=a.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)}};n=Me([fe(1,E.IInstantiationService),fe(2,w.IContextKeyService),fe(3,k.IThemeService),fe(4,S.ICodeEditorService)],n);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(n,d);this.mapEditorToService.set(d,h),(0,p.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=y.CancellationToken.None){return this.activeService.pick(d,h,o)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};e.StandaloneQuickInputService=t=Me([fe(0,E.IInstantiationService),fe(1,S.ICodeEditorService)],t);class i{static get(d){return d.getContribution(i.ID)}constructor(d){this.editor=d,this.widget=new s(this.editor)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=i,i.ID="editor.controller.quickInput";class s{constructor(d){this.codeEditor=d,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return s.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=s,s.ID="editor.contrib.quickInputWidget",(0,_.registerEditorContribution)(i.ID,i,4)}),define(X[186],ee([1,0,8]),function(K,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 y{constructor(){this.id=y._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=y,y._ID=0,y.None=new y;class E{constructor(){this.id=E._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=E,E._ID=0,E.None=new E}),define(X[38],ee([1,0,16,37,11,6,2,9,20,117,191,12,5,23,168,39,28,46,573,820,313,271,491,492,305,574,175,578,106,186,104]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,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(j){const z=new m.PieceTreeTextBufferBuilder;return z.acceptChunk(j),z.finish()}e.createTextBufferFactory=O;function R(j){const z=new m.PieceTreeTextBufferBuilder;let U;for(;typeof(U=j.read())=="string";)z.acceptChunk(U);return z.finish()}e.createTextBufferFactoryFromSnapshot=R;function A(j,z){let U;return typeof j=="string"?U=O(j):h.isITextSnapshot(j)?U=R(j):U=j,U.create(z)}e.createTextBuffer=A;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,J=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,J+=te.length),J>=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 J=(0,u.guessIndentation)(z,U.tabSize,U.insertSpaces);return new h.TextModelResolvedOptions({tabSize:J.tabSize,indentSize:"tabSize",insertSpaces:J.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,J,te=null,G,ae,me){super(),this._undoRedoService=G,this._languageService=ae,this._languageConfigurationService=me,this._onWillDispose=this._register(new E.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 E.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new E.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new E.Emitter),this._eventEmitter=this._register(new ge),this._languageSelectionListener=this._register(new w.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new le,N++,this.id="$model"+N,this.isForSimpleWidget=J.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}=A(z,J.defaultEOL);this._buffer=Ce,this._bufferDisposable=Se,this._options=Wt.resolveOptions(this._buffer,J);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 a.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new c.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new L.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,ye,this._attachedViews);const Ee=this._buffer.getLineCount(),De=this._buffer.getValueLengthInRange(new t.Range(1,1,Ee,this._buffer.getLineLength(Ee)+1),0);J.largeFileOptimizations?this._isTooLargeForTokenization=De>Wt.LARGE_FILE_SIZE_THRESHOLD||Ee>Wt.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=De>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 l.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([],"",`
- `,!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 D.InternalModelContentChangeEvent(z,U)))}setValue(z){if(this._assertNotDisposed(),z==null)throw(0,y.illegalArgument)();const{textBuffer:U,disposable:J}=A(z,this._options.defaultEOL);this._setValueFromTextBuffer(U,J)}_createContentChanged2(z,U,J,te,G,ae,me,Ce){return{changes:[{range:z,rangeOffset:U,rangeLength:J,text:te}],eol:this._buffer.getEOL(),isEolChange:Ce,versionId:this.getVersionId(),isUndoing:G,isRedoing:ae,isFlush:me}}_setValueFromTextBuffer(z,U){this._assertNotDisposed();const J=this.getFullModelRange(),te=this.getValueLengthInRange(J),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 D.ModelRawContentChangedEvent([new D.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
- `:`
- `;if(this._buffer.getEOL()===U)return;const J=this.getFullModelRange(),te=this.getValueLengthInRange(J),G=this.getLineCount(),ae=this.getLineMaxColumn(G);this._onBeforeEOLChange(),this._buffer.setEOL(U),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new D.ModelRawContentChangedEvent([new D.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 J=0,te=U.length;J<te;J++){const G=U[J],ae=G.range,me=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-me,G.end=Se-me,(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 J=this._buffer.getLineCount();for(let te=1;te<=J;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,J=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,me=new h.TextModelResolvedOptions({tabSize:U,indentSize:J,insertSpaces:te,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:G,bracketPairColorizationOptions:ae});if(this._options.equals(me))return;const Ce=this._options.createChangeEvent(me);this._options=me,this._bracketPairs.handleDidChangeOptions(Ce),this._decorationProvider.handleDidChangeOptions(Ce),this._onDidChangeOptions.fire(Ce)}detectIndentation(z,U){this._assertNotDisposed();const J=(0,u.guessIndentation)(this._buffer,U,z);this.updateOptions({insertSpaces:J.insertSpaces,tabSize:J.tabSize,indentSize:J.tabSize})}normalizeIndentation(z){return this._assertNotDisposed(),(0,p.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(J=>({range:J.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 J=this.getFullModelRange(),te=this.getValueInRange(J,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 J=this.getFullModelRange(),te=this.getValueLengthInRange(J,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 Error("Illegal value for lineNumber");return this._buffer.getLineContent(z)}getLineLength(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(z)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
- `?0:1}getLineMinColumn(z){return this._assertNotDisposed(),1}getLineMaxColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(z)+1}getLineFirstNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(z)}getLineLastNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(z)}_validateRangeRelaxedNoAllocations(z){const U=this._buffer.getLineCount(),J=z.startLineNumber,te=z.startColumn;let G=Math.floor(typeof J=="number"&&!isNaN(J)?J: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 Ee=this.getLineMaxColumn(G);ae>=Ee&&(ae=Ee)}const me=z.endLineNumber,Ce=z.endColumn;let Se=Math.floor(typeof me=="number"&&!isNaN(me)?me: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 Ee=this.getLineMaxColumn(Se);ye>=Ee&&(ye=Ee)}return J===G&&te===ae&&me===Se&&Ce===ye&&z instanceof t.Range&&!(z instanceof i.Selection)?z:new t.Range(G,ae,Se,ye)}_isValidPosition(z,U,J){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(J===1){const ae=this._buffer.getLineCharCode(z,U-2);if(b.isHighSurrogate(ae))return!1}return!0}_validatePosition(z,U,J){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 n.Position(1,1);if(te>ae)return new n.Position(ae,this.getLineMaxColumn(ae));if(G<=1)return new n.Position(te,1);const me=this.getLineMaxColumn(te);if(G>=me)return new n.Position(te,me);if(J===1){const Ce=this._buffer.getLineCharCode(te,G-2);if(b.isHighSurrogate(Ce))return new n.Position(te,G-1)}return new n.Position(te,G)}validatePosition(z){return this._assertNotDisposed(),z instanceof n.Position&&this._isValidPosition(z.lineNumber,z.column,1)?z:this._validatePosition(z.lineNumber,z.column,1)}_isValidRange(z,U){const J=z.startLineNumber,te=z.startColumn,G=z.endLineNumber,ae=z.endColumn;if(!this._isValidPosition(J,te,0)||!this._isValidPosition(G,ae,0))return!1;if(U===1){const me=te>1?this._buffer.getLineCharCode(J,te-2):0,Ce=ae>1&&ae<=this._buffer.getLineLength(G)?this._buffer.getLineCharCode(G,ae-2):0,Se=b.isHighSurrogate(me),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 J=this._validatePosition(z.startLineNumber,z.startColumn,0),te=this._validatePosition(z.endLineNumber,z.endColumn,0),G=J.lineNumber,ae=J.column,me=te.lineNumber,Ce=te.column;{const Se=ae>1?this._buffer.getLineCharCode(G,ae-2):0,ye=Ce>1&&Ce<=this._buffer.getLineLength(me)?this._buffer.getLineCharCode(me,Ce-2):0,Ee=b.isHighSurrogate(Se),De=b.isHighSurrogate(ye);return!Ee&&!De?new t.Range(G,ae,me,Ce):G===me&&ae===Ce?new t.Range(G,ae-1,me,Ce-1):Ee&&De?new t.Range(G,ae-1,me,Ce+1):Ee?new t.Range(G,ae-1,me,Ce):new t.Range(G,ae,me,Ce+1)}return new t.Range(G,ae,me,Ce)}modifyPosition(z,U){this._assertNotDisposed();const J=this.getOffsetAt(z)+U;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,J)))}getFullModelRange(){this._assertNotDisposed();const z=this.getLineCount();return new t.Range(1,1,z,this.getLineMaxColumn(z))}findMatchesLineByLine(z,U,J,te){return this._buffer.findMatchesLineByLine(z,U,J,te)}findMatches(z,U,J,te,G,ae,me=P){this._assertNotDisposed();let Ce=null;U!==null&&(Array.isArray(U)||(U=[U]),U.every(Ee=>t.Range.isIRange(Ee))&&(Ce=U.map(Ee=>this.validateRange(Ee)))),Ce===null&&(Ce=[this.getFullModelRange()]),Ce=Ce.sort((Ee,De)=>Ee.startLineNumber-De.startLineNumber||Ee.startColumn-De.startColumn);const Se=[];Se.push(Ce.reduce((Ee,De)=>t.Range.areIntersecting(Ee,De)?Ee.plusRange(De):(Se.push(Ee),De)));let ye;if(!J&&z.indexOf(`
- `)<0){const De=new C.SearchParams(z,J,te,G).parseSearchRequest();if(!De)return[];ye=ke=>this.findMatchesLineByLine(ke,De,ae,me)}else ye=Ee=>C.TextModelSearch.findMatches(this,new C.SearchParams(z,J,te,G),Ee,ae,me);return Se.map(ye).reduce((Ee,De)=>Ee.concat(De),[])}findNextMatch(z,U,J,te,G,ae){this._assertNotDisposed();const me=this.validatePosition(U);if(!J&&z.indexOf(`
- `)<0){const Se=new C.SearchParams(z,J,te,G).parseSearchRequest();if(!Se)return null;const ye=this.getLineCount();let Ee=new t.Range(me.lineNumber,me.column,ye,this.getLineMaxColumn(ye)),De=this.findMatchesLineByLine(Ee,Se,ae,1);return C.TextModelSearch.findNextMatch(this,new C.SearchParams(z,J,te,G),me,ae),De.length>0||(Ee=new t.Range(1,1,me.lineNumber,this.getLineMaxColumn(me.lineNumber)),De=this.findMatchesLineByLine(Ee,Se,ae,1),De.length>0)?De[0]:null}return C.TextModelSearch.findNextMatch(this,new C.SearchParams(z,J,te,G),me,ae)}findPreviousMatch(z,U,J,te,G,ae){this._assertNotDisposed();const me=this.validatePosition(U);return C.TextModelSearch.findPreviousMatch(this,new C.SearchParams(z,J,te,G),me,ae)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(z){if((this.getEOL()===`
- `?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 J=0,te=z.length;J<te;J++)U[J]=this._validateEditOperation(z[J]);return U}pushEditOperations(z,U,J,te){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(z,this._validateEditOperations(U),J,te)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(z,U,J,te){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const G=U.map(me=>({range:this.validateRange(me.range),text:me.text}));let ae=!0;if(z)for(let me=0,Ce=z.length;me<Ce;me++){const Se=z[me];let ye=!1;for(let Ee=0,De=G.length;Ee<De;Ee++){const ke=G[Ee].range,Ie=ke.startLineNumber>Se.endLineNumber,he=Se.startLineNumber>ke.endLineNumber;if(!Ie&&!he){ye=!0;break}}if(!ye){ae=!1;break}}if(ae)for(let me=0,Ce=this._trimAutoWhitespaceLines.length;me<Ce;me++){const Se=this._trimAutoWhitespaceLines[me],ye=this.getLineMaxColumn(Se);let Ee=!0;for(let De=0,ke=G.length;De<ke;De++){const Ie=G[De].range,he=G[De].text;if(!(Se<Ie.startLineNumber||Se>Ie.endLineNumber)&&!(Se===Ie.startLineNumber&&Ie.startColumn===ye&&Ie.isEmpty()&&he&&he.length>0&&he.charAt(0)===`
- `)&&!(Se===Ie.startLineNumber&&Ie.startColumn===1&&Ie.isEmpty()&&he&&he.length>0&&he.charAt(he.length-1)===`
- `)){Ee=!1;break}}if(Ee){const De=new t.Range(Se,1,Se,ye);U.push(new h.ValidAnnotatedEditOperation(null,De,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(z,U,J,te)}_applyUndo(z,U,J,te){const G=z.map(ae=>{const me=this.getPositionAt(ae.newPosition),Ce=this.getPositionAt(ae.newEnd);return{range:new t.Range(me.lineNumber,me.column,Ce.lineNumber,Ce.column),text:ae.oldText}});this._applyUndoRedoEdits(G,U,!0,!1,J,te)}_applyRedo(z,U,J,te){const G=z.map(ae=>{const me=this.getPositionAt(ae.oldPosition),Ce=this.getPositionAt(ae.oldEnd);return{range:new t.Range(me.lineNumber,me.column,Ce.lineNumber,Ce.column),text:ae.newText}});this._applyUndoRedoEdits(G,U,!1,!0,J,te)}_applyUndoRedoEdits(z,U,J,te,G,ae){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=J,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 J=this._validateEditOperations(z);return this._doApplyEdits(J,U)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(z,U){const J=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 Ee=ae[Se];this._decorationsTree.acceptReplace(Ee.rangeOffset,Ee.rangeLength,Ee.text.length,Ee.forceMoveMarkers)}const me=[];this._increaseVersionId();let Ce=J;for(let Se=0,ye=ae.length;Se<ye;Se++){const Ee=ae[Se],[De]=(0,g.countEOL)(Ee.text);this._onDidChangeDecorations.fire();const ke=Ee.range.startLineNumber,Ie=Ee.range.endLineNumber,he=Ie-ke,ve=De,de=Math.min(he,ve),pe=ve-he,Le=G-Ce-pe+ke,Ne=Le,be=Le+ve,_e=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new n.Position(Ne,1)),this.getOffsetAt(new n.Position(be,this.getLineMaxColumn(be))),0),Te=D.LineInjectedText.fromDecorations(_e),Oe=new _.ArrayQueue(Te);for(let Pe=de;Pe>=0;Pe--){const Be=ke+Pe,Fe=Le+Pe;Oe.takeFromEndWhile(Ze=>Ze.lineNumber>Fe);const ze=Oe.takeFromEndWhile(Ze=>Ze.lineNumber===Fe);me.push(new D.ModelRawLineChanged(Be,this.getLineContent(Fe),ze))}if(de<he){const Pe=ke+de;me.push(new D.ModelRawLinesDeleted(Pe+1,Ie))}if(de<ve){const Pe=new _.ArrayQueue(Te),Be=ke+de,Fe=ve-de,ze=G-Ce-Fe+Be+1,Ze=[],Ge=[];for(let tt=0;tt<Fe;tt++){const He=ze+tt;Ge[tt]=this.getLineContent(He),Pe.takeWhile(Ae=>Ae.lineNumber<He),Ze[tt]=Pe.takeWhile(Ae=>Ae.lineNumber===He)}me.push(new D.ModelRawLinesInserted(Be+1,ke+ve,Ge,Ze))}Ce+=pe}this._emitContentChangedEvent(new D.ModelRawContentChangedEvent(me,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 J=Array.from(z).map(te=>new D.ModelRawLineChanged(te,this.getLineContent(te),this._getInjectedTextInLine(te)));this._onDidChangeInjectedText.fire(new D.ModelInjectedTextChangedEvent(J))}changeDecorations(z,U=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(U,z)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(z,U){const J={addDecoration:(G,ae)=>this._deltaDecorationsImpl(z,[],[{range:G,options:ae}])[0],changeDecoration:(G,ae)=>{this._changeDecorationImpl(G,ae)},changeDecorationOptions:(G,ae)=>{this._changeDecorationOptionsImpl(G,oe(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(J)}catch(G){(0,y.onUnexpectedError)(G)}return J.addDecoration=B,J.changeDecoration=B,J.changeDecorationOptions=B,J.removeDecoration=B,J.deltaDecorations=B,te}deltaDecorations(z,U,J=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,y.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(J,z,U)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(z){return this.getDecorationRange(z)}_setTrackedRange(z,U,J){const te=z?this._decorations[z]:null;if(!te)return U?this._deltaDecorationsImpl(0,[],[{range:U,options:Y[J]}],!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),me=this._buffer.getOffsetAt(G.endLineNumber,G.endColumn);return this._decorationsTree.delete(te),te.reset(this.getVersionId(),ae,me,G),te.setOptions(Y[J]),this._decorationsTree.insert(te),te.id}removeAllDecorationsWithOwnerId(z){if(this._isDisposed)return;const U=this._decorationsTree.collectNodesFromOwner(z);for(let J=0,te=U.length;J<te;J++){const G=U[J];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,J=!1){return z<1||z>this.getLineCount()?[]:this.getLinesDecorations(z,z,U,J)}getLinesDecorations(z,U,J=0,te=!1,G=!1){const ae=this.getLineCount(),me=Math.min(ae,Math.max(1,z)),Ce=Math.min(ae,Math.max(1,U)),Se=this.getLineMaxColumn(Ce),ye=new t.Range(me,1,Ce,Se),Ee=this._getDecorationsInRange(ye,J,te,G);return(0,_.pushMany)(Ee,this._decorationProvider.getDecorationsInRange(ye,J,te)),Ee}getDecorationsInRange(z,U=0,J=!1,te=!1,G=!1){const ae=this.validateRange(z),me=this._getDecorationsInRange(ae,U,J,G);return(0,_.pushMany)(me,this._decorationProvider.getDecorationsInRange(ae,U,J,te)),me}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),J=U+this._buffer.getLineLength(z),te=this._decorationsTree.getInjectedTextInInterval(this,U,J,0);return D.LineInjectedText.fromDecorations(te).filter(G=>G.lineNumber===z)}getAllDecorations(z=0,U=!1){let J=this._decorationsTree.getAll(this,z,U,!1,!1);return J=J.concat(this._decorationProvider.getAllDecorations(z,U)),J}getAllMarginDecorations(z=0){return this._decorationsTree.getAll(this,z,!1,!1,!0)}_getDecorationsInRange(z,U,J,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,J,te)}getRangeAt(z,U){return this._buffer.getRangeAt(z,U-z)}_changeDecorationImpl(z,U){const J=this._decorations[z];if(!J)return;if(J.options.after){const me=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(me.endLineNumber)}if(J.options.before){const me=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(me.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(J),J.reset(this.getVersionId(),G,ae,te),this._decorationsTree.insert(J),this._onDidChangeDecorations.checkAffectedAndFire(J.options),J.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(te.endLineNumber),J.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(te.startLineNumber)}_changeDecorationOptionsImpl(z,U){const J=this._decorations[z];if(!J)return;const te=!!(J.options.overviewRuler&&J.options.overviewRuler.color),G=!!(U.overviewRuler&&U.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(J.options),this._onDidChangeDecorations.checkAffectedAndFire(U),J.options.after||U.after){const ae=this._decorationsTree.getNodeRange(this,J);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ae.endLineNumber)}if(J.options.before||U.before){const ae=this._decorationsTree.getNodeRange(this,J);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ae.startLineNumber)}te!==G?(this._decorationsTree.delete(J),J.setOptions(U),this._decorationsTree.insert(J)):J.setOptions(U)}_deltaDecorationsImpl(z,U,J,te=!1){const G=this.getVersionId(),ae=U.length;let me=0;const Ce=J.length;let Se=0;this._onDidChangeDecorations.beginDeferredEmit();try{const ye=new Array(Ce);for(;me<ae||Se<Ce;){let Ee=null;if(me<ae){do Ee=this._decorations[U[me++]];while(!Ee&&me<ae);if(Ee){if(Ee.options.after){const De=this._decorationsTree.getNodeRange(this,Ee);this._onDidChangeDecorations.recordLineAffectedByInjectedText(De.endLineNumber)}if(Ee.options.before){const De=this._decorationsTree.getNodeRange(this,Ee);this._onDidChangeDecorations.recordLineAffectedByInjectedText(De.startLineNumber)}this._decorationsTree.delete(Ee),te||this._onDidChangeDecorations.checkAffectedAndFire(Ee.options)}}if(Se<Ce){if(!Ee){const de=++this._lastDecorationId,pe=`${this._instanceId};${de}`;Ee=new v.IntervalNode(pe,0,0),this._decorations[pe]=Ee}const De=J[Se],ke=this._validateRangeRelaxedNoAllocations(De.range),Ie=oe(De.options),he=this._buffer.getOffsetAt(ke.startLineNumber,ke.startColumn),ve=this._buffer.getOffsetAt(ke.endLineNumber,ke.endColumn);Ee.ownerId=z,Ee.reset(G,he,ve,ke),Ee.setOptions(Ie),Ee.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ke.endLineNumber),Ee.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ke.startLineNumber),te||this._onDidChangeDecorations.checkAffectedAndFire(Ie),this._decorationsTree.insert(Ee),ye[Se]=Ee.id,Se++}else Ee&&delete this._decorations[Ee.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 $(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:s.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:s.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:s.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:s.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:s.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:s.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},e.TextModel=V=Me([fe(4,I.IUndoRedoService),fe(5,r.ILanguageService),fe(6,d.ILanguageConfigurationService)],V);function $(j){let z=0;for(const U of j)if(U===" "||U===" ")z++;else break;return z}function M(j){return!!(j.options.overviewRuler&&j.options.overviewRuler.color)}function Q(j){return!!j.options.after||!!j.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 J of U)J.range===null&&(J.range=z.getRangeAt(J.cachedAbsoluteStart,J.cachedAbsoluteEnd));return U}getAllInInterval(z,U,J,te,G,ae){const me=z.getVersionId(),Ce=this._intervalSearch(U,J,te,G,me,ae);return this._ensureNodesHaveRanges(z,Ce)}_intervalSearch(z,U,J,te,G,ae){const me=this._decorationsTree0.intervalSearch(z,U,J,te,G,ae),Ce=this._decorationsTree1.intervalSearch(z,U,J,te,G,ae),Se=this._injectedTextDecorationsTree.intervalSearch(z,U,J,te,G,ae);return me.concat(Ce).concat(Se)}getInjectedTextInInterval(z,U,J,te){const G=z.getVersionId(),ae=this._injectedTextDecorationsTree.intervalSearch(U,J,te,!1,G,!1);return this._ensureNodesHaveRanges(z,ae).filter(me=>me.options.showIfCollapsed||!me.range.isEmpty())}getAllInjectedText(z,U){const J=z.getVersionId(),te=this._injectedTextDecorationsTree.search(U,!1,J,!1);return this._ensureNodesHaveRanges(z,te).filter(G=>G.options.showIfCollapsed||!G.range.isEmpty())}getAll(z,U,J,te,G){const ae=z.getVersionId(),me=this._search(U,J,te,ae,G);return this._ensureNodesHaveRanges(z,me)}_search(z,U,J,te,G){if(J)return this._decorationsTree1.search(z,U,te,G);{const ae=this._decorationsTree0.search(z,U,te,G),me=this._decorationsTree1.search(z,U,te,G),Ce=this._injectedTextDecorationsTree.search(z,U,te,G);return ae.concat(me).concat(Ce)}}collectNodesFromOwner(z){const U=this._decorationsTree0.collectNodesFromOwner(z),J=this._decorationsTree1.collectNodesFromOwner(z),te=this._injectedTextDecorationsTree.collectNodesFromOwner(z);return U.concat(J).concat(te)}collectNodesPostOrder(){const z=this._decorationsTree0.collectNodesPostOrder(),U=this._decorationsTree1.collectNodesPostOrder(),J=this._injectedTextDecorationsTree.collectNodesPostOrder();return z.concat(U).concat(J)}insert(z){Q(z)?this._injectedTextDecorationsTree.insert(z):M(z)?this._decorationsTree1.insert(z):this._decorationsTree0.insert(z)}delete(z){Q(z)?this._injectedTextDecorationsTree.delete(z):M(z)?this._decorationsTree1.delete(z):this._decorationsTree0.delete(z)}getNodeRange(z,U){const J=z.getVersionId();return U.cachedVersionId!==J&&this._resolveNode(U,J),U.range===null&&(U.range=z.getRangeAt(U.cachedAbsoluteStart,U.cachedAbsoluteEnd)),U.range}_resolveNode(z,U){Q(z)?this._injectedTextDecorationsTree.resolveNode(z,U):M(z)?this._decorationsTree1.resolveNode(z,U):this._decorationsTree0.resolveNode(z,U)}acceptReplace(z,U,J,te){this._decorationsTree0.acceptReplace(z,U,J,te),this._decorationsTree1.acceptReplace(z,U,J,te),this._injectedTextDecorationsTree.acceptReplace(z,U,J,te)}}function re(j){return j.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 J=z?U.getColor(z.id):null;return J?J.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 q{static from(z){return z instanceof q?z:new q(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=q;class Z{static register(z){return new Z(z)}static createDynamic(z){return new Z(z)}constructor(z){var U,J,te,G,ae;this.description=z.description,this.blockClassName=z.blockClassName?re(z.blockClassName):null,this.blockDoesNotCollapse=(U=z.blockDoesNotCollapse)!==null&&U!==void 0?U:null,this.blockIsAfterEnd=(J=z.blockIsAfterEnd)!==null&&J!==void 0?J: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?re(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?re(z.glyphMarginClassName):null,this.linesDecorationsClassName=z.linesDecorationsClassName?re(z.linesDecorationsClassName):null,this.firstLineDecorationClassName=z.firstLineDecorationClassName?re(z.firstLineDecorationClassName):null,this.marginClassName=z.marginClassName?re(z.marginClassName):null,this.inlineClassName=z.inlineClassName?re(z.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=z.beforeContentClassName?re(z.beforeContentClassName):null,this.afterContentClassName=z.afterContentClassName?re(z.afterContentClassName):null,this.after=z.after?q.from(z.after):null,this.before=z.before?q.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 Y=[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 oe(j){return j instanceof Z?j:Z.createDynamic(j)}class ce extends w.Disposable{constructor(z){super(),this.handleBeforeFire=z,this._actual=this._register(new E.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 ge extends w.Disposable{constructor(){super(),this._fastEmitter=this._register(new E.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new E.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 le{constructor(){this._onDidChangeVisibleRanges=new E.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=le;class ue{constructor(z){this.handleStateChange=z}setVisibleLines(z,U){const J=z.map(te=>new T.LineRange(te.startLineNumber,te.endLineNumber+1));this.handleStateChange({visibleLineRanges:J,stabilized:U})}}}),define(X[838],ee([1,0,6,2,17,38,168,71,39,180,26,186,136,313,48,45,28]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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,m=v.createSnapshot();let C;for(;C=m.read();)f.update(C);return f.digest()}class c{constructor(f,m,C){this.model=f,this._modelEventListeners=new k.DisposableStore,this.model=f,this._modelEventListeners.add(f.onWillDispose(()=>m(f))),this._modelEventListeners.add(f.onDidChangeLanguage(L=>C(f,L)))}dispose(){this._modelEventListeners.dispose()}}const l=y.isLinux||y.isMacintosh?1:2;class a{constructor(f,m,C,L,D,I,T,O){this.uri=f,this.initialUndoRedoSnapshot=m,this.time=C,this.sharesUndoRedoStack=L,this.heapSize=D,this.sha1=I,this.versionId=T,this.alternativeVersionId=O}}let u=e.ModelService=class zt extends k.Disposable{constructor(f,m,C,L,D){super(),this._configurationService=f,this._resourcePropertiesService=m,this._undoRedoService=C,this._languageService=L,this._languageConfigurationService=D,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,m){var C;let L=w.EDITOR_MODEL_DEFAULTS.tabSize;if(f.editor&&typeof f.editor.tabSize<"u"){const x=parseInt(f.editor.tabSize,10);isNaN(x)||(L=x),L<1&&(L=1)}let D="tabSize";if(f.editor&&typeof f.editor.indentSize<"u"&&f.editor.indentSize!=="tabSize"){const x=parseInt(f.editor.indentSize,10);isNaN(x)||(D=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=l;const O=f.eol;O===`\r
- `?T=2:O===`
- `&&(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 A=w.EDITOR_MODEL_DEFAULTS.detectIndentation;f.editor&&typeof f.editor.detectIndentation<"u"&&(A=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:m,tabSize:L,indentSize:D,insertSpaces:I,detectIndentation:A,defaultEOL:T,trimAutoWhitespace:R,largeFileOptimizations:N,bracketPairColorizationOptions:P}}_getEOL(f,m){if(f)return this._resourcePropertiesService.getEOL(f,m);const C=this._configurationService.getValue("files.eol",{overrideIdentifier:m});return C&&typeof C=="string"&&C!=="auto"?C:y.OS===3||y.OS===2?`
- `:`\r
- `}_shouldRestoreUndoStack(){const f=this._configurationService.getValue("files.restoreUndoStack");return typeof f=="boolean"?f:!0}getCreationOptions(f,m,C){const L=typeof f=="string"?f:f.languageId;let D=this._modelCreationOptionsByLanguageAndResource[L+m];if(!D){const I=this._configurationService.getValue("editor",{overrideIdentifier:L,resource:m}),T=this._getEOL(m,L);D=zt._readModelOptions({editor:I,eol:T},C),this._modelCreationOptionsByLanguageAndResource[L+m]=D}return D}_updateModelOptions(f){const m=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const C=Object.keys(this._models);for(let L=0,D=C.length;L<D;L++){const I=C[L],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 A=m[O+R],N=this.getCreationOptions(O,R,T.model.isForSimpleWidget);zt._setModelOptionsForModel(T.model,N,A)}}static _setModelOptionsForModel(f,m,C){C&&C.defaultEOL!==m.defaultEOL&&f.getLineCount()===1&&f.setEOL(m.defaultEOL===1?0:1),!(C&&C.detectIndentation===m.detectIndentation&&C.insertSpaces===m.insertSpaces&&C.tabSize===m.tabSize&&C.indentSize===m.indentSize&&C.trimAutoWhitespace===m.trimAutoWhitespace&&(0,r.equals)(C.bracketPairColorizationOptions,m.bracketPairColorizationOptions))&&(m.detectIndentation?(f.detectIndentation(m.insertSpaces,m.tabSize),f.updateOptions({trimAutoWhitespace:m.trimAutoWhitespace,bracketColorizationOptions:m.bracketPairColorizationOptions})):f.updateOptions({insertSpaces:m.insertSpaces,tabSize:m.tabSize,indentSize:m.indentSize,trimAutoWhitespace:m.trimAutoWhitespace,bracketColorizationOptions:m.bracketPairColorizationOptions}))}_insertDisposedModel(f){this._disposedModels.set(h(f.uri),f),this._disposedModelsHeapSize+=f.heapSize}_removeDisposedModel(f){const m=this._disposedModels.get(h(f));return m&&(this._disposedModelsHeapSize-=m.heapSize),this._disposedModels.delete(h(f)),m}_ensureDisposedModelsHeapSize(f){if(this._disposedModelsHeapSize>f){const m=[];for(this._disposedModels.forEach(C=>{C.sharesUndoRedoStack||m.push(C)}),m.sort((C,L)=>C.time-L.time);m.length>0&&this._disposedModelsHeapSize>f;){const C=m.shift();this._removeDisposedModel(C.uri),C.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(C.initialUndoRedoSnapshot)}}}_createModelData(f,m,C,L){const D=this.getCreationOptions(m,C,L),I=new E.TextModel(f,m,D,C,this._undoRedoService,this._languageService,this._languageConfigurationService);if(C&&this._disposedModels.has(h(C))){const R=this._removeDisposedModel(C),A=this._undoRedoService.getElements(C),N=o(I)===R.sha1;if(N||R.sharesUndoRedoStack){for(const P of A.past)(0,i.isEditStackElement)(P)&&P.matchesResource(C)&&P.setModel(I);for(const P of A.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,A)=>this._onDidChangeLanguage(R,A));return this._models[T]=O,O}createModel(f,m,C,L=!1){let D;return m?D=this._createModelData(f,m,C,L):D=this._createModelData(f,b.PLAINTEXT_LANGUAGE_ID,C,L),this._onModelAdded.fire(D.model),D.model}getModels(){const f=[],m=Object.keys(this._models);for(let C=0,L=m.length;C<L;C++){const D=m[C];f.push(this._models[D].model)}return f}getModel(f){const m=h(f),C=this._models[m];return C?C.model:null}_schemaShouldMaintainUndoRedoElements(f){return f.scheme===s.Schemas.file||f.scheme===s.Schemas.vscodeRemote||f.scheme===s.Schemas.vscodeUserData||f.scheme===s.Schemas.vscodeNotebookCell||f.scheme==="fake-fs"}_onWillDispose(f){const m=h(f.uri),C=this._models[m],L=this._undoRedoService.getUriComparisonKey(f.uri)!==f.uri.toString();let D=!1,I=0;if(L||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)&&(D=!0,I+=R.heapSize(f.uri),R.setModel(f.uri));for(const R of O.future)(0,i.isEditStackElement)(R)&&R.matchesResource(f.uri)&&(D=!0,I+=R.heapSize(f.uri),R.setModel(f.uri))}}const T=zt.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(D)if(!L&&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 a(f.uri,C.model.getInitialUndoRedoSnapshot(),Date.now(),L,I,o(f),f.getVersionId(),f.getAlternativeVersionId()));else if(!L){const O=C.model.getInitialUndoRedoSnapshot();O!==null&&this._undoRedoService.restoreSnapshot(O)}delete this._models[m],C.dispose(),delete this._modelCreationOptionsByLanguageAndResource[f.getLanguageId()+f.uri],this._onModelRemoved.fire(f)}_onDidChangeLanguage(f,m){const C=m.oldLanguage,L=f.getLanguageId(),D=this.getCreationOptions(C,f.uri,f.isForSimpleWidget),I=this.getCreationOptions(L,f.uri,f.isForSimpleWidget);zt._setModelOptionsForModel(f,I,D),this._onModelModeChanged.fire({model:f,oldLanguageId:C})}};u.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,e.ModelService=u=Me([fe(0,p.IConfigurationService),fe(1,g.ITextResourcePropertiesService),fe(2,n.IUndoRedoService),fe(3,S.ILanguageService),fe(4,d.ILanguageConfigurationService)],u)}),define(X[839],ee([1,0,16,12,5,200,38,106,202,512,265,81]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class t{constructor(l,a,u,v,f,m,C,L,D,I){this._editorId=l,this.model=a,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=u,this._monospaceLineBreaksComputerFactory=v,this.fontInfo=f,this.tabSize=m,this.wrappingStrategy=C,this.wrappingColumn=L,this.wrappingIndent=D,this.wordBreak=I,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new d(this)}_constructLines(l,a){this.modelLineProjections=[],l&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const u=this.model.getLinesContent(),v=this.model.getInjectedTextDecorations(this._editorId),f=u.length,m=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);m.addRequest(u[N],P,a?a[N]:null)}const L=m.finalize(),D=[],I=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(y.Range.compareRangesUsingStarts);let T=1,O=0,R=-1,A=R+1<I.length?O+1:f+2;for(let N=0;N<f;N++){const P=N+1;P===A&&(R++,T=I[R].startLineNumber,O=I[R].endLineNumber,A=R+1<I.length?O+1:f+2);const x=P>=T&&P<=O,F=(0,g.createModelLineProjection)(L[N],!x);D[N]=F.getViewLineCount(),this.modelLineProjections[N]=F}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new p.ConstantTimePrefixSumComputer(D)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(l=>this.model.getDecorationRange(l))}setHiddenAreas(l){const a=l.map(O=>this.model.validateRange(O)),u=i(a),v=this.hiddenAreasDecorationIds.map(O=>this.model.getDecorationRange(O)).sort(y.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 m=u;let C=1,L=0,D=-1,I=D+1<m.length?L+1:this.modelLineProjections.length+2,T=!1;for(let O=0;O<this.modelLineProjections.length;O++){const R=O+1;R===I&&(D++,C=m[D].startLineNumber,L=m[D].endLineNumber,I=D+1<m.length?L+1:this.modelLineProjections.length+2);let A=!1;if(R>=C&&R<=L?this.modelLineProjections[O].isVisible()&&(this.modelLineProjections[O]=this.modelLineProjections[O].setVisible(!1),A=!0):(T=!0,this.modelLineProjections[O].isVisible()||(this.modelLineProjections[O]=this.modelLineProjections[O].setVisible(!0),A=!0)),A){const N=this.modelLineProjections[O].getViewLineCount();this.projectedModelLineLineCounts.setValue(O,N)}}return T||this.setHiddenAreas([]),!0}modelPositionIsVisible(l,a){return l<1||l>this.modelLineProjections.length?!1:this.modelLineProjections[l-1].isVisible()}getModelLineViewLineCount(l){return l<1||l>this.modelLineProjections.length?1:this.modelLineProjections[l-1].getViewLineCount()}setTabSize(l){return this.tabSize===l?!1:(this.tabSize=l,this._constructLines(!1,null),!0)}setWrappingSettings(l,a,u,v,f){const m=this.fontInfo.equals(l),C=this.wrappingStrategy===a,L=this.wrappingColumn===u,D=this.wrappingIndent===v,I=this.wordBreak===f;if(m&&C&&L&&D&&I)return!1;const T=m&&C&&!L&&D&&I;this.fontInfo=l,this.wrappingStrategy=a,this.wrappingColumn=u,this.wrappingIndent=v,this.wordBreak=f;let O=null;if(T){O=[];for(let R=0,A=this.modelLineProjections.length;R<A;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(l,a,u){if(!l||l<=this._validModelVersionId)return null;const v=a===1?1:this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,f=this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections.splice(a-1,u-a+1),this.projectedModelLineLineCounts.removeValues(a-1,u-a+1),new S.ViewLinesDeletedEvent(v,f)}onModelLinesInserted(l,a,u,v){if(!l||l<=this._validModelVersionId)return null;const f=a>2&&!this.modelLineProjections[a-2].isVisible(),m=a===1?1:this.projectedModelLineLineCounts.getPrefixSum(a-1)+1;let C=0;const L=[],D=[];for(let I=0,T=v.length;I<T;I++){const O=(0,g.createModelLineProjection)(v[I],!f);L.push(O);const R=O.getViewLineCount();C+=R,D[I]=R}return this.modelLineProjections=this.modelLineProjections.slice(0,a-1).concat(L).concat(this.modelLineProjections.slice(a-1)),this.projectedModelLineLineCounts.insertValues(a-1,D),new S.ViewLinesInsertedEvent(m,m+C-1)}onModelLineChanged(l,a,u){if(l!==null&&l<=this._validModelVersionId)return[!1,null,null,null];const v=a-1,f=this.modelLineProjections[v].getViewLineCount(),m=this.modelLineProjections[v].isVisible(),C=(0,g.createModelLineProjection)(u,m);this.modelLineProjections[v]=C;const L=this.modelLineProjections[v].getViewLineCount();let D=!1,I=0,T=-1,O=0,R=-1,A=0,N=-1;f>L?(I=this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,T=I+L-1,A=T+1,N=A+(f-L)-1,D=!0):f<L?(I=this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,T=I+f-1,O=T+1,R=O+(L-f)-1,D=!0):(I=this.projectedModelLineLineCounts.getPrefixSum(a-1)+1,T=I+L-1),this.projectedModelLineLineCounts.setValue(v,L);const P=I<=T?new S.ViewLinesChangedEvent(I,T-I+1):null,x=O<=R?new S.ViewLinesInsertedEvent(O,R):null,F=A<=N?new S.ViewLinesDeletedEvent(A,N):null;return[D,P,x,F]}acceptVersionId(l){this._validModelVersionId=l,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(l){if(l<1)return 1;const a=this.getViewLineCount();return l>a?a:l|0}getActiveIndentGuide(l,a,u){l=this._toValidViewLineNumber(l),a=this._toValidViewLineNumber(a),u=this._toValidViewLineNumber(u);const v=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),f=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),m=this.convertViewPositionToModelPosition(u,this.getViewLineMinColumn(u)),C=this.model.guides.getActiveIndentGuide(v.lineNumber,f.lineNumber,m.lineNumber),L=this.convertModelPositionToViewPosition(C.startLineNumber,1),D=this.convertModelPositionToViewPosition(C.endLineNumber,this.model.getLineMaxColumn(C.endLineNumber));return{startLineNumber:L.lineNumber,endLineNumber:D.lineNumber,indent:C.indent}}getViewLineInfo(l){l=this._toValidViewLineNumber(l);const a=this.projectedModelLineLineCounts.getIndexOf(l-1),u=a.index,v=a.remainder;return new s(u+1,v)}getMinColumnOfViewLine(l){return this.modelLineProjections[l.modelLineNumber-1].getViewLineMinColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(l){return this.modelLineProjections[l.modelLineNumber-1].getViewLineMaxColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(l){const a=this.modelLineProjections[l.modelLineNumber-1],u=a.getViewLineMinColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx),v=a.getModelColumnOfViewPosition(l.modelLineWrappedLineIdx,u);return new k.Position(l.modelLineNumber,v)}getModelEndPositionOfViewLine(l){const a=this.modelLineProjections[l.modelLineNumber-1],u=a.getViewLineMaxColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx),v=a.getModelColumnOfViewPosition(l.modelLineWrappedLineIdx,u);return new k.Position(l.modelLineNumber,v)}getViewLineInfosGroupedByModelRanges(l,a){const u=this.getViewLineInfo(l),v=this.getViewLineInfo(a),f=new Array;let m=this.getModelStartPositionOfViewLine(u),C=new Array;for(let L=u.modelLineNumber;L<=v.modelLineNumber;L++){const D=this.modelLineProjections[L-1];if(D.isVisible()){const I=L===u.modelLineNumber?u.modelLineWrappedLineIdx:0,T=L===v.modelLineNumber?v.modelLineWrappedLineIdx+1:D.getViewLineCount();for(let O=I;O<T;O++)C.push(new s(L,O))}if(!D.isVisible()&&m){const I=new k.Position(L-1,this.model.getLineMaxColumn(L-1)+1),T=y.Range.fromPositions(m,I);f.push(new r(T,C)),C=[],m=null}else D.isVisible()&&!m&&(m=new k.Position(L,1))}if(m){const L=y.Range.fromPositions(m,this.getModelEndPositionOfViewLine(v));f.push(new r(L,C))}return f}getViewLinesBracketGuides(l,a,u,v){const f=u?this.convertViewPositionToModelPosition(u.lineNumber,u.column):null,m=[];for(const C of this.getViewLineInfosGroupedByModelRanges(l,a)){const L=C.modelRange.startLineNumber,D=this.model.guides.getLinesBracketGuides(L,C.modelRange.endLineNumber,f,v);for(const I of C.viewLines){const O=D[I.modelLineNumber-L].map(R=>{if(R.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.forWrappedLinesAfterColumn).lineNumber>=I.modelLineWrappedLineIdx||R.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.forWrappedLinesBeforeOrAtColumn).lineNumber<I.modelLineWrappedLineIdx)return;if(!R.horizontalLine)return R;let A=-1;if(R.column!==-1){const x=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.column);if(x.lineNumber===I.modelLineWrappedLineIdx)A=x.column;else if(x.lineNumber<I.modelLineWrappedLineIdx)A=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 E.IndentGuide(R.visibleColumn,A,R.className,new E.IndentGuideHorizontalLine(R.horizontalLine.top,N.column),-1,-1):P.lineNumber<I.modelLineWrappedLineIdx||R.visibleColumn!==-1?void 0:new E.IndentGuide(R.visibleColumn,A,R.className,new E.IndentGuideHorizontalLine(R.horizontalLine.top,this.getMaxColumnOfViewLine(I)),-1,-1)});m.push(O.filter(R=>!!R))}}return m}getViewLinesIndentGuides(l,a){l=this._toValidViewLineNumber(l),a=this._toValidViewLineNumber(a);const u=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),v=this.convertViewPositionToModelPosition(a,this.getViewLineMaxColumn(a));let f=[];const m=[],C=[],L=u.lineNumber-1,D=v.lineNumber-1;let I=null;for(let A=L;A<=D;A++){const N=this.modelLineProjections[A];if(N.isVisible()){const P=N.getViewLineNumberOfModelPosition(0,A===L?u.column:1),x=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(A+1)),F=x-P+1;let B=0;F>1&&N.getViewLineMinColumn(this.model,A+1,x)===1&&(B=P===0?1:2),m.push(F),C.push(B),I===null&&(I=new k.Position(A+1,0))}else I!==null&&(f=f.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,A)),I=null)}I!==null&&(f=f.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,v.lineNumber)),I=null);const T=a-l+1,O=new Array(T);let R=0;for(let A=0,N=f.length;A<N;A++){let P=f[A];const x=Math.min(T-R,m[A]),F=C[A];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(l){const a=this.getViewLineInfo(l);return this.modelLineProjections[a.modelLineNumber-1].getViewLineContent(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineLength(l){const a=this.getViewLineInfo(l);return this.modelLineProjections[a.modelLineNumber-1].getViewLineLength(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineMinColumn(l){const a=this.getViewLineInfo(l);return this.modelLineProjections[a.modelLineNumber-1].getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineMaxColumn(l){const a=this.getViewLineInfo(l);return this.modelLineProjections[a.modelLineNumber-1].getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLineData(l){const a=this.getViewLineInfo(l);return this.modelLineProjections[a.modelLineNumber-1].getViewLineData(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getViewLinesData(l,a,u){l=this._toValidViewLineNumber(l),a=this._toValidViewLineNumber(a);const v=this.projectedModelLineLineCounts.getIndexOf(l-1);let f=l;const m=v.index,C=v.remainder,L=[];for(let D=m,I=this.model.getLineCount();D<I;D++){const T=this.modelLineProjections[D];if(!T.isVisible())continue;const O=D===m?C:0;let R=T.getViewLineCount()-O,A=!1;if(f+R>a&&(A=!0,R=a-f+1),T.getViewLinesData(this.model,D+1,O,R,f-l,u,L),f+=R,A)break}return L}validateViewPosition(l,a,u){l=this._toValidViewLineNumber(l);const v=this.projectedModelLineLineCounts.getIndexOf(l-1),f=v.index,m=v.remainder,C=this.modelLineProjections[f],L=C.getViewLineMinColumn(this.model,f+1,m),D=C.getViewLineMaxColumn(this.model,f+1,m);a<L&&(a=L),a>D&&(a=D);const I=C.getModelColumnOfViewPosition(m,a);return this.model.validatePosition(new k.Position(f+1,I)).equals(u)?new k.Position(l,a):this.convertModelPositionToViewPosition(u.lineNumber,u.column)}validateViewRange(l,a){const u=this.validateViewPosition(l.startLineNumber,l.startColumn,a.getStartPosition()),v=this.validateViewPosition(l.endLineNumber,l.endColumn,a.getEndPosition());return new y.Range(u.lineNumber,u.column,v.lineNumber,v.column)}convertViewPositionToModelPosition(l,a){const u=this.getViewLineInfo(l),v=this.modelLineProjections[u.modelLineNumber-1].getModelColumnOfViewPosition(u.modelLineWrappedLineIdx,a);return this.model.validatePosition(new k.Position(u.modelLineNumber,v))}convertViewRangeToModelRange(l){const a=this.convertViewPositionToModelPosition(l.startLineNumber,l.startColumn),u=this.convertViewPositionToModelPosition(l.endLineNumber,l.endColumn);return new y.Range(a.lineNumber,a.column,u.lineNumber,u.column)}convertModelPositionToViewPosition(l,a,u=2){const v=this.model.validatePosition(new k.Position(l,a)),f=v.lineNumber,m=v.column;let C=f-1,L=!1;for(;C>0&&!this.modelLineProjections[C].isVisible();)C--,L=!0;if(C===0&&!this.modelLineProjections[C].isVisible())return new k.Position(1,1);const D=1+this.projectedModelLineLineCounts.getPrefixSum(C);let I;return L?I=this.modelLineProjections[C].getViewPositionOfModelPosition(D,this.model.getLineMaxColumn(C+1),u):I=this.modelLineProjections[f-1].getViewPositionOfModelPosition(D,m,u),I}convertModelRangeToViewRange(l,a=0){if(l.isEmpty()){const u=this.convertModelPositionToViewPosition(l.startLineNumber,l.startColumn,a);return y.Range.fromPositions(u)}else{const u=this.convertModelPositionToViewPosition(l.startLineNumber,l.startColumn,1),v=this.convertModelPositionToViewPosition(l.endLineNumber,l.endColumn,0);return new y.Range(u.lineNumber,u.column,v.lineNumber,v.column)}}getViewLineNumberOfModelPosition(l,a){let u=l-1;if(this.modelLineProjections[u].isVisible()){const f=1+this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections[u].getViewLineNumberOfModelPosition(f,a)}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(l,a,u,v,f){const m=this.convertViewPositionToModelPosition(l.startLineNumber,l.startColumn),C=this.convertViewPositionToModelPosition(l.endLineNumber,l.endColumn);if(C.lineNumber-m.lineNumber<=l.endLineNumber-l.startLineNumber)return this.model.getDecorationsInRange(new y.Range(m.lineNumber,1,C.lineNumber,C.column),a,u,v,f);let L=[];const D=m.lineNumber-1,I=C.lineNumber-1;let T=null;for(let N=D;N<=I;N++)if(this.modelLineProjections[N].isVisible())T===null&&(T=new k.Position(N+1,N===D?m.column:1));else if(T!==null){const x=this.model.getLineMaxColumn(N);L=L.concat(this.model.getDecorationsInRange(new y.Range(T.lineNumber,T.column,N,x),a,u,v)),T=null}T!==null&&(L=L.concat(this.model.getDecorationsInRange(new y.Range(T.lineNumber,T.column,C.lineNumber,C.column),a,u,v)),T=null),L.sort((N,P)=>{const x=y.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,A=null;for(const N of L){const P=N.id;A!==P&&(A=P,O[R++]=N)}return O}getInjectedTextAt(l){const a=this.getViewLineInfo(l.lineNumber);return this.modelLineProjections[a.modelLineNumber-1].getInjectedTextAt(a.modelLineWrappedLineIdx,l.column)}normalizePosition(l,a){const u=this.getViewLineInfo(l.lineNumber);return this.modelLineProjections[u.modelLineNumber-1].normalizePosition(u.modelLineWrappedLineIdx,l,a)}getLineIndentColumn(l){const a=this.getViewLineInfo(l);return a.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(a.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=t;function i(c){if(c.length===0)return[];const l=c.slice();l.sort(y.Range.compareRangesUsingStarts);const a=[];let u=l[0].startLineNumber,v=l[0].endLineNumber;for(let f=1,m=l.length;f<m;f++){const C=l[f];C.startLineNumber>v+1?(a.push(new y.Range(u,1,v,1)),u=C.startLineNumber,v=C.endLineNumber):C.endLineNumber>v&&(v=C.endLineNumber)}return a.push(new y.Range(u,1,v,1)),a}class s{constructor(l,a){this.modelLineNumber=l,this.modelLineWrappedLineIdx=a}}class r{constructor(l,a){this.modelRange=l,this.viewLines=a}}class d{constructor(l){this._lines=l}convertViewPositionToModelPosition(l){return this._lines.convertViewPositionToModelPosition(l.lineNumber,l.column)}convertViewRangeToModelRange(l){return this._lines.convertViewRangeToModelRange(l)}validateViewPosition(l,a){return this._lines.validateViewPosition(l.lineNumber,l.column,a)}validateViewRange(l,a){return this._lines.validateViewRange(l,a)}convertModelPositionToViewPosition(l,a){return this._lines.convertModelPositionToViewPosition(l.lineNumber,l.column,a)}convertModelRangeToViewRange(l,a){return this._lines.convertModelRangeToViewRange(l,a)}modelPositionIsVisible(l){return this._lines.modelPositionIsVisible(l.lineNumber,l.column)}getModelLineViewLineCount(l){return this._lines.getModelLineViewLineCount(l)}getViewLineNumberOfModelPosition(l,a){return this._lines.getViewLineNumberOfModelPosition(l,a)}}class h{constructor(l){this.model=l}dispose(){}createCoordinatesConverter(){return new o(this)}getHiddenAreas(){return[]}setHiddenAreas(l){return!1}setTabSize(l){return!1}setWrappingSettings(l,a,u,v){return!1}createLineBreaksComputer(){const l=[];return{addRequest:(a,u,v)=>{l.push(null)},finalize:()=>l}}onModelFlushed(){}onModelLinesDeleted(l,a,u){return new S.ViewLinesDeletedEvent(a,u)}onModelLinesInserted(l,a,u,v){return new S.ViewLinesInsertedEvent(a,u)}onModelLineChanged(l,a,u){return[!1,new S.ViewLinesChangedEvent(a,1),null,null]}acceptVersionId(l){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(l,a,u){return{startLineNumber:l,endLineNumber:l,indent:0}}getViewLinesBracketGuides(l,a,u){return new Array(a-l+1).fill([])}getViewLinesIndentGuides(l,a){const u=a-l+1,v=new Array(u);for(let f=0;f<u;f++)v[f]=0;return v}getViewLineContent(l){return this.model.getLineContent(l)}getViewLineLength(l){return this.model.getLineLength(l)}getViewLineMinColumn(l){return this.model.getLineMinColumn(l)}getViewLineMaxColumn(l){return this.model.getLineMaxColumn(l)}getViewLineData(l){const a=this.model.tokenization.getLineTokens(l),u=a.getLineContent();return new n.ViewLineData(u,!1,1,u.length+1,0,a.inflate(),null)}getViewLinesData(l,a,u){const v=this.model.getLineCount();l=Math.min(Math.max(1,l),v),a=Math.min(Math.max(1,a),v);const f=[];for(let m=l;m<=a;m++){const C=m-l;f[C]=u[C]?this.getViewLineData(m):null}return f}getDecorationsInRange(l,a,u,v,f){return this.model.getDecorationsInRange(l,a,u,v,f)}normalizePosition(l,a){return this.model.normalizePosition(l,a)}getLineIndentColumn(l){return this.model.getLineIndentColumn(l)}getInjectedTextAt(l){return null}}e.ViewModelLinesFromModelAsIs=h;class o{constructor(l){this._lines=l}_validPosition(l){return this._lines.model.validatePosition(l)}_validRange(l){return this._lines.model.validateRange(l)}convertViewPositionToModelPosition(l){return this._validPosition(l)}convertViewRangeToModelRange(l){return this._validRange(l)}validateViewPosition(l,a){return this._validPosition(a)}validateViewRange(l,a){return this._validRange(a)}convertModelPositionToViewPosition(l){return this._validPosition(l)}convertModelRangeToViewRange(l){return this._validRange(l)}modelPositionIsVisible(l){const a=this._lines.model.getLineCount();return!(l.lineNumber<1||l.lineNumber>a)}getModelLineViewLineCount(l){return 1}getViewLineNumberOfModelPosition(l,a){return l}}}),define(X[840],ee([1,0,16,13,37,2,17,9,41,745,66,12,5,46,106,31,71,306,202,580,308,81,312,223,839]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const m=!0;class C extends E.Disposable{constructor(N,P,x,F,B,V,$,M,Q){if(super(),this.languageConfigurationService=$,this._themeService=M,this._attachedView=Q,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 p.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=L.create(this.model),m&&this.model.isTooLargeForTokenization())this._lines=new f.ViewModelLinesFromModelAsIs(this.model);else{const ie=this._configuration.options,re=ie.get(48),ne=ie.get(133),se=ie.get(140),H=ie.get(132),W=ie.get(124);this._lines=new f.ViewModelLinesFromProjectedModel(this._editorId,this.model,F,B,re,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 re=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(re,ie)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(l.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 n.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(133),$=F.get(140),M=F.get(132),Q=F.get(124);this._lines.setWrappingSettings(B,V,$.wrappingColumn,M,Q)&&(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(87)&&(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),p.CursorConfiguration.shouldRecreate(P)&&(this.cursorConfig=new p.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 s.InternalModelContentChangeEvent?N.rawContentChangedEvent.changes:N.changes,$=N instanceof s.InternalModelContentChangeEvent?N.rawContentChangedEvent.versionId:null,M=this._lines.createLineBreaksComputer();for(const re of V)switch(re.changeType){case 4:{for(let ne=0;ne<re.detail.length;ne++){const se=re.detail[ne];let H=re.injectedTexts[ne];H&&(H=H.filter(W=>!W.ownerId||W.ownerId===this._editorId)),M.addRequest(se,H,null)}break}case 2:{let ne=null;re.injectedText&&(ne=re.injectedText.filter(se=>!se.ownerId||se.ownerId===this._editorId)),M.addRequest(re.detail,ne,null);break}}const Q=M.finalize(),ie=new _.ArrayQueue(Q);for(const re of V)switch(re.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($,re.fromLineNumber,re.toLineNumber);ne!==null&&(x.emitViewEvent(ne),this.viewLayout.onLinesDeleted(ne.fromLineNumber,ne.toLineNumber)),F=!0;break}case 4:{const ne=ie.takeCount(re.detail.length),se=this._lines.onModelLinesInserted($,re.fromLineNumber,re.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,q]=this._lines.onModelLineChanged($,re.lineNumber,ne);B=se,H&&x.emitViewEvent(H),W&&(x.emitViewEvent(W),this.viewLayout.onLinesInserted(W.fromLineNumber,W.toLineNumber)),q&&(x.emitViewEvent(q),this.viewLayout.onLinesDeleted(q.fromLineNumber,q.toLineNumber));break}case 5:break}$!==null&&this._lines.acceptVersionId($),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 s.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 n.Position(B.fromLineNumber,1)).lineNumber,$=this.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(B.toLineNumber,this.model.getLineMaxColumn(B.toLineNumber))).lineNumber;P[x]={fromLineNumber:V,toLineNumber:$}}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 p.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 p.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 p.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((M,Q)=>t.Range.compareRangesUsingStarts(M.range,Q.range));let V=null,$=null;for(const M of F){const Q=(x=(P=M.options.glyphMargin)===null||P===void 0?void 0:P.position)!==null&&x!==void 0?x:i.GlyphMarginLane.Left;if(Q===i.GlyphMarginLane.Left&&(!V||t.Range.compareRangesUsingEnds(V,M.range)<0)&&(V=M.range),Q===i.GlyphMarginLane.Right&&(!$||t.Range.compareRangesUsingEnds($,M.range)<0)&&($=M.range),V&&$){if(V.endLineNumber<$.startLineNumber){V=null;continue}if($.endLineNumber<V.startLineNumber){$=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(139),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,$=P.startColumn;const M=P.endLineNumber,Q=P.endColumn;for(let ie=0,re=x.length;ie<re;ie++){const ne=x[ie].startLineNumber,se=x[ie].endLineNumber;se<V||ne>M||(V<ne&&(F[B++]=new t.Range(V,$,ne-1,this.model.getLineMaxColumn(ne-1))),V=se+1,$=1)}return(V<M||V===M&&$<Q)&&(F[B++]=new t.Range(V,$,M,Q)),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 n.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($=>$.toInlineDecoration(N))]),new a.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 a.MinimapLinesRenderingData(this.getTabSize(),F)}getAllOverviewRulerDecorations(N){const P=this.model.getOverviewRulerDecorations(this._editorId,(0,S.filterValidationDecorations)(this._configuration.options)),x=new D;for(const F of P){const B=F.options,V=B.overviewRuler;if(!V)continue;const $=V.position;if($===0)continue;const M=V.getColor(N.value),Q=this.coordinatesConverter.getViewLineNumberOfModelPosition(F.range.startLineNumber,F.range.startColumn),ie=this.coordinatesConverter.getViewLineNumberOfModelPosition(F.range.endLineNumber,F.range.endColumn);x.accept(M,B.zIndex,Q,ie,$)}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
- `:this.model.getEOL();N=N.slice(0),N.sort(t.Range.compareRangesUsingStarts);let B=!1,V=!1;for(const M of N)M.isEmpty()?B=!0:V=!0;if(!V){if(!P)return"";const M=N.map(ie=>ie.startLineNumber);let Q="";for(let ie=0;ie<M.length;ie++)ie>0&&M[ie-1]===M[ie]||(Q+=this.model.getLineContent(M[ie])+F);return Q}if(B&&P){const M=[];let Q=0;for(const ie of N){const re=ie.startLineNumber;ie.isEmpty()?re!==Q&&M.push(this.model.getLineContent(re)):M.push(this.model.getValueInRange(ie,x?2:0)),Q=re}return M.length===1?M[0]:M}const $=[];for(const M of N)M.isEmpty()||$.push(this.model.getValueInRange(M,x?2:0));return $.length===1?$[0]:$}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(),M=/[:;\\\/<>]/.test(B.fontFamily)||B.fontFamily===S.EDITOR_FONT_DEFAULTS.fontFamily;let Q;return M?Q=S.EDITOR_FONT_DEFAULTS.fontFamily:(Q=B.fontFamily,Q=Q.replace(/"/g,"'"),/[,']/.test(Q)||/[+ ]/.test(Q)&&(Q=`'${Q}'`),Q=`${Q}, ${S.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:x,html:`<div style="color: ${V[1]};background-color: ${V[2]};font-family: ${Q};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,$=this.getTabSize();let M="";for(let Q=x;Q<=B;Q++){const ie=this.model.tokenization.getLineTokens(Q),re=ie.getLineContent(),ne=Q===x?F-1:0,se=Q===B?V-1:re.length;re===""?M+="<br>":M+=(0,h.tokenizeLineToHTML)(re,ie.inflate(),P,ne,se,$,w.isWindows)}return M}_getColorMap(){const N=r.TokenizationRegistry.getColorMap(),P=["#000000"];if(N)for(let x=1,F=N.length;x<F;x++)P[x]=y.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 L{static create(N){const P=N._setTrackedRange(null,new t.Range(1,1,1,1),1);return new L(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 n.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 D{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(N,P,x,F,B){const V=this._asMap[N];if(V){const $=V.data,M=$[$.length-3],Q=$[$.length-1];if(M===B&&Q+1>=x){F>Q&&($[$.length-1]=F);return}$.push(B,x,F)}else{const $=new a.OverviewRulerDecorationsGroup(N,P,[B,x,F]);this._asMap[N]=$,this.asArray.push($)}}}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(A,N){const P=[];let x=0,F=0;for(;x<A.length&&F<N.length;){const B=A[x],V=N[F];if(B.endLineNumber<V.startLineNumber-1)P.push(A[x++]);else if(V.endLineNumber<B.startLineNumber-1)P.push(N[F++]);else{const $=Math.min(B.startLineNumber,V.startLineNumber),M=Math.max(B.endLineNumber,V.endLineNumber);P.push(new t.Range($,1,M,1)),x++,F++}}for(;x<A.length;)P.push(A[x++]);for(;F<N.length;)P.push(N[F++]);return P}function O(A,N){if(A.length!==N.length)return!1;for(let P=0;P<A.length;P++)if(!A[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(X[187],ee([1,0,588,7,11,6,2,48,723,15,32,819,258,41,76,12,5,23,262,171,22,38,74,33,840,25,14,8,182,43,24,89,18,513,567,173,28,75,19,566,219,760,416]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R,A,N,P,x,F,B,V,$){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let M=0;class Q{constructor(j,z,U,J,te,G){this.model=j,this.viewModel=z,this.view=U,this.hasRealView=J,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(j,z,U,J,te,G,ae,me,Ce,Se,ye,Ee){super(),this.languageConfigurationService=ye,this._deliveryQueue=new E.EventDeliveryQueue,this._contributions=this._register(new V.CodeEditorContributions),this._onDidDispose=this._register(new E.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new E.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 E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new re({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new re({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 E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),te.willCreateCodeEditor();const De=Object.assign({},z);this._domElement=j,this._overflowWidgetsDomNode=De.overflowWidgetsDomNode,delete De.overflowWidgetsDomNode,this._id=++M,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=U.telemetryData,this._configuration=this._register(this._createConfiguration(U.isSimpleWidget||!1,De,Se)),this._register(this._configuration.onDidChange(he=>{this._onDidChangeConfiguration.fire(he);const ve=this._configuration.options;if(he.hasChanged(139)){const de=ve.get(139);this._onDidLayoutChange.fire(de)}})),this._contextKeyService=this._register(ae.createScoped(this._domElement)),this._notificationService=Ce,this._codeEditorService=te,this._commandService=G,this._themeService=me,this._register(new se(this,this._contextKeyService)),this._register(new H(this,this._contextKeyService,Ee)),this._instantiationService=J.createChild(new D.ServiceCollection([C.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new W(j),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 he of g.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(he.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${he.id}`));continue}const ve=new o.InternalEditorAction(he.id,he.label,he.alias,(0,R.withNullAsUndefined)(he.precondition),()=>this._instantiationService.invokeFunction(de=>Promise.resolve(he.runEditorCommand(de,this,null))),this._contextKeyService);this._actions.set(ve.id,ve)}const Ie=()=>!this._configuration.options.get(87)&&this._configuration.options.get(34).enabled;this._register(new k.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:he=>{if(!Ie())return;const ve=this.getTargetAtClientPoint(he.clientX,he.clientY);ve?.position&&this.showDropIndicatorAt(ve.position)},onDrop:he=>we(this,void 0,void 0,function*(){if(!Ie()||(this.removeDropIndicator(),!he.dataTransfer))return;const ve=this.getTargetAtClientPoint(he.clientX,he.clientY);ve?.position&&this._onDropIntoEditor.fire({position:ve.position,event:he})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(j){var z;(z=this._modelData)===null||z===void 0||z.view.writeScreenReaderContent(j)}_createConfiguration(j,z,U){return new S.EditorConfiguration(j,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(j){return this._instantiationService.invokeFunction(j)}updateOptions(j){this._configuration.updateOptions(j||{})}getOptions(){return this._configuration.options}getOption(j){return this._configuration.options.get(j)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(j){return this._modelData?P.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(125),j):null}getValue(j=null){if(!this._modelData)return"";const z=!!(j&&j.preserveBOM);let U=0;return j&&j.lineEnding&&j.lineEnding===`
- `?U=1:j&&j.lineEnding&&j.lineEnding===`\r
- `&&(U=2),this._modelData.model.getValue(U,z)}setValue(j){this._modelData&&this._modelData.model.setValue(j)}getModel(){return this._modelData?this._modelData.model:null}setModel(j=null){const z=j;if(this._modelData===null&&z===null||this._modelData&&this._modelData.model===z)return;const U=this.hasTextFocus(),J=this._detachModel();this._attachModel(z),U&&this.hasModel()&&this.focus();const te={oldModelUrl:J?J.uri:null,newModelUrl:z?z.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(te),this._postDetachModelCleanup(J),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const j in this._decorationTypeSubtypes){const z=this._decorationTypeSubtypes[j];for(const U in z)this._removeDecorationType(j+"-"+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(j,z,U,J){const te=j.model.validatePosition({lineNumber:z,column:U}),G=j.viewModel.coordinatesConverter.convertModelPositionToViewPosition(te);return j.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(G.lineNumber,J)}getTopForLineNumber(j,z=!1){return this._modelData?Rt._getVerticalOffsetForPosition(this._modelData,j,1,z):-1}getTopForPosition(j,z){return this._modelData?Rt._getVerticalOffsetForPosition(this._modelData,j,z,!1):-1}static _getVerticalOffsetForPosition(j,z,U,J=!1){const te=j.model.validatePosition({lineNumber:z,column:U}),G=j.viewModel.coordinatesConverter.convertModelPositionToViewPosition(te);return j.viewModel.viewLayout.getVerticalOffsetForLineNumber(G.lineNumber,J)}getBottomForLineNumber(j,z=!1){return this._modelData?Rt._getVerticalOffsetAfterPosition(this._modelData,j,1,z):-1}setHiddenAreas(j,z){var U;(U=this._modelData)===null||U===void 0||U.viewModel.setHiddenAreas(j.map(J=>d.Range.lift(J)),z)}getVisibleColumnFromPosition(j){if(!this._modelData)return j.column;const z=this._modelData.model.validatePosition(j),U=this._modelData.model.getOptions().tabSize;return s.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(z.lineNumber),z.column,U)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(j,z="api"){if(this._modelData){if(!r.Position.isIPosition(j))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(z,[{selectionStartLineNumber:j.lineNumber,selectionStartColumn:j.column,positionLineNumber:j.lineNumber,positionColumn:j.column}])}}_sendRevealRange(j,z,U,J){if(!this._modelData)return;if(!d.Range.isIRange(j))throw new Error("Invalid arguments");const te=this._modelData.model.validateRange(j),G=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(te);this._modelData.viewModel.revealRange("api",U,G,z,J)}revealLine(j,z=0){this._revealLine(j,0,z)}revealLineInCenter(j,z=0){this._revealLine(j,1,z)}revealLineInCenterIfOutsideViewport(j,z=0){this._revealLine(j,2,z)}revealLineNearTop(j,z=0){this._revealLine(j,5,z)}_revealLine(j,z,U){if(typeof j!="number")throw new Error("Invalid arguments");this._sendRevealRange(new d.Range(j,1,j,1),z,!1,U)}revealPosition(j,z=0){this._revealPosition(j,0,!0,z)}revealPositionInCenter(j,z=0){this._revealPosition(j,1,!0,z)}revealPositionInCenterIfOutsideViewport(j,z=0){this._revealPosition(j,2,!0,z)}revealPositionNearTop(j,z=0){this._revealPosition(j,5,!0,z)}_revealPosition(j,z,U,J){if(!r.Position.isIPosition(j))throw new Error("Invalid arguments");this._sendRevealRange(new d.Range(j.lineNumber,j.column,j.lineNumber,j.column),z,U,J)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(j,z="api"){const U=h.Selection.isISelection(j),J=d.Range.isIRange(j);if(!U&&!J)throw new Error("Invalid arguments");if(U)this._setSelectionImpl(j,z);else if(J){const te={selectionStartLineNumber:j.startLineNumber,selectionStartColumn:j.startColumn,positionLineNumber:j.endLineNumber,positionColumn:j.endColumn};this._setSelectionImpl(te,z)}}_setSelectionImpl(j,z){if(!this._modelData)return;const U=new h.Selection(j.selectionStartLineNumber,j.selectionStartColumn,j.positionLineNumber,j.positionColumn);this._modelData.viewModel.setSelections(z,[U])}revealLines(j,z,U=0){this._revealLines(j,z,0,U)}revealLinesInCenter(j,z,U=0){this._revealLines(j,z,1,U)}revealLinesInCenterIfOutsideViewport(j,z,U=0){this._revealLines(j,z,2,U)}revealLinesNearTop(j,z,U=0){this._revealLines(j,z,5,U)}_revealLines(j,z,U,J){if(typeof j!="number"||typeof z!="number")throw new Error("Invalid arguments");this._sendRevealRange(new d.Range(j,1,z,1),U,!1,J)}revealRange(j,z=0,U=!1,J=!0){this._revealRange(j,U?1:0,J,z)}revealRangeInCenter(j,z=0){this._revealRange(j,1,!0,z)}revealRangeInCenterIfOutsideViewport(j,z=0){this._revealRange(j,2,!0,z)}revealRangeNearTop(j,z=0){this._revealRange(j,5,!0,z)}revealRangeNearTopIfOutsideViewport(j,z=0){this._revealRange(j,6,!0,z)}revealRangeAtTop(j,z=0){this._revealRange(j,3,!0,z)}_revealRange(j,z,U,J){if(!d.Range.isIRange(j))throw new Error("Invalid arguments");this._sendRevealRange(d.Range.lift(j),z,U,J)}setSelections(j,z="api",U=0){if(this._modelData){if(!j||j.length===0)throw new Error("Invalid arguments");for(let J=0,te=j.length;J<te;J++)if(!h.Selection.isISelection(j[J]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(z,j,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(j,z=1){if(this._modelData){if(typeof j!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:j},z)}}setScrollTop(j,z=1){if(this._modelData){if(typeof j!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:j},z)}}setScrollPosition(j,z=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(j,z)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const j=this._contributions.saveViewState(),z=this._modelData.viewModel.saveCursorState(),U=this._modelData.viewModel.saveState();return{cursorState:z,viewState:U,contributionsState:j}}restoreViewState(j){if(!this._modelData||!this._modelData.hasRealView)return;const z=j;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 J=this._modelData.viewModel.reduceRestoreState(z.viewState);this._modelData.view.restoreState(J)}}getContribution(j){return this._contributions.get(j)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let j=this.getActions();return j=j.filter(z=>z.isSupported()),j}getAction(j){return this._actions.get(j)||null}trigger(j,z,U){switch(U=U||{},z){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(j);return;case"type":{const te=U;this._type(j,te.text||"");return}case"replacePreviousChar":{const te=U;this._compositionType(j,te.text||"",te.replaceCharCnt||0,0,0);return}case"compositionType":{const te=U;this._compositionType(j,te.text||"",te.replacePrevCharCnt||0,te.replaceNextCharCnt||0,te.positionDelta||0);return}case"paste":{const te=U;this._paste(j,te.text||"",te.pasteOnNewLine||!1,te.multicursorText||null,te.mode||null);return}case"cut":this._cut(j);return}const J=this.getAction(z);if(J){Promise.resolve(J.run(U)).then(void 0,y.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(j,z,U)||this._triggerCommand(z,U))}_triggerCommand(j,z){this._commandService.executeCommand(j,z)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(j){this._modelData&&(this._modelData.viewModel.endComposition(j),this._onDidCompositionEnd.fire())}_type(j,z){!this._modelData||z.length===0||(j==="keyboard"&&this._onWillType.fire(z),this._modelData.viewModel.type(z,j),j==="keyboard"&&this._onDidType.fire(z))}_compositionType(j,z,U,J,te){this._modelData&&this._modelData.viewModel.compositionType(z,U,J,te,j)}_paste(j,z,U,J,te){if(!this._modelData||z.length===0)return;const G=this._modelData.viewModel,ae=G.getSelection().getStartPosition();G.paste(z,U,J,j);const me=G.getSelection().getStartPosition();j==="keyboard"&&this._onDidPaste.fire({range:new d.Range(ae.lineNumber,ae.column,me.lineNumber,me.column),languageId:te})}_cut(j){this._modelData&&this._modelData.viewModel.cut(j)}_triggerEditorCommand(j,z,U){const J=g.EditorExtensionsRegistry.getEditorCommand(z);return J?(U=U||{},U.source=j,this._instantiationService.invokeFunction(te=>{Promise.resolve(J.runEditorCommand(te,this,U)).then(void 0,y.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(87)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(87)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(j,z,U){if(!this._modelData||this._configuration.options.get(87))return!1;let J;return U?Array.isArray(U)?J=()=>U:J=U:J=()=>null,this._modelData.viewModel.executeEdits(j,z,J),!0}executeCommand(j,z){this._modelData&&this._modelData.viewModel.executeCommand(z,j)}executeCommands(j,z){this._modelData&&this._modelData.viewModel.executeCommands(z,j)}createDecorationsCollection(j){return new q(this,j)}changeDecorations(j){return this._modelData?this._modelData.model.changeDecorations(j,this._id):null}getLineDecorations(j){return this._modelData?this._modelData.model.getLineDecorations(j,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(j){return this._modelData?this._modelData.model.getDecorationsInRange(j,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(j,z){return this._modelData?j.length===0&&z.length===0?j:this._modelData.model.deltaDecorations(j,z,this._id):[]}removeDecorations(j){!this._modelData||j.length===0||this._modelData.model.changeDecorations(z=>{z.deltaDecorations(j,[])})}removeDecorationsByType(j){const z=this._decorationTypeKeysToIds[j];z&&this.deltaDecorations(z,[]),this._decorationTypeKeysToIds.hasOwnProperty(j)&&delete this._decorationTypeKeysToIds[j],this._decorationTypeSubtypes.hasOwnProperty(j)&&delete this._decorationTypeSubtypes[j]}getLayoutInfo(){return this._configuration.options.get(139)}createOverviewRuler(j){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(j)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(j){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(j)}delegateScrollFromMouseWheelEvent(j){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(j)}layout(j){this._configuration.observeContainer(j),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(j){const z={widget:j,position:j.getPosition()};this._contentWidgets.hasOwnProperty(j.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[j.getId()]=z,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(z)}layoutContentWidget(j){const z=j.getId();if(this._contentWidgets.hasOwnProperty(z)){const U=this._contentWidgets[z];U.position=j.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(U)}}removeContentWidget(j){const z=j.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(j){const z={widget:j,position:j.getPosition()};this._overlayWidgets.hasOwnProperty(j.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[j.getId()]=z,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(z)}layoutOverlayWidget(j){const z=j.getId();if(this._overlayWidgets.hasOwnProperty(z)){const U=this._overlayWidgets[z];U.position=j.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(U)}}removeOverlayWidget(j){const z=j.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(j){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(j)}getTargetAtClientPoint(j,z){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(j,z)}getScrolledVisiblePosition(j){if(!this._modelData||!this._modelData.hasRealView)return null;const z=this._modelData.model.validatePosition(j),U=this._configuration.options,J=U.get(139),te=Rt._getVerticalOffsetForPosition(this._modelData,z.lineNumber,z.column)-this.getScrollTop(),G=this._modelData.view.getOffsetForColumn(z.lineNumber,z.column)+J.glyphMarginWidth+J.lineNumbersWidth+J.decorationsWidth-this.getScrollLeft();return{top:te,left:G,height:U.get(64)}}getOffsetForColumn(j,z){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(j,z)}render(j=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,j)}setAriaOptions(j){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(j)}applyFontInfo(j){(0,F.applyFontInfo)(j,this._configuration.options.get(48))}setBanner(j,z){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=j,this._configuration.setReservedHeight(j?z:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(j){if(!j){this._modelData=null;return}const z=[];this._domElement.setAttribute("data-mode-id",j.getLanguageId()),this._configuration.setIsDominatedByLongLines(j.isDominatedByLongLines()),this._configuration.setModelLineCount(j.getLineCount());const U=j.onBeforeAttached(),J=new f.ViewModel(this._id,this._configuration,j,N.DOMLineBreaksComputerFactory.create(),A.MonospaceLineBreaksComputerFactory.create(this._configuration.options),ae=>k.scheduleAtNextAnimationFrame(ae),this.languageConfigurationService,this._themeService,U);z.push(j.onWillDispose(()=>this.setModel(null))),z.push(J.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),Ee=_.localize(0,null,ye);this._notificationService.prompt(I.Severity.Warning,Ee,[{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 me=[];for(let ye=0,Ee=ae.selections.length;ye<Ee;ye++)me[ye]=ae.selections[ye].getPosition();const Ce={position:me[0],secondaryPositions:me.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",j.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(J);if(G){this._domElement.appendChild(te.domNode.domNode);let ae=Object.keys(this._contentWidgets);for(let me=0,Ce=ae.length;me<Ce;me++){const Se=ae[me];te.addContentWidget(this._contentWidgets[Se])}ae=Object.keys(this._overlayWidgets);for(let me=0,Ce=ae.length;me<Ce;me++){const Se=ae[me];te.addOverlayWidget(this._overlayWidgets[Se])}te.render(!1,!0),te.domNode.domNode.setAttribute("data-uri",j.uri.toString())}this._modelData=new Q(j,J,te,G,z,U)}_createView(j){let z;this.isSimpleWidget?z={paste:(te,G,ae,me)=>{this._paste("keyboard",te,G,ae,me)},type:te=>{this._type("keyboard",te)},compositionType:(te,G,ae,me)=>{this._compositionType("keyboard",te,G,ae,me)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:z={paste:(te,G,ae,me)=>{const Ce={text:te,pasteOnNewLine:G,multicursorText:ae,mode:me};this._commandService.executeCommand("paste",Ce)},type:te=>{const G={text:te};this._commandService.executeCommand("type",G)},compositionType:(te,G,ae,me)=>{if(ae||me){const Ce={text:te,replacePrevCharCnt:G,replaceNextCharCnt:ae,positionDelta:me};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(j.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 n.View(z,this._configuration,this._themeService.getColorTheme(),j,U,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(j){j?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const j=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),j}_removeDecorationType(j){this._codeEditorService.removeDecorationType(j)}hasModel(){return this._modelData!==null}showDropIndicatorAt(j){const z=[{range:new d.Range(j.lineNumber,j.column,j.lineNumber,j.column),options:Rt.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(z),this.revealPosition(j,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};ie.dropIntoEditorDecorationOptions=a.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),e.CodeEditorWidget=ie=Me([fe(3,L.IInstantiationService),fe(4,p.ICodeEditorService),fe(5,m.ICommandService),fe(6,C.IContextKeyService),fe(7,T.IThemeService),fe(8,I.INotificationService),fe(9,O.IAccessibilityService),fe(10,x.ILanguageConfigurationService),fe(11,B.ILanguageFeaturesService)],ie);class re extends w.Disposable{constructor(j){super(),this._emitterOptions=j,this._onDidChangeToTrue=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(j){const z=j?2:1;this._value!==z&&(this._value=z,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=re;class ne extends E.Emitter{constructor(j,z){super({deliveryQueue:z}),this._contributions=j}fire(j){this._contributions.onBeforeInteractionEvent(),super.fire(j)}}class se extends w.Disposable{constructor(j,z){super(),this._editor=j,z.createKey("editorId",j.getId()),this._editorSimpleInput=l.EditorContextKeys.editorSimpleInput.bindTo(z),this._editorFocus=l.EditorContextKeys.focus.bindTo(z),this._textInputFocus=l.EditorContextKeys.textInputFocus.bindTo(z),this._editorTextFocus=l.EditorContextKeys.editorTextFocus.bindTo(z),this._editorTabMovesFocus=l.EditorContextKeys.tabMovesFocus.bindTo(z),this._editorReadonly=l.EditorContextKeys.readOnly.bindTo(z),this._inDiffEditor=l.EditorContextKeys.inDiffEditor.bindTo(z),this._editorColumnSelection=l.EditorContextKeys.columnSelection.bindTo(z),this._hasMultipleSelections=l.EditorContextKeys.hasMultipleSelections.bindTo(z),this._hasNonEmptySelection=l.EditorContextKeys.hasNonEmptySelection.bindTo(z),this._canUndo=l.EditorContextKeys.canUndo.bindTo(z),this._canRedo=l.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($.TabFocus.onDidChangeTabFocus(()=>this._editorTabMovesFocus.set($.TabFocus.getTabFocusMode("editorFocus")))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const j=this._editor.getOptions();this._editorTabMovesFocus.set($.TabFocus.getTabFocusMode("editorFocus")),this._editorReadonly.set(j.get(87)),this._inDiffEditor.set(j.get(59)),this._editorColumnSelection.set(j.get(20))}_updateFromSelection(){const j=this._editor.getSelections();j?(this._hasMultipleSelections.set(j.length>1),this._hasNonEmptySelection.set(j.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 j=this._editor.getModel();this._canUndo.set(!!(j&&j.canUndo())),this._canRedo.set(!!(j&&j.canRedo()))}}class H extends w.Disposable{constructor(j,z,U){super(),this._editor=j,this._contextKeyService=z,this._languageFeaturesService=U,this._langId=l.EditorContextKeys.languageId.bindTo(z),this._hasCompletionItemProvider=l.EditorContextKeys.hasCompletionItemProvider.bindTo(z),this._hasCodeActionsProvider=l.EditorContextKeys.hasCodeActionsProvider.bindTo(z),this._hasCodeLensProvider=l.EditorContextKeys.hasCodeLensProvider.bindTo(z),this._hasDefinitionProvider=l.EditorContextKeys.hasDefinitionProvider.bindTo(z),this._hasDeclarationProvider=l.EditorContextKeys.hasDeclarationProvider.bindTo(z),this._hasImplementationProvider=l.EditorContextKeys.hasImplementationProvider.bindTo(z),this._hasTypeDefinitionProvider=l.EditorContextKeys.hasTypeDefinitionProvider.bindTo(z),this._hasHoverProvider=l.EditorContextKeys.hasHoverProvider.bindTo(z),this._hasDocumentHighlightProvider=l.EditorContextKeys.hasDocumentHighlightProvider.bindTo(z),this._hasDocumentSymbolProvider=l.EditorContextKeys.hasDocumentSymbolProvider.bindTo(z),this._hasReferenceProvider=l.EditorContextKeys.hasReferenceProvider.bindTo(z),this._hasRenameProvider=l.EditorContextKeys.hasRenameProvider.bindTo(z),this._hasSignatureHelpProvider=l.EditorContextKeys.hasSignatureHelpProvider.bindTo(z),this._hasInlayHintsProvider=l.EditorContextKeys.hasInlayHintsProvider.bindTo(z),this._hasDocumentFormattingProvider=l.EditorContextKeys.hasDocumentFormattingProvider.bindTo(z),this._hasDocumentSelectionFormattingProvider=l.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(z),this._hasMultipleDocumentFormattingProvider=l.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(z),this._hasMultipleDocumentSelectionFormattingProvider=l.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(z),this._isInWalkThrough=l.EditorContextKeys.isInWalkThroughSnippet.bindTo(z);const J=()=>this._update();this._register(j.onDidChangeModel(J)),this._register(j.onDidChangeModelLanguage(J)),this._register(U.completionProvider.onDidChange(J)),this._register(U.codeActionProvider.onDidChange(J)),this._register(U.codeLensProvider.onDidChange(J)),this._register(U.definitionProvider.onDidChange(J)),this._register(U.declarationProvider.onDidChange(J)),this._register(U.implementationProvider.onDidChange(J)),this._register(U.typeDefinitionProvider.onDidChange(J)),this._register(U.hoverProvider.onDidChange(J)),this._register(U.documentHighlightProvider.onDidChange(J)),this._register(U.documentSymbolProvider.onDidChange(J)),this._register(U.referenceProvider.onDidChange(J)),this._register(U.renameProvider.onDidChange(J)),this._register(U.documentFormattingEditProvider.onDidChange(J)),this._register(U.documentRangeFormattingEditProvider.onDidChange(J)),this._register(U.signatureHelpProvider.onDidChange(J)),this._register(U.inlayHintsProvider.onDidChange(J)),J()}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 j=this._editor.getModel();if(!j){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(j.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(j)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(j)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(j)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(j)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(j)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(j)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(j)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(j)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(j)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(j)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(j)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(j)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(j)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(j)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(j)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(j)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(j)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(j).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(j).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(j).length>1),this._isInWalkThrough.set(j.uri.scheme===b.Schemas.walkThroughSnippet)})}}e.EditorModeContext=H;class W extends w.Disposable{constructor(j){super(),this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(k.trackFocus(j)),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 q{get length(){return this._decorationIds.length}constructor(j,z){this._editor=j,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(z)&&z.length>0&&this.set(z)}onDidChange(j,z,U){return this._editor.onDidChangeModelDecorations(J=>{this._isChangingDecorations||j.call(z,J)},U)}getRange(j){return!this._editor.hasModel()||j>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[j])}getRanges(){if(!this._editor.hasModel())return[];const j=this._editor.getModel(),z=[];for(const U of this._decorationIds){const J=j.getDecorationRange(U);J&&z.push(J)}return z}has(j){return this._decorationIds.includes(j.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(j){try{this._isChangingDecorations=!0,this._editor.changeDecorations(z=>{this._decorationIds=z.deltaDecorations(this._decorationIds,j)})}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='"),Y=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function oe(ue){return Z+encodeURIComponent(ue.toString())+Y}const ce=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),ge=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 le(ue){return ce+encodeURIComponent(ue.toString())+ge}(0,T.registerThemingParticipant)((ue,j)=>{const z=ue.getColor(v.editorErrorForeground);z&&j.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${oe(z)}") repeat-x bottom left; }`);const U=ue.getColor(v.editorWarningForeground);U&&j.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${oe(U)}") repeat-x bottom left; }`);const J=ue.getColor(v.editorInfoForeground);J&&j.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${oe(J)}") repeat-x bottom left; }`);const te=ue.getColor(v.editorHintForeground);te&&j.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${le(te)}") no-repeat bottom left; }`);const G=ue.getColor(u.editorUnnecessaryCodeOpacity);G&&j.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${G.rgba.a}; }`)})}),define(X[343],ee([1,0,7,36,166,145,85,13,27,11,6,2,75,303,15,32,115,187,801,592,762,41,12,5,96,171,38,141,110,81,274,589,97,14,55,8,182,43,83,33,73,24,30,61,414]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R,A,N,P,x,F,B,V,$,M,Q,ie){"use strict";var re;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class ne{constructor(he,ve){this._contextMenuService=he,this._clipboardService=ve,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(he){return he.filter(ve=>!this._zonesMap[String(ve.id)])}clean(he){this._zones.length>0&&he.changeViewZones(ve=>{for(const de of this._zones)ve.removeZone(de)}),this._zones=[],this._zonesMap={},he.changeDecorations(ve=>{this._decorations=ve.deltaDecorations(this._decorations,[])})}apply(he,ve,de,pe){const Le=pe?d.StableEditorScrollState.capture(he):null;he.changeViewZones(Ne=>{var be;for(const _e of this._zones)Ne.removeZone(_e);for(const _e of this._inlineDiffMargins)_e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let _e=0,Te=de.zones.length;_e<Te;_e++){const Oe=de.zones[_e];Oe.suppressMouseDown=!0;const Pe=Ne.addZone(Oe);this._zones.push(Pe),this._zonesMap[String(Pe)]=!0,de.zones[_e].diff&&Oe.marginDomNode&&(Oe.suppressMouseDown=!1,((be=de.zones[_e].diff)===null||be===void 0?void 0:be.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new c.InlineDiffMargin(Pe,Oe.marginDomNode,he,de.zones[_e].diff,this._contextMenuService,this._clipboardService)))}}),Le?.restore(he),he.changeDecorations(Ne=>{this._decorations=Ne.deltaDecorations(this._decorations,de.decorations)}),ve?.setZones(de.overviewZones)}}let se=0;const H=(0,$.registerIcon)("diff-insert",S.Codicon.add,O.localize(0,null)),W=(0,$.registerIcon)("diff-remove",S.Codicon.remove,O.localize(1,null)),q=(re=window.trustedTypes)===null||re===void 0?void 0:re.createPolicy("diffEditorWidget",{createHTML:Ie=>Ie}),Z=O.localize(2,null);let Y=e.DiffEditorWidget=class ht extends n.Disposable{constructor(he,ve,de,pe,Le,Ne,be,_e,Te,Oe,Pe){super(),this._editorProgressService=Pe,this._onDidDispose=this._register(new p.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new p.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new p.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new p.Emitter),this._lastOriginalWarning=null,this._lastModifiedWarning=null,be.willCreateDiffEditor(),this._documentDiffProvider=this._register(Ne.createInstance(l.WorkerBasedDocumentDiffProvider,ve)),this._register(this._documentDiffProvider.onDidChange(Fe=>this._beginUpdateDecorationsSoon())),this._codeEditorService=be,this._contextKeyService=this._register(Le.createScoped(he)),this._instantiationService=Ne.createChild(new x.ServiceCollection([A.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=_e,this._notificationService=Te,this._id=++se,this._state=0,this._updatingDiffProgress=null,this._domElement=he,ve=ve||{},this._options=De(ve,{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}),typeof ve.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",ve.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new b.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,k.createFastDomNode)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(_.addStandardDisposableListener(this._overviewDomElement,_.EventType.POINTER_DOWN,Fe=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(Fe)})),this._register(_.addDisposableListener(this._overviewDomElement,_.EventType.MOUSE_WHEEL,Fe=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(Fe)},{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 ne(Oe,pe),this._modifiedEditorState=new ne(Oe,pe),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new i.ElementSizeObserver(this._containerDomElement,ve.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),ve.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(ve,de.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(ve,de.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=Ne.createInstance(o.DiffReview,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new j(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new U(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(_e.onDidColorThemeChange(Fe=>{this._strategy&&this._strategy.applyColors(Fe)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Be=s.EditorExtensionsRegistry.getDiffEditorContributions();for(const Fe of Be)try{this._register(Ne.createInstance(Fe.ctor,this))}catch(ze){(0,g.onUnexpectedError)(ze)}this._codeEditorService.addDiffEditor(this)}_setState(he){this._state!==he&&(this._state=he,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(he,ve){let de="monaco-diff-editor monaco-editor-background ";return ve&&(de+="side-by-side "),de+=(0,M.getThemeTypeSelector)(he.type),de}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){this._options.renderOverviewRuler&&(w.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(he,ve){const de=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(he),ve);this._register(de.onDidScrollChange(Le=>{this._isHandlingScrollEvent||!Le.scrollTopChanged&&!Le.scrollLeftChanged&&!Le.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:Le.scrollLeft,scrollTop:Le.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(de.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(de.onDidChangeConfiguration(Le=>{de.getModel()&&(Le.hasChanged(48)&&this._updateDecorationsRunner.schedule(),Le.hasChanged(140)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(de.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(de.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const pe=this._contextKeyService.createKey("isInDiffLeftEditor",de.hasWidgetFocus());return this._register(de.onDidFocusEditorWidget(()=>pe.set(!0))),this._register(de.onDidBlurEditorWidget(()=>pe.set(!1))),this._register(de.onDidContentSizeChange(Le=>{const Ne=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ht.ONE_OVERVIEW_WIDTH,be=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:be,contentWidth:Ne,contentHeightChanged:Le.contentHeightChanged,contentWidthChanged:Le.contentWidthChanged})})),de}_createRightHandSideEditor(he,ve){const de=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(he),ve);this._register(de.onDidScrollChange(Le=>{this._isHandlingScrollEvent||!Le.scrollTopChanged&&!Le.scrollLeftChanged&&!Le.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:Le.scrollLeft,scrollTop:Le.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(de.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(de.onDidChangeConfiguration(Le=>{de.getModel()&&(Le.hasChanged(48)&&this._updateDecorationsRunner.schedule(),Le.hasChanged(140)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(de.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(de.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(de.onDidChangeModelOptions(Le=>{Le.tabSize&&this._updateDecorationsRunner.schedule()}));const pe=this._contextKeyService.createKey("isInDiffRightEditor",de.hasWidgetFocus());return this._register(de.onDidFocusEditorWidget(()=>pe.set(!0))),this._register(de.onDidBlurEditorWidget(()=>pe.set(!1))),this._register(de.onDidContentSizeChange(Le=>{const Ne=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ht.ONE_OVERVIEW_WIDTH,be=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:be,contentWidth:Ne,contentHeightChanged:Le.contentHeightChanged,contentWidthChanged:Le.contentWidthChanged})})),this._register(de.onMouseDown(Le=>{var Ne,be;if(!Le.event.rightButton&&Le.target.position&&(!((Ne=Le.target.element)===null||Ne===void 0)&&Ne.className.includes("arrow-revert-change"))){const _e=Le.target.position.lineNumber,Te=Le.target,Oe=(be=this._diffComputationResult)===null||be===void 0?void 0:be.changes.find(Pe=>Te?.detail.afterLineNumber===Pe.modifiedStartLineNumber||Pe.modifiedEndLineNumber>0&&Pe.modifiedStartLineNumber===_e);Oe&&this.revertChange(Oe),Le.event.stopPropagation(),this._updateDecorations();return}})),de}revertChange(he){const ve=this._modifiedEditor,de=this._originalEditor.getModel(),pe=this._modifiedEditor.getModel();if(!de||!pe||!ve)return;const Le=he.originalEndLineNumber>0?new v.Range(he.originalStartLineNumber,1,he.originalEndLineNumber,de.getLineMaxColumn(he.originalEndLineNumber)):null,Ne=Le?de.getValueInRange(Le):null,be=he.modifiedEndLineNumber>0?new v.Range(he.modifiedStartLineNumber,1,he.modifiedEndLineNumber,pe.getLineMaxColumn(he.modifiedEndLineNumber)):null,_e=pe.getEOL();if(he.originalEndLineNumber===0&&be){let Te=be;he.modifiedStartLineNumber>1?Te=be.setStartPosition(he.modifiedStartLineNumber-1,pe.getLineMaxColumn(he.modifiedStartLineNumber-1)):he.modifiedEndLineNumber<pe.getLineCount()&&(Te=be.setEndPosition(he.modifiedEndLineNumber+1,1)),ve.executeEdits("diffEditor",[{range:Te,text:""}])}else if(he.modifiedEndLineNumber===0&&Ne!==null){const Te=he.modifiedStartLineNumber<pe.getLineCount()?new u.Position(he.modifiedStartLineNumber+1,1):new u.Position(he.modifiedStartLineNumber,pe.getLineMaxColumn(he.modifiedStartLineNumber));ve.executeEdits("diffEditor",[{range:v.Range.fromPositions(Te,Te),text:he.modifiedStartLineNumber<pe.getLineCount()?Ne+_e:_e+Ne}])}else be&&Ne!==null&&ve.executeEdits("diffEditor",[{range:be,text:Ne}])}_createInnerEditor(he,ve,de,pe){return he.createInstance(h.CodeEditorWidget,ve,de,pe)}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 m.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(he){const ve=De(he,this._options),de=ke(this._options,ve);this._options=ve;const pe=de.ignoreTrimWhitespace||de.renderIndicators||de.renderMarginRevertIcon,Le=this._isVisible&&(de.maxComputationTime||de.maxFileSize);this._documentDiffProvider.setOptions(ve),pe?this._beginUpdateDecorations():Le&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(he)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(he)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio),de.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new j(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new U(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),de.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(he){if(he&&(!he.original||!he.modified))throw new Error(he.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(he?he.original:null),this._modifiedEditor.setModel(he?he.modified:null),this._updateDecorationsRunner.cancel(),he&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),he&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(he){return this._modifiedEditor.getVisibleColumnFromPosition(he)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(he,ve="api"){this._modifiedEditor.setPosition(he,ve)}revealLine(he,ve=0){this._modifiedEditor.revealLine(he,ve)}revealLineInCenter(he,ve=0){this._modifiedEditor.revealLineInCenter(he,ve)}revealLineInCenterIfOutsideViewport(he,ve=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(he,ve)}revealLineNearTop(he,ve=0){this._modifiedEditor.revealLineNearTop(he,ve)}revealPosition(he,ve=0){this._modifiedEditor.revealPosition(he,ve)}revealPositionInCenter(he,ve=0){this._modifiedEditor.revealPositionInCenter(he,ve)}revealPositionInCenterIfOutsideViewport(he,ve=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(he,ve)}revealPositionNearTop(he,ve=0){this._modifiedEditor.revealPositionNearTop(he,ve)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(he,ve="api"){this._modifiedEditor.setSelection(he,ve)}setSelections(he,ve="api"){this._modifiedEditor.setSelections(he,ve)}revealLines(he,ve,de=0){this._modifiedEditor.revealLines(he,ve,de)}revealLinesInCenter(he,ve,de=0){this._modifiedEditor.revealLinesInCenter(he,ve,de)}revealLinesInCenterIfOutsideViewport(he,ve,de=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(he,ve,de)}revealLinesNearTop(he,ve,de=0){this._modifiedEditor.revealLinesNearTop(he,ve,de)}revealRange(he,ve=0,de=!1,pe=!0){this._modifiedEditor.revealRange(he,ve,de,pe)}revealRangeInCenter(he,ve=0){this._modifiedEditor.revealRangeInCenter(he,ve)}revealRangeInCenterIfOutsideViewport(he,ve=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(he,ve)}revealRangeNearTop(he,ve=0){this._modifiedEditor.revealRangeNearTop(he,ve)}revealRangeNearTopIfOutsideViewport(he,ve=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(he,ve)}revealRangeAtTop(he,ve=0){this._modifiedEditor.revealRangeAtTop(he,ve)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const he=this._originalEditor.saveViewState(),ve=this._modifiedEditor.saveViewState();return{original:he,modified:ve}}restoreViewState(he){if(he&&he.original&&he.modified){const ve=he;this._originalEditor.restoreViewState(ve.original),this._modifiedEditor.restoreViewState(ve.modified)}}layout(he){this._elementSizeObserver.observe(he)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(he,ve,de){this._modifiedEditor.trigger(he,ve,de)}createDecorationsCollection(he){return this._modifiedEditor.createDecorationsCollection(he)}changeDecorations(he){return this._modifiedEditor.changeDecorations(he)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const he=this._elementSizeObserver.getHeight(),ve=this._getReviewHeight(),de=ht.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ht.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:ht.ONE_OVERVIEW_WIDTH,right:de+ht.ONE_OVERVIEW_WIDTH,height:he-ve}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:ht.ONE_OVERVIEW_WIDTH,height:he-ve}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),ht.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(he,ve){return!he&&!ve?!0:!he||!ve?!1:he.toString()===ve.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1);const he=this._originalEditor.getModel(),ve=this._modifiedEditor.getModel();if(!he||!ve)return;this._diffComputationToken++;const de=this._diffComputationToken,pe=this._options.maxFileSize*1024*1024,Le=Ne=>{const be=Ne.getValueLength();return pe===0||be<=pe};if(!Le(he)||!Le(ve)){(!ht._equals(he.uri,this._lastOriginalWarning)||!ht._equals(ve.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=he.uri,this._lastModifiedWarning=ve.uri,this._notificationService.warn(O.localize(3,null)));return}this._setState(1),this._documentDiffProvider.computeDiff(he,ve,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime}).then(Ne=>{de===this._diffComputationToken&&he===this._originalEditor.getModel()&&ve===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:Ne.identical,quitEarly:Ne.quitEarly,changes2:Ne.changes,changes:Ne.changes.map(be=>{let _e,Te,Oe,Pe,Be=be.innerChanges;return be.originalRange.isEmpty?(_e=be.originalRange.startLineNumber-1,Te=0,Be=void 0):(_e=be.originalRange.startLineNumber,Te=be.originalRange.endLineNumberExclusive-1),be.modifiedRange.isEmpty?(Oe=be.modifiedRange.startLineNumber-1,Pe=0,Be=void 0):(Oe=be.modifiedRange.startLineNumber,Pe=be.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:_e,originalEndLineNumber:Te,modifiedStartLineNumber:Oe,modifiedEndLineNumber:Pe,charChanges:Be?.map(Fe=>({originalStartLineNumber:Fe.originalRange.startLineNumber,originalStartColumn:Fe.originalRange.startColumn,originalEndLineNumber:Fe.originalRange.endLineNumber,originalEndColumn:Fe.originalRange.endColumn,modifiedStartLineNumber:Fe.modifiedRange.startLineNumber,modifiedStartColumn:Fe.modifiedRange.startColumn,modifiedEndLineNumber:Fe.modifiedRange.endLineNumber,modifiedEndColumn:Fe.modifiedRange.endColumn}))}})},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},Ne=>{de===this._diffComputationToken&&he===this._originalEditor.getModel()&&ve===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 he=this._diffComputationResult?this._diffComputationResult.changes:[],ve=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),de=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),pe=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(87),Le=this._strategy.getEditorsDiffDecorations(he,this._options.ignoreTrimWhitespace,this._options.renderIndicators,pe,ve,de);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,Le.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,Le.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(he){const ve=Object.assign({},he);return ve.inDiffEditor=!0,ve.automaticLayout=!1,ve.scrollbar=Object.assign({},ve.scrollbar||{}),ve.scrollbar.vertical="visible",ve.folding=!1,ve.codeLens=this._options.diffCodeLens,ve.fixedOverflowWidgets=!0,ve.minimap=Object.assign({},ve.minimap||{}),ve.minimap.enabled=!1,ve}_adjustOptionsForLeftHandSide(he){const ve=this._adjustOptionsForSubEditor(he);return this._options.renderSideBySide?ve.wordWrapOverride1=this._options.diffWordWrap:(ve.wordWrapOverride1="off",ve.wordWrapOverride2="off"),he.originalAriaLabel&&(ve.ariaLabel=he.originalAriaLabel),this._updateAriaLabel(ve),ve.readOnly=!this._options.originalEditable,ve.dropIntoEditor={enabled:!ve.readOnly},ve.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},ve),{dimension:{height:0,width:0}})}_updateAriaLabel(he){let ve=he.ariaLabel;this._options.accessibilityVerbose?ve+=Z:ve&&(ve=ve.replaceAll(Z,"")),he.ariaLabel=ve}_adjustOptionsForRightHandSide(he){const ve=this._adjustOptionsForSubEditor(he);return he.modifiedAriaLabel&&(ve.ariaLabel=he.modifiedAriaLabel),this._updateAriaLabel(ve),ve.wordWrapOverride1=this._options.diffWordWrap,ve.revealHorizontalRightPadding=a.EditorOptions.revealHorizontalRightPadding.defaultValue+ht.ENTIRE_DIFF_OVERVIEW_WIDTH,ve.scrollbar.verticalHasArrows=!1,ve.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},ve),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const he=this._elementSizeObserver.getWidth(),ve=this._elementSizeObserver.getHeight(),de=this._getReviewHeight(),pe=this._strategy.layout();this._originalDomNode.style.width=pe+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=he-pe+"px",this._modifiedDomNode.style.left=pe+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=ve-de+"px",this._overviewDomElement.style.width=ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=he-ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(ht.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:pe,height:ve-de}),this._modifiedEditor.layout({width:he-pe-(this._options.renderOverviewRuler?ht.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:ve-de}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(ve-de,he,de),this._layoutOverviewViewport()}_layoutOverviewViewport(){const he=this._computeOverviewViewport();he?(this._overviewViewportDomElement.setTop(he.top),this._overviewViewportDomElement.setHeight(he.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const he=this._modifiedEditor.getLayoutInfo();if(!he)return null;const ve=this._modifiedEditor.getScrollTop(),de=this._modifiedEditor.getScrollHeight(),pe=Math.max(0,he.height),Le=Math.max(0,pe-2*0),Ne=de>0?Le/de:0,be=Math.max(0,Math.floor(he.height*Ne)),_e=Math.floor(ve*Ne);return{height:be,top:_e}}_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(he){var ve;(ve=this._strategy)===null||ve===void 0||ve.dispose(),this._strategy=he,this._boundarySashes&&he.setBoundarySashes(this._boundarySashes),he.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(he,ve){const de=this._diffComputationResult?this._diffComputationResult.changes:[];if(de.length===0||he<ve(de[0]))return null;let pe=0,Le=de.length-1;for(;pe<Le;){const Ne=Math.floor((pe+Le)/2),be=ve(de[Ne]),_e=Ne+1<=Le?ve(de[Ne+1]):1073741824;he<be?Le=Ne-1:he>=_e?pe=Ne+1:(pe=Ne,Le=Ne)}return de[pe]}_getEquivalentLineForOriginalLineNumber(he){const ve=this._getLineChangeAtOrBeforeLineNumber(he,_e=>_e.originalStartLineNumber);if(!ve)return he;const de=ve.originalStartLineNumber+(ve.originalEndLineNumber>0?-1:0),pe=ve.modifiedStartLineNumber+(ve.modifiedEndLineNumber>0?-1:0),Le=ve.originalEndLineNumber>0?ve.originalEndLineNumber-ve.originalStartLineNumber+1:0,Ne=ve.modifiedEndLineNumber>0?ve.modifiedEndLineNumber-ve.modifiedStartLineNumber+1:0,be=he-de;return be<=Le?pe+Math.min(be,Ne):pe+Ne-Le+be}_getEquivalentLineForModifiedLineNumber(he){const ve=this._getLineChangeAtOrBeforeLineNumber(he,_e=>_e.modifiedStartLineNumber);if(!ve)return he;const de=ve.originalStartLineNumber+(ve.originalEndLineNumber>0?-1:0),pe=ve.modifiedStartLineNumber+(ve.modifiedEndLineNumber>0?-1:0),Le=ve.originalEndLineNumber>0?ve.originalEndLineNumber-ve.originalStartLineNumber+1:0,Ne=ve.modifiedEndLineNumber>0?ve.modifiedEndLineNumber-ve.modifiedStartLineNumber+1:0,be=he-pe;return be<=Ne?de+Math.min(be,Le):de+Le-Ne+be}getDiffLineInformationForOriginal(he){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(he)}:null}getDiffLineInformationForModified(he){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(he)}:null}};Y.ONE_OVERVIEW_WIDTH=15,Y.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Y.UPDATE_DIFF_DECORATIONS_DELAY=200,e.DiffEditorWidget=Y=Me([fe(3,R.IClipboardService),fe(4,A.IContextKeyService),fe(5,P.IInstantiationService),fe(6,r.ICodeEditorService),fe(7,M.IThemeService),fe(8,F.INotificationService),fe(9,N.IContextMenuService),fe(10,B.IEditorProgressService)],Y);class oe extends n.Disposable{constructor(he){super(),this._dataSource=he,this._insertColor=null,this._removeColor=null}applyColors(he){const ve=he.getColor(V.diffOverviewRulerInserted)||(he.getColor(V.diffInserted)||V.defaultInsertColor).transparent(2),de=he.getColor(V.diffOverviewRulerRemoved)||(he.getColor(V.diffRemoved)||V.defaultRemoveColor).transparent(2),pe=!ve.equals(this._insertColor)||!de.equals(this._removeColor);return this._insertColor=ve,this._removeColor=de,pe}getEditorsDiffDecorations(he,ve,de,pe,Le,Ne){Ne=Ne.sort((Oe,Pe)=>Oe.afterLineNumber-Pe.afterLineNumber),Le=Le.sort((Oe,Pe)=>Oe.afterLineNumber-Pe.afterLineNumber);const be=this._getViewZones(he,Le,Ne,de),_e=this._getOriginalEditorDecorations(be,he,ve,de),Te=this._getModifiedEditorDecorations(be,he,ve,de,pe);return{original:{decorations:_e.decorations,overviewZones:_e.overviewZones,zones:be.original},modified:{decorations:Te.decorations,overviewZones:Te.overviewZones,zones:be.modified}}}setBoundarySashes(he){}}class ce{constructor(he){this._source=he,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 ge{constructor(he,ve,de,pe,Le){this._lineChanges=he,this._originalForeignVZ=ve,this._modifiedForeignVZ=de,this._originalEditor=pe,this._modifiedEditor=Le}static _getViewLineCount(he,ve,de){const pe=he.getModel(),Le=he._getViewModel();if(pe&&Le){const Ne=Ee(pe,Le,ve,de);return Ne.endLineNumber-Ne.startLineNumber+1}return de-ve+1}getViewZones(){const he=this._originalEditor.getOption(64),ve=this._modifiedEditor.getOption(64),de=this._originalEditor.getOption(140).wrappingColumn!==-1,pe=this._modifiedEditor.getOption(140).wrappingColumn!==-1,Le=de||pe,Ne=this._originalEditor.getModel(),be=this._originalEditor._getViewModel().coordinatesConverter,_e=this._modifiedEditor._getViewModel().coordinatesConverter,Te={original:[],modified:[]};let Oe=0,Pe=0,Be=0,Fe=0,ze=0,Ze=0;const Ge=($e,Je)=>$e.afterLineNumber-Je.afterLineNumber,tt=($e,Je)=>{if(Je.domNode===null&&$e.length>0){const Ke=$e[$e.length-1];if(Ke.afterLineNumber===Je.afterLineNumber&&Ke.domNode===null){Ke.heightInLines+=Je.heightInLines;return}}$e.push(Je)},He=new ce(this._modifiedForeignVZ),Ae=new ce(this._originalForeignVZ);let xe=1,Ve=1;for(let $e=0,Je=this._lineChanges.length;$e<=Je;$e++){const Ke=$e<Je?this._lineChanges[$e]:null;Ke!==null?(Be=Ke.originalStartLineNumber+(Ke.originalEndLineNumber>0?-1:0),Fe=Ke.modifiedStartLineNumber+(Ke.modifiedEndLineNumber>0?-1:0),Pe=Ke.originalEndLineNumber>0?ge._getViewLineCount(this._originalEditor,Ke.originalStartLineNumber,Ke.originalEndLineNumber):0,Oe=Ke.modifiedEndLineNumber>0?ge._getViewLineCount(this._modifiedEditor,Ke.modifiedStartLineNumber,Ke.modifiedEndLineNumber):0,ze=Math.max(Ke.originalStartLineNumber,Ke.originalEndLineNumber),Ze=Math.max(Ke.modifiedStartLineNumber,Ke.modifiedEndLineNumber)):(Be+=1e7+Pe,Fe+=1e7+Oe,ze=Be,Ze=Fe);let Xe=[],rt=[];if(Le){let Ye;Ke?Ke.originalEndLineNumber>0?Ye=Ke.originalStartLineNumber-xe:Ye=Ke.modifiedStartLineNumber-Ve:Ye=Ne.getLineCount()-xe+1;for(let at=0;at<Ye;at++){const ut=xe+at,qe=Ve+at,Re=be.getModelLineViewLineCount(ut),We=_e.getModelLineViewLineCount(qe);Re<We?Xe.push({afterLineNumber:ut,heightInLines:We-Re,domNode:null,marginDomNode:null}):Re>We&&rt.push({afterLineNumber:qe,heightInLines:Re-We,domNode:null,marginDomNode:null})}Ke&&(xe=(Ke.originalEndLineNumber>0?Ke.originalEndLineNumber:Ke.originalStartLineNumber)+1,Ve=(Ke.modifiedEndLineNumber>0?Ke.modifiedEndLineNumber:Ke.modifiedStartLineNumber)+1)}for(;He.current&&He.current.afterLineNumber<=Ze;){let Ye;He.current.afterLineNumber<=Fe?Ye=Be-Fe+He.current.afterLineNumber:Ye=ze;let at=null;Ke&&Ke.modifiedStartLineNumber<=He.current.afterLineNumber&&He.current.afterLineNumber<=Ke.modifiedEndLineNumber&&(at=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),Xe.push({afterLineNumber:Ye,heightInLines:He.current.height/ve,domNode:null,marginDomNode:at}),He.advance()}for(;Ae.current&&Ae.current.afterLineNumber<=ze;){let Ye;Ae.current.afterLineNumber<=Be?Ye=Fe-Be+Ae.current.afterLineNumber:Ye=Ze,rt.push({afterLineNumber:Ye,heightInLines:Ae.current.height/he,domNode:null}),Ae.advance()}if(Ke!==null&&G(Ke)){const Ye=this._produceOriginalFromDiff(Ke,Pe,Oe);Ye&&Xe.push(Ye)}if(Ke!==null&&ae(Ke)){const Ye=this._produceModifiedFromDiff(Ke,Pe,Oe);Ye&&rt.push(Ye)}let st=0,dt=0;for(Xe=Xe.sort(Ge),rt=rt.sort(Ge);st<Xe.length&&dt<rt.length;){const Ye=Xe[st],at=rt[dt],ut=Ye.afterLineNumber-Be,qe=at.afterLineNumber-Fe;ut<qe?(tt(Te.original,Ye),st++):qe<ut?(tt(Te.modified,at),dt++):Ye.shouldNotShrink?(tt(Te.original,Ye),st++):at.shouldNotShrink?(tt(Te.modified,at),dt++):Ye.heightInLines>=at.heightInLines?(Ye.heightInLines-=at.heightInLines,dt++):(at.heightInLines-=Ye.heightInLines,st++)}for(;st<Xe.length;)tt(Te.original,Xe[st]),st++;for(;dt<rt.length;)tt(Te.modified,rt[dt]),dt++}return{original:ge._ensureDomNodes(Te.original),modified:ge._ensureDomNodes(Te.modified)}}static _ensureDomNodes(he){return he.map(ve=>(ve.domNode||(ve.domNode=Se()),ve))}}function le(Ie,he,ve,de,pe){return{range:new v.Range(Ie,he,ve,de),options:pe}}const ue={arrowRevertChange:C.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new ie.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(O.localize(4,null)),glyphMarginClassName:"arrow-revert-change "+Q.ThemeIcon.asClassName(S.Codicon.arrowRight),zIndex:10001}),charDelete:C.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:C.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:C.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:C.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:C.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:C.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Q.ThemeIcon.asClassName(H),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:C.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:C.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Q.ThemeIcon.asClassName(W),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:C.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class j extends oe{constructor(he,ve,de){super(he),this._disableSash=ve===!1,this._defaultRatio=de,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new E.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(pe=>this._onSashDrag(pe)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(he,ve){this._defaultRatio=ve;const de=he===!1;this._disableSash!==de&&(this._disableSash=de,this._sash.state=this._disableSash?0:3)}layout(he=this._sashRatio||this._defaultRatio){const de=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Y.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let pe=Math.floor((he||this._defaultRatio)*de);const Le=Math.floor(this._defaultRatio*de);return pe=this._disableSash?Le:pe||Le,de>j.MINIMUM_EDITOR_WIDTH*2?(pe<j.MINIMUM_EDITOR_WIDTH&&(pe=j.MINIMUM_EDITOR_WIDTH),pe>de-j.MINIMUM_EDITOR_WIDTH&&(pe=de-j.MINIMUM_EDITOR_WIDTH)):pe=Le,this._sashPosition!==pe&&(this._sashPosition=pe),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(he){const de=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Y.ENTIRE_DIFF_OVERVIEW_WIDTH:0),pe=this.layout((this._startSashPosition+(he.currentX-he.startX))/de);this._sashRatio=pe/de,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=this._defaultRatio,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(he){return 0}getVerticalSashLeft(he){return this._sashPosition}getVerticalSashHeight(he){return this._dataSource.getHeight()}setBoundarySashes(he){this._sash.orthogonalEndSash=he.bottom}_getViewZones(he,ve,de){const pe=this._dataSource.getOriginalEditor(),Le=this._dataSource.getModifiedEditor();return new z(he,ve,de,pe,Le).getViewZones()}_getOriginalEditorDecorations(he,ve,de,pe){const Le=this._dataSource.getOriginalEditor(),Ne=String(this._removeColor),be={decorations:[],overviewZones:[]},_e=Le.getModel(),Te=Le._getViewModel();for(const Oe of ve)if(ae(Oe)){be.decorations.push({range:new v.Range(Oe.originalStartLineNumber,1,Oe.originalEndLineNumber,1073741824),options:pe?ue.lineDeleteWithSign:ue.lineDelete}),(!G(Oe)||!Oe.charChanges)&&be.decorations.push(le(Oe.originalStartLineNumber,1,Oe.originalEndLineNumber,1073741824,ue.charDeleteWholeLine));const Pe=Ee(_e,Te,Oe.originalStartLineNumber,Oe.originalEndLineNumber);if(be.overviewZones.push(new T.OverviewRulerZone(Pe.startLineNumber,Pe.endLineNumber,0,Ne)),Oe.charChanges){for(const Be of Oe.charChanges)if(Ce(Be))if(de)for(let Fe=Be.originalStartLineNumber;Fe<=Be.originalEndLineNumber;Fe++){let ze,Ze;Fe===Be.originalStartLineNumber?ze=Be.originalStartColumn:ze=_e.getLineFirstNonWhitespaceColumn(Fe),Fe===Be.originalEndLineNumber?Ze=Be.originalEndColumn:Ze=_e.getLineLastNonWhitespaceColumn(Fe),be.decorations.push(le(Fe,ze,Fe,Ze,ue.charDelete))}else be.decorations.push(le(Be.originalStartLineNumber,Be.originalStartColumn,Be.originalEndLineNumber,Be.originalEndColumn,ue.charDelete))}}return be}_getModifiedEditorDecorations(he,ve,de,pe,Le){const Ne=this._dataSource.getModifiedEditor(),be=String(this._insertColor),_e={decorations:[],overviewZones:[]},Te=Ne.getModel(),Oe=Ne._getViewModel();for(const Pe of ve){if(Le)if(Pe.modifiedEndLineNumber>0)_e.decorations.push({range:new v.Range(Pe.modifiedStartLineNumber,1,Pe.modifiedStartLineNumber,1),options:ue.arrowRevertChange});else{const Be=he.modified.find(Fe=>Fe.afterLineNumber===Pe.modifiedStartLineNumber);Be&&(Be.marginDomNode=ye())}if(G(Pe)){_e.decorations.push({range:new v.Range(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824),options:pe?ue.lineInsertWithSign:ue.lineInsert}),(!ae(Pe)||!Pe.charChanges)&&_e.decorations.push(le(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824,ue.charInsertWholeLine));const Be=Ee(Te,Oe,Pe.modifiedStartLineNumber,Pe.modifiedEndLineNumber);if(_e.overviewZones.push(new T.OverviewRulerZone(Be.startLineNumber,Be.endLineNumber,0,be)),Pe.charChanges){for(const Fe of Pe.charChanges)if(me(Fe))if(de)for(let ze=Fe.modifiedStartLineNumber;ze<=Fe.modifiedEndLineNumber;ze++){let Ze,Ge;ze===Fe.modifiedStartLineNumber?Ze=Fe.modifiedStartColumn:Ze=Te.getLineFirstNonWhitespaceColumn(ze),ze===Fe.modifiedEndLineNumber?Ge=Fe.modifiedEndColumn:Ge=Te.getLineLastNonWhitespaceColumn(ze),_e.decorations.push(le(ze,Ze,ze,Ge,ue.charInsert))}else _e.decorations.push(le(Fe.modifiedStartLineNumber,Fe.modifiedStartColumn,Fe.modifiedEndLineNumber,Fe.modifiedEndColumn,ue.charInsert))}}}return _e}}j.MINIMUM_EDITOR_WIDTH=100;class z extends ge{constructor(he,ve,de,pe,Le){super(he,ve,de,pe,Le)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(he,ve,de){return de>ve?{afterLineNumber:Math.max(he.originalStartLineNumber,he.originalEndLineNumber),heightInLines:de-ve,domNode:null}:null}_produceModifiedFromDiff(he,ve,de){return ve>de?{afterLineNumber:Math.max(he.modifiedStartLineNumber,he.modifiedEndLineNumber),heightInLines:ve-de,domNode:null}:null}}class U extends oe{constructor(he,ve){super(he),this._decorationsLeft=he.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(he.getOriginalEditor().onDidLayoutChange(de=>{this._decorationsLeft!==de.decorationsLeft&&(this._decorationsLeft=de.decorationsLeft,he.relayoutEditors())}))}setEnableSplitViewResizing(he){}_getViewZones(he,ve,de,pe){const Le=this._dataSource.getOriginalEditor(),Ne=this._dataSource.getModifiedEditor();return new J(he,ve,de,Le,Ne,pe).getViewZones()}_getOriginalEditorDecorations(he,ve,de,pe){const Le=String(this._removeColor),Ne={decorations:[],overviewZones:[]},be=this._dataSource.getOriginalEditor(),_e=be.getModel(),Te=be._getViewModel();let Oe=0;for(const Pe of ve)if(ae(Pe)){for(Ne.decorations.push({range:new v.Range(Pe.originalStartLineNumber,1,Pe.originalEndLineNumber,1073741824),options:ue.lineDeleteMargin});Oe<he.modified.length;){const ze=he.modified[Oe];if(ze.diff&&ze.diff.originalStartLineNumber>=Pe.originalStartLineNumber)break;Oe++}let Be=0;if(Oe<he.modified.length){const ze=he.modified[Oe];ze.diff&&ze.diff.originalStartLineNumber===Pe.originalStartLineNumber&&ze.diff.originalEndLineNumber===Pe.originalEndLineNumber&&ze.diff.modifiedStartLineNumber===Pe.modifiedStartLineNumber&&ze.diff.modifiedEndLineNumber===Pe.modifiedEndLineNumber&&(Be=ze.heightInLines)}const Fe=Ee(_e,Te,Pe.originalStartLineNumber,Pe.originalEndLineNumber);Ne.overviewZones.push(new T.OverviewRulerZone(Fe.startLineNumber,Fe.endLineNumber,Be,Le))}return Ne}_getModifiedEditorDecorations(he,ve,de,pe,Le){const Ne=this._dataSource.getModifiedEditor(),be=String(this._insertColor),_e={decorations:[],overviewZones:[]},Te=Ne.getModel(),Oe=Ne._getViewModel();for(const Pe of ve)if(G(Pe)){_e.decorations.push({range:new v.Range(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824),options:pe?ue.lineInsertWithSign:ue.lineInsert});const Be=Ee(Te,Oe,Pe.modifiedStartLineNumber,Pe.modifiedEndLineNumber);if(_e.overviewZones.push(new T.OverviewRulerZone(Be.startLineNumber,Be.endLineNumber,0,be)),Pe.charChanges){for(const Fe of Pe.charChanges)if(me(Fe))if(de)for(let ze=Fe.modifiedStartLineNumber;ze<=Fe.modifiedEndLineNumber;ze++){let Ze,Ge;ze===Fe.modifiedStartLineNumber?Ze=Fe.modifiedStartColumn:Ze=Te.getLineFirstNonWhitespaceColumn(ze),ze===Fe.modifiedEndLineNumber?Ge=Fe.modifiedEndColumn:Ge=Te.getLineLastNonWhitespaceColumn(ze),_e.decorations.push(le(ze,Ze,ze,Ge,ue.charInsert))}else _e.decorations.push(le(Fe.modifiedStartLineNumber,Fe.modifiedStartColumn,Fe.modifiedEndLineNumber,Fe.modifiedEndColumn,ue.charInsert))}else _e.decorations.push(le(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824,ue.charInsertWholeLine))}return _e}layout(){return Math.max(5,this._decorationsLeft)}}class J extends ge{constructor(he,ve,de,pe,Le,Ne){super(he,ve,de,pe,Le),this._originalModel=pe.getModel(),this._renderIndicators=Ne,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const he=super.getViewZones();return this._finalize(he),he}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const he=document.createElement("div");return he.className="inline-added-margin-view-zone",he}_produceOriginalFromDiff(he,ve,de){const pe=document.createElement("div");return pe.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(he.originalStartLineNumber,he.originalEndLineNumber),heightInLines:de,domNode:document.createElement("div"),marginDomNode:pe}}_produceModifiedFromDiff(he,ve,de){const pe=document.createElement("div");pe.className=`view-lines line-delete ${y.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const Le=document.createElement("div");Le.className="inline-deleted-margin-view-zone";const Ne={shouldNotShrink:!0,afterLineNumber:he.modifiedEndLineNumber===0?he.modifiedStartLineNumber:he.modifiedStartLineNumber-1,heightInLines:ve,minWidthInPx:0,domNode:pe,marginDomNode:Le,diff:{originalStartLineNumber:he.originalStartLineNumber,originalEndLineNumber:he.originalEndLineNumber,modifiedStartLineNumber:he.modifiedStartLineNumber,modifiedEndLineNumber:he.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let be=he.originalStartLineNumber;be<=he.originalEndLineNumber;be++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(be),null,null);return this._pendingLineChange.push(he),this._pendingViewZones.push(Ne),Ne}_finalize(he){const ve=this._modifiedEditor.getOptions(),de=this._modifiedEditor.getModel().getOptions().tabSize,pe=ve.get(48),Le=ve.get(31),Ne=pe.typicalHalfwidthCharacterWidth,be=ve.get(99),_e=this._originalModel.mightContainNonBasicASCII(),Te=this._originalModel.mightContainRTL(),Oe=ve.get(64),Be=ve.get(139).decorationsWidth,Fe=ve.get(112),ze=ve.get(94),Ze=ve.get(89),Ge=ve.get(49),tt=this._lineBreaksComputer.finalize();let He=0;for(let Ae=0;Ae<this._pendingLineChange.length;Ae++){const xe=this._pendingLineChange[Ae],Ve=this._pendingViewZones[Ae],$e=Ve.domNode;(0,t.applyFontInfo)($e,pe);const Je=Ve.marginDomNode;(0,t.applyFontInfo)(Je,pe);const Ke=[];if(xe.charChanges)for(const qe of xe.charChanges)Ce(qe)&&Ke.push(new I.InlineDecoration(new v.Range(qe.originalStartLineNumber,qe.originalStartColumn,qe.originalEndLineNumber,qe.originalEndColumn),"char-delete",0));const Xe=Ke.length>0,rt=new f.StringBuilder(1e4);let st=0,dt=0,Ye=null;for(let qe=xe.originalStartLineNumber;qe<=xe.originalEndLineNumber;qe++){const Re=qe-xe.originalStartLineNumber,We=this._originalModel.tokenization.getLineTokens(qe),Ue=We.getLineContent(),je=tt[He++],nt=L.LineDecoration.filter(Ke,qe,1,Ue.length+1);if(je){let Qe=0;for(const it of je.breakOffsets){const lt=We.sliceAndInflate(Qe,it,0),ft=Ue.substring(Qe,it);st=Math.max(st,this._renderOriginalLine(dt++,ft,lt,L.LineDecoration.extractWrapped(nt,Qe,it),Xe,_e,Te,pe,Le,Oe,Be,Fe,ze,Ze,Ge,de,rt,Je)),Qe=it}for(Ye||(Ye=[]);Ye.length<Re;)Ye[Ye.length]=1;Ye[Re]=je.breakOffsets.length,Ve.heightInLines+=je.breakOffsets.length-1;const ot=document.createElement("div");ot.className="gutter-delete",he.original.push({afterLineNumber:qe,afterColumn:0,heightInLines:je.breakOffsets.length-1,domNode:Se(),marginDomNode:ot})}else st=Math.max(st,this._renderOriginalLine(dt++,Ue,We,nt,Xe,_e,Te,pe,Le,Oe,Be,Fe,ze,Ze,Ge,de,rt,Je))}st+=be;const at=rt.build(),ut=q?q.createHTML(at):at;if($e.innerHTML=ut,Ve.minWidthInPx=st*Ne,Ye){const qe=xe.originalEndLineNumber-xe.originalStartLineNumber;for(;Ye.length<=qe;)Ye[Ye.length]=1}Ve.diff.viewLineCounts=Ye}he.original.sort((Ae,xe)=>Ae.afterLineNumber-xe.afterLineNumber)}_renderOriginalLine(he,ve,de,pe,Le,Ne,be,_e,Te,Oe,Pe,Be,Fe,ze,Ze,Ge,tt,He){tt.appendString('<div class="view-line'),Le||tt.appendString(" char-delete"),tt.appendString('" style="top:'),tt.appendString(String(he*Oe)),tt.appendString('px;width:1000000px;">');const Ae=I.ViewLineRenderingData.isBasicASCII(ve,Ne),xe=I.ViewLineRenderingData.containsRTL(ve,Ae,be),Ve=(0,D.renderViewLine)(new D.RenderLineInput(_e.isMonospace&&!Te,_e.canUseHalfwidthRightwardsArrow,ve,!1,Ae,xe,0,de,pe,Ge,0,_e.spaceWidth,_e.middotWidth,_e.wsmiddotWidth,Be,Fe,ze,Ze!==a.EditorFontLigatures.OFF,null),tt);if(tt.appendString("</div>"),this._renderIndicators){const $e=document.createElement("div");$e.className=`delete-sign ${Q.ThemeIcon.asClassName(W)}`,$e.setAttribute("style",`position:absolute;top:${he*Oe}px;width:${Pe}px;height:${Oe}px;right:0;`),He.appendChild($e)}return Ve.characterMapping.getHorizontalOffset(Ve.characterMapping.length)}}function te(Ie,he){return(0,a.stringSet)(Ie,he,["off","on","inherit"])}function G(Ie){return Ie.modifiedEndLineNumber>0}function ae(Ie){return Ie.originalEndLineNumber>0}function me(Ie){return Ie.modifiedStartLineNumber===Ie.modifiedEndLineNumber?Ie.modifiedEndColumn-Ie.modifiedStartColumn>0:Ie.modifiedEndLineNumber-Ie.modifiedStartLineNumber>0}function Ce(Ie){return Ie.originalStartLineNumber===Ie.originalEndLineNumber?Ie.originalEndColumn-Ie.originalStartColumn>0:Ie.originalEndLineNumber-Ie.originalStartLineNumber>0}function Se(){const Ie=document.createElement("div");return Ie.className="diagonal-fill",Ie}function ye(){const Ie=document.createElement("div");return Ie.className="arrow-revert-change "+Q.ThemeIcon.asClassName(S.Codicon.arrowRight),_.$("div",{},Ie)}function Ee(Ie,he,ve,de){const pe=Ie.getLineCount();return ve=Math.min(pe,Math.max(1,ve)),de=Math.min(pe,Math.max(1,de)),he.coordinatesConverter.convertModelRangeToViewRange(new v.Range(ve,Ie.getLineMinColumn(ve),de,Ie.getLineMaxColumn(de)))}function De(Ie,he){return{enableSplitViewResizing:(0,a.boolean)(Ie.enableSplitViewResizing,he.enableSplitViewResizing),splitViewDefaultRatio:(0,a.clampedFloat)(Ie.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,a.boolean)(Ie.renderSideBySide,he.renderSideBySide),renderMarginRevertIcon:(0,a.boolean)(Ie.renderMarginRevertIcon,he.renderMarginRevertIcon),maxComputationTime:(0,a.clampedInt)(Ie.maxComputationTime,he.maxComputationTime,0,1073741824),maxFileSize:(0,a.clampedInt)(Ie.maxFileSize,he.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,a.boolean)(Ie.ignoreTrimWhitespace,he.ignoreTrimWhitespace),renderIndicators:(0,a.boolean)(Ie.renderIndicators,he.renderIndicators),originalEditable:(0,a.boolean)(Ie.originalEditable,he.originalEditable),diffCodeLens:(0,a.boolean)(Ie.diffCodeLens,he.diffCodeLens),renderOverviewRuler:(0,a.boolean)(Ie.renderOverviewRuler,he.renderOverviewRuler),diffWordWrap:te(Ie.diffWordWrap,he.diffWordWrap),diffAlgorithm:(0,a.stringSet)(Ie.diffAlgorithm,he.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,a.boolean)(Ie.accessibilityVerbose,he.accessibilityVerbose)}}function ke(Ie,he){return{enableSplitViewResizing:Ie.enableSplitViewResizing!==he.enableSplitViewResizing,renderSideBySide:Ie.renderSideBySide!==he.renderSideBySide,renderMarginRevertIcon:Ie.renderMarginRevertIcon!==he.renderMarginRevertIcon,maxComputationTime:Ie.maxComputationTime!==he.maxComputationTime,maxFileSize:Ie.maxFileSize!==he.maxFileSize,ignoreTrimWhitespace:Ie.ignoreTrimWhitespace!==he.ignoreTrimWhitespace,renderIndicators:Ie.renderIndicators!==he.renderIndicators,originalEditable:Ie.originalEditable!==he.originalEditable,diffCodeLens:Ie.diffCodeLens!==he.diffCodeLens,renderOverviewRuler:Ie.renderOverviewRuler!==he.renderOverviewRuler,diffWordWrap:Ie.diffWordWrap!==he.diffWordWrap,diffAlgorithm:Ie.diffAlgorithm!==he.diffAlgorithm,accessibilityVerbose:Ie.accessibilityVerbose!==he.accessibilityVerbose}}(0,M.registerThemingParticipant)((Ie,he)=>{const ve=Ie.getColor(V.diffDiagonalFill);he.addRule(`
- .monaco-editor .diagonal-fill {
- background-image: linear-gradient(
- -45deg,
- ${ve} 12.5%,
- #0000 12.5%, #0000 50%,
- ${ve} 50%, ${ve} 62.5%,
- #0000 62.5%, #0000 100%
- );
- background-size: 8px 8px;
- }
- `)})}),define(X[157],ee([1,0,45,32,187,25,14,8,43,24,89,28,19]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let i=e.EmbeddedCodeEditorWidget=class extends y.CodeEditorWidget{constructor(r,d,h,o,c,l,a,u,v,f,m,C,L){super(r,Object.assign(Object.assign({},o.getRawOptions()),{overflowWidgetsDomNode:o.getOverflowWidgetsDomNode()}),h,c,l,a,u,v,f,m,C,L),this._parentEditor=o,this._overwriteOptions=d,super.updateOptions(this._overwriteOptions),this._register(o.onDidChangeConfiguration(D=>this._onParentConfigurationChanged(D)))}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=Me([fe(4,b.IInstantiationService),fe(5,k.ICodeEditorService),fe(6,E.ICommandService),fe(7,w.IContextKeyService),fe(8,g.IThemeService),fe(9,S.INotificationService),fe(10,p.IAccessibilityService),fe(11,n.ILanguageConfigurationService),fe(12,t.ILanguageFeaturesService)],i)}),define(X[841],ee([1,0,13,2,15,12,5,23,22,46,38,603,29,33,24,418]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const r=(0,i.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},n.localize(0,null));class d extends y.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:n.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=l.get(v))===null||f===void 0||f.jumpToBracket()}}class h extends y.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:n.localize(2,null),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(u,v,f){var m;let C=!0;f&&f.selectBrackets===!1&&(C=!1),(m=l.get(v))===null||m===void 0||m.selectToBracket(C)}}class o extends y.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:n.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(u,v){var f;(f=l.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 l extends k.Disposable{static get(u){return u.getContribution(l.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 m=f.getStartPosition(),C=u.bracketPairs.matchBracket(m);let L=null;if(C)C[0].containsPosition(m)&&!C[1].containsPosition(m)?L=C[1].getStartPosition():C[1].containsPosition(m)&&(L=C[0].getStartPosition());else{const D=u.bracketPairs.findEnclosingBrackets(m);if(D)L=D[1].getStartPosition();else{const I=u.bracketPairs.findNextBracket(m);I&&I.range&&(L=I.range.getStartPosition())}}return L?new b.Selection(L.lineNumber,L.column,L.lineNumber,L.column):new b.Selection(m.lineNumber,m.column,m.lineNumber,m.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(m=>{const C=m.getStartPosition();let L=v.bracketPairs.matchBracket(C);if(!L&&(L=v.bracketPairs.findEnclosingBrackets(C),!L)){const T=v.bracketPairs.findNextBracket(C);T&&T.range&&(L=v.bracketPairs.matchBracket(T.range.getStartPosition()))}let D=null,I=null;if(L){L.sort(w.Range.compareRangesUsingStarts);const[T,O]=L;if(D=u?T.getStartPosition():T.getEndPosition(),I=u?O.getEndPosition():O.getStartPosition(),O.containsPosition(C)){const R=D;D=I,I=R}}D&&I&&f.push(new b.Selection(D.lineNumber,D.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 m=f.getPosition();let C=v.bracketPairs.matchBracket(m);C||(C=v.bracketPairs.findEnclosingBrackets(m)),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 m=f.brackets;m&&(u[v++]={range:m[0],options:f.options},u[v++]={range:m[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 m=[];this._lastVersionId===f&&(m=this._lastBracketsData);const C=[];let L=0;for(let R=0,A=u.length;R<A;R++){const N=u[R];N.isEmpty()&&(C[L++]=N.getStartPosition())}C.length>1&&C.sort(E.Position.compare);const D=[];let I=0,T=0;const O=m.length;for(let R=0,A=C.length;R<A;R++){const N=C[R];for(;T<O&&m[T].position.isBefore(N);)T++;if(T<O&&m[T].position.equals(N))D[I++]=m[T];else{let P=v.bracketPairs.matchBracket(N,20),x=l._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!P&&this._matchBrackets==="always"&&(P=v.bracketPairs.findEnclosingBrackets(N,20),x=l._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),D[I++]=new c(N,P,x)}}this._lastBracketsData=D,this._lastVersionId=f}}e.BracketMatchingController=l,l.ID="editor.contrib.bracketMatchingController",l._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=p.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,s.themeColorFromId)(r),position:g.OverviewRulerLane.Center}}),l._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=p.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,y.registerEditorContribution)(l.ID,l,1),(0,y.registerEditorAction)(h),(0,y.registerEditorAction)(d),(0,y.registerEditorAction)(o),t.MenuRegistry.appendMenuItem(t.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:n.localize(4,null)},order:2})}),define(X[842],ee([1,0,7,144,5,38,420]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class w{constructor(t,i,s){this.afterColumn=1073741824,this.afterLineNumber=t,this.heightInPx=i,this._onHeight=s,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(t){this._lastHeight===void 0?this._lastHeight=t:this._lastHeight!==t&&(this._lastHeight=t,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class b{constructor(t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=t,this._id=`codelens.widget-${b._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(t,i){this._commands.clear();const s=[];let r=!1;for(let 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?(s.push(_.$("a",{id:String(d),title:h.command.tooltip,role:"button"},...o)),this._commands.set(String(d),h.command)):s.push(_.$("span",{title:h.command.tooltip},...o)),d+1<t.length&&s.push(_.$("span",void 0,"\xA0|\xA0"))}}r?(_.reset(this._domNode,...s),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 s=0,r=i.length;s<r;s++)this._addDecorationsCallbacks[s](i[s])}}e.CodeLensHelper=S;const g=E.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class p{constructor(t,i,s,r,d,h){this._isDisposed=!1,this._editor=i,this._data=t,this._decorationIds=[];let o;const c=[];this._data.forEach((l,a)=>{l.symbol.command&&c.push(l.symbol),s.addDecoration({range:l.symbol.range,options:g},u=>this._decorationIds[a]=u),o?o=y.Range.plusRange(o,l.symbol.range):o=y.Range.lift(l.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 s=this._editor.getModel().getDecorationRange(t),r=this._data[i].symbol;return!!(s&&y.Range.isEmpty(r.range)===s.isEmpty())})}updateCodeLensSymbols(t,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=t,this._data.forEach((s,r)=>{i.addDecoration({range:s.symbol.range,options: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 s=t.getDecorationRange(this._decorationIds[i]);s&&(this._data[i].symbol.range=s)}return this._data}updateCommands(t){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(t,!0);for(let i=0;i<this._data.length;i++){const s=t[i];if(s){const{symbol:r}=this._data[i];r.command=s.command||r.command}}}getCommand(t){var i;return(i=this._contentWidget)===null||i===void 0?void 0:i.getCommand(t)}getLineNumber(){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return t?t.startLineNumber:-1}update(t){if(this.isValid()){const i=this._editor.getModel().getDecorationRange(this._decorationIds[0]);i&&(this._viewZone.afterLineNumber=i.startLineNumber-1,t.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(i.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}e.CodeLensWidget=p}),define(X[843],ee([1,0,13,11,2,115,15,41,22,315,758,842,613,25,43,79,70,19]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let o=e.CodeLensContribution=class{constructor(l,a,u,v,f,m){this._editor=l,this._languageFeaturesService=a,this._commandService=v,this._notificationService=f,this._codeLensCache=m,this._disposables=new y.DisposableStore,this._localToDispose=new y.DisposableStore,this._lenses=[],this._oldCodeLensModels=new y.DisposableStore,this._provideCodeLensDebounce=u.for(a.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=u.for(a.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(a.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var l;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(l=this._currentCodeLensModel)===null||l===void 0||l.dispose()}_getLayoutInfo(){const l=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50));let a=this._editor.getOption(17);return(!a||a<5)&&(a=this._editor.getOption(50)*.9|0),{fontSize:a,codeLensHeight:a*l|0}}_updateLensStyle(){const{codeLensHeight:l,fontSize:a}=this._getLayoutInfo(),u=this._editor.getOption(16),v=this._editor.getOption(48),{style:f}=this._editor.getContainerDomNode();f.setProperty("--vscode-editorCodeLens-lineHeight",`${l}px`),f.setProperty("--vscode-editorCodeLens-fontSize",`${a}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(m=>{for(const C of this._lenses)C.updateHeight(l,m)})}_localDispose(){var l,a,u;(l=this._getCodeLensModelPromise)===null||l===void 0||l.cancel(),this._getCodeLensModelPromise=void 0,(a=this._resolveCodeLensesPromise)===null||a===void 0||a.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(u=this._currentCodeLensModel)===null||u===void 0||u.dispose()}_onModelChange(){this._localDispose();const l=this._editor.getModel();if(!l||!this._editor.getOption(15))return;const a=this._codeLensCache.get(l);if(a&&this._renderCodeLensSymbols(a),!this._languageFeaturesService.codeLensProvider.has(l)){a&&this._localToDispose.add((0,_.disposableTimeout)(()=>{const v=this._codeLensCache.get(l);a===v&&(this._codeLensCache.delete(l),this._onModelChange())},30*1e3));return}for(const v of this._languageFeaturesService.codeLensProvider.all(l))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)(m=>(0,g.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,l,m)),this._getCodeLensModelPromise.then(m=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=m,this._codeLensCache.put(l,m);const C=this._provideCodeLensDebounce.update(l,Date.now()-f);u.delay=C,this._renderCodeLensSymbols(m),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(l));this._localToDispose.add(u),this._localToDispose.add((0,y.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var v;this._editor.changeDecorations(f=>{this._editor.changeViewZones(m=>{const C=[];let L=-1;this._lenses.forEach(I=>{!I.isValid()||L===I.getLineNumber()?C.push(I):(I.update(m),L=I.getLineNumber())});const D=new n.CodeLensHelper;C.forEach(I=>{I.dispose(D,m),this._lenses.splice(this._lenses.indexOf(I),1)}),D.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,y.toDisposable)(()=>{if(this._editor.getModel()){const v=E.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(f=>{this._editor.changeViewZones(m=>{this._disposeAllLenses(f,m)})}),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 m of this._lenses){const C=m.getCommand(f);if(C){this._commandService.executeCommand(C.id,...C.arguments||[]).catch(L=>this._notificationService.error(L));break}}})),u.schedule()}_disposeAllLenses(l,a){const u=new n.CodeLensHelper;for(const v of this._lenses)v.dispose(u,a);l&&u.commit(l),this._lenses.length=0}_renderCodeLensSymbols(l){if(!this._editor.hasModel())return;const a=this._editor.getModel().getLineCount(),u=[];let v;for(const C of l.lenses){const L=C.symbol.range.startLineNumber;L<1||L>a||(v&&v[v.length-1].symbol.range.startLineNumber===L?v.push(C):(v=[C],u.push(v)))}if(!u.length&&!this._lenses.length)return;const f=E.StableEditorScrollState.capture(this._editor),m=this._getLayoutInfo();this._editor.changeDecorations(C=>{this._editor.changeViewZones(L=>{const D=new n.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(D,L),this._lenses.splice(I,1)):R===O?(this._lenses[I].updateCodeLensSymbols(u[T],D),T++,I++):(this._lenses.splice(I,0,new n.CodeLensWidget(u[T],this._editor,D,L,m.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),I++,T++)}for(;I<this._lenses.length;)this._lenses[I].dispose(D,L),this._lenses.splice(I,1);for(;T<u.length;)this._lenses.push(new n.CodeLensWidget(u[T],this._editor,D,L,m.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;D.commit(C)})}),f.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var l;(l=this._resolveCodeLensesPromise)===null||l===void 0||l.cancel(),this._resolveCodeLensesPromise=void 0;const a=this._editor.getModel();if(!a)return;const u=[],v=[];if(this._lenses.forEach(C=>{const L=C.computeIfNecessary(a);L&&(u.push(L),v.push(C))}),u.length===0)return;const f=Date.now(),m=(0,_.createCancelablePromise)(C=>{const L=u.map((D,I)=>{const T=new Array(D.length),O=D.map((R,A)=>!R.symbol.command&&typeof R.provider.resolveCodeLens=="function"?Promise.resolve(R.provider.resolveCodeLens(a,R.symbol,C)).then(N=>{T[A]=N},k.onUnexpectedExternalError):(T[A]=R.symbol,Promise.resolve(void 0)));return Promise.all(O).then(()=>{!C.isCancellationRequested&&!v[I].isDisposed()&&v[I].updateCommands(T)})});return Promise.all(L)});this._resolveCodeLensesPromise=m,this._resolveCodeLensesPromise.then(()=>{const C=this._resolveCodeLensesDebounce.update(a,Date.now()-f);this._resolveCodeLensesScheduler.delay=C,this._currentCodeLensModel&&this._codeLensCache.put(a,this._currentCodeLensModel),this._oldCodeLensModels.clear(),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},C=>{(0,k.onUnexpectedError)(C),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};o.ID="css.editor.codeLens",e.CodeLensContribution=o=Me([fe(1,h.ILanguageFeaturesService),fe(2,d.ILanguageFeatureDebounceService),fe(3,i.ICommandService),fe(4,s.INotificationService),fe(5,p.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(l,a){return we(this,void 0,void 0,function*(){if(!a.hasModel())return;const u=l.get(r.IQuickInputService),v=l.get(i.ICommandService),f=l.get(s.INotificationService),m=a.getSelection().positionLineNumber,C=a.getContribution(o.ID);if(!C)return;const L=C.getModel();if(!L)return;const D=[];for(const T of L.lenses)T.symbol.command&&T.symbol.range.startLineNumber===m&&D.push({label:T.symbol.command.title,command:T.symbol.command});if(D.length===0)return;const I=yield u.pick(D,{canPickMany:!1});if(I){if(L.isDisposed)return yield v.executeCommand(this.id);try{yield v.executeCommand(I.command.id,...I.command.arguments||[])}catch(T){f.error(T)}}})}})}),define(X[344],ee([1,0,13,37,11,6,2,57,9,155,15,5,38,70,19,326,26]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 Gi extends w.Disposable{constructor(l,a,u,v){super(),this._editor=l,this._configurationService=a,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:Gi.RECOMPUTE_TIME}),this._register(l.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(l.onDidChangeModelLanguage(()=>this.updateColors())),this._register(u.colorProvider.onDidChange(()=>this.updateColors())),this._register(l.onDidChangeConfiguration(f=>{const m=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(141);const C=m!==this._isColorDecoratorsEnabled||f.hasChanged(19),L=f.hasChanged(141);(C||L)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(141),this.updateColors()}isEnabled(){const l=this._editor.getModel();if(!l)return!1;const a=l.getLanguageId(),u=this._configurationService.getValue(a);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(l){return l.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const l=this._editor.getModel();!l||!this._languageFeaturesService.colorProvider.has(l)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new _.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(l)))})),this.beginCompute())}beginCompute(){return we(this,void 0,void 0,function*(){this._computePromise=(0,_.createCancelablePromise)(l=>we(this,void 0,void 0,function*(){const a=this._editor.getModel();if(!a)return[];const u=new b.StopWatch(!1),v=yield(0,r.getColors)(this._languageFeaturesService.colorProvider,a,l,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(a,u.elapsed()),v}));try{const l=yield this._computePromise;this.updateDecorations(l),this.updateColorDecorators(l),this._computePromise=null}catch(l){(0,y.onUnexpectedError)(l)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(l){const a=l.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,a),this._colorDatas=new Map,this._decorationsIds.forEach((v,f)=>this._colorDatas.set(v,l[f]))})}updateColorDecorators(l){this._colorDecorationClassRefs.clear();const a=[],u=this._editor.getOption(19);for(let f=0;f<l.length&&a.length<u;f++){const{red:m,green:C,blue:L,alpha:D}=l[f].colorInfo.color,I=new k.RGBA(Math.round(m*255),Math.round(C*255),Math.round(L*255),D),T=`rgba(${I.r}, ${I.g}, ${I.b}, ${I.a})`,O=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:T}));a.push({range:{startLineNumber:l[f].colorInfo.range.startLineNumber,startColumn:l[f].colorInfo.range.startColumn,endLineNumber:l[f].colorInfo.range.endLineNumber,endColumn:l[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<l.length?u:!1;this._decoratorLimitReporter.update(l.length,v),this._colorDecoratorIds.set(a)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(l){const a=this._editor.getModel();if(!a)return null;const u=a.getDecorationsInRange(n.Range.fromPositions(l,l)).filter(v=>this._colorDatas.has(v.id));return u.length===0?null:this._colorDatas.get(u[0].id)}isColorDecoration(l){return this._colorDecoratorIds.has(l)}};h.ID="editor.contrib.colorDetector",h.RECOMPUTE_TIME=1e3,e.ColorDetector=h=Me([fe(1,d.IConfigurationService),fe(2,s.ILanguageFeaturesService),fe(3,i.ILanguageFeatureDebounceService)],h);class o{constructor(){this._onDidChange=new E.Emitter,this._computed=0,this._limited=!1}update(l,a){(l!==this._computed||a!==this._limited)&&(this._computed=l,this._limited=a,this._onDidChange.fire())}}e.DecoratorLimitReporter=o,(0,p.registerEditorContribution)(h.ID,h,1)}),define(X[345],ee([1,0,13,21,37,2,5,326,344,581,802,24]),function(K,e,_,k,y,E,w,b,S,g,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class t{constructor(a,u,v,f){this.owner=a,this.range=u,this.model=v,this.provider=f,this.forceShowAtRange=!0}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}}e.ColorHover=t;let i=e.ColorHoverParticipant=class{constructor(a,u){this._editor=a,this._themeService=u,this.hoverOrdinal=2}computeSync(a,u){return[]}computeAsync(a,u,v){return _.AsyncIterableObject.fromPromise(this._computeAsync(a,u,v))}_computeAsync(a,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 m of u){if(!f.isColorDecoration(m))continue;const C=f.getColorData(m.range.getStartPosition());if(C)return[yield d(this,this._editor.getModel(),C.colorInfo,C.provider)]}return[]})}renderHoverParts(a,u){return h(this,this._editor,this._themeService,u,a)}};e.ColorHoverParticipant=i=Me([fe(1,n.IThemeService)],i);class s{constructor(a,u,v,f){this.owner=a,this.range=u,this.model=v,this.provider=f}}e.StandaloneColorPickerHover=s;let r=e.StandaloneColorPickerParticipant=class{constructor(a,u){this._editor=a,this._themeService=u,this._color=null}createColorHover(a,u,v){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!S.ColorDetector.get(this._editor))return null;const m=yield(0,b.getColors)(v,this._editor.getModel(),k.CancellationToken.None);let C=null,L=null;for(const O of m){const R=O.colorInfo;w.Range.containsRange(R.range,a.range)&&(C=R,L=O.provider)}const D=C??a,I=L??u,T=!!C;return{colorHover:yield d(this,this._editor.getModel(),D,I),foundInEditor:T}})}updateEditorModel(a){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const u=a.model;let v=new w.Range(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);this._color&&(yield c(this._editor.getModel(),u,this._color,v,a),v=o(this._editor,v,u))})}renderHoverParts(a,u){return h(this,this._editor,this._themeService,u,a)}set color(a){this._color=a}get color(){return this._color}};e.StandaloneColorPickerParticipant=r=Me([fe(1,n.IThemeService)],r);function d(l,a,u,v){return we(this,void 0,void 0,function*(){const f=a.getValueInRange(u.range),{red:m,green:C,blue:L,alpha:D}=u.color,I=new y.RGBA(Math.round(m*255),Math.round(C*255),Math.round(L*255),D),T=new y.Color(I),O=yield(0,b.getColorPresentations)(a,u,v,k.CancellationToken.None),R=new g.ColorPickerModel(T,[],0);return R.colorPresentations=O||[],R.guessColorPresentation(T,f),l instanceof i?new t(l,w.Range.lift(u.range),R,v):new s(l,w.Range.lift(u.range),R,v)})}function h(l,a,u,v,f){if(v.length===0||!a.hasModel())return E.Disposable.None;const m=new E.DisposableStore,C=v[0],L=a.getModel(),D=C.model,I=m.add(new p.ColorPickerWidget(f.fragment,D,a.getOption(137),u,l instanceof r));f.setColorPicker(I);let T=new w.Range(C.range.startLineNumber,C.range.startColumn,C.range.endLineNumber,C.range.endColumn);if(l instanceof r){const O=v[0].model.color;l.color=O,c(L,D,O,T,C),m.add(D.onColorFlushed(R=>{l.color=R}))}else m.add(D.onColorFlushed(O=>we(this,void 0,void 0,function*(){yield c(L,D,O,T,C),T=o(a,T,D,f)})));return m.add(D.onDidChangeColor(O=>{c(L,D,O,T,C)})),m}function o(l,a,u,v){let f,m;if(u.presentation.textEdit){f=[u.presentation.textEdit],m=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=l.getModel()._setTrackedRange(null,m,3);l.pushUndoStop(),l.executeEdits("colorpicker",f),m=l.getModel()._getTrackedRange(C)||m}else f=[{range:a,text:u.presentation.label,forceMoveMarkers:!1}],m=a.setEndPosition(a.endLineNumber,a.startColumn+u.presentation.label.length),l.pushUndoStop(),l.executeEdits("colorpicker",f);return u.presentation.additionalTextEdits&&(f=[...u.presentation.additionalTextEdits],l.executeEdits("colorpicker",f),v&&v.hide()),l.pushUndoStop(),m}function c(l,a,u,v,f){return we(this,void 0,void 0,function*(){const m=yield(0,b.getColorPresentations)(l,{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);a.colorPresentations=m||[]})}}),define(X[844],ee([1,0,2,17,15,12,5,23,38,518,421]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function p(t){return k.isMacintosh?t.altKey:t.ctrlKey}class n extends _.Disposable{constructor(i){super(),this._editor=i,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(s=>this._onEditorMouseDown(s))),this._register(this._editor.onMouseUp(s=>this._onEditorMouseUp(s))),this._register(this._editor.onMouseDrag(s=>this._onEditorMouseDrag(s))),this._register(this._editor.onMouseDrop(s=>this._onEditorMouseDrop(s))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(s=>this.onEditorKeyDown(s))),this._register(this._editor.onKeyUp(s=>this.onEditorKeyUp(s))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(i){!this._editor.getOption(33)||this._editor.getOption(20)||(p(i)&&(this._modifierPressed=!0),this._mouseDown&&p(i)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(i){!this._editor.getOption(33)||this._editor.getOption(20)||(p(i)&&(this._modifierPressed=!1),this._mouseDown&&i.keyCode===n.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(i){this._mouseDown=!0}_onEditorMouseUp(i){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(i){const s=i.target;if(this._dragSelection===null){const d=(this._editor.getSelections()||[]).filter(h=>s.position&&h.containsPosition(s.position));if(d.length===1)this._dragSelection=d[0];else return}p(i.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),s.position&&(this._dragSelection.containsPosition(s.position)?this._removeDecoration():this.showAt(s.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(i){if(i.target&&(this._hitContent(i.target)||this._hitMargin(i.target))&&i.target.position){const s=new E.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,s.lineNumber,s.column)]}}else r=(this._editor.getSelections()||[]).map(d=>d.containsPosition(s)?new b.Selection(s.lineNumber,s.column,s.lineNumber,s.column):d);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(s)||(p(i.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(s)||this._dragSelection.getStartPosition().equals(s)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(n.ID,new g.DragAndDropCommand(this._dragSelection,s,p(i.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(i){this._dndDecorationIds.set([{range:new w.Range(i.lineNumber,i.column,i.lineNumber,i.column),options:n._DECORATION_OPTIONS}]),this._editor.revealPosition(i,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(i){return i.type===6||i.type===7}_hitMargin(i){return i.type===2||i.type===3||i.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=n,n.ID="editor.contrib.dragAndDrop",n.TRIGGER_KEY_VALUE=k.isMacintosh?6:5,n._DECORATION_OPTIONS=S.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,y.registerEditorContribution)(n.ID,n,2)}),define(X[845],ee([1,0,5,46,38,33,24]),function(K,e,_,k,y,E,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(p=>this._editor.getModel().getDecorationRange(p)).filter(p=>!!p);if(g.length)return g}return null}getStartPosition(){return this._startPosition}setStartPosition(g){this._startPosition=g,this.setCurrentFindMatch(null)}_getDecorationIndex(g){const p=this._decorations.indexOf(g);return p>=0?p+1:1}getDecorationRangeAt(g){const p=g<this._decorations.length?this._decorations[g]:null;return p?this._editor.getModel().getDecorationRange(p):null}getCurrentMatchesPosition(g){const p=this._editor.getModel().getDecorationsInRange(g);for(const n of p){const t=n.options;if(t===b._FIND_MATCH_DECORATION||t===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(g){let p=null,n=0;if(g)for(let t=0,i=this._decorations.length;t<i;t++){const s=this._editor.getModel().getDecorationRange(this._decorations[t]);if(g.equalsRange(s)){p=this._decorations[t],n=t+1;break}}return(this._highlightedDecorationId!==null||p!==null)&&this._editor.changeDecorations(t=>{if(this._highlightedDecorationId!==null&&(t.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),p!==null&&(this._highlightedDecorationId=p,t.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(t.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),p!==null){let i=this._editor.getModel().getDecorationRange(p);if(i.startLineNumber!==i.endLineNumber&&i.endColumn===1){const s=i.endLineNumber-1,r=this._editor.getModel().getLineMaxColumn(s);i=new _.Range(i.startLineNumber,i.startColumn,s,r)}this._rangeHighlightDecorationId=t.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}}),n}set(g,p){this._editor.changeDecorations(n=>{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,l=g[0].range.endLineNumber;for(let a=1,u=g.length;a<u;a++){const v=g[a].range;l+o>=v.startLineNumber?v.endLineNumber>l&&(l=v.endLineNumber):(i.push({range:new _.Range(c,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=v.startLineNumber,l=v.endLineNumber)}i.push({range:new _.Range(c,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(g.length);for(let r=0,d=g.length;r<d;r++)s[r]={range:g[r].range,options:t};this._decorations=n.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,i),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(r=>n.removeDecoration(r)),this._findScopeDecorationIds=[]),p?.length&&(this._findScopeDecorationIds=p.map(r=>n.addDecoration(r,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(g){if(this._decorations.length===0)return null;for(let p=this._decorations.length-1;p>=0;p--){const n=this._decorations[p],t=this._editor.getModel().getDecorationRange(n);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 p=0,n=this._decorations.length;p<n;p++){const t=this._decorations[p],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=y.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,w.themeColorFromId)(E.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,w.themeColorFromId)(E.minimapFindMatch),position:k.MinimapPosition.Inline}}),b._FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,w.themeColorFromId)(E.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,w.themeColorFromId)(E.minimapFindMatch),position:k.MinimapPosition.Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,w.themeColorFromId)(E.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center}}),b._RANGE_HIGHLIGHT_DECORATION=y.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=y.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(X[188],ee([1,0,16,13,2,119,12,5,23,175,845,519,520,14]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new i.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new i.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new i.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const s=240;class r{constructor(h,o){this._toDispose=new y.DisposableStore,this._editor=h,this._state=o,this._isDisposed=!1,this._startSearchingTimer=new k.TimeoutTimer,this._decorations=new p.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,y.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)},s)):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 l=this._findMatches(c,!1,e.MATCHES_LIMIT);this._decorations.set(l,c);const a=this._editor.getSelection();let u=this._decorations.getCurrentMatchesPosition(a);if(u===0&&l.length>0){const v=(0,_.findFirstInSorted)(l.map(f=>f.range),f=>b.Range.compareRangesUsingStarts(f,a)>=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:l}=h;const a=this._editor.getModel();return o||l===1?(c===1?c=a.getLineCount():c--,l=a.getLineMaxColumn(c)):l--,new w.Position(c,l)}_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(),l=r._getSearchRange(this._editor.getModel(),c);l.getEndPosition().isBefore(h)&&(h=l.getEndPosition()),h.isBefore(l.getStartPosition())&&(h=l.getEndPosition());const{lineNumber:a,column:u}=h,v=this._editor.getModel();let f=new w.Position(a,u),m=v.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,!1);if(m&&m.range.isEmpty()&&m.range.getStartPosition().equals(f)&&(f=this._prevSearchPosition(f),m=v.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,!1)),!!m){if(!o&&!l.containsRange(m.range))return this._moveToPrevMatch(m.range.getStartPosition(),!0);this._setCurrentFindMatch(m.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:l}=h;const a=this._editor.getModel();return o||l===a.getLineMaxColumn(c)?(c===a.getLineCount()?c=1:c++,l=1):l++,new w.Position(c,l)}_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,l=!1){if(this._cannotFind())return null;const a=this._decorations.getFindScope(),u=r._getSearchRange(this._editor.getModel(),a);u.getEndPosition().isBefore(h)&&(h=u.getStartPosition()),h.isBefore(u.getStartPosition())&&(h=u.getStartPosition());const{lineNumber:v,column:f}=h,m=this._editor.getModel();let C=new w.Position(v,f),L=m.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,o);return c&&L&&L.range.isEmpty()&&L.range.getStartPosition().equals(C)&&(C=this._nextSearchPosition(C),L=m.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,o)),L?!l&&!u.containsRange(L.range)?this._getNextMatch(L.range.getEndPosition(),o,c,!0):L: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 l=h.buildReplaceString(c.matches,this._state.preserveCase),a=new E.ReplaceCommand(o,l);this._executeEditorCommand("replace",a),this._decorations.setStartPosition(new w.Position(o.startLineNumber,o.startColumn+l.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(c.range)}_findMatches(h,o,c){const l=(h||[null]).map(a=>r._getSearchRange(this._editor.getModel(),a));return this._editor.getModel().findMatches(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):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(125):null).parseSearchRequest();if(!o)return;let c=o.regex;if(!c.multiline){let L="mu";c.ignoreCase&&(L+="i"),c.global&&(L+="g"),c=new RegExp(c.source,L)}const l=this._editor.getModel(),a=l.getValue(1),u=l.getFullModelRange(),v=this._getReplacePattern();let f;const m=this._state.preserveCase;v.hasReplacementPatterns||m?f=a.replace(c,function(){return v.buildReplaceString(arguments,m)}):f=a.replace(c,v.buildReplaceString(null,m));const C=new E.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),l=[];for(let u=0,v=c.length;u<v;u++)l[u]=o.buildReplaceString(c[u].matches,this._state.preserveCase);const a=new n.ReplaceAllCommand(this._editor.getSelection(),c.map(u=>u.range),l);this._executeEditorCommand("replaceAll",a)}selectAllMatches(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();let c=this._findMatches(h,!1,1073741824).map(a=>new S.Selection(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn));const l=this._editor.getSelection();for(let a=0,u=c.length;a<u;a++)if(c[a].equalsRange(l)){c=[l].concat(c.slice(0,a)).concat(c.slice(a+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(X[846],ee([1,0,7,297,68,13,188,33,423]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class S extends y.Widget{constructor(p,n,t){super(),this._hideSoon=this._register(new E.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=p,this._state=n,this._keybindingService=t,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const i={inputActiveOptionBorder:(0,b.asCssVariable)(b.inputActiveOptionBorder),inputActiveOptionForeground:(0,b.asCssVariable)(b.inputActiveOptionForeground),inputActiveOptionBackground:(0,b.asCssVariable)(b.inputActiveOptionBackground)};this.caseSensitive=this._register(new k.CaseSensitiveToggle(Object.assign({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},i))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new k.WholeWordsToggle(Object.assign({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord},i))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new k.RegexToggle(Object.assign({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex},i))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(s=>{let r=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&this._revealTemporarily()})),this._register(_.addDisposableListener(this._domNode,_.EventType.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(_.addDisposableListener(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(p){const n=this._keybindingService.lookupKeybinding(p);return n?` (${n.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(X[847],ee([1,0,6,2,5,188]),function(K,e,_,k,y,E){"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,p,n){const t={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let i=!1;p===0&&(g=0),g>p&&(g=p),this._matchesPosition!==g&&(this._matchesPosition=g,t.matchesPosition=!0,i=!0),this._matchesCount!==p&&(this._matchesCount=p,t.matchesCount=!0,i=!0),typeof n<"u"&&(y.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,t.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(t)}change(g,p,n=!0){var t;const i={moveCursor:p,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const r=this.isRegex,d=this.wholeWord,h=this.matchCase,o=this.preserveCase;typeof g.searchString<"u"&&this._searchString!==g.searchString&&(this._searchString=g.searchString,i.searchString=!0,s=!0),typeof g.replaceString<"u"&&this._replaceString!==g.replaceString&&(this._replaceString=g.replaceString,i.replaceString=!0,s=!0),typeof g.isRevealed<"u"&&this._isRevealed!==g.isRevealed&&(this._isRevealed=g.isRevealed,i.isRevealed=!0,s=!0),typeof g.isReplaceRevealed<"u"&&this._isReplaceRevealed!==g.isReplaceRevealed&&(this._isReplaceRevealed=g.isReplaceRevealed,i.isReplaceRevealed=!0,s=!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 l;return(l=this._searchScope)===null||l===void 0?void 0:l.some(a=>!y.Range.equalsRange(a,c))})||(this._searchScope=g.searchScope,i.searchScope=!0,s=!0)),typeof g.loop<"u"&&this._loop!==g.loop&&(this._loop=g.loop,i.loop=!0,s=!0),typeof g.isSearching<"u"&&this._isSearching!==g.isSearching&&(this._isSearching=g.isSearching,i.isSearching=!0,s=!0),typeof g.filters<"u"&&(this._filters?this._filters.update(g.filters):this._filters=g.filters,i.filters=!0,s=!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&&(s=!0,i.isRegex=!0),d!==this.wholeWord&&(s=!0,i.wholeWord=!0),h!==this.matchCase&&(s=!0,i.matchCase=!0),o!==this.preserveCase&&(s=!0,i.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(i)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=E.MATCHES_LIMIT}}e.FindReplaceState=b}),define(X[848],ee([1,0,7,49,146,145,68,13,27,11,2,17,9,5,188,626,330,713,33,73,24,30,92,18,99,424]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m=(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)),L=(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 D=r.localize(7,null),I=r.localize(8,null),T=r.localize(9,null),O=r.localize(10,null),R=r.localize(11,null),A=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,s.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=r.localize(19,null),e.NLS_NO_RESULTS=r.localize(20,null);const $=419,Q=275-54;let ie=69;const re=33,ne="ctrlEnterReplaceAll.windows.donotask",se=n.isMacintosh?256:2048;class H{constructor(ce){this.afterLineNumber=ce,this.heightInPx=re,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=H;function W(oe,ce,ge){const le=!!ce.match(/\n/);if(ge&&le&&ge.selectionStart>0){oe.stopPropagation();return}}function q(oe,ce,ge){const le=!!ce.match(/\n/);if(ge&&le&&ge.selectionEnd<ge.value.length){oe.stopPropagation();return}}class Z extends w.Widget{constructor(ce,ge,le,ue,j,z,U,J,te){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=ce,this._controller=ge,this._state=le,this._contextViewProvider=ue,this._keybindingService=j,this._contextKeyService=z,this._storageService=J,this._notificationService=te,this._ctrlEnterReplaceAllWarningPrompted=!!J.getBoolean(ne,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new b.Delayer(500),this._register((0,p.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(87)&&(this._codeEditor.getOption(87)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),G.hasChanged(139)&&this._tryUpdateWidgetWidth(),G.hasChanged(2)&&this.updateAccessibilitySupport(),G.hasChanged(39)){const ae=this._codeEditor.getOption(39).loop;this._state.change({loop:ae},!1);const me=this._codeEditor.getOption(39).addExtraSpaceOnTop;me&&!this._viewZone&&(this._viewZone=new H(0),this._showViewZone()),!me&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>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=s.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=s.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(87)&&!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 ge=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",ge),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>=s.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 ge=String(this._state.matchesCount);this._state.matchesCount>=s.MATCHES_LIMIT&&(ge+="+");let le=String(this._state.matchesPosition);le==="0"&&(le="?"),ce=t.format(e.NLS_MATCHES_LOCATION,le,ge)}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,ge,le){if(ce===e.NLS_NO_RESULTS)return le===""?r.localize(21,null,ce):r.localize(22,null,ce,le);if(ge){const ue=r.localize(23,null,ce,le,ge.startLineNumber+":"+ge.startColumn),j=this._codeEditor.getModel();return j&&ge.startLineNumber<=j.getLineCount()&&ge.startLineNumber>=1?`${j.getLineContent(ge.startLineNumber)}, ${ue}`:ue}return r.localize(24,null,ce,le)}_updateToggleSelectionFindButton(){const ce=this._codeEditor.getSelection(),ge=ce?ce.startLineNumber!==ce.endLineNumber||ce.startColumn!==ce.endColumn:!1,le=this._toggleSelectionFind.checked;this._isVisible&&(le||ge)?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,ge=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&ce&&ge&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&ce&&ge&&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 le=!this._codeEditor.getOption(87);this._toggleReplaceBtn.setEnabled(this._isVisible&&le)}_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 le=!!ce&&ce.startLineNumber!==ce.endLineNumber;this._toggleSelectionFind.checked=le;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 ge=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&ce){const le=this._codeEditor.getDomNode();if(le){const ue=_.getDomNodePagePosition(le),j=this._codeEditor.getScrolledVisiblePosition(ce.getStartPosition()),z=ue.left+(j?j.left:0),U=j?j.top:0;if(this._viewZone&&U<this._viewZone.heightInPx){ce.endLineNumber>ce.startLineNumber&&(ge=!1);const J=_.getTopLeftOffset(this._domNode).left;z>J&&(ge=!1);const te=this._codeEditor.getScrolledVisiblePosition(ce.getEndPosition());ue.left+(te?te.left:0)>J&&(ge=!1)}}}this._showViewZone(ge)}}_hide(ce){this._revealTimeouts.forEach(ge=>{clearTimeout(ge)}),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 le=this._viewZone;this._viewZoneId!==void 0||!le||this._codeEditor.changeViewZones(ue=>{le.heightInPx=this._getHeight(),this._viewZoneId=ue.addZone(le),this._codeEditor.setScrollTop(ce||this._codeEditor.getScrollTop()+le.heightInPx)})}_showViewZone(ce=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new H(0));const le=this._viewZone;this._codeEditor.changeViewZones(ue=>{if(this._viewZoneId!==void 0){const j=this._getHeight();if(j===le.heightInPx)return;const z=j-le.heightInPx;le.heightInPx=j,ue.layoutZone(this._viewZoneId),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+z);return}else{let j=this._getHeight();if(j-=this._codeEditor.getOption(81).top,j<=0)return;le.heightInPx=j,this._viewZoneId=ue.addZone(le),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+j)}})}_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 le=ce.width,ue=ce.minimap.minimapWidth;let j=!1,z=!1,U=!1;if(this._resized&&_.getTotalWidth(this._domNode)>$){this._domNode.style.maxWidth=`${le-28-ue-15}px`,this._replaceInput.width=_.getTotalWidth(this._findInput.domNode);return}if($+28+ue>=le&&(z=!0),$+28+ue-ie>=le&&(U=!0),$+28+ue-ie>=le+50&&(j=!0),this._domNode.classList.toggle("collapsed-find-widget",j),this._domNode.classList.toggle("narrow-find-widget",U),this._domNode.classList.toggle("reduced-find-widget",z),!U&&!j&&(this._domNode.style.maxWidth=`${le-28-ue-15}px`),this._findInput.layout({collapsedFindWidget:j,narrowFindWidget:U,reducedFindWidget:z}),this._resized){const J=this._findInput.inputBox.element.clientWidth;J>0&&(this._replaceInput.width=J)}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(ge=>{ge.endColumn===1&&ge.endLineNumber>ge.startLineNumber&&(ge=ge.setEndPosition(ge.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ge.endLineNumber-1)));const le=this._state.currentMatch;return ge.startLineNumber!==ge.endLineNumber&&!i.Range.equalsRange(ge,le)?ge:null}).filter(ge=>!!ge),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(`
- `),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 q(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{n.isWindows&&n.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(r.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ne,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
- `),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 q(ce,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(ce){return 0}_keybindingLabelFor(ce){const ge=this._keybindingService.lookupKeybinding(ce);return ge?` (${ge.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new d.ContextScopedFindInput(null,this._contextViewProvider,{width:Q,label:D,placeholder:I,appendCaseSensitiveLabel:this._keybindingLabelFor(s.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(s.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(s.FIND_IDS.ToggleRegexCommand),validation:J=>{if(J.length===0||!this._findInput.getRegex())return null;try{return new RegExp(J,"gu"),null}catch(te){return{content:te.message}}},flexibleHeight:!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(J=>this._onFindInputKeyDown(J))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(J=>{J.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),J.preventDefault())})),this._register(this._findInput.onRegexKeyDown(J=>{J.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),J.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(J=>{this._tryUpdateHeight()&&this._showViewZone()})),n.isLinux&&this._register(this._findInput.onMouseDown(J=>this._onFindInputMouseDown(J))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Y({label:T+this._keybindingLabelFor(s.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,v.assertIsDefined)(this._codeEditor.getAction(s.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,g.onUnexpectedError)}})),this._nextBtn=this._register(new Y({label:O+this._keybindingLabelFor(s.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,v.assertIsDefined)(this._codeEditor.getAction(s.FIND_IDS.NextMatchFindAction)).run().then(void 0,g.onUnexpectedError)}}));const le=document.createElement("div");le.className="find-part",le.appendChild(this._findInput.domNode);const ue=document.createElement("div");ue.className="find-actions",le.appendChild(ue),ue.appendChild(this._matchesCount),ue.appendChild(this._prevBtn.domNode),ue.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y.Toggle({icon:m,title:R+this._keybindingLabelFor(s.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:(0,o.asCssVariable)(o.inputActiveOptionBackground),inputActiveOptionBorder:(0,o.asCssVariable)(o.inputActiveOptionBorder),inputActiveOptionForeground:(0,o.asCssVariable)(o.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const J=this._codeEditor.getSelections();J.map(te=>(te.endColumn===1&&te.endLineNumber>te.startLineNumber&&(te=te.setEndPosition(te.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(te.endLineNumber-1))),te.isEmpty()?null:te)).filter(te=>!!te),J.length&&this._state.change({searchScope:J},!0)}}else this._state.change({searchScope:null},!0)})),ue.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Y({label:A+this._keybindingLabelFor(s.FIND_IDS.CloseFindWidgetCommand),icon:c.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:J=>{J.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),J.preventDefault())}})),ue.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new d.ContextScopedReplaceInput(null,void 0,{label:N,placeholder:P,appendPreserveCaseLabel:this._keybindingLabelFor(s.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(J=>this._onReplaceInputKeyDown(J))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(J=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(J=>{J.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),J.preventDefault())})),this._replaceBtn=this._register(new Y({label:x+this._keybindingLabelFor(s.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:J=>{J.equals(1026)&&(this._closeBtn.focus(),J.preventDefault())}})),this._replaceAllBtn=this._register(new Y({label:F+this._keybindingLabelFor(s.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const j=document.createElement("div");j.className="replace-part",j.appendChild(this._replaceInput.domNode);const z=document.createElement("div");z.className="replace-actions",j.appendChild(z),z.appendChild(this._replaceBtn.domNode),z.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Y({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=`${$}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(le),this._domNode.appendChild(j),this._resizeSash=new E.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let U=$;this._register(this._resizeSash.onDidStart(()=>{U=_.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(J=>{this._resized=!0;const te=U+J.startX-J.currentX;if(te<$)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 J=_.getTotalWidth(this._domNode);if(J<$)return;let te=$;if(!this._resized||J===$){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 Y extends w.Widget{constructor(ce){super(),this._opts=ce;let ge="button";this._opts.className&&(ge=ge+" "+this._opts.className),this._opts.icon&&(ge=ge+" "+a.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=ge,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,le=>{this._opts.onTrigger(),le.preventDefault()}),this.onkeydown(this._domNode,le=>{var ue,j;if(le.equals(10)||le.equals(3)){this._opts.onTrigger(),le.preventDefault();return}(j=(ue=this._opts).onKeyDown)===null||j===void 0||j.call(ue,le)})}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(...a.ThemeIcon.asClassNameArray(C)),this._domNode.classList.add(...a.ThemeIcon.asClassNameArray(L))):(this._domNode.classList.remove(...a.ThemeIcon.asClassNameArray(L)),this._domNode.classList.add(...a.ThemeIcon.asClassNameArray(C)))}}e.SimpleButton=Y,(0,l.registerThemingParticipant)((oe,ce)=>{const ge=(ye,Ee)=>{Ee&&ce.addRule(`.monaco-editor ${ye} { background-color: ${Ee}; }`)};ge(".findMatch",oe.getColor(o.editorFindMatchHighlight)),ge(".currentFindMatch",oe.getColor(o.editorFindMatch)),ge(".findScope",oe.getColor(o.editorFindRangeHighlight));const le=oe.getColor(o.editorWidgetBackground);ge(".find-widget",le);const ue=oe.getColor(o.widgetShadow);ue&&ce.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ue}; }`);const j=oe.getColor(o.widgetBorder);j&&ce.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${j}; border-right: 1px solid ${j}; border-bottom: 1px solid ${j}; }`);const z=oe.getColor(o.editorFindMatchHighlightBorder);z&&ce.addRule(`.monaco-editor .findMatch { border: 1px ${(0,u.isHighContrast)(oe.type)?"dotted":"solid"} ${z}; box-sizing: border-box; }`);const U=oe.getColor(o.editorFindMatchBorder);U&&ce.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${U}; padding: 1px; box-sizing: border-box; }`);const J=oe.getColor(o.editorFindRangeHighlightBorder);J&&ce.addRule(`.monaco-editor .findScope { border: 1px ${(0,u.isHighContrast)(oe.type)?"dashed":"solid"} ${J}; }`);const te=oe.getColor(o.contrastBorder);te&&ce.addRule(`.monaco-editor .find-widget { border: 1px solid ${te}; }`);const G=oe.getColor(o.editorWidgetForeground);G&&ce.addRule(`.monaco-editor .find-widget { color: ${G}; }`);const ae=oe.getColor(o.errorForeground);ae&&ce.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ae}; }`);const me=oe.getColor(o.editorWidgetResizeBorder);if(me)ce.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${me}; }`);else{const ye=oe.getColor(o.editorWidgetBorder);ye&&ce.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ye}; }`)}const Ce=oe.getColor(o.toolbarHoverBackground);Ce&&ce.addRule(`
- .monaco-editor .find-widget .button:not(.disabled):hover,
- .monaco-editor .find-widget .codicon-find-selection:hover {
- background-color: ${Ce} !important;
- }
- `);const Se=oe.getColor(o.focusBorder);Se&&ce.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${Se}; }`)})}),define(X[346],ee([1,0,13,2,9,15,74,22,46,188,846,847,848,625,29,97,14,55,34,43,79,84,24]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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",$=!1){if(!B.hasModel())return null;const M=B.getSelection();if(V==="single"&&M.startLineNumber===M.endLineNumber||V==="multiple"){if(M.isEmpty()){const Q=B.getConfiguredWordAtPosition(M.getStartPosition());if(Q&&$===!1)return Q.word}else if(B.getModel().getValueLengthInRange(M)<v)return B.getModel().getValueInRange(M)}return null}e.getSelectionSearchString=f;let m=e.CommonFindController=class Zi extends k.Disposable{get editor(){return this._editor}static get(V){return V.getContribution(Zi.ID)}constructor(V,$,M,Q){super(),this._editor=V,this._findWidgetVisible=g.CONTEXT_FIND_WIDGET_VISIBLE.bindTo($),this._contextKeyService=$,this._storageService=M,this._clipboardService=Q,this._updateHistoryDelayer=new _.Delayer(500),this._state=this._register(new n.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,0),V.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),V.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),V.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!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($=>($.endColumn===1&&$.endLineNumber>$.startLineNumber&&($=$.setEndPosition($.endLineNumber-1,this._editor.getModel().getLineMaxColumn($.endLineNumber-1))),$.isEmpty()?null:$)).filter($=>!!$),V.length&&this._state.change({searchScope:V},!0)}}setSearchString(V){this._state.isRegex&&(V=y.escapeRegExpCharacters(V)),this._state.change({searchString:V},!1)}highlightFindOptions(V=!1){}_start(V,$){return we(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const M=Object.assign(Object.assign({},$),{isRevealed:!0});if(V.seedSearchStringFromSelection==="single"){const Q=f(this._editor,V.seedSearchStringFromSelection,V.seedSearchStringFromNonEmptySelection);Q&&(this._state.isRegex?M.searchString=y.escapeRegExpCharacters(Q):M.searchString=Q)}else if(V.seedSearchStringFromSelection==="multiple"&&!V.updateSearchScope){const Q=f(this._editor,V.seedSearchStringFromSelection);Q&&(M.searchString=Q)}if(!M.searchString&&V.seedSearchStringFromGlobalClipboard){const Q=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;Q&&(M.searchString=Q)}if(V.forceRevealReplace||M.isReplaceRevealed?M.isReplaceRevealed=!0:this._findWidgetVisible.get()||(M.isReplaceRevealed=!1),V.updateSearchScope){const Q=this._editor.getSelections();Q.some(ie=>!ie.isEmpty())&&(M.searchScope=Q)}M.loop=V.loop,this._state.change(M,!1),this._model||(this._model=new g.FindModelBoundToEditorModel(this._editor,this._state))})}start(V,$){return this._start(V,$)}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)}};m.ID="editor.contrib.findController",e.CommonFindController=m=Me([fe(1,d.IContextKeyService),fe(2,a.IStorageService),fe(3,r.IClipboardService)],m);let C=e.FindController=class extends m{constructor(V,$,M,Q,ie,re,ne,se){super(V,M,ne,se),this._contextViewService=$,this._keybindingService=Q,this._themeService=ie,this._notificationService=re,this._widget=null,this._findOptionsWidget=null}_start(V,$){const M=Object.create(null,{_start:{get:()=>super._start}});return we(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const Q=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=!!Q&&Q.startLineNumber!==Q.endLineNumber;break}default:break}V.updateSearchScope=V.updateSearchScope||ie,yield M._start.call(this,V,$),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 p.FindOptionsWidget(this._editor,this._state,this._keybindingService))}};e.FindController=C=Me([fe(1,h.IContextViewService),fe(2,d.IContextKeyService),fe(3,o.IKeybindingService),fe(4,u.IThemeService),fe(5,c.INotificationService),fe(6,a.IStorageService),fe(7,r.IClipboardService)],C),e.StartFindAction=(0,E.registerMultiEditorAction)(new E.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:s.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(B,V,$)=>{const M=m.get(V);return M?M.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 L={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:i.localize(2,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:i.localize(3,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:i.localize(4,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:i.localize(5,null)},findInSelection:{type:"boolean"}}}}]};class D extends E.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:L})}run(V,$,M){return we(this,void 0,void 0,function*(){const Q=m.get($);if(Q){const ie=M?{searchString:M.searchString,replaceString:M.replaceString,isReplaceRevealed:M.replaceString!==void 0,isRegex:M.isRegex,wholeWord:M.matchWholeWord,matchCase:M.isCaseSensitive,preserveCase:M.preserveCase}:{};yield Q.start({forceRevealReplace:!1,seedSearchStringFromSelection:Q.getState().searchString.length===0&&$.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:$.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:M?.findInSelection||!1,loop:$.getOption(39).loop},ie),Q.setGlobalBufferTerm(Q.getState().searchString)}})}}e.StartFindWithArgsAction=D;class I extends E.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,$){return we(this,void 0,void 0,function*(){const M=m.get($);M&&(yield M.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:$.getOption(39).loop}),M.setGlobalBufferTerm(M.getState().searchString))})}}e.StartFindWithSelectionAction=I;class T extends E.EditorAction{run(V,$){return we(this,void 0,void 0,function*(){const M=m.get($);M&&!this._run(M)&&(yield M.start({forceRevealReplace:!1,seedSearchStringFromSelection:M.getState().searchString.length===0&&$.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:$.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:$.getOption(39).loop}),this._run(M))})}}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 A extends E.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,$,M){const Q=m.get($);if(!Q)return;const ie=Q.getState().matchesCount;if(ie<1){V.get(c.INotificationService).notify({severity:c.Severity.Warning,message:i.localize(11,null)});return}const ne=V.get(l.IQuickInputService).createInputBox();ne.placeholder=i.localize(12,null,ie);const se=W=>{const q=parseInt(W);if(isNaN(q))return;const Z=Q.getState().matchesCount;if(q>0&&q<=Z)return q-1;if(q<0&&q>=-Z)return Z+q},H=W=>{const q=se(W);if(typeof q=="number"){ne.validationMessage=void 0,Q.goToMatch(q);const Z=Q.getState().currentMatch;Z&&this.addDecorations($,Z)}else ne.validationMessage=i.localize(13,null,Q.getState().matchesCount),this.clearDecorations($)};ne.onDidChangeValue(W=>{H(W)}),ne.onDidAccept(()=>{const W=se(ne.value);typeof W=="number"?(Q.goToMatch(W),ne.hide()):ne.validationMessage=i.localize(14,null,Q.getState().matchesCount)}),ne.onDidHide(()=>{this.clearDecorations($),ne.dispose()}),ne.show()}clearDecorations(V){V.changeDecorations($=>{this._highlightDecorations=$.deltaDecorations(this._highlightDecorations,[])})}addDecorations(V,$){V.changeDecorations(M=>{this._highlightDecorations=M.deltaDecorations(this._highlightDecorations,[{range:$,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:$,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,u.themeColorFromId)(w.overviewRulerRangeHighlight),position:S.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=A;class N extends E.EditorAction{run(V,$){return we(this,void 0,void 0,function*(){const M=m.get($);if(!M)return;const Q=f($,"single",!1);Q&&M.setSearchString(Q),this._run(M)||(yield M.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:$.getOption(39).loop}),this._run(M))})}}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,E.registerMultiEditorAction)(new E.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:s.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(18,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(B,V,$)=>{if(!V.hasModel()||V.getOption(87))return!1;const M=m.get(V);if(!M)return!1;const Q=V.getSelection(),ie=M.isFindInputFocused(),re=!Q.isEmpty()&&Q.startLineNumber===Q.endLineNumber&&V.getOption(39).seedSearchStringFromSelection!=="never"&&!ie,ne=ie||re?2:1;return M.start({forceRevealReplace:!0,seedSearchStringFromSelection:re?"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,E.registerEditorContribution)(m.ID,C,0),(0,E.registerEditorAction)(D),(0,E.registerEditorAction)(I),(0,E.registerEditorAction)(O),(0,E.registerEditorAction)(R),(0,E.registerEditorAction)(A),(0,E.registerEditorAction)(P),(0,E.registerEditorAction)(x);const F=E.EditorCommand.bindToContribution(m.get);(0,E.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,E.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,E.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,E.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,E.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,E.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,E.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,E.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,E.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,E.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,E.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(X[849],ee([1,0,27,46,38,628,33,73,24,30]),function(K,e,_,k,y,E,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 p=(0,w.registerColor)("editor.foldBackground",{light:(0,w.transparent)(w.editorSelectionBackground,.3),dark:(0,w.transparent)(w.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,E.localize)(0,null),!0);(0,w.registerColor)("editorGutter.foldingControlForeground",{dark:w.iconForeground,light:w.iconForeground,hcDark:w.iconForeground,hcLight:w.iconForeground},(0,E.localize)(1,null)),e.foldingExpandedIcon=(0,b.registerIcon)("folding-expanded",_.Codicon.chevronDown,(0,E.localize)(2,null)),e.foldingCollapsedIcon=(0,b.registerIcon)("folding-collapsed",_.Codicon.chevronRight,(0,E.localize)(3,null)),e.foldingManualCollapsedIcon=(0,b.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,E.localize)(4,null)),e.foldingManualExpandedIcon=(0,b.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,E.localize)(5,null));const n={color:(0,S.themeColorFromId)(p),position:k.MinimapPosition.Inline};class t{constructor(s){this.editor=s,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(s,r,d){return r?t.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?s?this.showFoldingHighlights?t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:t.NO_CONTROLS_EXPANDED_RANGE_DECORATION:s?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(s){return this.editor.changeDecorations(s)}removeDecorations(s){this.editor.removeDecorations(s)}}e.FoldingDecorationProvider=t,t.COLLAPSED_VISUAL_DECORATION=y.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=y.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:n,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.MANUALLY_COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:n,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:n,isWholeLine:!0}),t.EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+g.ThemeIcon.asClassName(e.foldingExpandedIcon)}),t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingExpandedIcon)}),t.MANUALLY_EXPANDED_VISUAL_DECORATION=y.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=y.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=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),t.HIDDEN_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(X[347],ee([1,0,13,21,11,59,2,9,18,115,15,22,31,28,582,583,276,627,14,849,176,277,43,70,57,19,6,25,20,51,26,425]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,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(le){return le.getContribution(Vt.ID)}static getFoldingRangeProviders(le,ue){var j,z;const U=le.foldingRangeProvider.ordered(ue);return(z=(j=Vt._foldingRangeSelector)===null||j===void 0?void 0:j.call(Vt,U,ue))!==null&&z!==void 0?z:U}constructor(le,ue,j,z,U,J){super(),this.contextKeyService=ue,this.languageConfigurationService=j,this.languageFeaturesService=J,this.localToDispose=this._register(new w.DisposableStore),this.editor=le,this._foldingLimitReporter=new A(le);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(J.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(le),this.foldingDecorationProvider.showFoldingControls=te.get(105),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(105)||G.hasChanged(43)){const ae=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=ae.get(105),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 le=this.editor.getModel();if(!le||!this._isEnabled||le.isTooLargeForTokenization())return{};if(this.foldingModel){const ue=this.foldingModel.getMemento(),j=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:ue,lineCount:le.getLineCount(),provider:j,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(le){const ue=this.editor.getModel();if(!(!ue||!this._isEnabled||ue.isTooLargeForTokenization()||!this.hiddenRangeModel)&&le&&(this._currentModelHasFoldedImports=!!le.foldedImports,le.collapsedRegions&&le.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(le.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const le=this.editor.getModel();!this._isEnabled||!le||le.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new s.FoldingModel(le,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(le)),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,j;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,(j=this.rangeProvider)===null||j===void 0||j.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var le;(le=this.rangeProvider)===null||le===void 0||le.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(le){if(this.rangeProvider)return this.rangeProvider;const ue=new d.IndentRangeProvider(le,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=ue,this._useFoldingProviders&&this.foldingModel){const j=Vt.getFoldingRangeProviders(this.languageFeaturesService,le);j.length>0&&(this.rangeProvider=new a.SyntaxRangeProvider(le,j,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,ue))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(le){var ue;(ue=this.hiddenRangeModel)===null||ue===void 0||ue.notifyChangeModelContent(le),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const le=this.foldingModel;if(!le)return null;const ue=new f.StopWatch(!0),j=this.getRangeProvider(le.textModel),z=this.foldingRegionPromise=(0,_.createCancelablePromise)(U=>j.compute(U));return z.then(U=>{if(U&&z===this.foldingRegionPromise){let J;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const me=U.setCollapsedAllOfType(t.FoldingRangeKind.Imports.value,!0);me&&(J=g.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=me)}const te=this.editor.getSelections(),G=te?te.map(me=>me.startLineNumber):[];le.update(U,G),J?.restore(this.editor);const ae=this.updateDebounceInfo.update(le.textModel,ue.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ae)}return le})}).then(void 0,le=>((0,y.onUnexpectedError)(le),null)))}onHiddenRangesChanges(le){if(this.hiddenRangeModel&&le.length&&!this._restoringViewState){const ue=this.editor.getSelections();ue&&this.hiddenRangeModel.adjustSelections(ue)&&this.editor.setSelections(ue)}this.editor.setHiddenAreas(le,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const le=this.getFoldingModel();le&&le.then(ue=>{if(ue){const j=this.editor.getSelections();if(j&&j.length>0){const z=[];for(const U of j){const J=U.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(J)&&z.push(...ue.getAllRegionsAtLine(J,te=>te.isCollapsed&&J>te.startLineNumber))}z.length&&(ue.toggleCollapseState(z),this.reveal(j[0].getPosition()))}}}).then(void 0,y.onUnexpectedError)}onEditorMouseDown(le){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!le.target||!le.target.range||!le.event.leftButton&&!le.event.middleButton)return;const ue=le.target.range;let j=!1;switch(le.target.type){case 4:{const z=le.target.detail,U=le.target.element.offsetLeft;if(z.offsetX-U<5)return;j=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!le.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:j}}onEditorMouseUp(le){const ue=this.foldingModel;if(!ue||!this.mouseDownInfo||!le.target)return;const j=this.mouseDownInfo.lineNumber,z=this.mouseDownInfo.iconClicked,U=le.target.range;if(!U||U.startLineNumber!==j)return;if(z){if(le.target.type!==4)return}else{const te=this.editor.getModel();if(!te||U.startColumn!==te.getLineMaxColumn(j))return}const J=ue.getRegionAtLine(j);if(J&&J.startLineNumber===j){const te=J.isCollapsed;if(z||te){const G=le.event.altKey;let ae=[];if(G){const me=Se=>!Se.containedBy(J)&&!J.containedBy(Se),Ce=ue.getRegionsInside(null,me);for(const Se of Ce)Se.isCollapsed&&ae.push(Se);ae.length===0&&(ae=Ce)}else{const me=le.event.middleButton||le.event.shiftKey;if(me)for(const Ce of ue.getRegionsInside(J))Ce.isCollapsed===te&&ae.push(Ce);(te||!me||ae.length===0)&&ae.push(J)}ue.toggleCollapseState(ae),this.reveal({lineNumber:j,column:1})}}}reveal(le){this.editor.revealPositionInCenterIfOutsideViewport(le,0)}};R.ID="editor.contrib.folding",e.FoldingController=R=Me([fe(1,o.IContextKeyService),fe(2,i.ILanguageConfigurationService),fe(3,u.INotificationService),fe(4,v.ILanguageFeatureDebounceService),fe(5,m.ILanguageFeaturesService)],R);class A{constructor(le){this.editor=le,this._onDidChange=new C.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(le,ue){(le!==this._computed||ue!==this._limited)&&(this._computed=le,this._limited=ue,this._onDidChange.fire())}}e.RangesLimitReporter=A;class N extends p.EditorAction{runEditorCommand(le,ue,j){const z=le.get(i.ILanguageConfigurationService),U=R.get(ue);if(!U)return;const J=U.getFoldingModel();if(J)return this.reportTelemetry(le,ue),J.then(te=>{if(te){this.invoke(U,te,ue,j,z);const G=ue.getSelection();G&&U.reveal(G.getStartPosition())}})}getSelectedLines(le){const ue=le.getSelections();return ue?ue.map(j=>j.startLineNumber):[]}getLineNumbers(le,ue){return le&&le.selectionLines?le.selectionLines.map(j=>j+1):this.getSelectedLines(ue)}run(le,ue){}}function P(ge){if(!S.isUndefined(ge)){if(!S.isObject(ge))return!1;const le=ge;if(!S.isUndefined(le.levels)&&!S.isNumber(le.levels)||!S.isUndefined(le.direction)&&!S.isString(le.direction)||!S.isUndefined(le.selectionLines)&&(!Array.isArray(le.selectionLines)||!le.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:n.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:
- * 'levels': Number of levels to unfold. If not set, defaults to 1.
- * 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
- * 'selectionLines': 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.
- `,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(le,ue,j,z){const U=z&&z.levels||1,J=this.getLineNumbers(z,j);z&&z.direction==="up"?(0,s.setCollapseStateLevelsUp)(ue,!1,U,J):(0,s.setCollapseStateLevelsDown)(ue,!1,U,J)}}class F extends N{constructor(){super({id:"editor.unfoldRecursively",label:h.localize(1,null),alias:"Unfold Recursively",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2142),weight:100}})}invoke(le,ue,j,z){(0,s.setCollapseStateLevelsDown)(ue,!1,Number.MAX_VALUE,this.getSelectedLines(j))}}class B extends N{constructor(){super({id:"editor.fold",label:h.localize(2,null),alias:"Fold",precondition:O,kbOpts:{kbExpr:n.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:
- * 'levels': Number of levels to fold.
- * 'direction': If 'up', folds given number of levels up otherwise folds down.
- * '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.
- If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
- `,constraint:P,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(le,ue,j,z){const U=this.getLineNumbers(z,j),J=z&&z.levels,te=z&&z.direction;typeof J!="number"&&typeof te!="string"?(0,s.setCollapseStateUp)(ue,!0,U):te==="up"?(0,s.setCollapseStateLevelsUp)(ue,!0,J||1,U):(0,s.setCollapseStateLevelsDown)(ue,!0,J||1,U)}}class V extends N{constructor(){super({id:"editor.toggleFold",label:h.localize(3,null),alias:"Toggle Fold",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2090),weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);(0,s.toggleCollapseState)(ue,1,z)}}class $ extends N{constructor(){super({id:"editor.foldRecursively",label:h.localize(4,null),alias:"Fold Recursively",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2140),weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);(0,s.setCollapseStateLevelsDown)(ue,!0,Number.MAX_VALUE,z)}}class M extends N{constructor(){super({id:"editor.foldAllBlockComments",label:h.localize(5,null),alias:"Fold All Block Comments",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2138),weight:100}})}invoke(le,ue,j,z,U){if(ue.regions.hasTypes())(0,s.setCollapseStateForType)(ue,t.FoldingRangeKind.Comment.value,!0);else{const J=j.getModel();if(!J)return;const te=U.getLanguageConfiguration(J.getLanguageId()).comments;if(te&&te.blockCommentStartToken){const G=new RegExp("^\\s*"+(0,b.escapeRegExpCharacters)(te.blockCommentStartToken));(0,s.setCollapseStateForMatchingLines)(ue,G,!0)}}}}class Q extends N{constructor(){super({id:"editor.foldAllMarkerRegions",label:h.localize(6,null),alias:"Fold All Regions",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2077),weight:100}})}invoke(le,ue,j,z,U){if(ue.regions.hasTypes())(0,s.setCollapseStateForType)(ue,t.FoldingRangeKind.Region.value,!0);else{const J=j.getModel();if(!J)return;const te=U.getLanguageConfiguration(J.getLanguageId()).foldingRules;if(te&&te.markers&&te.markers.start){const G=new RegExp(te.markers.start);(0,s.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:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2078),weight:100}})}invoke(le,ue,j,z,U){if(ue.regions.hasTypes())(0,s.setCollapseStateForType)(ue,t.FoldingRangeKind.Region.value,!1);else{const J=j.getModel();if(!J)return;const te=U.getLanguageConfiguration(J.getLanguageId()).foldingRules;if(te&&te.markers&&te.markers.start){const G=new RegExp(te.markers.start);(0,s.setCollapseStateForMatchingLines)(ue,G,!1)}}}}class re extends N{constructor(){super({id:"editor.foldAllExcept",label:h.localize(8,null),alias:"Fold All Regions Except Selected",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2136),weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);(0,s.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:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2134),weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);(0,s.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:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2069),weight:100}})}invoke(le,ue,j){(0,s.setCollapseStateLevelsDown)(ue,!0)}}class H extends N{constructor(){super({id:"editor.unfoldAll",label:h.localize(11,null),alias:"Unfold All",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2088),weight:100}})}invoke(le,ue,j){(0,s.setCollapseStateLevelsDown)(ue,!1)}}class W extends N{getFoldingLevel(){return parseInt(this.id.substr(W.ID_PREFIX.length))}invoke(le,ue,j){(0,s.setCollapseStateAtLevel)(ue,this.getFoldingLevel(),!0,this.getSelectedLines(j))}}W.ID_PREFIX="editor.foldLevel",W.ID=ge=>W.ID_PREFIX+ge;class q extends N{constructor(){super({id:"editor.gotoParentFold",label:h.localize(12,null),alias:"Go to Parent Fold",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);if(z.length>0){const U=(0,s.getParentFoldLine)(z[0],ue);U!==null&&j.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:n.EditorContextKeys.editorTextFocus,weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);if(z.length>0){const U=(0,s.getPreviousFoldLine)(z[0],ue);U!==null&&j.setSelection({startLineNumber:U,startColumn:1,endLineNumber:U,endColumn:1})}}}class Y extends N{constructor(){super({id:"editor.gotoNextFold",label:h.localize(14,null),alias:"Go to Next Folding Range",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,weight:100}})}invoke(le,ue,j){const z=this.getSelectedLines(j);if(z.length>0){const U=(0,s.getNextFoldLine)(z[0],ue);U!==null&&j.setSelection({startLineNumber:U,startColumn:1,endLineNumber:U,endColumn:1})}}}class oe extends N{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:h.localize(15,null),alias:"Create Folding Range from Selection",precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2135),weight:100}})}invoke(le,ue,j){var z;const U=[],J=j.getSelections();if(J){for(const te of J){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}),j.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=l.FoldingRegions.sanitizeAndMerge(ue.regions,U,(z=j.getModel())===null||z===void 0?void 0:z.getLineCount());ue.updatePost(l.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:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2137),weight:100}})}invoke(le,ue,j){const z=j.getSelections();if(z){const U=[];for(const J of z){const{startLineNumber:te,endLineNumber:G}=J;U.push(G>=te?{startLineNumber:te,endLineNumber:G}:{endLineNumber:G,startLineNumber:te})}ue.removeManualRanges(U),le.triggerFoldingModelChanged()}}}(0,p.registerEditorContribution)(R.ID,R,0),(0,p.registerEditorAction)(x),(0,p.registerEditorAction)(F),(0,p.registerEditorAction)(B),(0,p.registerEditorAction)($),(0,p.registerEditorAction)(se),(0,p.registerEditorAction)(H),(0,p.registerEditorAction)(M),(0,p.registerEditorAction)(Q),(0,p.registerEditorAction)(ie),(0,p.registerEditorAction)(re),(0,p.registerEditorAction)(ne),(0,p.registerEditorAction)(V),(0,p.registerEditorAction)(q),(0,p.registerEditorAction)(Z),(0,p.registerEditorAction)(Y),(0,p.registerEditorAction)(oe),(0,p.registerEditorAction)(ce);for(let ge=1;ge<=7;ge++)(0,p.registerInstantiatedEditorAction)(new W({id:W.ID(ge),label:h.localize(17,null,ge),alias:`Fold Level ${ge}`,precondition:O,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2048|21+ge),weight:100}}));L.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",function(ge,...le){return we(this,void 0,void 0,function*(){const[ue]=le;if(!(ue instanceof D.URI))throw(0,y.illegalArgument)();const j=ge.get(m.ILanguageFeaturesService),z=ge.get(I.IModelService).getModel(ue);if(!z)throw(0,y.illegalArgument)();const U=ge.get(T.IConfigurationService);if(!U.getValue("editor.folding",{resource:ue}))return[];const J=ge.get(i.ILanguageConfigurationService),te=U.getValue("editor.foldingStrategy",{resource:ue}),G={get limit(){return U.getValue("editor.foldingMaximumRegions",{resource:ue})},update:(ye,Ee)=>{}},ae=new d.IndentRangeProvider(z,J,G);let me=ae;if(te!=="indentation"){const ye=R.getFoldingRangeProviders(j,z);ye.length&&(me=new a.SyntaxRangeProvider(z,ye,()=>{},G,ae))}const Ce=yield me.compute(k.CancellationToken.None),Se=[];try{if(Ce)for(let ye=0;ye<Ce.length;ye++){const Ee=Ce.getType(ye);Se.push({start:Ce.getStartLineNumber(ye),end:Ce.getEndLineNumber(ye),kind:Ee?t.FoldingRangeKind.fromValue(Ee):void 0})}return Se}finally{me.dispose()}})})}),define(X[348],ee([1,0,7,295,16,2,12,5,38,31,309,94,14,8,34,126,13,22]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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 E.Disposable{constructor(D,I,T){super(),this._editor=D,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 n.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(O,this._editor));this._participants.sort((O,R)=>O.hoverOrdinal-R.hoverOrdinal),this._computer=new m(this._editor,this._participants),this._hoverOperation=this._register(new p.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 l(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(D){const I=[];for(const O of this._participants)if(O.suggestHoverAnchor){const R=O.suggestHoverAnchor(D);R&&I.push(R)}const T=D.target;if(T.type===6&&I.push(new n.HoverRangeAnchor(0,T.range,D.event.posx,D.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 n.HoverRangeAnchor(0,T.range,D.event.posx,D.event.posy))}return I.length===0?this._startShowingOrUpdateHover(null,0,0,!1,D):(I.sort((O,R)=>R.priority-O.priority),this._startShowingOrUpdateHover(I[0],0,0,!1,D))}startShowingAtRange(D,I,T,O){this._startShowingOrUpdateHover(new n.HoverRangeAnchor(0,D,void 0,void 0),I,T,O,null)}_startShowingOrUpdateHover(D,I,T,O,R){return!this._widget.position||!this._currentResult?D?(this._startHoverOperationIfNecessary(D,I,T,O,!1),!0):!1:this._editor.getOption(58).sticky&&R&&this._widget.isMouseGettingCloser(R.event.posx,R.event.posy)?(D&&this._startHoverOperationIfNecessary(D,I,T,O,!0),!0):D?D&&this._currentResult.anchor.equals(D)?!0:D.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(D)),this._startHoverOperationIfNecessary(D,I,T,O,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(D,I,T,O,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(D,I,T,O,R){this._computer.anchor&&this._computer.anchor.equals(D)||(this._hoverOperation.cancel(),this._computer.anchor=D,this._computer.shouldFocus=O,this._computer.source=T,this._computer.insistOnKeepingHoverVisible=R,this._hoverOperation.start(I))}_setCurrentResult(D){this._currentResult!==D&&(D&&D.messages.length===0&&(D=null),this._currentResult=D,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(D){return D?this._widget.getDomNode().contains(D):!1}_addLoadingMessage(D){if(this._computer.anchor){for(const I of this._participants)if(I.createLoadingMessage){const T=I.createLoadingMessage(this._computer.anchor);if(T)return D.slice(0).concat([T])}}return D}_withResult(D){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!D.isComplete||this._computer.insistOnKeepingHoverVisible&&D.messages.length===0)||this._setCurrentResult(D)}_renderMessages(D,I){const{showAtPosition:T,showAtSecondaryPosition:O,highlightRange:R}=gi.computeHoverRanges(this._editor,D.range,I),A=new E.DisposableStore,N=A.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 $=I.filter(M=>M.owner===V);$.length>0&&A.add(V.renderHoverParts(F,$))}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}]),A.add((0,E.toDisposable)(()=>{V.clear()}))}this._widget.showAt(P,new u(x,T,O,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,B,D.initialMousePosX,D.initialMousePosY,A))}else A.dispose()}static computeHoverRanges(D,I,T){let O=1;if(D.hasModel()){const x=D._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 A=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&&(A=Math.max(Math.min(A,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,A),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=Me([fe(1,i.IInstantiationService),fe(2,s.IKeybindingService)],c);class l{constructor(D,I,T){this.anchor=D,this.messages=I,this.isComplete=T}filter(D){const I=this.messages.filter(T=>T.isValidForHoverAnchor(D));return I.length===this.messages.length?this:new a(this,this.anchor,I,this.isComplete)}}class a extends l{constructor(D,I,T,O){super(I,T,O),this.original=D}filter(D){return this.original.filter(D)}}class u{constructor(D,I,T,O,R,A,N,P,x,F){this.colorPicker=D,this.showAtPosition=I,this.showAtSecondaryPosition=T,this.preferAbove=O,this.stoleFocus=R,this.source=A,this.isBeforeContent=N,this.initialMousePosX=P,this.initialMousePosY=x,this.disposables=F,this.closestMouseDistance=void 0}}let v=e.ContentHoverWidget=class Yi extends E.Disposable{get position(){var D,I;return(I=(D=this._visibleData)===null||D===void 0?void 0:D.showAtPosition)!==null&&I!==void 0?I:null}get isColorPickerVisible(){var D;return!!(!((D=this._visibleData)===null||D===void 0)&&D.colorPicker)}get isVisibleFromKeyboard(){var D;return((D=this._visibleData)===null||D===void 0?void 0:D.source)===1}get isVisible(){var D;return(D=this._hoverVisibleKey.get())!==null&&D!==void 0?D:!1}constructor(D,I){super(),this._editor=D,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 Yi.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let D=this._visibleData.preferAbove;!D&&this._contextKeyService.getContextKeyValue(r.Context.Visible.key)&&(D=!0);const I=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:D?[1,2]:[2,1],positionAffinity:I}}isMouseGettingCloser(D,I){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=D,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(D,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(D){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=D,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const D=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=`${D}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(D,I){var T;this._setVisibleData(I),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(D),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 D=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),D&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const D=this._hover.scrollbar.getScrollDimensions();if(D.scrollWidth>D.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 D=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:D-I.lineHeight})}scrollDown(){const D=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:D+I.lineHeight})}scrollLeft(){const D=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:D-this._horizontalScrollingBy})}scrollRight(){const D=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:D+this._horizontalScrollingBy})}pageUp(){const D=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:D-I})}pageDown(){const D=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:D+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=Me([fe(1,t.IContextKeyService)],v);let f=e.EditorHoverStatusBar=class extends E.Disposable{get hasContent(){return this._hasContent}constructor(D){super(),this._keybindingService=D,this._hasContent=!1,this.hoverElement=o("div.hover-row.status-bar"),this.actionsElement=_.append(this.hoverElement,o("div.actions"))}addAction(D){const I=this._keybindingService.lookupKeybinding(D.commandId),T=I?I.getLabel():null;return this._hasContent=!0,this._register(k.HoverAction.render(this.actionsElement,D,T))}append(D){const I=_.append(this.actionsElement,D);return this._hasContent=!0,I}};e.EditorHoverStatusBar=f=Me([fe(0,s.IKeybindingService)],f);class m{get anchor(){return this._anchor}set anchor(D){this._anchor=D}get shouldFocus(){return this._shouldFocus}set shouldFocus(D){this._shouldFocus=D}get source(){return this._source}set source(D){this._source=D}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(D){this._insistOnKeepingHoverVisible=D}constructor(D,I){this._editor=D,this._participants=I,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(D,I){if(I.type!==1&&!I.supportsMarkerHover)return[];const T=D.getModel(),O=I.range.startLineNumber;if(O>T.getLineCount())return[];const R=T.getLineMaxColumn(O);return D.getLineDecorations(O).filter(A=>{if(A.options.isWholeLine)return!0;const N=A.range.startLineNumber===O?A.range.startColumn:1,P=A.range.endLineNumber===O?A.range.endColumn:R;if(A.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(D){const I=this._anchor;if(!this._editor.hasModel()||!I)return d.AsyncIterableObject.EMPTY;const T=m._getLineDecorations(this._editor,I);return d.AsyncIterableObject.merge(this._participants.map(O=>O.computeAsync?O.computeAsync(I,T,D):d.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const D=m._getLineDecorations(this._editor,this._anchor);let I=[];for(const T of this._participants)I=I.concat(T.computeSync(this._anchor,D));return(0,y.coalesce)(I)}}function C(L,D,I,T,O,R){const A=I+O/2,N=T+R/2,P=Math.max(Math.abs(L-A)-O/2,0),x=Math.max(Math.abs(D-N)-R/2,0);return Math.sqrt(P*P+x*x)}}),define(X[850],ee([1,0,2,345,8,348,34,6,19,15,22,14,51,28,325,7,190]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let d=e.StandaloneColorPickerController=class Qi extends _.Disposable{constructor(u,v,f,m,C,L,D){super(),this._editor=u,this._modelService=f,this._keybindingService=m,this._instantiationService=C,this._languageFeatureService=L,this._languageConfigurationService=D,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.EditorContextKeys.standaloneColorPickerVisible.bindTo(v),this._standaloneColorPickerFocused=p.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(Qi.ID)}};d.ID="editor.contrib.standaloneColorPickerController",e.StandaloneColorPickerController=d=Me([fe(1,n.IContextKeyService),fe(2,t.IModelService),fe(3,w.IKeybindingService),fe(4,y.IInstantiationService),fe(5,S.ILanguageFeaturesService),fe(6,i.ILanguageConfigurationService)],d),(0,g.registerEditorContribution)(d.ID,d,1);const h=8,o=22;let c=e.StandaloneColorPickerWidget=class Xi extends _.Disposable{constructor(u,v,f,m,C,L,D,I){var T;super(),this._editor=u,this._standaloneColorPickerVisible=v,this._standaloneColorPickerFocused=f,this._modelService=C,this._keybindingService=L,this._languageFeaturesService=D,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=m.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},A=this._register(r.trackFocus(this.body));this._register(A.onDidBlur(N=>{this.hide()})),this._register(A.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 Xi.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 l(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 s.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return f?{result:f.colorHover,foundInEditor:f.foundInEditor}:null})}_render(u,v){const f=document.createDocumentFragment(),m=this._register(new E.EditorHoverStatusBar(this._keybindingService));let C;const L={fragment:f,statusBar:m,setColorPicker:x=>C=x,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=u,this._register(this._standaloneColorPickerParticipant.renderHoverParts(L,[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 D=C.body,I=D.saturationBox.domNode.clientWidth,T=D.domNode.clientWidth-I-o-h,O=C.body.enterButton;O?.onClicked(()=>{this.updateEditor(),this.hide()});const R=C.header,A=R.pickedColorNode;A.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=Me([fe(3,y.IInstantiationService),fe(4,t.IModelService),fe(5,w.IKeybindingService),fe(6,S.ILanguageFeaturesService),fe(7,i.ILanguageConfigurationService)],c);class l{constructor(u,v){this.value=u,this.foundInEditor=v}}}),define(X[851],ee([1,0,15,615,850,22,29,190]),function(K,e,_,k,y,E,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(n,t){var i;(i=y.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:E.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(n,t){var i;(i=y.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:E.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(n,t){var i;(i=y.StandaloneColorPickerController.get(t))===null||i===void 0||i.insertColor()}}(0,_.registerEditorAction)(S),(0,_.registerEditorAction)(g),(0,w.registerAction2)(b)}),define(X[852],ee([1,0,13,11,98,15,5,23,22,38,111,644,521,430]),function(K,e,_,k,y,E,w,b,S,g,p,n,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 l=this.editor.getSelection(),a=this.editor.getModel();if(!a||!l)return;let u=l;if(u.startLineNumber!==u.endLineNumber)return;const v=new y.EditorState(this.editor,5),f=a.uri;return this.editorWorkerService.canNavigateValueSet(f)?(this.currentRequest=(0,_.createCancelablePromise)(m=>this.editorWorkerService.navigateValueSet(f,u,o)),this.currentRequest.then(m=>{var C;if(!m||!m.range||!m.value||!v.validate(this.editor))return;const L=w.Range.lift(m.range);let D=m.range;const I=m.value.length-(u.endColumn-u.startColumn);D={startLineNumber:D.startLineNumber,startColumn:D.startColumn,endLineNumber:D.endLineNumber,endColumn:D.startColumn+m.value.length},I>1&&(u=new b.Selection(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+I-1));const T=new t.InPlaceReplaceCommand(L,u,m.value);this.editor.pushUndoStop(),this.editor.executeCommand(h,T),this.editor.pushUndoStop(),this.decorations.set([{range:D,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=Me([fe(1,p.IEditorWorkerService)],i);class s extends E.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:n.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 E.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:n.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,E.registerEditorContribution)(i.ID,i,4),(0,E.registerEditorAction)(s),(0,E.registerEditorAction)(r)}),define(X[243],ee([1,0,7,13,27,2,9,30,5,38,8,433]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineProgressManager=void 0;const n=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 E.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(y.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 E.Disposable{constructor(r,d,h){super(),this.id=r,this._editor=d,this._instantiationService=h,this._showDelay=500,this._showPromise=this._register(new E.MutableDisposable),this._currentWidget=new E.MutableDisposable,this._currentDecorations=d.createDecorationsCollection()}setAtPosition(r,d,h){this.clear(),this._showPromise.value=(0,k.disposableTimeout)(()=>{const o=S.Range.fromPositions(r);this._currentDecorations.set([{range:o,options:n}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(t,this.id,this._editor,o,d,h))},this._showDelay)}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};e.InlineProgressManager=i=Me([fe(2,p.IInstantiationService)],i)}),define(X[853],ee([1,0,7,13,164,2,102,48,163,324,151,5,23,19,98,243,95,619,97,26,8]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=void 0;const a="application/vnd.code.copyMetadata";let u=e.CopyPasteController=class extends E.Disposable{constructor(m,C,L,D,I,T){super(),this._bulkEditService=L,this._clipboardService=D,this._configurationService=I,this._languageFeaturesService=T,this.operationIdPool=0,this._editor=m;const O=m.getContainerDomNode();this._register((0,_.addDisposableListener)(O,"copy",R=>this.handleCopy(R))),this._register((0,_.addDisposableListener)(O,"cut",R=>this.handleCopy(R))),this._register((0,_.addDisposableListener)(O,"paste",R=>this.handlePaste(R),!0)),this._pasteProgressManager=this._register(new r.InlineProgressManager("pasteIntoEditor",m,C))}arePasteActionsEnabled(m){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:m.uri})?!0:m.uri.scheme===b.Schemas.vscodeNotebookCell}handleCopy(m){var C;if(!m.clipboardData||!this._editor.hasTextFocus())return;const L=this._editor.getModel(),D=this._editor.getSelections();if(!L||!D?.length||!this.arePasteActionsEnabled(L))return;const I=[...D],T=D[0],O=T.isEmpty();if(O){if(!this._editor.getOption(35))return;I[0]=new n.Range(T.startLineNumber,0,T.startLineNumber,L.getLineLength(T.startLineNumber))}const R=this._languageFeaturesService.documentPasteEditProvider.ordered(L).filter(x=>!!x.prepareDocumentPaste);if(!R.length){this.setCopyMetadata(m.clipboardData,{wasFromEmptySelection:O});return}const A=(0,g.toVSDataTransfer)(m.clipboardData),N=(0,S.generateUuid)();this.setCopyMetadata(m.clipboardData,{id:N,wasFromEmptySelection:O});const P=(0,k.createCancelablePromise)(x=>we(this,void 0,void 0,function*(){const F=yield Promise.all(R.map(B=>B.prepareDocumentPaste(L,I,A,x)));for(const B of F)B?.forEach((V,$)=>{A.replace($,V)});return A}));(C=this._currentClipboardItem)===null||C===void 0||C.dataTransferPromise.cancel(),this._currentClipboardItem={handle:N,dataTransferPromise:P}}setCopyMetadata(m,C){m.setData(a,JSON.stringify(C))}handlePaste(m){var C,L;return we(this,void 0,void 0,function*(){if(!m.clipboardData||!this._editor.hasTextFocus())return;const D=this.operationIdPool++;(C=this._currentOperation)===null||C===void 0||C.promise.cancel(),this._pasteProgressManager.clear();const I=this._editor.getSelections();if(!I?.length||!this._editor.hasModel())return;const T=this._editor.getModel();if(!this.arePasteActionsEnabled(T))return;let O;const R=(L=m.clipboardData)===null||L===void 0?void 0:L.getData(a);R&&typeof R=="string"&&(O=JSON.parse(R));const A=this._languageFeaturesService.documentPasteEditProvider.ordered(T);if(!A.length)return;m.preventDefault(),m.stopImmediatePropagation();const N=(0,k.createCancelablePromise)(P=>we(this,void 0,void 0,function*(){var x,F,B,V;const $=this._editor;if(!$.hasModel())return;const M=new s.EditorStateCancellationTokenSource($,3,void 0,P);try{this._pasteProgressManager.setAtPosition(I[0].getEndPosition(),(0,h.localize)(0,null),{cancel:()=>M.cancel()});const Q=(0,g.toVSDataTransfer)(m.clipboardData);if(O?.id&&((x=this._currentClipboardItem)===null||x===void 0?void 0:x.handle)===O.id){const re=yield this._currentClipboardItem.dataTransferPromise;if(M.token.isCancellationRequested)return;re.forEach((ne,se)=>{Q.replace(se,ne)})}if(!Q.has(w.Mimes.uriList)){const re=yield this._clipboardService.readResources();if(M.token.isCancellationRequested)return;re.length&&Q.append(w.Mimes.uriList,(0,y.createStringDataTransferItem)(y.UriList.create(re)))}Q.delete(a);const ie=yield this.getProviderPasteEdit(A,Q,T,I,M.token);if(M.token.isCancellationRequested)return;if(ie){const re=typeof ie.insertText=="string"?d.SnippetParser.escape(ie.insertText):ie.insertText.snippet,ne={edits:[new p.ResourceTextEdit(T.uri,{range:t.Selection.liftSelection($.getSelection()),text:re,insertAsSnippet:!0}),...(B=(F=ie.additionalEdit)===null||F===void 0?void 0:F.edits)!==null&&B!==void 0?B:[]]};yield this._bulkEditService.apply(ne,{editor:$});return}yield this.applyDefaultPasteHandler(Q,O,M.token)}finally{M.dispose(),((V=this._currentOperation)===null||V===void 0?void 0:V.id)===D&&(this._pasteProgressManager.clear(),this._currentOperation=void 0)}}));this._currentOperation={id:D,promise:N}})}getProviderPasteEdit(m,C,L,D,I){return(0,k.raceCancellation)((()=>we(this,void 0,void 0,function*(){for(const T of m){if(I.isCancellationRequested)return;if(!v(T,C))continue;const O=yield T.provideDocumentPasteEdits(L,D,C,I);if(O)return O}}))(),I)}applyDefaultPasteHandler(m,C,L){var D;return we(this,void 0,void 0,function*(){const I=(D=m.get(w.Mimes.text))!==null&&D!==void 0?D:m.get("text");if(!I)return;const T=yield I.asString();L.isCancellationRequested||this._editor.trigger("keyboard","paste",{text:T,pasteOnNewLine:C?.wasFromEmptySelection,multicursorText:null})})}};u.ID="editor.contrib.copyPasteActionController",e.CopyPasteController=u=Me([fe(1,l.IInstantiationService),fe(2,p.IBulkEditService),fe(3,o.IClipboardService),fe(4,c.IConfigurationService),fe(5,i.ILanguageFeaturesService)],u);function v(f,m){return f.pasteMimeTypes.some(C=>m.matches(C))}}),define(X[854],ee([1,0,15,231,853,618,91,35]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(y.CopyPasteController.ID,y.CopyPasteController,0),b.Registry.as(w.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},k.editorConfigurationBaseNode),{properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:E.localize(0,null),default:!1}}}))}),define(X[855],ee([1,0,16,13,21,37,11,6,2,9,20,15,32,12,5,22,38,28,653,14,19,33,70,57,434]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m=e.LinkedEditingContribution=class mi extends S.Disposable{static get(T){return T.getContribution(mi.ID)}constructor(T,O,R,A,N){super(),this.languageConfigurationService=A,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(88))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(T){const O=this._editor.getModel(),R=O!==null&&(this._editor.getOption(67)||this._editor.getOption(88))&&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 A=new k.Delayer(this._debounceInformation.get(O)),N=()=>{var F;this._rangeUpdateTriggerPromise=A.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:()=>{A.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 A=O.getValueInRange(R);if(this._currentWordPattern){const P=A.match(this._currentWordPattern);if((P?P[0].length:0)!==A.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:A});else{let B=O.getValueInRange(F),V=A,$=F.startColumn,M=F.endColumn;const Q=g.commonPrefixLength(B,V);$+=Q,B=B.substr(Q),V=V.substr(Q);const ie=g.commonSuffixLength(B,V);M-=ie,B=B.substr(0,B.length-ie),V=V.substr(0,V.length-ie),($!==M||V.length!==0)&&N.push({range:new s.Range(F.startLineNumber,$,F.endLineNumber,M),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(),A=R.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===A){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=A;const N=(0,k.createCancelablePromise)(P=>we(this,void 0,void 0,function*(){try{const x=new v.StopWatch(!1),F=yield D(this._providers,R,O,P);if(this._debounceInformation.update(R,x.elapsed()),N!==this._currentRequest||(this._currentRequest=null,A!==R.getVersionId()))return;let B=[];F?.ranges&&(B=F.ranges),this._currentWordPattern=F?.wordPattern||this._languageWordPattern;let V=!1;for(let M=0,Q=B.length;M<Q;M++)if(s.Range.containsPosition(B[M],O)){if(V=!0,M!==0){const ie=B[M];B.splice(M,1),B.unshift(ie)}break}if(!V){this.clearRanges();return}const $=B.map(M=>({range:M,options:mi.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set($),this._syncRangesToken++}catch(x){(0,w.isCancellationError)(x)||(0,w.onUnexpectedError)(x),(this._currentRequest===N||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=N,N})}};m.ID="editor.contrib.linkedEditing",m.DECORATION=d.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:f}),e.LinkedEditingContribution=m=Me([fe(1,c.IContextKeyService),fe(2,l.ILanguageFeaturesService),fe(3,h.ILanguageConfigurationService),fe(4,u.ILanguageFeatureDebounceService)],m);class C extends n.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),[A,N]=Array.isArray(O)&&O||[void 0,void 0];return p.URI.isUri(A)&&i.Position.isIPosition(N)?R.openCodeEditor({resource:A},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=m.get(O);return R?Promise.resolve(R.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=C;const L=n.EditorCommand.bindToContribution(m.get);(0,n.registerEditorCommand)(new L({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:I=>I.clearRanges(),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function D(I,T,O,R){const A=I.ordered(T);return(0,k.first)(A.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,a.registerColor)("editor.linkedEditingBackground",{dark:E.Color.fromHex("#f00").transparent(.3),light:E.Color.fromHex("#f00").transparent(.3),hcDark:E.Color.fromHex("#f00").transparent(.3),hcLight:E.Color.white},o.localize(1,null)),(0,n.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(I,T,O)=>{const{linkedEditingRangeProvider:R}=I.get(l.ILanguageFeaturesService);return D(R,T,O,y.CancellationToken.None)}),(0,n.registerEditorContribution)(m.ID,m,1),(0,n.registerEditorAction)(C)}),define(X[856],ee([1,0,13,21,11,61,2,48,17,42,57,20,15,38,70,19,179,718,654,43,52,435]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let a=e.LinkDetector=class Ji extends w.Disposable{static get(L){return L.getContribution(Ji.ID)}constructor(L,D,I,T,O){super(),this.editor=L,this.openerService=D,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(L));this._register(R.onMouseMoveOrRelevantKeyDown(([A,N])=>{this._onEditorMouseMove(A,N)})),this._register(R.onExecute(A=>{this.onEditorMouseUp(A)})),this._register(R.onCancel(A=>{this.cleanUpActiveLinkDecoration()})),this._register(L.onDidChangeConfiguration(A=>{A.hasChanged(68)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(L.onDidChangeModelContent(A=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(L.onDidChangeModel(A=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(L.onDidChangeModelLanguage(A=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(A=>{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 L=this.editor.getModel();if(this.providers.has(L)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,_.createCancelablePromise)(D=>(0,h.getLinks)(this.providers,L,D));try{const D=new p.StopWatch(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(L,D.elapsed()),L.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(D){(0,y.onUnexpectedError)(D)}finally{this.computePromise=null}}})}updateDecorations(L){const D=this.editor.getOption(75)==="altKey",I=[],T=Object.keys(this.currentOccurrences);for(const R of T){const A=this.currentOccurrences[R];I.push(A.decorationId)}const O=[];if(L)for(const R of L)O.push(v.decoration(R,D));this.editor.changeDecorations(R=>{const A=R.deltaDecorations(I,O);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let N=0,P=A.length;N<P;N++){const x=new v(L[N],A[N]);this.currentOccurrences[x.decorationId]=x}})}_onEditorMouseMove(L,D){const I=this.editor.getOption(75)==="altKey";if(this.isEnabled(L,D)){this.cleanUpActiveLinkDecoration();const T=this.getLinkOccurrence(L.target.position);T&&this.editor.changeDecorations(O=>{T.activate(O,I),this.activeLinkDecorationId=T.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const L=this.editor.getOption(75)==="altKey";if(this.activeLinkDecorationId){const D=this.currentOccurrences[this.activeLinkDecorationId];D&&this.editor.changeDecorations(I=>{D.deactivate(I,L)}),this.activeLinkDecorationId=null}}onEditorMouseUp(L){if(!this.isEnabled(L))return;const D=this.getLinkOccurrence(L.target.position);D&&this.openLinkOccurrence(D,L.hasSideBySideModifier,!0)}openLinkOccurrence(L,D,I=!1){if(!this.openerService)return;const{link:T}=L;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 A=n.URI.parse(O);if(A.scheme===b.Schemas.file){const N=g.originalFSPath(A);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:D,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,y.onUnexpectedError)(O)})}getLinkOccurrence(L){if(!this.editor.hasModel()||!L)return null;const D=this.editor.getModel().getDecorationsInRange({startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:L.lineNumber,endColumn:L.column},0,!0);for(const I of D){const T=this.currentOccurrences[I.id];if(T)return T}return null}isEnabled(L,D){return!!(L.target.type===6&&(L.hasTriggerModifier||D&&D.keyCodeIsTriggerKey))}stop(){var L;this.computeLinks.cancel(),this.activeLinksList&&((L=this.activeLinksList)===null||L===void 0||L.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};a.ID="editor.linkDetector",e.LinkDetector=a=Me([fe(1,l.IOpenerService),fe(2,c.INotificationService),fe(3,r.ILanguageFeaturesService),fe(4,s.ILanguageFeatureDebounceService)],a);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(L,D){return{range:L.range,options:v._getOptions(L,D,!1)}}static _getOptions(L,D,I){const T=Object.assign({},I?u.active:u.general);return T.hoverMessage=f(L,D),T}constructor(L,D){this.link=L,this.decorationId=D}activate(L,D){L.changeDecorationOptions(this.decorationId,v._getOptions(this.link,D,!0))}deactivate(L,D){L.changeDecorationOptions(this.decorationId,v._getOptions(this.link,D,!1))}}function f(C,L){const D=C.url&&/^command:/i.test(C.url.toString()),I=C.tooltip?C.tooltip:D?o.localize(2,null):o.localize(3,null),T=L?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 A=C.url.toString().match(/^command:([^?#]+)/);if(A){const N=A[1];O=o.localize(8,null,N)}}return new E.MarkdownString("",!0).appendLink(C.url.toString(!0).replace(/ /g,"%20"),I,O).appendMarkdown(` (${T})`)}else return new E.MarkdownString().appendText(`${I} (${T})`)}class m extends t.EditorAction{constructor(){super({id:"editor.action.openLink",label:o.localize(9,null),alias:"Open Link",precondition:void 0})}run(L,D){const I=a.get(D);if(!I||!D.hasModel())return;const T=D.getSelections();for(const O of T){const R=I.getLinkOccurrence(O.getEndPosition());R&&I.openLinkOccurrence(R,!1)}}}(0,t.registerEditorContribution)(a.ID,a,1),(0,t.registerEditorAction)(m)}),define(X[857],ee([1,0,2,19,183,13,347,277,276,28,11,205,53]),function(K,e,_,k,y,E,w,b,S,g,p,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModelProvider=void 0;var i;(function(a){a.OUTLINE_MODEL="outlineModel",a.FOLDING_PROVIDER_MODEL="foldingProviderModel",a.INDENTATION_MODEL="indentationModel"})(i||(i={}));var s;(function(a){a[a.VALID=0]="VALID",a[a.INVALID=1]="INVALID",a[a.CANCELED=2]="CANCELED"})(s||(s={}));let r=e.StickyModelProvider=class{constructor(u,v,f,m){this._editor=u,this._languageConfigurationService=v,this._languageFeaturesService=f,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new E.Delayer(300);const C=new h(f),L=new l(this._editor,f),D=new c(this._editor,v);switch(m){case i.OUTLINE_MODEL:this._modelProviders.push(C),this._modelProviders.push(L),this._modelProviders.push(D);break;case i.FOLDING_PROVIDER_MODEL:this._modelProviders.push(L),this._modelProviders.push(D);break;case i.INDENTATION_MODEL:this._modelProviders.push(D);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 m;this._cancelModelPromise(),(m=this._updateScheduler)===null||m===void 0||m.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>we(this,void 0,void 0,function*(){for(const m of this._modelProviders){const{statusPromise:C,modelPromise:L}=m.computeStickyModel(u,v,f);this._modelPromise=L;const D=yield C;if(this._modelPromise!==L)return null;switch(D){case s.CANCELED:return this._store.clear(),null;case s.VALID:return m.stickyModel}}return null}))})}};e.StickyModelProvider=r=Me([fe(1,g.ILanguageConfigurationService),fe(2,k.ILanguageFeaturesService)],r);class d{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,s.INVALID}computeStickyModel(u,v,f){if(!this.isProviderValid(u))return{statusPromise:this._invalid(),modelPromise:null};const m=(0,E.createCancelablePromise)(C=>this.createModelFromProvider(u,v,C));return{statusPromise:m.then(C=>this.isModelValid(C)?f.isCancellationRequested?s.CANCELED:(this._stickyModel=this.createStickyModel(u,v,f,C),s.VALID):this._invalid()).then(void 0,C=>((0,p.onUnexpectedError)(C),s.CANCELED)),modelPromise:m}}isModelValid(u){return!0}isProviderValid(u){return!0}}let h=class extends d{constructor(u){super(),this._languageFeaturesService=u}createModelFromProvider(u,v,f){return y.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,u,f)}createStickyModel(u,v,f,m){var C;const{stickyOutlineElement:L,providerID:D}=this._stickyModelFromOutlineModel(m,(C=this._stickyModel)===null||C===void 0?void 0:C.outlineProviderId);return new n.StickyModel(u.uri,v,L,D)}isModelValid(u){return u&&u.children.size>0}_stickyModelFromOutlineModel(u,v){let f;if(t.Iterable.first(u.children.values())instanceof y.OutlineGroup){const D=t.Iterable.find(u.children.values(),I=>I.id===v);if(D)f=D.children;else{let I="",T=-1,O;for(const[R,A]of u.children.entries()){const N=this._findSumOfRangesOfGroup(A);N>T&&(O=A,T=N,I=A.id)}v=I,f=O.children}}else f=u.children;const m=[],C=Array.from(f.values()).sort((D,I)=>{const T=new n.StickyRange(D.symbol.range.startLineNumber,D.symbol.range.endLineNumber),O=new n.StickyRange(I.symbol.range.startLineNumber,I.symbol.range.endLineNumber);return this._comparator(T,O)});for(const D of C)m.push(this._stickyModelFromOutlineElement(D,D.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new n.StickyElement(void 0,m,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 L of C.children.values())f.push(this._stickyModelFromOutlineElement(L,C.symbol.selectionRange.startLineNumber));f.sort((C,L)=>this._comparator(C.range,L.range));const m=new n.StickyRange(u.symbol.selectionRange.startLineNumber,u.symbol.range.endLineNumber);return new n.StickyElement(m,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 y.OutlineElement?v+u.symbol.range.endLineNumber-u.symbol.selectionRange.startLineNumber:v}};h=Me([fe(0,k.ILanguageFeaturesService)],h);class o extends d{constructor(u){super(),this._foldingLimitReporter=new w.RangesLimitReporter(u)}createStickyModel(u,v,f,m){const C=this._fromFoldingRegions(m);return new n.StickyModel(u.uri,v,C,void 0)}isModelValid(u){return u!==null}_fromFoldingRegions(u){const v=u.length,f=[],m=new n.StickyElement(void 0,[],void 0);for(let C=0;C<v;C++){const L=u.getParentIndex(C);let D;L!==-1?D=f[L]:D=m;const I=new n.StickyElement(new n.StickyRange(u.getStartLineNumber(C),u.getEndLineNumber(C)+1),[],D);D.children.push(I),f.push(I)}return m}}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=Me([fe(1,g.ILanguageConfigurationService)],c);let l=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 m=w.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,u);return new b.SyntaxRangeProvider(u,m,()=>this.createModelFromProvider(u,v,f),this._foldingLimitReporter,void 0).compute(f)}};l=Me([fe(1,k.ILanguageFeaturesService)],l)}),define(X[858],ee([1,0,2,19,21,13,16,42,6,28,857,205]),function(K,e,_,k,y,E,w,b,S,g,p,n){"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 E.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(110)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._options=this._editor.getOption(110),!this._options.enabled){this._sessionStore.clear();return}this._stickyModelProvider=new p.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 y.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 n.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 l=c;const a=[];for(let f=0;f<d.children.length;f++){const m=d.children[f];m.range&&a.push(m.range.startLineNumber)}const u=this.updateIndex((0,w.binarySearch)(a,r.startLineNumber,(f,m)=>f-m)),v=this.updateIndex((0,w.binarySearch)(a,r.startLineNumber+o,(f,m)=>f-m));for(let f=u;f<=v;f++){const m=d.children[f];if(!m)return;if(m.range){const C=m.range.startLineNumber,L=m.range.endLineNumber;r.startLineNumber<=L+1&&C-1<=r.endLineNumber&&C!==l&&(l=C,h.push(new t(C,L-1,o+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(r,m,h,o+1,C))}else this.getCandidateStickyLinesIntersectingFromStickyModel(r,m,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 l of c)o=o.filter(a=>!(a.startLineNumber>=l.startLineNumber&&a.endLineNumber<=l.endLineNumber+1));return o}};e.StickyLineCandidateProvider=i=Me([fe(1,k.ILanguageFeaturesService),fe(2,g.ILanguageConfigurationService)],i)}),define(X[859],ee([1,0,2,96,110,141,12,67,157,7,442]),function(K,e,_,k,y,E,w,b,S,g){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class n{constructor(r,d){this.lineNumbers=r,this.lastLineRelativePosition=d}}e.StickyScrollWidgetState=n;const t=(p=window.trustedTypes)===null||p===void 0?void 0:p.createPolicy("stickyScrollViewLayer",{createHTML:s=>s});class i extends _.Disposable{constructor(r){super(),this._editor=r,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new _.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 S.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){g.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 l=this._renderChildNode(o,c);this._rootDomNode.appendChild(l)}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 w.Position(d,1)).lineNumber,l=o.getViewLineRenderingData(c),a=this._editor.getLayoutInfo(),u=a.width-a.minimap.minimapCanvasOuterWidth-a.verticalScrollbarWidth,v=this._editor.getOption(70).side,f=this._editor.getOption(64),m=this._editor.getOption(65);let C;try{C=E.LineDecoration.filter(l.inlineDecorations,c,l.minColumn,l.maxColumn)}catch{C=[]}const L=new y.RenderLineInput(!0,!0,l.content,l.continuesWithWrappedLine,l.isBasicASCII,l.containsRTL,0,l.tokens,C,l.tabSize,l.startVisibleColumn,1,1,1,500,"none",!0,!0,null),D=new k.StringBuilder(2e3);(0,y.renderViewLine)(L,D);let I;t?I=t.createHTML(D.build()):I=D.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=`${a.contentLeft-a.minimap.minimapCanvasOuterWidth}px`:v==="right"&&(O.style.width=`${a.contentLeft}px`);const R=document.createElement("span");return m.renderType===1||m.renderType===3&&d%10===0?R.innerText=d.toString():m.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=`${a.lineNumbersWidth}px`,v==="left"?R.style.paddingLeft=`${a.lineNumbersLeft-a.minimap.minimapCanvasOuterWidth}px`:v==="right"&&(R.style.paddingLeft=`${a.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(g.addDisposableListener(h,"mouseover",A=>{if(this._editor.hasModel()){const P=new b.StandardMouseEvent(A).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(X[860],ee([1,0,7,109,13,11,6,2,133,9,157,834,671,14,8,84,33,92,24,293,126,327,829,99,165,443,239]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m{constructor(I,T){this._service=I,this._key=`suggestWidget.size/${T.getEditorType()}/${T instanceof p.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,A){this.editor=I,this._storageService=T,this._state=0,this._isAuto=!1,this._pendingLayout=new b.MutableDisposable,this._pendingShowDetails=new b.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new y.TimeoutTimer,this._disposables=new b.DisposableStore,this._onDidSelect=new w.PauseableEmitter,this._onDidFocus=new w.PauseableEmitter,this._onDidHide=new w.Emitter,this._onDidShow=new w.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new w.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new c.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new L(this,I),this._persistedSize=new m(T,I);class N{constructor(M,Q,ie=!1,re=!1){this.persistedSize=M,this.currentSize=Q,this.persistHeight=ie,this.persistWidth=re}}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($=>{var M,Q,ie,re;if(this._resize($.dimension.width,$.dimension.height),P&&(P.persistHeight=P.persistHeight||!!$.north||!!$.south,P.persistWidth=P.persistWidth||!!$.east||!!$.west),!!$.done){if(P){const{itemHeight:ne,defaultSize:se}=this.getLayoutInfo(),H=Math.round(ne/2);let{width:W,height:q}=this.element.size;(!P.persistHeight||Math.abs(P.currentSize.height-q)<=H)&&(q=(Q=(M=P.persistedSize)===null||M===void 0?void 0:M.height)!==null&&Q!==void 0?Q:se.height),(!P.persistWidth||Math.abs(P.currentSize.width-W)<=H)&&(W=(re=(ie=P.persistedSize)===null||ie===void 0?void 0:ie.width)!==null&&re!==void 0?re:se.width),this._persistedSize.store(new _.Dimension(W,q))}this._contentWidget.unlockPreference(),P=void 0}})),this._messageElement=_.append(this.element.domNode,_.$(".message")),this._listElement=_.append(this.element.domNode,_.$(".tree"));const x=A.createInstance(a.SuggestDetailsWidget,this.editor);x.onDidClose(this.toggleDetails,this,this._disposables),this._details=new a.SuggestDetailsOverlay(x,this.editor);const F=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(113).showIcons);F();const B=A.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:$=>this.getLayoutInfo().itemHeight,getTemplateId:$=>"suggestion"},[B],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>t.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:$=>{let M=$.textLabel;if(typeof $.completion.label!="string"){const{detail:ne,description:se}=$.completion.label;ne&&se?M=t.localize(12,null,M,ne,se):ne?M=t.localize(13,null,M,ne):se&&(M=t.localize(14,null,M,se))}if(!$.isResolved||!this._isDetailsVisible())return M;const{documentation:Q,detail:ie}=$.completion,re=g.format("{0}{1}",ie||"",Q?typeof Q=="string"?Q:Q.value:"");return t.localize(15,null,M,re)}}}),this._list.style((0,v.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:d.activeContrastBorder})),this._status=A.createInstance(n.SuggestWidgetStatus,this.element.domNode,l.suggestWidgetStatusbarMenu);const V=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(113).showStatusBar);V(),this._disposables.add(R.onDidColorThemeChange($=>this._onThemeChange($))),this._onThemeChange(R.getColorTheme()),this._disposables.add(this._list.onMouseDown($=>this._onListMouseDownOrTap($))),this._disposables.add(this._list.onTap($=>this._onListMouseDownOrTap($))),this._disposables.add(this._list.onDidChangeSelection($=>this._onListSelection($))),this._disposables.add(this._list.onDidChangeFocus($=>this._onListFocus($))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration($=>{$.hasChanged(113)&&(V(),F())})),this._ctxSuggestWidgetVisible=l.Context.Visible.bindTo(O),this._ctxSuggestWidgetDetailsVisible=l.Context.DetailsVisible.bindTo(O),this._ctxSuggestWidgetMultipleSuggestions=l.Context.MultipleSuggestions.bindTo(O),this._ctxSuggestWidgetHasFocusedSuggestion=l.Context.HasFocusedSuggestion.bindTo(O),this._disposables.add(_.addStandardDisposableListener(this._details.widget.domNode,"keydown",$=>{this._onDetailsKeydown.fire($)})),this._disposables.add(this.editor.onMouseDown($=>this._onEditorMouseDown($)))}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,y.createCancelablePromise)(A=>we(this,void 0,void 0,function*(){const N=(0,y.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),P=A.onCancellationRequested(()=>N.dispose()),x=yield O.resolve(A);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(E.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,y.disposableTimeout)(()=>this._setState(1),T)))}showSuggestions(I,T,O,R,A){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(A?[]:[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,a.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 A=_.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=A.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,$=N.itemHeight+N.statusBarHeight,M=_.getDomNodePagePosition(this.editor.getDomNode()),Q=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),ie=M.top+Q.top+Q.height,re=Math.min(A.height-ie-N.verticalPadding,V),ne=M.top+Q.top-N.verticalPadding,se=Math.min(ne,V);let H=Math.min(Math.max(se,re)+N.borderHeight,V);P===((T=this._cappedHeight)===null||T===void 0?void 0:T.capped)&&(P=this._cappedHeight.wanted),P<$&&(P=$),P>H&&(P=H);const W=150;P>re||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=re),this.element.preferredSize=new _.Dimension(B,N.defaultSize.height),this.element.maxSize=new _.Dimension(F,H),this.element.minSize=new _.Dimension(220,$),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:A}=this.getLayoutInfo();this._list.layout(T-A,I),this._listElement.style.height=`${T-A}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(115)||I.lineHeight,8,1e3),O=!this.editor.getOption(113).showStatusBar||this._state===2||this._state===1?0:T,R=this._details.widget.borderWidth,A=2*R;return{itemHeight:T,statusBarHeight:O,borderWidth:R,borderHeight:A,typicalHalfwidthCharacterWidth:I.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new _.Dimension(430,O+12*T+A)}}_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=Me([fe(1,r.IStorageService),fe(2,i.IContextKeyService),fe(3,o.IThemeService),fe(4,s.IInstantiationService)],C);class L{constructor(I,T){this._widget=I,this._editor=T,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:I,width:T}=this._widget.element.size,{borderWidth: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=L}),define(X[349],ee([1,0,46,38,31,680,33,24,447]),function(K,e,_,k,y,E,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},E.localize(0,null),!0);(0,w.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},E.localize(1,null),!0),(0,w.registerColor)("editor.wordHighlightTextBackground",{light:S,dark:S,hcDark:S,hcLight:S},E.localize(2,null),!0);const g=(0,w.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:w.activeContrastBorder,hcLight:w.activeContrastBorder},E.localize(3,null));(0,w.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:w.activeContrastBorder,hcLight:w.activeContrastBorder},E.localize(4,null)),(0,w.registerColor)("editor.wordHighlightTextBorder",{light:g,dark:g,hcDark:g,hcLight:g},E.localize(5,null));const p=(0,w.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},E.localize(6,null),!0),n=(0,w.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},E.localize(7,null),!0),t=(0,w.registerColor)("editorOverviewRuler.wordHighlightTextForeground",{dark:w.overviewRulerSelectionHighlightForeground,light:w.overviewRulerSelectionHighlightForeground,hcDark:w.overviewRulerSelectionHighlightForeground,hcLight:w.overviewRulerSelectionHighlightForeground},E.localize(8,null),!0),i=k.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,b.themeColorFromId)(n),position:_.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:_.MinimapPosition.Inline}}),s=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)(p),position:_.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:_.MinimapPosition.Inline}});function o(l){return l===y.DocumentHighlightKind.Write?i:l===y.DocumentHighlightKind.Text?s:h}e.getHighlightDecorationOptions=o;function c(l){return l?d:r}e.getSelectionHighlightDecorationOptions=c,(0,b.registerThemingParticipant)((l,a)=>{const u=l.getColor(w.editorSelectionHighlight);u&&a.addRule(`.monaco-editor .selectionHighlight { background-color: ${u.transparent(.5)}; }`)})}),define(X[861],ee([1,0,49,13,59,2,15,195,5,23,22,346,656,29,14,19,349,8]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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($,M){const Q=M.filter(ie=>!$.find(re=>re.equals(ie)));if(Q.length>=1){const ie=Q.map(ne=>`line ${ne.viewState.position.lineNumber} column ${ne.viewState.position.column}`).join(", "),re=Q.length===1?t.localize(0,null,ie):t.localize(1,null,ie);(0,_.status)(re)}}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:p.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(M,Q,ie){if(!Q.hasModel())return;let re=!0;ie&&ie.logicalLine===!1&&(re=!1);const ne=Q._getViewModel();if(ne.cursorConfig.readOnly)return;ne.model.pushStackElement();const se=ne.getCursorStates();ne.setCursorStates(ie.source,3,b.CursorMoveCommands.addCursorUp(ne,se,re)),ne.revealTopMostCursor(ie.source),o(se,ne.getCursorStates())}}e.InsertCursorAbove=c;class l extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:t.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:p.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(M,Q,ie){if(!Q.hasModel())return;let re=!0;ie&&ie.logicalLine===!1&&(re=!1);const ne=Q._getViewModel();if(ne.cursorConfig.readOnly)return;ne.model.pushStackElement();const se=ne.getCursorStates();ne.setCursorStates(ie.source,3,b.CursorMoveCommands.addCursorDown(ne,se,re)),ne.revealBottomMostCursor(ie.source),o(se,ne.getCursorStates())}}e.InsertCursorBelow=l;class a 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:p.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(7,null),order:4}})}getCursorsForSelection(M,Q,ie){if(!M.isEmpty()){for(let re=M.startLineNumber;re<M.endLineNumber;re++){const ne=Q.getLineMaxColumn(re);ie.push(new g.Selection(re,ne,re,ne))}M.endColumn>1&&ie.push(new g.Selection(M.endLineNumber,M.endColumn,M.endLineNumber,M.endColumn))}}run(M,Q){if(!Q.hasModel())return;const ie=Q.getModel(),re=Q.getSelections(),ne=Q._getViewModel(),se=ne.getCursorStates(),H=[];re.forEach(W=>this.getCursorsForSelection(W,ie,H)),H.length>0&&Q.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(M,Q){if(!Q.hasModel())return;const ie=Q.getSelections(),re=Q.getModel().getLineCount(),ne=[];for(let W=ie[0].startLineNumber;W<=re;W++)ne.push(new g.Selection(W,ie[0].startColumn,W,ie[0].endColumn));const se=Q._getViewModel(),H=se.getCursorStates();ne.length>0&&Q.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(M,Q){if(!Q.hasModel())return;const ie=Q.getSelections(),re=[];for(let H=ie[0].startLineNumber;H>=1;H--)re.push(new g.Selection(H,ie[0].startColumn,H,ie[0].endColumn));const ne=Q._getViewModel(),se=ne.getCursorStates();re.length>0&&Q.setSelections(re),o(se,ne.getCursorStates())}}class f{constructor(M,Q,ie){this.selections=M,this.revealRange=Q,this.revealScrollType=ie}}e.MultiCursorSessionResult=f;class m{static create(M,Q){if(!M.hasModel())return null;const ie=Q.getState();if(!M.hasTextFocus()&&ie.isRevealed&&ie.searchString.length>0)return new m(M,Q,!1,ie.searchString,ie.wholeWord,ie.matchCase,null);let re=!1,ne,se;const H=M.getSelections();H.length===1&&H[0].isEmpty()?(re=!0,ne=!0,se=!0):(ne=ie.wholeWord,se=ie.matchCase);const W=M.getSelection();let q,Z=null;if(W.isEmpty()){const Y=M.getConfiguredWordAtPosition(W.getStartPosition());if(!Y)return null;q=Y.word,Z=new g.Selection(W.startLineNumber,Y.startColumn,W.startLineNumber,Y.endColumn)}else q=M.getModel().getValueInRange(W).replace(/\r\n/g,`
- `);return new m(M,Q,re,q,ne,se,Z)}constructor(M,Q,ie,re,ne,se,H){this._editor=M,this.findController=Q,this.isDisconnectedFromFindController=ie,this.searchText=re,this.wholeWord=ne,this.matchCase=se,this.currentMatch=H}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const M=this._getNextMatch();if(!M)return null;const Q=this._editor.getSelections();return new f(Q.concat(M),M,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const M=this._getNextMatch();if(!M)return null;const Q=this._editor.getSelections();return new f(Q.slice(0,Q.length-1).concat(M),M,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const re=this.currentMatch;return this.currentMatch=null,re}this.findController.highlightFindOptions();const M=this._editor.getSelections(),Q=M[M.length-1],ie=this._editor.getModel().findNextMatch(this.searchText,Q.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(125):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 M=this._getPreviousMatch();if(!M)return null;const Q=this._editor.getSelections();return new f(Q.concat(M),M,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const M=this._getPreviousMatch();if(!M)return null;const Q=this._editor.getSelections();return new f(Q.slice(0,Q.length-1).concat(M),M,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const re=this.currentMatch;return this.currentMatch=null,re}this.findController.highlightFindOptions();const M=this._editor.getSelections(),Q=M[M.length-1],ie=this._editor.getModel().findPreviousMatch(this.searchText,Q.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1);return ie?new g.Selection(ie.range.startLineNumber,ie.range.startColumn,ie.range.endLineNumber,ie.range.endColumn):null}selectAll(M){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const Q=this._editor.getModel();return M?Q.findMatches(this.searchText,M,!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1,1073741824):Q.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1,1073741824)}}e.MultiCursorSession=m;class C extends E.Disposable{static get(M){return M.getContribution(C.ID)}constructor(M){super(),this._sessionDispose=this._register(new E.DisposableStore),this._editor=M,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(M){if(!this._session){const Q=m.create(this._editor,M);if(!Q)return;this._session=Q;const ie={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(ie.wholeWordOverride=1,ie.matchCaseOverride=1,ie.isRegexOverride=2),M.getState().change(ie,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(re=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(M.getState().onFindReplaceStateChange(re=>{(re.matchCase||re.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const M={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(M,!1)}this._session=null}_setSelections(M){this._ignoreSelectionChange=!0,this._editor.setSelections(M),this._ignoreSelectionChange=!1}_expandEmptyToWord(M,Q){if(!Q.isEmpty())return Q;const ie=this._editor.getConfiguredWordAtPosition(Q.getStartPosition());return ie?new g.Selection(Q.startLineNumber,ie.startColumn,Q.startLineNumber,ie.endColumn):Q}_applySessionResult(M){M&&(this._setSelections(M.selections),M.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(M.revealRange,M.revealScrollType))}getSession(M){return this._session}addSelectionToNextFindMatch(M){if(this._editor.hasModel()){if(!this._session){const Q=this._editor.getSelections();if(Q.length>1){const re=M.getState().matchCase;if(!x(this._editor.getModel(),Q,re)){const se=this._editor.getModel(),H=[];for(let W=0,q=Q.length;W<q;W++)H[W]=this._expandEmptyToWord(se,Q[W]);this._editor.setSelections(H);return}}}this._beginSessionIfNeeded(M),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(M){this._beginSessionIfNeeded(M),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(M){this._beginSessionIfNeeded(M),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(M){this._beginSessionIfNeeded(M),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(M){if(!this._editor.hasModel())return;let Q=null;const ie=M.getState();if(ie.isRevealed&&ie.searchString.length>0&&ie.isRegex){const re=this._editor.getModel();ie.searchScope?Q=re.findMatches(ie.searchString,ie.searchScope,ie.isRegex,ie.matchCase,ie.wholeWord?this._editor.getOption(125):null,!1,1073741824):Q=re.findMatches(ie.searchString,!0,ie.isRegex,ie.matchCase,ie.wholeWord?this._editor.getOption(125):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(M),!this._session)return;Q=this._session.selectAll(ie.searchScope)}if(Q.length>0){const re=this._editor.getSelection();for(let ne=0,se=Q.length;ne<se;ne++){const H=Q[ne];if(H.range.intersectRanges(re)){Q[ne]=Q[0],Q[0]=H;break}}this._setSelections(Q.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 L extends w.EditorAction{run(M,Q){const ie=C.get(Q);if(!ie)return;const re=Q._getViewModel();if(re){const ne=re.getCursorStates(),se=n.CommonFindController.get(Q);if(se)this._run(ie,se);else{const H=M.get(h.IInstantiationService).createInstance(n.CommonFindController,Q);this._run(ie,H),H.dispose()}o(ne,re.getCursorStates())}}}e.MultiCursorSelectionControllerAction=L;class D extends L{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:t.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(11,null),order:5}})}_run(M,Q){M.addSelectionToNextFindMatch(Q)}}e.AddSelectionToNextFindMatchAction=D;class I extends L{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:t.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(13,null),order:6}})}_run(M,Q){M.addSelectionToPreviousFindMatch(Q)}}e.AddSelectionToPreviousFindMatchAction=I;class T extends L{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:t.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:(0,y.KeyChord)(2089,2082),weight:100}})}_run(M,Q){M.moveSelectionToNextFindMatch(Q)}}e.MoveSelectionToNextFindMatchAction=T;class O extends L{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:t.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(M,Q){M.moveSelectionToPreviousFindMatch(Q)}}e.MoveSelectionToPreviousFindMatchAction=O;class R extends L{constructor(){super({id:"editor.action.selectHighlights",label:t.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(17,null),order:7}})}_run(M,Q){M.selectAll(Q)}}e.SelectHighlightsAction=R;class A extends L{constructor(){super({id:"editor.action.changeAll",label:t.localize(18,null),alias:"Change All Occurrences",precondition:s.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(M,Q){M.selectAll(Q)}}e.CompatChangeAll=A;class N{constructor(M,Q,ie,re,ne){this._model=M,this._searchText=Q,this._matchCase=ie,this._wordSeparators=re,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(M=>M.range),this._cachedFindMatches.sort(S.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let P=e.SelectionHighlighter=class en extends E.Disposable{constructor(M,Q){super(),this._languageFeaturesService=Q,this.editor=M,this._isEnabled=M.getOption(103),this._decorations=M.createDecorationsCollection(),this.updateSoon=this._register(new k.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(M.onDidChangeConfiguration(re=>{this._isEnabled=M.getOption(103)})),this._register(M.onDidChangeCursorSelection(re=>{this._isEnabled&&(re.selection.isEmpty()?re.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(M.onDidChangeModel(re=>{this._setState(null)})),this._register(M.onDidChangeModelContent(re=>{this._isEnabled&&this.updateSoon.schedule()}));const ie=n.CommonFindController.get(M);ie&&this._register(ie.getState().onFindReplaceStateChange(re=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(en._createState(this.state,this._isEnabled,this.editor))}static _createState(M,Q,ie){if(!Q||!ie.hasModel())return null;const re=ie.getSelection();if(re.startLineNumber!==re.endLineNumber)return null;const ne=C.get(ie);if(!ne)return null;const se=n.CommonFindController.get(ie);if(!se)return null;let H=ne.getSession(se);if(!H){const Z=ie.getSelections();if(Z.length>1){const oe=se.getState().matchCase;if(!x(ie.getModel(),Z,oe))return null}H=m.create(ie,se)}if(!H||H.currentMatch||/^[ \t]+$/.test(H.searchText)||H.searchText.length>200)return null;const W=se.getState(),q=W.matchCase;if(W.isRevealed){let Z=W.searchString;q||(Z=Z.toLowerCase());let Y=H.searchText;if(q||(Y=Y.toLowerCase()),Z===Y&&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(125):null,M)}_setState(M){if(this.state=M,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const Q=this.editor.getModel();if(Q.isTooLargeForTokenization())return;const ie=this.state.findMatches(),re=this.editor.getSelections();re.sort(S.Range.compareRangesUsingStarts);const ne=[];for(let W=0,q=0,Z=ie.length,Y=re.length;W<Z;){const oe=ie[W];if(q>=Y)ne.push(oe),W++;else{const ce=S.Range.compareRangesUsingStarts(oe,re[q]);ce<0?((re[q].isEmpty()||!S.Range.areIntersecting(oe,re[q]))&&ne.push(oe),W++):(ce>0||W++,q++)}}const se=this._languageFeaturesService.documentHighlightProvider.has(Q)&&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=Me([fe(1,r.ILanguageFeaturesService)],P);function x($,M,Q){const ie=F($,M[0],!Q);for(let re=1,ne=M.length;re<ne;re++){const se=M[re];if(se.isEmpty())return!1;const H=F($,se,!Q);if(ie!==H)return!1}return!0}function F($,M,Q){const ie=$.getValueInRange(M);return Q?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(M,Q,ie){if(!Q.hasModel())return;const re=Q._getViewModel();if(re.cursorConfig.readOnly)return;re.model.pushStackElement();const ne=Array.from(re.getCursorStates()),se=ne.shift();se&&(ne.push(se),re.setCursorStates(ie.source,3,ne),re.revealPrimaryCursor(ie.source,!0),o(ne,re.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(M,Q,ie){if(!Q.hasModel())return;const re=Q._getViewModel();if(re.cursorConfig.readOnly)return;re.model.pushStackElement();const ne=Array.from(re.getCursorStates()),se=ne.pop();se&&(ne.unshift(se),re.setCursorStates(ie.source,3,ne),re.revealPrimaryCursor(ie.source,!0),o(ne,re.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)(l),(0,w.registerEditorAction)(a),(0,w.registerEditorAction)(D),(0,w.registerEditorAction)(I),(0,w.registerEditorAction)(T),(0,w.registerEditorAction)(O),(0,w.registerEditorAction)(R),(0,w.registerEditorAction)(A),(0,w.registerEditorAction)(u),(0,w.registerEditorAction)(v),(0,w.registerEditorAction)(B),(0,w.registerEditorAction)(V)}),define(X[862],ee([1,0,49,16,13,21,11,2,15,5,22,31,681,14,19,349]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordHighlighterContribution=e.getOccurrencesAtPosition=void 0;const d=new i.RawContextKey("hasWordHighlights",!1);function h(D,I,T,O){const R=D.ordered(I);return(0,y.first)(R.map(A=>()=>Promise.resolve(A.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,y.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,A=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<=A&&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(A=>A||[])}}class l extends o{constructor(I,T,O){super(I,T,O),this._selectionIsEmpty=T.isEmpty()}_compute(I,T,O,R){return(0,y.timeout)(250,R).then(()=>{if(!T.isEmpty())return[];const A=I.getWordAtPosition(T.getPosition());return!A||A.word.length>1e3?[]:I.findMatches(A.word,!0,!1,!0,O,!1).map(P=>({range:P.range,kind:n.DocumentHighlightKind.Text}))})}isValid(I,T,O){const R=T.isEmpty();return this._selectionIsEmpty!==R?!1:super.isValid(I,T,O)}}function a(D,I,T,O){return D.has(I)?new c(I,T,O,D):new l(I,T,O)}(0,S.registerModelAndPositionCommand)("_executeDocumentHighlights",(D,I,T)=>{const O=D.get(s.ILanguageFeaturesService);return h(O.documentHighlightProvider,I,T,E.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 A=this.editor.getOption(78);this.occurrencesHighlight!==A&&(this.occurrencesHighlight=A,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(A=>A.containsPosition(this.editor.getPosition()))+1)%I.length,R=I[O];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(R.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(R);const A=this._getWord();if(A){const N=this.editor.getModel().getLineContent(R.startLineNumber);(0,_.alert)(`${N}, ${O+1} of ${I.length} for '${A.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const I=this._getSortedHighlights(),O=(I.findIndex(A=>A.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 A=this._getWord();if(A){const N=this.editor.getModel().getLineContent(R.startLineNumber);(0,_.alert)(`${N}, ${O+1} of ${I.length} for '${A.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 A=this.workerRequest&&this.workerRequest.isValid(this.model,I,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),A)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=a(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(125)),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 tn extends b.Disposable{static get(I){return I.getContribution(tn.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(A=>{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=Me([fe(1,i.IContextKeyService),fe(2,s.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 m 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:p.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:p.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class L extends S.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:t.localize(2,null),alias:"Trigger Symbol Highlight",precondition:d.toNegated(),kbOpts:{kbExpr:p.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)(m),(0,S.registerEditorAction)(C),(0,S.registerEditorAction)(L)}),define(X[863],ee([1,0,7,145,37,158,2,45,5,38,448]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=void 0;const p=new y.Color(new y.RGBA(0,122,204)),n={showArrow:!0,showFrame:!0,className:"",frameColor:p,arrowColor:p,keepEditorSelection:!1},t="vs.editor.contrib.zoneWidget";class i{constructor(o,c,l,a,u,v,f,m){this.id="",this.domNode=o,this.afterLineNumber=c,this.afterColumn=l,this.heightInLines=a,this.showInHiddenAreas=f,this.ordinal=m,this._onDomNodeTop=u,this._onComputedHeight=v}onDomNodeTop(o){this._onDomNodeTop(o)}onComputedHeight(o){this._onComputedHeight(o)}}class s{constructor(o,c){this._id=o,this._domNode=c}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=s;class r{constructor(o){this._editor=o,this._ruleName=r._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),_.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 E.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,n,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(l=>{const a=this._getWidth(l);this.domNode.style.width=a+"px",this.domNode.style.left=this._getLeft(l)+"px",this._onWidth(a)}))}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 l=o-this._decoratingElementsHeight();this.container.style.height=`${l}px`;const a=this.editor.getLayoutInfo();this._doLayout(l,this._getWidth(a))}(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 l=S.Range.isIRange(o)?S.Range.lift(o):S.Range.fromPositions(o);this._isShowing=!0,this._showImpl(l,c),this._isShowing=!1,this._positionMarkerId.set([{range:l,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()}_decoratingElementsHeight(){const o=this.editor.getOption(64);let c=0;if(this.options.showArrow){const l=Math.round(o/3);c+=2*l}if(this.options.showFrame){const l=Math.round(o/9);c+=2*l}return c}_showImpl(o,c){const l=o.getStartPosition(),a=this.editor.getLayoutInfo(),u=this._getWidth(a);this.domNode.style.width=`${u}px`,this.domNode.style.left=this._getLeft(a)+"px";const v=document.createElement("div");v.style.overflow="hidden";const f=this.editor.getOption(64),m=Math.max(12,this.editor.getLayoutInfo().height/f*.8);c=Math.min(c,m);let C=0,L=0;if(this._arrow&&this.options.showArrow&&(C=Math.round(f/3),this._arrow.height=C,this._arrow.show(l)),this.options.showFrame&&(L=Math.round(f/9)),this.editor.changeViewZones(T=>{this._viewZone&&T.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new i(v,l.lineNumber,l.column,c,O=>this._onViewZoneTop(O),O=>this._onViewZoneHeight(O),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=T.addZone(this._viewZone),this._overlayWidget=new s(t+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const T=this.options.frameWidth?this.options.frameWidth:L;this.container.style.borderTopWidth=T+"px",this.container.style.borderBottomWidth=T+"px"}const D=c*f-this._decoratingElementsHeight();this.container&&(this.container.style.top=C+"px",this.container.style.height=D+"px",this.container.style.overflow="hidden"),this._doLayout(D,u),this.options.keepEditorSelection||this.editor.setSelection(o);const I=this.editor.getModel();if(I){const T=I.validateRange(new S.Range(o.startLineNumber,1,o.endLineNumber+1,1));this.revealRange(T,T.endLineNumber===I.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 l=(c.currentY-o.startY)/this.editor.getOption(64),a=l<0?Math.ceil(l):Math.floor(l),u=o.heightInLines+a;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(X[129],ee([1,0,7,69,40,27,30,37,6,45,15,32,157,863,659,156,14,50,8,33,439]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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(m,C){const L=this._widgets.get(m);L&&(L.listener.dispose(),L.widget.dispose());const D=()=>{const I=this._widgets.get(m);I&&I.widget===C&&(I.listener.dispose(),this._widgets.delete(m))};this._widgets.set(m,{widget:C,listener:C.onDidClose(D)})}},1);var l;(function(m){m.inPeekEditor=new d.RawContextKey("inReferenceSearchEditor",!0,s.localize(0,null)),m.notInPeekEditor=m.inPeekEditor.toNegated()})(l||(e.PeekContext=l={}));let a=class{constructor(C,L){C instanceof t.EmbeddedCodeEditorWidget&&l.inPeekEditor.bindTo(L)}dispose(){}};a.ID="editor.contrib.referenceController",a=Me([fe(1,d.IContextKeyService)],a),(0,p.registerEditorContribution)(a.ID,a,0);function u(m){const C=m.get(n.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,L,D){super(C,L),this.instantiationService=D,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 L=this.options;C.headerBackgroundColor&&(L.headerBackgroundColor=C.headerBackgroundColor),C.primaryHeadingColor&&(L.primaryHeadingColor=C.primaryHeadingColor),C.secondaryHeadingColor&&(L.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,L){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 D=_.$(".peekview-actions");_.append(this._headElement,D);const I=this._getActionBarOptions();this._actionbarWidget=new k.ActionBar(D,I),this._disposables.add(this._actionbarWidget),L||this._actionbarWidget.push(new y.Action("peekview.close",s.localize(1,null),w.ThemeIcon.asClassName(E.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,L){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=C,this._primaryHeading.setAttribute("title",C),L?this._secondaryHeading.innerText=L:_.clearNode(this._secondaryHeading))}setMetaTitle(C){this._metaHeading&&(C?(this._metaHeading.innerText=C,_.show(this._metaHeading)):_.hide(this._metaHeading))}_doLayout(C,L){if(!this._isShowing&&C<0){this.dispose();return}const D=Math.ceil(this.editor.getOption(64)*1.2),I=Math.round(C-(D+2));this._doLayoutHead(D,L),this._doLayoutBody(I,L)}_doLayoutHead(C,L){this._headElement&&(this._headElement.style.height=`${C}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(C,L){this._bodyElement&&(this._bodyElement.style.height=`${C}px`)}};e.PeekViewWidget=f=Me([fe(2,o.IInstantiationService)],f),e.peekViewTitleBackground=(0,c.registerColor)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:b.Color.black,hcLight:b.Color.white},s.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},s.localize(3,null)),e.peekViewTitleInfoForeground=(0,c.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},s.localize(4,null)),e.peekViewBorder=(0,c.registerColor)("peekView.border",{dark:c.editorInfoForeground,light:c.editorInfoForeground,hcDark:c.contrastBorder,hcLight:c.contrastBorder},s.localize(5,null)),e.peekViewResultsBackground=(0,c.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:b.Color.black,hcLight:b.Color.white},s.localize(6,null)),e.peekViewResultsMatchForeground=(0,c.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:b.Color.white,hcLight:c.editorForeground},s.localize(7,null)),e.peekViewResultsFileForeground=(0,c.registerColor)("peekViewResult.fileForeground",{dark:b.Color.white,light:"#1E1E1E",hcDark:b.Color.white,hcLight:c.editorForeground},s.localize(8,null)),e.peekViewResultsSelectionBackground=(0,c.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},s.localize(9,null)),e.peekViewResultsSelectionForeground=(0,c.registerColor)("peekViewResult.selectionForeground",{dark:b.Color.white,light:"#6C6C6C",hcDark:b.Color.white,hcLight:c.editorForeground},s.localize(10,null)),e.peekViewEditorBackground=(0,c.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:b.Color.black,hcLight:b.Color.white},s.localize(11,null)),e.peekViewEditorGutterBackground=(0,c.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},s.localize(12,null)),e.peekViewEditorStickyScrollBackground=(0,c.registerColor)("peekViewEditorStickyScroll.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},s.localize(13,null)),e.peekViewResultsMatchHighlight=(0,c.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},s.localize(14,null)),e.peekViewEditorMatchHighlight=(0,c.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},s.localize(15,null)),e.peekViewEditorMatchHighlightBorder=(0,c.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:c.activeContrastBorder,hcLight:c.activeContrastBorder},s.localize(16,null))}),define(X[864],ee([1,0,7,78,16,37,6,2,42,9,5,129,633,156,29,14,8,153,90,52,757,33,24,426]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class v{constructor(x,F,B,V,$){this._openerService=V,this._labelService=$,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new b.DisposableStore,this._editor=F;const M=document.createElement("div");M.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),M.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),M.appendChild(this._relatedBlock),this._disposables.add(_.addStandardDisposableListener(this._relatedBlock,"click",Q=>{Q.preventDefault();const ie=this._relatedDiagnostics.get(Q.target);ie&&B(ie)})),this._scrollable=new k.ScrollableElement(M,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),x.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(Q=>{M.style.left=`-${Q.scrollLeft}px`,M.style.top=`-${Q.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,b.dispose)(this._disposables)}update(x){const{source:F,message:B,relatedInformation:V,code:$}=x;let M=(F?.length||0)+2;$&&(typeof $=="string"?M+=$.length:M+=$.value.length);const Q=(0,g.splitLines)(B);this._lines=Q.length,this._longestLineLength=0;for(const H of Q)this._longestLineLength=Math.max(H.length+M,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 Q)ie=document.createElement("div"),ie.innerText=H,H===""&&(ie.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(ie);if(F||$){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($)if(typeof $=="string"){const W=document.createElement("span");W.innerText=`(${$})`,W.classList.add("code"),H.appendChild(W)}else{this._codeLink=_.$("a.code-link"),this._codeLink.setAttribute("href",`${$.target.toString()}`),this._codeLink.onclick=q=>{this._openerService.open($.target,{allowCommands:!0}),q.preventDefault(),q.stopPropagation()};const W=_.append(this._codeLink,_.$("span"));W.innerText=$.value,H.appendChild(this._codeLink)}}if(_.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,y.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 q=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 Y=document.createElement("span");Y.innerText=W.message,q.appendChild(Z),q.appendChild(Y),this._lines+=1,H.appendChild(q)}}const re=this._editor.getOption(48),ne=Math.ceil(re.typicalFullwidthCharacterWidth*this._longestLineLength*.75),se=re.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 nn extends n.PeekViewWidget{constructor(x,F,B,V,$,M,Q){super(x,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},$),this._themeService=F,this._openerService=B,this._menuService=V,this._contextKeyService=M,this._labelService=Q,this._callOnDispose=new b.DisposableStore,this._onDidSelectRelatedInformation=new w.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=o.MarkerSeverity.Warning,this._backgroundColor=E.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=D,B=I;this._severity===o.MarkerSeverity.Warning?(F=T,B=O):this._severity===o.MarkerSeverity.Info&&(F=R,B=A);const V=x.getColor(F),$=x.getColor(B);this.style({arrowColor:V,frameColor:V,headerBackgroundColor:$,primaryHeadingColor:x.getColor(n.peekViewTitleForeground),secondaryHeadingColor:x.getColor(n.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(nn.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=p.Range.lift(x),$=this.editor.getPosition(),M=$&&V.containsPosition($)?$:V.getStartPosition();super.show(M,this.computeRequiredHeight());const Q=this.editor.getModel();if(Q){const ie=B>1?t.localize(5,null,F,B):t.localize(6,null,F,B);this.setTitle((0,S.basename)(Q.uri),ie)}this._icon.className=`codicon ${l.SeverityIcon.className(o.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(M,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 s.MenuId("gotoErrorTitleMenu"),e.MarkerNavigationWidget=f=Me([fe(1,u.IThemeService),fe(2,c.IOpenerService),fe(3,s.IMenuService),fe(4,d.IInstantiationService),fe(5,r.IContextKeyService),fe(6,h.ILabelService)],f);const m=(0,a.oneOf)(a.editorErrorForeground,a.editorErrorBorder),C=(0,a.oneOf)(a.editorWarningForeground,a.editorWarningBorder),L=(0,a.oneOf)(a.editorInfoForeground,a.editorInfoBorder),D=(0,a.registerColor)("editorMarkerNavigationError.background",{dark:m,light:m,hcDark:a.contrastBorder,hcLight:a.contrastBorder},t.localize(7,null)),I=(0,a.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,a.transparent)(D,.1),light:(0,a.transparent)(D,.1),hcDark:null,hcLight:null},t.localize(8,null)),T=(0,a.registerColor)("editorMarkerNavigationWarning.background",{dark:C,light:C,hcDark:a.contrastBorder,hcLight:a.contrastBorder},t.localize(9,null)),O=(0,a.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,a.transparent)(T,.1),light:(0,a.transparent)(T,.1),hcDark:"#0C141F",hcLight:(0,a.transparent)(T,.2)},t.localize(10,null)),R=(0,a.registerColor)("editorMarkerNavigationInfo.background",{dark:L,light:L,hcDark:a.contrastBorder,hcLight:a.contrastBorder},t.localize(11,null)),A=(0,a.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,a.transparent)(R,.1),light:(0,a.transparent)(R,.1),hcDark:null,hcLight:null},t.localize(12,null)),N=(0,a.registerColor)("editorMarkerNavigation.background",{dark:a.editorBackground,light:a.editorBackground,hcDark:a.editorBackground,hcLight:a.editorBackground},t.localize(13,null))}),define(X[350],ee([1,0,27,2,15,32,12,5,22,735,632,29,14,8,73,864]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let d=e.MarkerController=class Xt{static get(m){return m.getContribution(Xt.ID)}constructor(m,C,L,D,I){this._markerNavigationService=C,this._contextKeyService=L,this._editorService=D,this._instantiationService=I,this._sessionDispoables=new k.DisposableStore,this._editor=m,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(m){if(this._model&&this._model.matches(m))return this._model;let C=!1;return this._model&&(C=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(m),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(L=>{var D,I,T;(!(!((D=this._model)===null||D===void 0)&&D.selected)||!b.Range.containsPosition((I=this._model)===null||I===void 0?void 0:I.selected.marker,L.position))&&((T=this._model)===null||T===void 0||T.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const L=this._model.find(this._editor.getModel().uri,this._widget.position);L?this._widget.updateMarker(L.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(L=>{this._editorService.openCodeEditor({resource:L.resource,options:{pinned:!0,revealIfOpened:!0,selection:b.Range.lift(L).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(m=!0){this._cleanUp(),m&&this._editor.focus()}showAtMarker(m){if(this._editor.hasModel()){const C=this._getOrCreateModel(this._editor.getModel().uri);C.resetIndex(),C.move(!0,this._editor.getModel(),new w.Position(m.startLineNumber,m.startColumn)),C.selected&&this._widget.showAtMarker(C.selected.marker,C.selected.index,C.selected.total)}}nagivate(m,C){var L,D;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(m,this._editor.getModel(),this._editor.getPosition()),!I.selected)return;if(I.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const T=yield this._editorService.openCodeEditor({resource:I.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:I.selected.marker}},this._editor);T&&((L=Xt.get(T))===null||L===void 0||L.close(),(D=Xt.get(T))===null||D===void 0||D.nagivate(m,C))}else this._widget.showAtMarker(I.selected.marker,I.selected.index,I.selected.total)}})}};d.ID="editor.contrib.markerController",e.MarkerController=d=Me([fe(1,g.IMarkerNavigationService),fe(2,t.IContextKeyService),fe(3,E.ICodeEditorService),fe(4,i.IInstantiationService)],d);class h extends y.EditorAction{constructor(m,C,L){super(L),this._next=m,this._multiFile=C}run(m,C){var L;return we(this,void 0,void 0,function*(){C.hasModel()&&((L=d.get(C))===null||L===void 0||L.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,s.registerIcon)("marker-navigation-next",_.Codicon.arrowDown,p.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=o,o.ID="editor.action.marker.next",o.LABEL=p.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,s.registerIcon)("marker-navigation-previous",_.Codicon.arrowUp,p.localize(3,null)),group:"navigation",order:2}})}}c.ID="editor.action.marker.prev",c.LABEL=p.localize(2,null);class l extends h{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:p.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:n.MenuId.MenubarGoMenu,title:p.localize(5,null),group:"6_problem_nav",order:1}})}}class a extends h{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:p.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:n.MenuId.MenubarGoMenu,title:p.localize(7,null),group:"6_problem_nav",order:2}})}}(0,y.registerEditorContribution)(d.ID,d,4),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(c),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(a);const u=new t.RawContextKey("markersNavigationVisible",!1),v=y.EditorCommand.bindToContribution(d.get);(0,y.registerEditorCommand)(new v({id:"closeMarkersNavigation",precondition:u,handler:f=>f.close(),kbOpts:{weight:100+50,kbExpr:S.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(X[865],ee([1,0,7,296,37,6,2,48,42,157,5,38,28,71,39,62,794,129,638,8,34,153,185,24,186,150,428]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m){"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=[],A=[];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}),A.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[A[x]])})}_onDecorationChanged(){const O=[],R=this._editor.getModel();if(R){for(const[A,N]of this._decorations){const P=R.getDecorationRange(A);if(!P)continue;let x=!1;if(!p.Range.equalsRange(P,N.range)){if(p.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(A)):N.range=P}}for(let A=0,N=O.length;A<N;A++)this._decorations.delete(O[A]);this._editor.removeDecorations(O)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}C.DecorationOptions=n.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class L{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(O){let R,A;try{const N=JSON.parse(O);R=N.ratio,A=N.heightInLines}catch{}return{ratio:R||.7,heightInLines:A||18}}}e.LayoutData=L;class D extends u.WorkbenchAsyncDataTree{}let I=e.ReferenceWidget=class extends h.PeekViewWidget{constructor(O,R,A,N,P,x,F,B,V,$,M,Q){super(O,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},x),this._defaultTreeKeyboardSupport=R,this.layoutData=A,this._textModelResolverService=P,this._instantiationService=x,this._peekViewService=F,this._uriLabel=B,this._undoRedoService=V,this._keybindingService=$,this._languageService=M,this._languageConfigurationService=Q,this._disposeOnNewModel=new w.DisposableStore,this._callOnDispose=new w.DisposableStore,this._onDidSelectReference=new E.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)||y.Color.transparent;this.style({arrowColor:R,frameColor:R,headerBackgroundColor:O.getColor(h.peekViewTitleBackground)||y.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 n.TextModel(o.localize(0,null),i.PLAINTEXT_LANGUAGE_ID,n.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=_.append(O,_.$("div.ref-tree.inline"));const A={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(D,"ReferencesWidget",this._treeContainer,new d.Delegate,[this._instantiationService.createInstance(d.FileReferencesRenderer),this._instantiationService.createInstance(d.OneReferenceRenderer)],this._instantiationService.createInstance(d.DataSource),A),this._splitView.addView({onDidChange:E.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:E.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 m.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:A}=O;if(R.detail!==2)return;const N=this._getFocusedReference();N&&this._onDidSelectReference.fire({element:{uri:N.uri,range:A.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 m.OneReference)return O;if(O instanceof m.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 A=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 A;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=p.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=Me([fe(3,v.IThemeService),fe(4,r.ITextModelService),fe(5,c.IInstantiationService),fe(6,h.IPeekViewService),fe(7,a.ILabelService),fe(8,f.IUndoRedoService),fe(9,l.IKeybindingService),fe(10,s.ILanguageService),fe(11,t.ILanguageConfigurationService)],I)}),define(X[351],ee([1,0,13,11,59,2,32,12,5,129,636,25,26,14,8,112,185,43,84,150,865]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new i.RawContextKey("referenceSearchVisible",!1,p.localize(0,null));let a=e.ReferencesController=class vi{static get(f){return f.getContribution(vi.ID)}constructor(f,m,C,L,D,I,T,O){this._defaultTreeKeyboardSupport=f,this._editor=m,this._editorService=L,this._notificationService=D,this._instantiationService=I,this._storageService=T,this._configurationService=O,this._disposables=new E.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(C)}dispose(){var f,m;this._referenceSearchVisible.reset(),this._disposables.dispose(),(f=this._widget)===null||f===void 0||f.dispose(),(m=this._model)===null||m===void 0||m.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(f,m,C){let L;if(this._widget&&(L=this._widget.position),this.closeWidget(),L&&f.containsPosition(L))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 D="peekViewLayout",I=l.LayoutData.fromJSON(this._storageService.get(D,0,"{}"));this._widget=this._instantiationService.createInstance(l.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,I),this._widget.setTitle(p.localize(1,null)),this._widget.show(f),this._disposables.add(this._widget.onDidClose(()=>{m.cancel(),this._widget&&(this._storageService.store(D,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(O=>{const{element:R,kind:A}=O;if(R)switch(A){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;m.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(p.localize(2,null,this._model.title,this._model.references.length));const A=this._editor.getModel().uri,N=new b.Position(f.startLineNumber,f.startColumn),P=this._model.nearestReference(A,N);if(P)return this._widget.setSelection(P).then(()=>{this._widget&&this._editor.getOption(83)==="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 m=this._widget.position;if(!m)return;const C=this._model.nearestReference(this._editor.getModel().uri,m);if(!C)return;const L=this._model.nextOrPreviousReference(C,f),D=this._editor.hasTextFocus(),I=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(L),yield this._gotoReference(L,!1),D?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 m,C;(m=this._widget)===null||m===void 0||m.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,m){var C;(C=this._widget)===null||C===void 0||C.hide(),this._ignoreModelChangeEvent=!0;const L=S.Range.lift(f.range).collapseToStart();return this._editorService.openCodeEditor({resource:f.uri,options:{selection:L,selectionSource:"code.jump",pinned:m}},this._editor).then(D=>{var I;if(this._ignoreModelChangeEvent=!1,!D||!this._widget){this.closeWidget();return}if(this._editor===D)this._widget.show(L),this._widget.focusOnReferenceTree();else{const T=vi.get(D),O=this._model.clone();this.closeWidget(),D.focus(),T?.toggleWidget(L,(0,_.createCancelablePromise)(R=>Promise.resolve(O)),(I=this._peekMode)!==null&&I!==void 0?I:!1)}},D=>{this._ignoreModelChangeEvent=!1,(0,k.onUnexpectedError)(D)})}openReference(f,m,C){m||this.closeWidget();const{uri:L,range:D}=f;this._editorService.openCodeEditor({resource:L,options:{selection:D,selectionSource:"code.jump",pinned:C}},this._editor,m)}};a.ID="editor.contrib.referencesController",e.ReferencesController=a=Me([fe(2,i.IContextKeyService),fe(3,w.ICodeEditorService),fe(4,h.INotificationService),fe(5,s.IInstantiationService),fe(6,o.IStorageService),fe(7,t.IConfigurationService)],a);function u(v,f){const m=(0,g.getOuterEditor)(v);if(!m)return;const C=a.get(m);C&&f(C)}r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,y.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)})}}),n.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),n.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),n.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),n.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,L=>L.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,L=>L.openReference(C[0],!0,!0))}}),n.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,L=>L.openReference(C[0],!1,!0))})}),define(X[244],ee([1,0,47,49,13,59,17,18,20,98,172,15,32,157,12,5,22,31,351,150,773,154,129,634,29,25,14,8,43,83,237,19,53]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R){"use strict";var A,N,P,x,F,B,V,$;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 M{static is(Y){return!Y||typeof Y!="object"?!1:!!(Y instanceof M||s.Position.isIPosition(Y.position)&&Y.model)}constructor(Y,oe){this.model=Y,this.position=oe}}e.SymbolNavigationAnchor=M;class Q extends n.EditorAction2{static all(){return Q._allSymbolNavigationCommands.values()}static _patchConfig(Y){const oe=Object.assign(Object.assign({},Y),{f1:!0});if(oe.menu)for(const ce of R.Iterable.wrap(oe.menu))(ce.id===f.MenuId.EditorContext||ce.id===f.MenuId.EditorContextPeek)&&(ce.when=C.ContextKeyExpr.and(Y.precondition,ce.when));return oe}constructor(Y,oe){super(Q._patchConfig(oe)),this.configuration=Y,Q._allSymbolNavigationCommands.set(oe.id,this)}runEditorCommand(Y,oe,ce,ge){if(!oe.hasModel())return Promise.resolve(void 0);const le=Y.get(D.INotificationService),ue=Y.get(t.ICodeEditorService),j=Y.get(I.IEditorProgressService),z=Y.get(l.ISymbolNavigationService),U=Y.get(O.ILanguageFeaturesService),J=Y.get(L.IInstantiationService),te=oe.getModel(),G=oe.getPosition(),ae=M.is(ce)?ce:new M(te,G),me=new g.EditorStateCancellationTokenSource(oe,5),Ce=(0,y.raceCancellation)(this._getLocationModel(U,ae.model,ae.position,me.token),me.token).then(Se=>we(this,void 0,void 0,function*(){var ye;if(!Se||me.token.isCancellationRequested)return;(0,k.alert)(Se.ariaMessage);let Ee;if(Se.referenceAt(te.uri,G)){const ke=this._getAlternativeCommand(oe);!Q._activeAlternativeCommands.has(ke)&&Q._allSymbolNavigationCommands.has(ke)&&(Ee=Q._allSymbolNavigationCommands.get(ke))}const De=Se.references.length;if(De===0){if(!this.configuration.muteMessage){const ke=te.getWordAtPosition(G);(ye=a.MessageController.get(oe))===null||ye===void 0||ye.showMessage(this._getNoResultFoundMessage(ke),G)}}else if(De===1&&Ee)Q._activeAlternativeCommands.add(this.desc.id),J.invokeFunction(ke=>Ee.runEditorCommand(ke,oe,ce,ge).finally(()=>{Q._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(ue,z,oe,Se,ge)}),Se=>{le.error(Se)}).finally(()=>{me.dispose()});return j.showWhile(Ce,250),Ce}_onResult(Y,oe,ce,ge,le){return we(this,void 0,void 0,function*(){const ue=this._getGoToPreference(ce);if(!(ce instanceof i.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||ue==="peek"&&ge.references.length>1))this._openInPeek(ce,ge,le);else{const j=ge.firstReference(),z=ge.references.length>1&&ue==="gotoAndPeek",U=yield this._openReference(ce,Y,j,this.configuration.openToSide,!z);z&&U?this._openInPeek(U,ge,le):ge.dispose(),ue==="goto"&&oe.put(j)}})}_openReference(Y,oe,ce,ge,le){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 j=yield oe.openCodeEditor({resource:ce.uri,options:{selection:r.Range.collapseToStart(ue),selectionRevealType:3,selectionSource:"code.jump"}},Y,ge);if(j){if(le){const z=j.getModel(),U=j.createDecorationsCollection([{range:ue,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{j.getModel()===z&&U.clear()},350)}return j}})}_openInPeek(Y,oe,ce){const ge=o.ReferencesController.get(Y);ge&&Y.hasModel()?ge.toggleWidget(ce??Y.getSelection(),(0,y.createCancelablePromise)(le=>Promise.resolve(oe)),this.configuration.openInPeek):oe.dispose()}}e.SymbolNavigationAction=Q,Q._allSymbolNavigationCommands=new Map,Q._activeAlternativeCommands=new Set;class ie extends Q{_getLocationModel(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getDefinitionsAtPosition)(Y.definitionProvider,oe,ce,ge),v.localize(1,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?v.localize(2,null,Y.word):v.localize(3,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeDefinitionCommand}_getGoToPreference(Y){return Y.getOption(56).multipleDefinitions}}e.DefinitionAction=ie;const re=w.isWeb&&!(0,_.isStandalone)()?2118:70;(0,f.registerAction2)((A=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:re,weight:100},menu:[{id:f.MenuId.EditorContext,group:"navigation",order:1.1},{id:f.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),m.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",Ci.id)}},A.id="editor.action.revealDefinition",A)),(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,E.KeyChord)(2089,re),weight:100}}),m.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}}),m.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",_i.id)}},P.id="editor.action.peekDefinition",P));class ne extends Q{_getLocationModel(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getDeclarationsAtPosition)(Y.declarationProvider,oe,ce,ge),v.localize(8,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?v.localize(9,null,Y.word):v.localize(10,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeDeclarationCommand}_getGoToPreference(Y){return Y.getOption(56).multipleDeclarations}}(0,f.registerAction2)((x=class sn extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:sn.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(Y){return Y&&Y.word?v.localize(13,null,Y.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 Q{_getLocationModel(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getTypeDefinitionsAtPosition)(Y.typeDefinitionProvider,oe,ce,ge),v.localize(16,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?v.localize(17,null,Y.word):v.localize(18,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(Y){return Y.getOption(56).multipleTypeDefinitions}}(0,f.registerAction2)((F=class on extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:on.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 rn extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:rn.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 Q{_getLocationModel(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getImplementationsAtPosition)(Y.implementationProvider,oe,ce,ge),v.localize(22,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?v.localize(23,null,Y.word):v.localize(24,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeImplementationCommand}_getGoToPreference(Y){return Y.getOption(56).multipleImplementations}}(0,f.registerAction2)((V=class an extends H{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:an.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)(($=class ln extends H{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:ln.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}})}},$.ID="editor.action.peekImplementation",$));class W extends Q{_getNoResultFoundMessage(Y){return Y?v.localize(28,null,Y.word):v.localize(29,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeReferenceCommand}_getGoToPreference(Y){return Y.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(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getReferencesAtPosition)(Y.referenceProvider,oe,ce,!0,ge),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(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getReferencesAtPosition)(Y.referenceProvider,oe,ce,!1,ge),v.localize(34,null))})}});class q extends Q{constructor(Y,oe,ce){super(Y,{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=oe,this._gotoMultipleBehaviour=ce}_getLocationModel(Y,oe,ce,ge){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(this._references,v.localize(36,null))})}_getNoResultFoundMessage(Y){return Y&&v.localize(37,null,Y.word)||""}_getGoToPreference(Y){var oe;return(oe=this._gotoMultipleBehaviour)!==null&&oe!==void 0?oe:Y.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}m.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:s.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(Z,Y,oe,ce,ge,le,ue)=>we(void 0,void 0,void 0,function*(){(0,b.assertType)(S.URI.isUri(Y)),(0,b.assertType)(s.Position.isIPosition(oe)),(0,b.assertType)(Array.isArray(ce)),(0,b.assertType)(typeof ge>"u"||typeof ge=="string"),(0,b.assertType)(typeof ue>"u"||typeof ue=="boolean");const j=Z.get(t.ICodeEditorService),z=yield j.openCodeEditor({resource:Y},j.getFocusedCodeEditor());if((0,p.isCodeEditor)(z))return z.setPosition(oe),z.revealPositionInCenterIfOutsideViewport(oe,0),z.invokeWithinContext(U=>{const J=new class extends q{_getNoResultFoundMessage(te){return le||super._getNoResultFoundMessage(te)}}({muteMessage:!le,openInPeek:!!ue,openToSide:!1},ce,ge);U.get(L.IInstantiationService).invokeFunction(J.run.bind(J),z)})})}),m.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:s.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(Z,Y,oe,ce,ge)=>we(void 0,void 0,void 0,function*(){Z.get(m.ICommandService).executeCommand("editor.action.goToLocations",Y,oe,ce,ge,void 0,!0)})}),m.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(Z,Y,oe)=>{(0,b.assertType)(S.URI.isUri(Y)),(0,b.assertType)(s.Position.isIPosition(oe));const ce=Z.get(O.ILanguageFeaturesService),ge=Z.get(t.ICodeEditorService);return ge.openCodeEditor({resource:Y},ge.getFocusedCodeEditor()).then(le=>{if(!(0,p.isCodeEditor)(le)||!le.hasModel())return;const ue=o.ReferencesController.get(le);if(!ue)return;const j=(0,y.createCancelablePromise)(U=>(0,T.getReferencesAtPosition)(ce.referenceProvider,le.getModel(),s.Position.lift(oe),!1,U).then(J=>new c.ReferencesModel(J,v.localize(38,null)))),z=new r.Range(oe.lineNumber,oe.column,oe.lineNumber,oe.column);return Promise.resolve(ue.toggleWidget(z,j,!1))})}}),m.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(X[352],ee([1,0,13,11,61,2,18,98,15,5,39,62,179,129,635,14,244,237,19,38,427]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let l=e.GotoDefinitionAtPositionEditorContribution=class Jt{constructor(u,v,f,m){this.textModelResolverService=v,this.languageService=f,this.languageFeaturesService=m,this.toUnhook=new E.DisposableStore,this.toUnhookForKeyboard=new E.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(([L,D])=>{this.startFindDefinitionFromMouse(L,(0,w.withNullAsUndefined)(D))})),this.toUnhook.add(C.onExecute(L=>{this.isEnabled(L)&&this.gotoDefinition(L.target.position,L.hasSideBySideModifier).catch(D=>{(0,k.onUnexpectedError)(D)}).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 m=new b.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,_.createCancelablePromise)(D=>this.findDefinition(u,D));let C;try{C=yield this.previousPromise}catch(D){(0,k.onUnexpectedError)(D);return}if(!C||!C.length||!m.validate(this.editor)){this.removeLinkDecorations();return}const L=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 D=L;for(const{originSelectionRange:I}of C)I&&(D=g.Range.plusRange(D,I));this.addDecoration(D,new y.MarkdownString().appendText(s.localize(0,null,C.length)))}else{const D=C[0];if(!D.uri)return;this.textModelResolverService.createModelReference(D.uri).then(I=>{if(!I.object||!I.object.textEditorModel){I.dispose();return}const{object:{textEditorModel:T}}=I,{startLineNumber:O}=D.range;if(O<1||O>T.getLineCount()){I.dispose();return}const R=this.getPreviewValue(T,O,D),A=this.languageService.guessLanguageIdByFilepathOrFirstLine(T.uri);this.addDecoration(L,R?new y.MarkdownString().appendCodeblock(A||"",R):void 0),I.dispose()})}})}getPreviewValue(u,v,f){let m=f.range;return m.endLineNumber-m.startLineNumber>=Jt.MAX_SOURCE_PREVIEW_LINES&&(m=this.getPreviewRangeBasedOnIndentation(u,v)),this.stripIndentationFromPreviewRange(u,v,m)}stripIndentationFromPreviewRange(u,v,f){let C=u.getLineFirstNonWhitespaceColumn(v);for(let D=v+1;D<f.endLineNumber;D++){const I=u.getLineFirstNonWhitespaceColumn(D);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),m=Math.min(u.getLineCount(),v+Jt.MAX_SOURCE_PREVIEW_LINES);let C=v+1;for(;C<m;C++){const L=u.getLineFirstNonWhitespaceColumn(C);if(f===L)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 m=!v&&this.editor.getOption(84)&&!this.isInPeekEditor(f);return new d.DefinitionAction({openToSide:v,openInPeek:m,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()}};l.ID="editor.contrib.gotodefinitionatposition",l.MAX_SOURCE_PREVIEW_LINES=8,e.GotoDefinitionAtPositionEditorContribution=l=Me([fe(1,n.ITextModelService),fe(2,p.ILanguageService),fe(3,o.ILanguageFeaturesService)],l),(0,S.registerEditorContribution)(l.ID,l,2)}),define(X[866],ee([1,0,7,16,13,11,2,42,5,19,226,128,240,108,350,643,90,52,83]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const c=_.$;class l{constructor(f,m,C){this.owner=f,this.range=m,this.marker=C}isValidForHoverAnchor(f){return f.type===1&&this.range.startColumn<=f.range.startColumn&&this.range.endColumn>=f.range.endColumn}}e.MarkerHover=l;const a={type:1,filter:{include:i.CodeActionKind.QuickFix},triggerAction:i.CodeActionTriggerSource.QuickFixHover};let u=e.MarkerHoverParticipant=class{constructor(f,m,C,L){this._editor=f,this._markerDecorationsService=m,this._openerService=C,this._languageFeaturesService=L,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(f,m){if(!this._editor.hasModel()||f.type!==1&&!f.supportsMarkerHover)return[];const C=this._editor.getModel(),L=f.range.startLineNumber,D=C.getLineMaxColumn(L),I=[];for(const T of m){const O=T.range.startLineNumber===L?T.range.startColumn:1,R=T.range.endLineNumber===L?T.range.endColumn:D,A=this._markerDecorationsService.getMarker(C.uri,T);if(!A)continue;const N=new S.Range(f.range.startLineNumber,O,f.range.startLineNumber,R);I.push(new l(this,N,A))}return I}renderHoverParts(f,m){if(!m.length)return w.Disposable.None;const C=new w.DisposableStore;m.forEach(D=>f.fragment.appendChild(this.renderMarkerHover(D,C)));const L=m.length===1?m[0]:m.sort((D,I)=>d.MarkerSeverity.compare(D.marker.severity,I.marker.severity))[0];return this.renderMarkerStatusbar(f,L,C),C}renderMarkerHover(f,m){const C=c("div.hover-row"),L=_.append(C,c("div.marker.hover-contents")),{source:D,message:I,code:T,relatedInformation:O}=f.marker;this._editor.applyFontInfo(L);const R=_.append(L,c("span"));if(R.style.whiteSpace="pre-wrap",R.innerText=I,D||T)if(T&&typeof T!="string"){const A=c("span");if(D){const F=_.append(A,c("span"));F.innerText=D}const N=_.append(A,c("a.code-link"));N.setAttribute("href",T.target.toString()),m.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(L,A);x.style.opacity="0.6",x.style.paddingLeft="6px"}else{const A=_.append(L,c("span"));A.style.opacity="0.6",A.style.paddingLeft="6px",A.innerText=D&&T?`${D}(${T})`:D||`(${T})`}if((0,k.isNonEmptyArray)(O))for(const{message:A,resource:N,startLineNumber:P,startColumn:x}of O){const F=_.append(L,c("div"));F.style.marginTop="8px";const B=_.append(F,c("a"));B.innerText=`${(0,b.basename)(N)}(${P}, ${x}): `,B.style.cursor="pointer",m.add(_.addDisposableListener(B,"click",$=>{$.stopPropagation(),$.preventDefault(),this._openerService&&this._openerService.open(N,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:P,startColumn:x}}}).catch(E.onUnexpectedError)}));const V=_.append(F,c("span"));V.innerText=A,this._editor.applyFontInfo(V)}return C}renderMarkerStatusbar(f,m,C){if((m.marker.severity===d.MarkerSeverity.Error||m.marker.severity===d.MarkerSeverity.Warning||m.marker.severity===d.MarkerSeverity.Info)&&f.statusBar.addAction({label:r.localize(0,null),commandId:s.NextMarkerAction.ID,run:()=>{var L;f.hide(),(L=s.MarkerController.get(this._editor))===null||L===void 0||L.showAtMarker(m.marker),this._editor.focus()}}),!this._editor.getOption(87)){const L=f.statusBar.append(c("div"));this.recentMarkerCodeActionsInfo&&(d.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===d.IMarkerData.makeKey(m.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(L.textContent=r.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const D=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?w.Disposable.None:C.add((0,y.disposableTimeout)(()=>L.textContent=r.localize(2,null),200));L.textContent||(L.textContent=String.fromCharCode(160));const I=this.getCodeActions(m.marker);C.add((0,w.toDisposable)(()=>I.cancel())),I.then(T=>{if(D.dispose(),this.recentMarkerCodeActionsInfo={marker:m.marker,hasCodeActions:T.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){T.dispose(),L.textContent=r.localize(3,null);return}L.style.display="none";let O=!1;C.add((0,w.toDisposable)(()=>{O||T.dispose()})),f.statusBar.addAction({label:r.localize(4,null),commandId:n.quickFixCommandId,run:R=>{O=!0;const A=t.CodeActionController.get(this._editor),N=_.getDomNodePagePosition(R);f.hide(),A?.showCodeActions(a,T,{x:N.left+6,y:N.top+N.height+6,width:N.width,height:N.height})}})},E.onUnexpectedError)}}getCodeActions(f){return(0,y.createCancelablePromise)(m=>(0,n.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new S.Range(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn),a,o.Progress.None,m))}};e.MarkerHoverParticipant=u=Me([fe(1,p.IMarkerDecorationsService),fe(2,h.IOpenerService),fe(3,g.ILanguageFeaturesService)],u)}),define(X[353],ee([1,0,59,2,15,5,22,39,352,348,752,641,8,52,33,24,94,238,866,242,34,429]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let a=e.ModesHoverController=class dn{static get(N){return N.getContribution(dn.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===p.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,$,M,Q;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===p.MarginHoverWidget.ID||this._isHoverSticky&&(!(($=this._contentWidget)===null||$===void 0)&&$.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(N)){(M=this._glyphWidget)===null||M===void 0||M.hide();return}if(ie.type===2&&ie.position){(Q=this._contentWidget)===null||Q===void 0||Q.hide(),this._glyphWidget||(this._glyphWidget=new p.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&&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()}};a.ID="editor.contrib.hover",e.ModesHoverController=a=Me([fe(1,t.IInstantiationService),fe(2,i.IOpenerService),fe(3,b.ILanguageService),fe(4,l.IKeybindingService)],a);class u extends y.EditorAction{constructor(){super({id:"editor.action.showHover",label:n.localize(0,null),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2089,2087),weight:100}})}run(N,P,x){if(!P.hasModel())return;const F=a.get(P);if(!F)return;const B=P.getPosition(),V=new E.Range(B.lineNumber,B.column,B.lineNumber,B.column),$=P.getOption(2)===2||!!x?.focus;F.isHoverVisible()?F.focus():F.showContentHover(V,1,1,$)}}class v extends y.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:n.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(N,P){const x=a.get(P);if(!x)return;const F=P.getPosition();if(!F)return;const B=new E.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 y.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:n.localize(2,null),alias:"Scroll Up Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(N,P){const x=a.get(P);x&&x.scrollUp()}}class m extends y.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:n.localize(3,null),alias:"Scroll Down Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(N,P){const x=a.get(P);x&&x.scrollDown()}}class C extends y.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:n.localize(4,null),alias:"Scroll Left Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(N,P){const x=a.get(P);x&&x.scrollLeft()}}class L extends y.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:n.localize(5,null),alias:"Scroll Right Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(N,P){const x=a.get(P);x&&x.scrollRight()}}class D extends y.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:n.localize(6,null),alias:"Page Up Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(N,P){const x=a.get(P);x&&x.pageUp()}}class I extends y.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:n.localize(7,null),alias:"Page Down Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(N,P){const x=a.get(P);x&&x.pageDown()}}class T extends y.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:n.localize(8,null),alias:"Go To Bottom Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(N,P){const x=a.get(P);x&&x.goToTop()}}class O extends y.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:n.localize(9,null),alias:"Go To Bottom Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(N,P){const x=a.get(P);x&&x.goToBottom()}}class R extends y.EditorAction{constructor(){super({id:"editor.action.escapeFocusHover",label:n.localize(10,null),alias:"Escape Focus Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:9,weight:100}})}run(N,P){const x=a.get(P);x&&x.escape()}}(0,y.registerEditorContribution)(a.ID,a,2),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(v),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(C),(0,y.registerEditorAction)(L),(0,y.registerEditorAction)(D),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(R),d.HoverParticipantRegistry.register(h.MarkdownHoverParticipant),d.HoverParticipantRegistry.register(o.MarkerHoverParticipant),(0,r.registerThemingParticipant)((A,N)=>{const P=A.getColor(s.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(X[867],ee([1,0,2,15,5,344,345,353,94]),function(K,e,_,k,y,E,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class g extends _.Disposable{constructor(n){super(),this._editor=n,this._register(n.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(n){const t=n.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==E.ColorDecorationInjectedTextMarker||!t.range)return;const i=this._editor.getContribution(b.ModesHoverController.ID);if(i&&!i.isColorPickerVisible()){const s=new y.Range(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(s,1,0,!1)}}}e.ColorContribution=g,g.ID="editor.contrib.colorContribution",(0,k.registerEditorContribution)(g.ID,g,2),S.HoverParticipantRegistry.register(w.ColorHoverParticipant)}),define(X[354],ee([1,0,7,40,21,163,5,62,244,129,29,25,14,55,8,43]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;function d(o,c,l,a){var u;return we(this,void 0,void 0,function*(){const v=o.get(b.ITextModelService),f=o.get(i.IContextMenuService),m=o.get(n.ICommandService),C=o.get(s.IInstantiationService),L=o.get(r.INotificationService);if(yield a.item.resolve(y.CancellationToken.None),!a.part.location)return;const D=a.part.location,I=[],T=new Set(p.MenuRegistry.getMenuItems(p.MenuId.EditorContext).map(R=>(0,p.isIMenuItem)(R)?R.command.id:(0,E.generateUuid)()));for(const R of S.SymbolNavigationAction.all())T.has(R.desc.id)&&I.push(new k.Action(R.desc.id,p.MenuItemAction.label(R.desc,{renderShortTitle:!0}),void 0,!0,()=>we(this,void 0,void 0,function*(){const A=yield v.createModelReference(D.uri);try{const N=new S.SymbolNavigationAnchor(A.object.textEditorModel,w.Range.getStartPosition(D.range)),P=a.item.anchor.range;yield C.invokeFunction(R.runEditorCommand.bind(R),c,N,P)}finally{A.dispose()}})));if(a.part.command){const{command:R}=a.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 A;try{yield m.executeCommand(R.id,...(A=R.arguments)!==null&&A!==void 0?A:[])}catch(N){L.notify({severity:r.Severity.Error,source:a.item.provider.displayName,message:N})}})))}const O=c.getOption(122);f.showContextMenu({domForShadowRoot:O&&(u=c.getDomNode())!==null&&u!==void 0?u:void 0,getAnchor:()=>{const R=_.getDomNodePagePosition(l);return{x:R.left,y:R.top+R.height+8}},getActions:()=>I,onHide:()=>{c.focus()},autoSelectFirstItem:!0})})}e.showGoToContextMenu=d;function h(o,c,l,a){return we(this,void 0,void 0,function*(){const v=yield o.get(b.ITextModelService).createModelReference(a.uri);yield l.invokeWithinContext(f=>we(this,void 0,void 0,function*(){const m=c.hasSideBySideModifier,C=f.get(t.IContextKeyService),L=g.PeekContext.inPeekEditor.getValue(C),D=!m&&l.getOption(84)&&!L;return new S.DefinitionAction({openToSide:m,openInPeek:D,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(f,new S.SymbolNavigationAnchor(v.object.textEditorModel,w.Range.getStartPosition(a.range)),w.Range.lift(a.range))})),v.dispose()})}e.goToDefinitionWithLocation=h}),define(X[355],ee([1,0,7,16,13,21,11,2,56,18,20,155,115,41,65,5,31,46,38,70,19,62,179,310,354,25,50,8,43,33,24]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,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 $=O._key(B);this._entries.set($,V)}static _key(B){return`${B.uri.toString()}/${B.getVersionId()}`}}const R=(0,L.createDecorator)("IInlayHintsCache");(0,C.registerSingleton)(R,O,1);class A{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=A;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,$,M,Q,ie,re){this._editor=B,this._languageFeaturesService=V,this._inlayHintsCache=M,this._commandService=Q,this._notificationService=ie,this._instaService=re,this._disposables=new b.DisposableStore,this._sessionDisposables=new b.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new n.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=$.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(135)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const B=this._editor.getOption(135);if(B.enabled==="off")return;const V=this._editor.getModel();if(!V||!this._languageFeaturesService.inlayHintsProvider.has(V))return;const $=this._inlayHintsCache.get(V);$&&this._updateHintsDecorators([V.getFullModelRange()],$),this._sessionDisposables.add((0,b.toDisposable)(()=>{V.isDisposed()||this._cacheHintsForFastRestore(V)}));let M;const Q=new Set,ie=new y.RunOnceScheduler(()=>we(this,void 0,void 0,function*(){const re=Date.now();M?.dispose(!0),M=new E.CancellationTokenSource;const ne=V.onWillDispose(()=>M?.cancel());try{const se=M.token,H=yield v.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,V,this._getHintsRanges(),se);if(ie.delay=this._debounceInfo.update(V,Date.now()-re),se.isCancellationRequested){H.dispose();return}for(const W of H.provider)typeof W.onDidChangeInlayHints=="function"&&!Q.has(W)&&(Q.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{M.dispose(),ne.dispose()}}),this._debounceInfo.get(V));if(this._sessionDisposables.add(ie),this._sessionDisposables.add((0,b.toDisposable)(()=>M?.dispose(!0))),ie.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(re=>{(re.scrollTopChanged||!ie.isScheduled())&&ie.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(re=>{const ne=Math.max(ie.delay,1250);ie.schedule(ne)})),B.enabled==="on")this._activeRenderMode=0;else{let re,ne;B.enabled==="onUnlessPressed"?(re=0,ne=1):(re=1,ne=0),this._activeRenderMode=re,this._sessionDisposables.add(_.ModifierKeyEmitter.getInstance().event(se=>{if(!this._editor.hasModel())return;const H=se.altKey&&se.ctrlKey&&!(se.shiftKey||se.metaKey)?ne:re;if(H!==this._activeRenderMode){this._activeRenderMode=H;const W=this._editor.getModel(),q=this._copyInlayHintsWithCurrentAnchor(W);this._updateHintsDecorators([W.getFullModelRange()],q),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)),$=new b.DisposableStore;return B.add($),B.add(V.onMouseMoveOrRelevantKeyDown(M=>{const[Q]=M,ie=this._getInlayHintLabelPart(Q),re=this._editor.getModel();if(!ie||!re){$.clear();return}const ne=new E.CancellationTokenSource;$.add((0,b.toDisposable)(()=>ne.dispose(!0))),ie.item.resolve(ne.token),this._activeInlayHintPart=ie.part.command||ie.part.location?new N(ie,Q.hasTriggerModifier):void 0;const se=re.validatePosition(ie.item.hint.position).lineNumber,H=new r.Range(se,1,se,re.getLineMaxColumn(se)),W=this._getInlineHintsForRange(H);this._updateHintsDecorators([H],W),$.add((0,b.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([H],W)}))})),B.add(V.onCancel(()=>$.clear())),B.add(V.onExecute(M=>we(this,void 0,void 0,function*(){const Q=this._getInlayHintLabelPart(M);if(Q){const ie=Q.part;ie.location?this._instaService.invokeFunction(f.goToDefinitionWithLocation,M,this._editor,ie.location):d.Command.is(ie.command)&&(yield this._invokeCommand(ie.command,Q.item))}}))),B}_getInlineHintsForRange(B){const V=new Set;for(const $ of this._decorationsMetadata.values())B.containsRange($.item.anchor.range)&&V.add($.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 $=this._getInlayHintLabelPart(V);if($&&(V.event.preventDefault(),yield $.item.resolve(E.CancellationToken.None),(0,k.isNonEmptyArray)($.item.hint.textEdits))){const M=$.item.hint.textEdits.map(Q=>s.EditOperation.replace(r.Range.lift(Q.range),Q.text));this._editor.executeEdits("inlayHint.default",M),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 $=(V=B.target.detail.injectedText)===null||V===void 0?void 0:V.options;if($ instanceof o.ModelDecorationInjectedTextOptions&&$?.attachedData instanceof A)return $.attachedData}_invokeCommand(B,V){var $;return we(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(B.id,...($=B.arguments)!==null&&$!==void 0?$:[])}catch(M){this._notificationService.notify({severity:D.Severity.Error,source:V.provider.displayName,message:M})}})}_cacheHintsForFastRestore(B){const V=this._copyInlayHintsWithCurrentAnchor(B);this._inlayHintsCache.set(B,V)}_copyInlayHintsWithCurrentAnchor(B){const V=new Map;for(const[$,M]of this._decorationsMetadata){if(V.has(M.item))continue;const Q=B.getDecorationRange($);if(Q){const ie=new v.InlayHintAnchor(Q,M.item.anchor.direction),re=M.item.with({anchor:ie});V.set(M.item,re)}}return Array.from(V.values())}_getHintsRanges(){const V=this._editor.getModel(),$=this._editor.getVisibleRangesPlusViewportAboveBelow(),M=[];for(const Q of $.sort(r.Range.compareRangesUsingStarts)){const ie=V.validateRange(new r.Range(Q.startLineNumber-30,Q.startColumn,Q.endLineNumber+30,Q.endColumn));M.length===0||!r.Range.areIntersectingOrTouching(M[M.length-1],ie)?M.push(ie):M[M.length-1]=r.Range.plusRange(M[M.length-1],ie)}return M}_updateHintsDecorators(B,V){var $,M;const Q=[],ie=(oe,ce,ge,le,ue)=>{const j={content:ge,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:ce.className,cursorStops:le,attachedData:ue};Q.push({item:oe,classNameRef:ce,decoration:{range:oe.anchor.range,options:{description:"InlayHint",showIfCollapsed:oe.anchor.range.isEmpty(),collapseOnReplaceEdit:!oe.anchor.range.isEmpty(),stickiness:0,[oe.anchor.direction]:this._activeRenderMode===0?j:void 0}}})},re=(oe,ce)=>{const ge=this._ruleFactory.createClassNameRef({width:`${ne/3|0}px`,display:"inline-block"});ie(oe,ge,"\u200A",ce?h.InjectedTextCursorStops.Right:h.InjectedTextCursorStops.None)},{fontSize:ne,fontFamily:se,padding:H,isUniform:W}=this._getLayoutInfo(),q="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(q,se);for(const oe of V){oe.hint.paddingLeft&&re(oe,!1);const ce=typeof oe.hint.label=="string"?[{label:oe.hint.label}]:oe.hint.label;for(let ge=0;ge<ce.length;ge++){const le=ce[ge],ue=ge===0,j=ge===ce.length-1,z={fontSize:`${ne}px`,fontFamily:`var(${q}), ${i.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:W?"baseline":"middle"};(0,k.isNonEmptyArray)(oe.hint.textEdits)&&(z.cursor="default"),this._fillInColors(z,oe.hint),(le.command||le.location)&&(($=this._activeInlayHintPart)===null||$===void 0?void 0:$.part.item)===oe&&this._activeInlayHintPart.part.index===ge&&(z.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(z.color=(0,T.themeColorFromId)(I.editorActiveLinkForeground),z.cursor="pointer")),H&&(ue&&j?(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`):j?(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(oe,this._ruleFactory.createClassNameRef(z),x(le.label),j&&!oe.hint.paddingRight?h.InjectedTextCursorStops.Right:h.InjectedTextCursorStops.None,new A(oe,ge))}if(oe.hint.paddingRight&&re(oe,!0),Q.length>Si._MAX_DECORATORS)break}const Z=[];for(const oe of B)for(const{id:ce}of(M=this._editor.getDecorationsInRange(oe))!==null&&M!==void 0?M:[]){const ge=this._decorationsMetadata.get(ce);ge&&(Z.push(ce),ge.classNameRef.dispose(),this._decorationsMetadata.delete(ce))}const Y=t.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(oe=>{const ce=oe.deltaDecorations(Z,Q.map(ge=>ge.decoration));for(let ge=0;ge<ce.length;ge++){const le=Q[ge];this._decorationsMetadata.set(ce[ge],le)}}),Y.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(135),V=B.padding,$=this._editor.getOption(50),M=this._editor.getOption(47);let Q=B.fontSize;(!Q||Q<5||Q>$)&&(Q=$);const ie=B.fontFamily||M;return{fontSize:Q,fontFamily:ie,padding:V,isUniform:!V&&ie===M&&Q===$}}_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=Me([fe(1,l.ILanguageFeaturesService),fe(2,c.ILanguageFeatureDebounceService),fe(3,R),fe(4,m.ICommandService),fe(5,D.INotificationService),fe(6,L.IInstantiationService)],P);function x(F){const B="\xA0";return F.replace(/[ \t]/g,B)}m.CommandsRegistry.registerCommand("_executeInlayHintProvider",(F,...B)=>we(void 0,void 0,void 0,function*(){const[V,$]=B;(0,g.assertType)(p.URI.isUri(V)),(0,g.assertType)(r.Range.isIRange($));const{inlayHintsProvider:M}=F.get(l.ILanguageFeaturesService),Q=yield F.get(a.ITextModelService).createModelReference(V);try{const ie=yield v.InlayHintsFragments.create(M,Q.object.textEditorModel,[r.Range.lift($)],E.CancellationToken.None),re=ie.items.map(ne=>ne.hint);return setTimeout(()=>ie.dispose(),0),re}finally{Q.dispose()}}))});var wt=this&&this.__asyncValues||function(K){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=K[Symbol.asyncIterator],_;return e?e.call(K):(K=typeof __values=="function"?__values(K):K[Symbol.iterator](),_={},k("next"),k("throw"),k("return"),_[Symbol.asyncIterator]=function(){return this},_);function k(E){_[E]=K[E]&&function(w){return new Promise(function(b,S){w=K[E](w),y(b,S,w.done,w.value)})}}function y(E,w,b,S){Promise.resolve(S).then(function(g){E({value:g,done:b})},w)}};define(X[868],ee([1,0,13,61,12,38,94,39,62,335,238,355,26,52,19,646,17,310,16]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,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,m){super(10,v,u.item.anchor.range,f,m,!0),this.part=u}}let l=e.InlayHintsHover=class extends p.MarkdownHoverParticipant{constructor(u,v,f,m,C,L){super(u,v,f,m,L),this._resolverService=C,this.hoverOrdinal=6}suggestHoverAnchor(u){var v;if(!n.InlayHintsController.get(this._editor)||u.target.type!==6)return null;const m=(v=u.target.detail.injectedText)===null||v===void 0?void 0:v.options;return m instanceof E.ModelDecorationInjectedTextOptions&&m.attachedData instanceof n.RenderedInlayHintLabelPart?new c(m.attachedData,this,u.event.posx,u.event.posy):null}computeSync(){return[]}computeAsync(u,v,f){return u instanceof c?new _.AsyncIterableObject(m=>we(this,void 0,void 0,function*(){var C,L,D,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&&m.emitOne(new p.MarkdownHover(this,u.range,[O],!1,0)),(0,o.isNonEmptyArray)(T.item.hint.textEdits)&&m.emitOne(new p.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&&m.emitOne(new p.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&&m.emitOne(new p.MarkdownHover(this,u.range,[F],!1,1e4))}const A=yield this._resolveInlayHintLabelPartHover(T,f);try{for(var N=!0,P=wt(A),x;x=yield P.next(),C=x.done,!C;){I=x.value,N=!1;try{const F=I;m.emitOne(F)}finally{N=!0}}}catch(F){L={error:F}}finally{try{!N&&!C&&(D=P.return)&&(yield D.call(P))}finally{if(L)throw L.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:m}=u.part.location,C=yield this._resolverService.createModelReference(f);try{const L=C.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(L)?(0,g.getHover)(this._languageFeaturesService.hoverProvider,L,new y.Position(m.startLineNumber,m.startColumn),v).filter(D=>!(0,k.isEmptyMarkdownString)(D.hover.contents)).map(D=>new p.MarkdownHover(this,u.item.anchor.range,D.hover.contents,!1,2+D.ordinal)):_.AsyncIterableObject.EMPTY}finally{C.dispose()}})}};e.InlayHintsHover=l=Me([fe(1,b.ILanguageService),fe(2,i.IOpenerService),fe(3,t.IConfigurationService),fe(4,S.ITextModelService),fe(5,s.ILanguageFeaturesService)],l)}),define(X[869],ee([1,0,15,94,355,868]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(y.InlayHintsController.ID,y.InlayHintsController,1),k.HoverParticipantRegistry.register(E.InlayHintsHover)}),define(X[356],ee([1,0,2,19,859,858,8,55,29,14,22,179,5,237,354,12,21,28,70,7,205]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let a=e.StickyScrollController=class cn extends _.Disposable{constructor(v,f,m,C,L,D,I){super(),this._editor=v,this._contextMenuService=f,this._languageFeaturesService=m,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 y.StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new E.StickyLineCandidateProvider(this._editor,m,L),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new y.StickyScrollWidgetState([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(O=>{O.hasChanged(110)&&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=p.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=p.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(cn.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 m=new n.ClickLinkGesture(this._editor,!0);return v.add(m),v.add(m.onMouseMoveOrRelevantKeyDown(([C,L])=>{if(!this._editor.hasModel()||!C.hasTriggerModifier){f.clear();return}const D=C.target;if(D.detail===this._stickyScrollWidget.getId()&&D.element.innerText===D.element.innerHTML){const I=D.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(D.element.style.textDecoration==="underline")return;const A=new d.CancellationTokenSource;f.add((0,_.toDisposable)(()=>A.dispose(!0)));let N;(0,i.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new r.Position(T,O+1),A.token).then(P=>{if(!A.token.isCancellationRequested)if(P.length!==0){this._candidateDefinitionsLength=P.length;const x=D.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(m.onCancel(()=>{f.clear()})),v.add(m.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(s.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(110);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(m=>this._onTokensChange(m))),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 m of f)for(const C of v.ranges)if(m>=C.fromLineNumber&&m<=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 m=v.height/this._editor.getOption(64);this._maxStickyLines=Math.round(m*.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 m=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyElements.length===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(m)||(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(110).maxLineCount),m=this._editor.getScrollTop();let C=0;const L=[],D=this._editor.getVisibleRanges();if(D.length!==0){const I=new l.StickyRange(D[0].startLineNumber,D[D.length-1].endLineNumber),T=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(I);for(const O of T){const R=O.startLineNumber,A=O.endLineNumber,N=O.nestingDepth;if(A-R>0){const P=(N-1)*v,x=N*v,F=this._editor.getBottomForLineNumber(R)-m,B=this._editor.getTopForLineNumber(A)-m,V=this._editor.getBottomForLineNumber(A)-m;if(P>B&&P<=V){L.push(R),C=V-x;break}else x>F&&x<=V&&L.push(R);if(L.length===f)break}}}return new y.StickyScrollWidgetState(L,C)}dispose(){super.dispose(),this._sessionStore.dispose()}};a.ID="store.contrib.stickyScrollController",e.StickyScrollController=a=Me([fe(1,b.IContextMenuService),fe(2,k.ILanguageFeaturesService),fe(3,w.IInstantiationService),fe(4,h.ILanguageConfigurationService),fe(5,o.ILanguageFeatureDebounceService),fe(6,g.IContextKeyService)],a)}),define(X[870],ee([1,0,15,668,709,29,26,14,22,356]),function(K,e,_,k,y,E,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 p extends E.Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,k.localize)(0,null),mnemonicTitle:(0,k.localize)(1,null),original:"Toggle Sticky Scroll"},category:y.Categories.View,toggled:{condition:b.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:(0,k.localize)(2,null),mnemonicTitle:(0,k.localize)(3,null)},menu:[{id:E.MenuId.CommandPalette},{id:E.MenuId.MenubarViewMenu,group:"5_editor",order:2},{id:E.MenuId.StickyScrollContext}]})}run(o){return we(this,void 0,void 0,function*(){const c=o.get(w.IConfigurationService),l=!c.getValue("editor.stickyScroll.enabled");return c.updateValue("editor.stickyScroll.enabled",l)})}}e.ToggleStickyScroll=p;const n=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:E.MenuId.CommandPalette}]})}runEditorCommand(o,c){var l;(l=g.StickyScrollController.get(c))===null||l===void 0||l.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:n,primary:18}})}runEditorCommand(o,c){var l;(l=g.StickyScrollController.get(c))===null||l===void 0||l.focusNext()}}e.SelectNextStickyScrollLine=i;class s 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:n,primary:16}})}runEditorCommand(o,c){var l;(l=g.StickyScrollController.get(c))===null||l===void 0||l.focusPrevious()}}e.SelectPreviousStickyScrollLine=s;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:n,primary:3}})}runEditorCommand(o,c){var l;(l=g.StickyScrollController.get(c))===null||l===void 0||l.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:n,primary:9}})}runEditorCommand(o,c){var l;(l=g.StickyScrollController.get(c))===null||l===void 0||l.selectEditor()}}e.SelectEditor=d}),define(X[871],ee([1,0,15,870,356,29]),function(K,e,_,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(y.StickyScrollController.ID,y.StickyScrollController,1),(0,E.registerAction2)(k.ToggleStickyScroll),(0,E.registerAction2)(k.FocusStickyScroll),(0,E.registerAction2)(k.SelectPreviousStickyScrollLine),(0,E.registerAction2)(k.SelectNextStickyScrollLine),(0,E.registerAction2)(k.GoToStickyScrollLine),(0,E.registerAction2)(k.SelectEditor)}),define(X[872],ee([1,0,15,32,351,26,14,8,43,84]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let p=e.StandaloneReferencesController=class extends y.ReferencesController{constructor(t,i,s,r,d,h,o){super(!0,t,i,s,r,d,h,o)}};e.StandaloneReferencesController=p=Me([fe(1,w.IContextKeyService),fe(2,k.ICodeEditorService),fe(3,S.INotificationService),fe(4,b.IInstantiationService),fe(5,g.IStorageService),fe(6,E.IConfigurationService)],p),(0,_.registerEditorContribution)(y.ReferencesController.ID,p,4)}),define(X[873],ee([1,0,11,2,48,103,706,152,50,43,186]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const n=!1;function t(v){return v.scheme===y.Schemas.file?v.fsPath:v.path}let i=0;class s{constructor(f,m,C,L,D,I,T){this.id=++i,this.type=0,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabel=m,this.strResource=C,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=L,this.groupOrder=D,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,m){this.resourceLabel=f,this.reason=m}}class d{constructor(){this.elements=new Map}createMessage(){const f=[],m=[];for(const[,L]of this.elements)(L.reason===0?f:m).push(L.resourceLabel);const C=[];return f.length>0&&C.push(w.localize(0,null,f.join(", "))),m.length>0&&C.push(w.localize(1,null,m.join(", "))),C.join(`
- `)}get size(){return this.elements.size}has(f){return this.elements.has(f)}set(f,m){this.elements.set(f,m)}delete(f){return this.elements.delete(f)}}class h{constructor(f,m,C,L,D,I,T){this.id=++i,this.type=1,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabels=m,this.strResources=C,this.groupId=L,this.groupOrder=D,this.sourceId=I,this.sourceOrder=T,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(f,m,C){this.removedResources||(this.removedResources=new d),this.removedResources.has(m)||this.removedResources.set(m,new r(f,C))}setValid(f,m,C){C?this.invalidatedResources&&(this.invalidatedResources.delete(m),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new d),this.invalidatedResources.has(m)||this.invalidatedResources.set(m,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,m){this.resourceLabel=f,this.strResource=m,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 m=0;m<this._past.length;m++)f.push(` * [UNDO] ${this._past[m]}`);for(let m=this._future.length-1;m>=0;m--)f.push(` * [REDO] ${this._future[m]}`);return f.join(`
- `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(f,m){f.type===1?f.setValid(this.resourceLabel,this.strResource,m):f.setValid(m)}setElementsValidFlag(f,m){for(const C of this._past)m(C.actual)&&this._setElementValidFlag(C,f);for(const C of this._future)m(C.actual)&&this._setElementValidFlag(C,f)}pushElement(f){for(const m of this._future)m.type===1&&m.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(f),this.versionId++}createSnapshot(f){const m=[];for(let C=0,L=this._past.length;C<L;C++)m.push(this._past[C].id);for(let C=this._future.length-1;C>=0;C--)m.push(this._future[C].id);return new p.ResourceEditStackSnapshot(f,m)}restoreSnapshot(f){const m=f.elements.length;let C=!0,L=0,D=-1;for(let T=0,O=this._past.length;T<O;T++,L++){const R=this._past[T];C&&(L>=m||R.id!==f.elements[L])&&(C=!1,D=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--,L++){const O=this._future[T];C&&(L>=m||O.id!==f.elements[L])&&(C=!1,I=T),!C&&O.type===1&&O.removeResource(this.resourceLabel,this.strResource,0)}D!==-1&&(this._past=this._past.slice(0,D)),I!==-1&&(this._future=this._future.slice(I+1)),this.versionId++}getElements(){const f=[],m=[];for(const C of this._past)f.push(C.actual);for(const C of this._future)m.push(C.actual);return{past:f,future:m}}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,m){for(let C=this._past.length-1;C>=0;C--)if(this._past[C]===f){m.has(this.strResource)?this._past[C]=m.get(this.strResource):this._past.splice(C,1);break}this.versionId++}splitFutureWorkspaceElement(f,m){for(let C=this._future.length-1;C>=0;C--)if(this._future[C]===f){m.has(this.strResource)?this._future[C]=m.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 m=0,C=this.editStacks.length;m<C;m++)this._versionIds[m]=this.editStacks[m].versionId}isValid(){for(let f=0,m=this.editStacks.length;f<m;f++)if(this._versionIds[f]!==this.editStacks[f].versionId)return!1;return!0}}const l=new o("","");l.locked=!0;let a=e.UndoRedoService=class{constructor(f,m){this._dialogService=f,this._notificationService=m,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(f){for(const m of this._uriComparisonKeyComputers)if(m[0]===f.scheme)return m[1].getComparisonKey(f);return f.toString()}_print(f){console.log("------------------------------------"),console.log(`AFTER ${f}: `);const m=[];for(const C of this._editStacks)m.push(C[1].toString());console.log(m.join(`
- `))}pushElement(f,m=p.UndoRedoGroup.None,C=p.UndoRedoSource.None){if(f.type===0){const L=t(f.resource),D=this.getUriComparisonKey(f.resource);this._pushElement(new s(f,L,D,m.id,m.nextOrder(),C.id,C.nextOrder()))}else{const L=new Set,D=[],I=[];for(const T of f.resources){const O=t(T),R=this.getUriComparisonKey(T);L.has(R)||(L.add(R),D.push(O),I.push(R))}D.length===1?this._pushElement(new s(f,D[0],I[0],m.id,m.nextOrder(),C.id,C.nextOrder())):this._pushElement(new h(f,D,I,m.id,m.nextOrder(),C.id,C.nextOrder()))}n&&this._print("pushElement")}_pushElement(f){for(let m=0,C=f.strResources.length;m<C;m++){const L=f.resourceLabels[m],D=f.strResources[m];let I;this._editStacks.has(D)?I=this._editStacks.get(D):(I=new o(L,D),this._editStacks.set(D,I)),I.pushElement(f)}}getLastElement(f){const m=this.getUriComparisonKey(f);if(this._editStacks.has(m)){const C=this._editStacks.get(m);if(C.hasFutureElements())return null;const L=C.getClosestPastElement();return L?L.actual:null}return null}_splitPastWorkspaceElement(f,m){const C=f.actual.split(),L=new Map;for(const D of C){const I=t(D.resource),T=this.getUriComparisonKey(D.resource),O=new s(D,I,T,0,0,0,0);L.set(O.strResource,O)}for(const D of f.strResources){if(m&&m.has(D))continue;this._editStacks.get(D).splitPastWorkspaceElement(f,L)}}_splitFutureWorkspaceElement(f,m){const C=f.actual.split(),L=new Map;for(const D of C){const I=t(D.resource),T=this.getUriComparisonKey(D.resource),O=new s(D,I,T,0,0,0,0);L.set(O.strResource,O)}for(const D of f.strResources){if(m&&m.has(D))continue;this._editStacks.get(D).splitFutureWorkspaceElement(f,L)}}removeElements(f){const m=typeof f=="string"?f:this.getUriComparisonKey(f);this._editStacks.has(m)&&(this._editStacks.get(m).dispose(),this._editStacks.delete(m)),n&&this._print("removeElements")}setElementsValidFlag(f,m,C){const L=this.getUriComparisonKey(f);this._editStacks.has(L)&&this._editStacks.get(L).setElementsValidFlag(m,C),n&&this._print("setElementsValidFlag")}createSnapshot(f){const m=this.getUriComparisonKey(f);return this._editStacks.has(m)?this._editStacks.get(m).createSnapshot(f):new p.ResourceEditStackSnapshot(f,[])}restoreSnapshot(f){const m=this.getUriComparisonKey(f.resource);if(this._editStacks.has(m)){const C=this._editStacks.get(m);C.restoreSnapshot(f),!C.hasPastElements()&&!C.hasFutureElements()&&(C.dispose(),this._editStacks.delete(m))}n&&this._print("restoreSnapshot")}getElements(f){const m=this.getUriComparisonKey(f);return this._editStacks.has(m)?this._editStacks.get(m).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(f){if(!f)return[null,null];let m=null,C=null;for(const[L,D]of this._editStacks){const I=D.getClosestPastElement();I&&I.sourceId===f&&(!m||I.sourceOrder>m.sourceOrder)&&(m=I,C=L)}return[m,C]}canUndo(f){if(f instanceof p.UndoRedoSource){const[,C]=this._findClosestUndoElementWithSource(f.id);return!!C}const m=this.getUriComparisonKey(f);return this._editStacks.has(m)?this._editStacks.get(m).hasPastElements():!1}_onError(f,m){(0,_.onUnexpectedError)(f);for(const C of m.strResources)this.removeElements(C);this._notificationService.error(f)}_acquireLocks(f){for(const m of f.editStacks)if(m.locked)throw new Error("Cannot acquire edit stack lock");for(const m of f.editStacks)m.locked=!0;return()=>{for(const m of f.editStacks)m.locked=!1}}_safeInvokeWithLocks(f,m,C,L,D){const I=this._acquireLocks(C);let T;try{T=m()}catch(O){return I(),L.dispose(),this._onError(O,f)}return T?T.then(()=>(I(),L.dispose(),D()),O=>(I(),L.dispose(),this._onError(O,f))):(I(),L.dispose(),D())}_invokeWorkspacePrepare(f){return we(this,void 0,void 0,function*(){if(typeof f.actual.prepareUndoRedo>"u")return k.Disposable.None;const m=f.actual.prepareUndoRedo();return typeof m>"u"?k.Disposable.None:m})}_invokeResourcePrepare(f,m){if(f.actual.type!==1||typeof f.actual.prepareUndoRedo>"u")return m(k.Disposable.None);const C=f.actual.prepareUndoRedo();return C?(0,k.isDisposable)(C)?m(C):C.then(L=>m(L)):m(k.Disposable.None)}_getAffectedEditStacks(f){const m=[];for(const C of f.strResources)m.push(this._editStacks.get(C)||l);return new c(m)}_tryToSplitAndUndo(f,m,C,L){if(m.canSplit())return this._splitPastWorkspaceElement(m,C),this._notificationService.warn(L),new u(this._undo(f,0,!0));for(const D of m.strResources)this.removeElements(D);return this._notificationService.warn(L),new u}_checkWorkspaceUndo(f,m,C,L){if(m.removedResources)return this._tryToSplitAndUndo(f,m,m.removedResources,w.localize(2,null,m.label,m.removedResources.createMessage()));if(L&&m.invalidatedResources)return this._tryToSplitAndUndo(f,m,m.invalidatedResources,w.localize(3,null,m.label,m.invalidatedResources.createMessage()));const D=[];for(const T of C.editStacks)T.getClosestPastElement()!==m&&D.push(T.resourceLabel);if(D.length>0)return this._tryToSplitAndUndo(f,m,null,w.localize(4,null,m.label,D.join(", ")));const I=[];for(const T of C.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndUndo(f,m,null,w.localize(5,null,m.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndUndo(f,m,null,w.localize(6,null,m.label))}_workspaceUndo(f,m,C){const L=this._getAffectedEditStacks(m),D=this._checkWorkspaceUndo(f,m,L,!1);return D?D.returnValue:this._confirmAndExecuteWorkspaceUndo(f,m,L,C)}_isPartOfUndoGroup(f){if(!f.groupId)return!1;for(const[,m]of this._editStacks){const C=m.getClosestPastElement();if(C){if(C===f){const L=m.getSecondClosestPastElement();if(L&&L.groupId===f.groupId)return!0}if(C.groupId===f.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(f,m,C,L){return we(this,void 0,void 0,function*(){if(m.canSplit()&&!this._isPartOfUndoGroup(m)){let T;(function(A){A[A.All=0]="All",A[A.This=1]="This",A[A.Cancel=2]="Cancel"})(T||(T={}));const{result:O}=yield this._dialogService.prompt({type:E.default.Info,message:w.localize(7,null,m.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(m,null),this._undo(f,0,!0);const R=this._checkWorkspaceUndo(f,m,C,!1);if(R)return R.returnValue;L=!0}let D;try{D=yield this._invokeWorkspacePrepare(m)}catch(T){return this._onError(T,m)}const I=this._checkWorkspaceUndo(f,m,C,!0);if(I)return D.dispose(),I.returnValue;for(const T of C.editStacks)T.moveBackward(m);return this._safeInvokeWithLocks(m,()=>m.actual.undo(),C,D,()=>this._continueUndoInGroup(m.groupId,L))})}_resourceUndo(f,m,C){if(!m.isValid){f.flushAllElements();return}if(f.locked){const L=w.localize(10,null,m.label);this._notificationService.warn(L);return}return this._invokeResourcePrepare(m,L=>(f.moveBackward(m),this._safeInvokeWithLocks(m,()=>m.actual.undo(),new c([f]),L,()=>this._continueUndoInGroup(m.groupId,C))))}_findClosestUndoElementInGroup(f){if(!f)return[null,null];let m=null,C=null;for(const[L,D]of this._editStacks){const I=D.getClosestPastElement();I&&I.groupId===f&&(!m||I.groupOrder>m.groupOrder)&&(m=I,C=L)}return[m,C]}_continueUndoInGroup(f,m){if(!f)return;const[,C]=this._findClosestUndoElementInGroup(f);if(C)return this._undo(C,0,m)}undo(f){if(f instanceof p.UndoRedoSource){const[,m]=this._findClosestUndoElementWithSource(f.id);return m?this._undo(m,f.id,!1):void 0}return typeof f=="string"?this._undo(f,0,!1):this._undo(this.getUriComparisonKey(f),0,!1)}_undo(f,m=0,C){if(!this._editStacks.has(f))return;const L=this._editStacks.get(f),D=L.getClosestPastElement();if(!D)return;if(D.groupId){const[T,O]=this._findClosestUndoElementInGroup(D.groupId);if(D!==T&&O)return this._undo(O,m,C)}if((D.sourceId!==m||D.confirmBeforeUndo)&&!C)return this._confirmAndContinueUndo(f,m,D);try{return D.type===1?this._workspaceUndo(f,D,C):this._resourceUndo(L,D,C)}finally{n&&this._print("undo")}}_confirmAndContinueUndo(f,m,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,m,!0)})}_findClosestRedoElementWithSource(f){if(!f)return[null,null];let m=null,C=null;for(const[L,D]of this._editStacks){const I=D.getClosestFutureElement();I&&I.sourceId===f&&(!m||I.sourceOrder<m.sourceOrder)&&(m=I,C=L)}return[m,C]}canRedo(f){if(f instanceof p.UndoRedoSource){const[,C]=this._findClosestRedoElementWithSource(f.id);return!!C}const m=this.getUriComparisonKey(f);return this._editStacks.has(m)?this._editStacks.get(m).hasFutureElements():!1}_tryToSplitAndRedo(f,m,C,L){if(m.canSplit())return this._splitFutureWorkspaceElement(m,C),this._notificationService.warn(L),new u(this._redo(f));for(const D of m.strResources)this.removeElements(D);return this._notificationService.warn(L),new u}_checkWorkspaceRedo(f,m,C,L){if(m.removedResources)return this._tryToSplitAndRedo(f,m,m.removedResources,w.localize(14,null,m.label,m.removedResources.createMessage()));if(L&&m.invalidatedResources)return this._tryToSplitAndRedo(f,m,m.invalidatedResources,w.localize(15,null,m.label,m.invalidatedResources.createMessage()));const D=[];for(const T of C.editStacks)T.getClosestFutureElement()!==m&&D.push(T.resourceLabel);if(D.length>0)return this._tryToSplitAndRedo(f,m,null,w.localize(16,null,m.label,D.join(", ")));const I=[];for(const T of C.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndRedo(f,m,null,w.localize(17,null,m.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndRedo(f,m,null,w.localize(18,null,m.label))}_workspaceRedo(f,m){const C=this._getAffectedEditStacks(m),L=this._checkWorkspaceRedo(f,m,C,!1);return L?L.returnValue:this._executeWorkspaceRedo(f,m,C)}_executeWorkspaceRedo(f,m,C){return we(this,void 0,void 0,function*(){let L;try{L=yield this._invokeWorkspacePrepare(m)}catch(I){return this._onError(I,m)}const D=this._checkWorkspaceRedo(f,m,C,!0);if(D)return L.dispose(),D.returnValue;for(const I of C.editStacks)I.moveForward(m);return this._safeInvokeWithLocks(m,()=>m.actual.redo(),C,L,()=>this._continueRedoInGroup(m.groupId))})}_resourceRedo(f,m){if(!m.isValid){f.flushAllElements();return}if(f.locked){const C=w.localize(19,null,m.label);this._notificationService.warn(C);return}return this._invokeResourcePrepare(m,C=>(f.moveForward(m),this._safeInvokeWithLocks(m,()=>m.actual.redo(),new c([f]),C,()=>this._continueRedoInGroup(m.groupId))))}_findClosestRedoElementInGroup(f){if(!f)return[null,null];let m=null,C=null;for(const[L,D]of this._editStacks){const I=D.getClosestFutureElement();I&&I.groupId===f&&(!m||I.groupOrder<m.groupOrder)&&(m=I,C=L)}return[m,C]}_continueRedoInGroup(f){if(!f)return;const[,m]=this._findClosestRedoElementInGroup(f);if(m)return this._redo(m)}redo(f){if(f instanceof p.UndoRedoSource){const[,m]=this._findClosestRedoElementWithSource(f.id);return m?this._redo(m):void 0}return typeof f=="string"?this._redo(f):this._redo(this.getUriComparisonKey(f))}_redo(f){if(!this._editStacks.has(f))return;const m=this._editStacks.get(f),C=m.getClosestFutureElement();if(C){if(C.groupId){const[L,D]=this._findClosestRedoElementInGroup(C.groupId);if(C!==L&&D)return this._redo(D)}try{return C.type===1?this._workspaceRedo(f,C):this._resourceRedo(m,C)}finally{n&&this._print("redo")}}}};e.UndoRedoService=a=Me([fe(0,b.IDialogService),fe(1,g.INotificationService)],a);class u{constructor(f){this.returnValue=f}}(0,S.registerSingleton)(p.IUndoRedoService,a,1)}),define(X[130],ee([1,0,707,88,189,20,8]),function(K,e,_,k,y,E,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandaloneEditorWorkspace=e.STANDALONE_EDITOR_WORKSPACE_ID=e.WORKSPACE_FILTER=e.WORKSPACE_EXTENSION=e.WorkspaceFolder=e.Workspace=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.UNKNOWN_EMPTY_WINDOW_WORKSPACE=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isEmptyWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,w.createDecorator)("contextService");function b(s){const r=s;return typeof r?.id=="string"&&E.URI.isUri(r.uri)}e.isSingleFolderWorkspaceIdentifier=b;function S(s){const r=s;return typeof r?.id=="string"&&!b(s)&&!p(s)}e.isEmptyWorkspaceIdentifier=S,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function g(s,r){if(typeof s=="string"||typeof s>"u")return typeof s=="string"?{id:(0,k.basename)(s)}:r?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const d=s;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 p(s){const r=s;return typeof r?.id=="string"&&E.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=p;class n{constructor(r,d,h,o,c){this._id=r,this._transient=h,this._configuration=o,this._ignorePathCasing=c,this._foldersMap=y.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=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const r of this.folders)this._foldersMap.set(r.uri,r)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=n;class t{constructor(r,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(s){return s.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=i}),define(X[874],ee([1,0,7,147,40,2,17,15,22,617,29,14,55,34,26,130]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let d=e.ContextMenuController=class un{static get(c){return c.getContribution(un.ID)}constructor(c,l,a,u,v,f,m,C){this._contextMenuService=l,this._contextViewService=a,this._contextKeyService=u,this._keybindingService=v,this._menuService=f,this._configurationService=m,this._workspaceContextService=C,this._toDispose=new E.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=c,this._toDispose.add(this._editor.onContextMenu(L=>this._onContextMenu(L))),this._toDispose.add(this._editor.onMouseWheel(L=>{if(this._contextMenuIsBeingShownCount>0){const D=this._contextViewService.getContextViewElement(),I=L.srcElement;I.shadowRoot&&_.getShadowRoot(D)===I.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(L=>{this._editor.getOption(22)&&L.keyCode===58&&(L.preventDefault(),L.stopPropagation(),this.showContextMenu())}))}_onContextMenu(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 a=!1;for(const u of this._editor.getSelections())if(u.containsPosition(c.target.position)){a=!0;break}a||this._editor.setPosition(c.target.position)}let l=null;c.target.type!==1&&(l={x:c.event.posx-1,width:2,y:c.event.posy-1,height:2}),this.showContextMenu(l)}showContextMenu(c){if(!this._editor.getOption(22)||!this._editor.hasModel())return;const l=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?p.MenuId.SimpleEditorContext:p.MenuId.EditorContext);l.length>0&&this._doShowContextMenu(l,c)}_getMenuActions(c,l){const a=[],u=this._menuService.createMenu(l,this._contextKeyService),v=u.getActions({arg:c.uri});u.dispose();for(const f of v){const[,m]=f;let C=0;for(const L of m)if(L instanceof p.SubmenuItemAction){const D=this._getMenuActions(c,L.item.submenu);D.length>0&&(a.push(new y.SubmenuAction(L.id,L.label,D)),C++)}else a.push(L),C++;C&&a.push(new y.Separator)}return a.length&&a.pop(),a}_doShowContextMenu(c,l=null){if(!this._editor.hasModel())return;const a=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!l){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const v=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=_.getDomNodePagePosition(this._editor.getDomNode()),m=f.left+v.left,C=f.top+v.top+v.height;l={x:m,y:C}}const u=this._editor.getOption(122)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:u?this._editor.getDomNode():void 0,getAnchor:()=>l,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 m=v;return typeof m.getActionViewItem=="function"?m.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:a})}})}_showScrollbarContextMenu(c){if(!this._editor.hasModel()||(0,r.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const l=this._editor.getOption(70);let a=0;const u=L=>({id:`menu-action-${++a}`,label:L.label,tooltip:"",class:void 0,enabled:typeof L.enabled>"u"?!0:L.enabled,checked:L.checked,run:L.run}),v=(L,D)=>new y.SubmenuAction(`menu-action-${++a}`,L,D,void 0),f=(L,D,I,T,O)=>{if(!D)return u({label:L,enabled:D,run:()=>{}});const R=N=>()=>{this._configurationService.updateValue(I,N)},A=[];for(const N of O)A.push(u({label:N.label,checked:T===N.value,run:R(N.value)}));return v(L,A)},m=[];m.push(u({label:g.localize(0,null),checked:l.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!l.enabled)}})),m.push(new y.Separator),m.push(u({label:g.localize(1,null),enabled:l.enabled,checked:l.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!l.renderCharacters)}})),m.push(f(g.localize(2,null),l.enabled,"editor.minimap.size",l.size,[{label:g.localize(3,null),value:"proportional"},{label:g.localize(4,null),value:"fill"},{label:g.localize(5,null),value:"fit"}])),m.push(f(g.localize(6,null),l.enabled,"editor.minimap.showSlider",l.showSlider,[{label:g.localize(7,null),value:"mouseover"},{label:g.localize(8,null),value:"always"}]));const C=this._editor.getOption(122)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:C?this._editor.getDomNode():void 0,getAnchor:()=>c,getActions:()=>m,onHide:L=>{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=Me([fe(1,t.IContextMenuService),fe(2,t.IContextViewService),fe(3,n.IContextKeyService),fe(4,i.IKeybindingService),fe(5,p.IMenuService),fe(6,s.IConfigurationService),fe(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,l){var a;(a=d.get(l))===null||a===void 0||a.showContextMenu()}}(0,b.registerEditorContribution)(d.ID,d,2),(0,b.registerEditorAction)(h)}),define(X[875],ee([1,0,16,164,102,48,42,20,621,130]),function(K,e,_,k,y,E,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerDefaultDropProviders=void 0;class p{constructor(){this.dropMimeTypes=[y.Mimes.text,"text"]}provideDocumentOnDropEdits(h,o,c,l){var a;return we(this,void 0,void 0,function*(){const u=(a=c.get("text"))!==null&&a!==void 0?a:c.get(y.Mimes.text);if(!u||c.has(y.Mimes.uriList))return;const v=yield u.asString();return{label:(0,S.localize)(0,null),insertText:v}})}}class n{constructor(){this.dropMimeTypes=[y.Mimes.uriList]}provideDocumentOnDropEdits(h,o,c,l){return we(this,void 0,void 0,function*(){const a=yield i(c);if(!a.length||l.isCancellationRequested)return;let u=0;const v=a.map(({uri:m,originalText:C})=>m.scheme===E.Schemas.file?m.fsPath:(u++,C)).join(" ");let f;return u>0?f=a.length>1?(0,S.localize)(1,null):(0,S.localize)(2,null):f=a.length>1?(0,S.localize)(3,null):(0,S.localize)(4,null),{insertText:v,label:f}})}}let t=class{constructor(h){this._workspaceContextService=h,this.dropMimeTypes=[y.Mimes.uriList]}provideDocumentOnDropEdits(h,o,c,l){return we(this,void 0,void 0,function*(){const a=yield i(c);if(!a.length||l.isCancellationRequested)return;const u=(0,_.coalesce)(a.map(({uri:v})=>{const f=this._workspaceContextService.getWorkspaceFolder(v);return f?(0,w.relativePath)(f.uri,v):void 0}));if(u.length)return{insertText:u.join(" "),label:a.length>1?(0,S.localize)(5,null):(0,S.localize)(6,null)}})}};t=Me([fe(0,g.IWorkspaceContextService)],t);function i(d){return we(this,void 0,void 0,function*(){const h=d.get(y.Mimes.uriList);if(!h)return[];const o=yield h.asString(),c=[];for(const l of k.UriList.parse(o))try{c.push({uri:b.URI.parse(l),originalText:l})}catch{}return c})}let s=!1;function r(d,h){s||(s=!0,d.documentOnDropEditProvider.register("*",new p),d.documentOnDropEditProvider.register("*",new n),d.documentOnDropEditProvider.register("*",new t(h)))}e.registerDefaultDropProviders=r}),define(X[876],ee([1,0,16,13,164,2,324,15,151,5,19,269,716,728,98,243,95,622,323,8,130,875]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=void 0;let u=e.DropIntoEditorController=class hn extends E.Disposable{static get(f){return f.getContribution(hn.ID)}constructor(f,m,C,L,D,I){super(),this._bulkEditService=L,this._languageFeaturesService=D,this._treeViewsDragAndDropService=I,this.operationIdPool=0,this.treeItemsTransfer=o.LocalSelectionTransfer.getInstance(),this._dropProgressManager=this._register(m.createInstance(r.InlineProgressManager,"dropIntoEditor",f)),this._postDropWidgetManager=this._register(m.createInstance(i.PostDropWidgetManager,f)),this._register(f.onDropIntoEditor(T=>this.onDropIntoEditor(f,T.position,T.event))),(0,a.registerDefaultDropProviders)(this._languageFeaturesService,C)}changeDropType(){this._postDropWidgetManager.changeExistingDropType()}onDropIntoEditor(f,m,C){var L;return we(this,void 0,void 0,function*(){if(!C.dataTransfer||!f.hasModel())return;(L=this._currentOperation)===null||L===void 0||L.promise.cancel(),this._dropProgressManager.clear(),f.focus(),f.setPosition(m);const D=this.operationIdPool++,I=(0,k.createCancelablePromise)(T=>we(this,void 0,void 0,function*(){var O;const R=new s.EditorStateCancellationTokenSource(f,1,void 0,T);this._dropProgressManager.setAtPosition(m,(0,h.localize)(0,null),{cancel:()=>R.cancel()});try{const A=yield this.extractDataTransferData(C);if(A.size===0||R.token.isCancellationRequested)return;const N=f.getModel();if(!N)return;const P=this._languageFeaturesService.documentOnDropEditProvider.ordered(N).filter(F=>F.dropMimeTypes?F.dropMimeTypes.some(B=>A.matches(B)):!0),x=yield(0,k.raceCancellation)(Promise.all(P.map(F=>F.provideDocumentOnDropEdits(N,m,A,R.token))),R.token);if(R.token.isCancellationRequested)return;x&&(yield this.applyDropResult(f,m,0,(0,_.coalesce)(x),T))}finally{R.dispose(),((O=this._currentOperation)===null||O===void 0?void 0:O.id)===D&&(this._dropProgressManager.clear(),this._currentOperation=void 0)}}));this._currentOperation={id:D,promise:I}})}extractDataTransferData(f){return we(this,void 0,void 0,function*(){if(!f.dataTransfer)return new y.VSDataTransfer;const m=(0,w.toVSDataTransfer)(f.dataTransfer);if((0,w.addExternalEditorsDropData)(m,f),this.treeItemsTransfer.hasData(n.DraggedTreeItemsIdentifier.prototype)){const C=this.treeItemsTransfer.getData(n.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(C))for(const L of C){const D=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(L.identifier);if(D)for(const[I,T]of D.entries())m.replace(I,T)}}return m})}applyDropResult(f,m,C,L,D){var I,T;return we(this,void 0,void 0,function*(){const O=f.getModel();if(!O)return;const R=L[C];if(!R)return;const A=typeof R.insertText=="string"?d.SnippetParser.escape(R.insertText):R.insertText.snippet,N={edits:[new S.ResourceTextEdit(O.uri,{range:g.Range.fromPositions(m),text:A,insertAsSnippet:!0}),...(T=(I=R.additionalEdit)===null||I===void 0?void 0:I.edits)!==null&&T!==void 0?T:[]]},P=O.deltaDecorations([],[{range:g.Range.fromPositions(m),options:{description:"drop-line-suffix",stickiness:0}}]),x=yield this._bulkEditService.apply(N,{editor:f,token:D}),F=O.getDecorationRange(P[0]);O.deltaDecorations(P,[]),x.isApplied&&L.length>1&&f.getOptions().get(34).showDropSelector==="afterDrop"&&this._postDropWidgetManager.show(F??g.Range.fromPositions(m),{activeEditIndex:C,allEdits:L},V=>we(this,void 0,void 0,function*(){yield O.undo(),this.applyDropResult(f,m,V,L,D)}))})}};u.ID="editor.contrib.dropIntoEditorController",e.DropIntoEditorController=u=Me([fe(1,c.IInstantiationService),fe(2,l.IWorkspaceContextService),fe(3,S.IBulkEditService),fe(4,p.ILanguageFeaturesService),fe(5,t.ITreeViewsDnDService)],u),(0,b.registerEditorContribution)(u.ID,u,2),(0,b.registerEditorCommand)(new class extends b.EditorCommand{constructor(){super({id:i.changeDropTypeCommandId,precondition:i.dropWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(v,f,m){var C;(C=u.get(f))===null||C===void 0||C.changeDropType()}})}),define(X[877],ee([1,0,545,88,42,9,163,28,95,667,130]),function(K,e,_,k,y,E,w,b,S,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=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 n{constructor(l){this._delegates=l}resolve(l){for(const a of this._delegates){const u=a.resolve(l);if(u!==void 0)return u}}}e.CompositeSnippetVariableResolver=n;class t{constructor(l,a,u,v){this._model=l,this._selection=a,this._selectionIdx=u,this._overtypingCapturer=v}resolve(l){const{name:a}=l;if(a==="SELECTION"||a==="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&&l.snippet){const f=this._model.getLineContent(this._selection.startLineNumber),m=(0,E.getLeadingWhitespace)(f,0,this._selection.startColumn-1);let C=m;l.snippet.walk(D=>D===l?!1:(D instanceof S.Text&&(C=(0,E.getLeadingWhitespace)((0,E.splitLines)(D.value).pop())),!0));const L=(0,E.commonPrefixLength)(C,m);u=u.replace(/(\r\n|\r|\n)(.*)/g,(D,I,T)=>`${I}${C.substr(L)}${T}`)}return u}else{if(a==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(a==="TM_CURRENT_WORD"){const u=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return u&&u.word||void 0}else{if(a==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(a==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(a==="CURSOR_INDEX")return String(this._selectionIdx);if(a==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=t;class i{constructor(l,a){this._labelService=l,this._model=a}resolve(l){const{name:a}=l;if(a==="TM_FILENAME")return k.basename(this._model.uri.fsPath);if(a==="TM_FILENAME_BASE"){const u=k.basename(this._model.uri.fsPath),v=u.lastIndexOf(".");return v<=0?u:u.slice(0,v)}else{if(a==="TM_DIRECTORY")return k.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,y.dirname)(this._model.uri));if(a==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(a==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=i;class s{constructor(l,a,u,v){this._readClipboardText=l,this._selectionIdx=a,this._selectionCount=u,this._spread=v}resolve(l){if(l.name!=="CLIPBOARD")return;const a=this._readClipboardText();if(a){if(this._spread){const u=a.split(/\r\n|\n|\r/).filter(v=>!(0,E.isFalsyOrWhitespace)(v));if(u.length===this._selectionCount)return u[this._selectionIdx]}return a}}}e.ClipboardBasedVariableResolver=s;let r=e.CommentBasedVariableResolver=class{constructor(l,a,u){this._model=l,this._selection=a,this._languageConfigurationService=u}resolve(l){const{name:a}=l,u=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),v=this._languageConfigurationService.getLanguageConfiguration(u).comments;if(v){if(a==="LINE_COMMENT")return v.lineCommentToken||void 0;if(a==="BLOCK_COMMENT_START")return v.blockCommentStartToken||void 0;if(a==="BLOCK_COMMENT_END")return v.blockCommentEndToken||void 0}}};e.CommentBasedVariableResolver=r=Me([fe(2,b.ILanguageConfigurationService)],r);class d{constructor(){this._date=new Date}resolve(l){const{name:a}=l;if(a==="CURRENT_YEAR")return String(this._date.getFullYear());if(a==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(a==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(a==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(a==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(a==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(a==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(a==="CURRENT_DAY_NAME")return d.dayNames[this._date.getDay()];if(a==="CURRENT_DAY_NAME_SHORT")return d.dayNamesShort[this._date.getDay()];if(a==="CURRENT_MONTH_NAME")return d.monthNames[this._date.getMonth()];if(a==="CURRENT_MONTH_NAME_SHORT")return d.monthNamesShort[this._date.getMonth()];if(a==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(a==="CURRENT_TIMEZONE_OFFSET"){const u=this._date.getTimezoneOffset(),v=u>0?"-":"+",f=Math.trunc(Math.abs(u/60)),m=f<10?"0"+f:f,C=Math.abs(u)-f*60,L=C<10?"0"+C:C;return v+m+":"+L}}}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(l){this._workspaceService=l}resolve(l){if(!this._workspaceService)return;const a=(0,p.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,p.isEmptyWorkspaceIdentifier)(a)){if(l.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(a);if(l.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(a)}}_resolveWorkspaceName(l){if((0,p.isSingleFolderWorkspaceIdentifier)(l))return k.basename(l.uri.path);let a=k.basename(l.configPath.path);return a.endsWith(p.WORKSPACE_EXTENSION)&&(a=a.substr(0,a.length-p.WORKSPACE_EXTENSION.length-1)),a}_resoveWorkspacePath(l){if((0,p.isSingleFolderWorkspaceIdentifier)(l))return(0,_.normalizeDriveLetter)(l.uri.fsPath);const a=k.basename(l.configPath.path);let u=l.configPath.fsPath;return u.endsWith(a)&&(u=u.substr(0,u.length-a.length-1)),u?(0,_.normalizeDriveLetter)(u):"/"}}e.WorkspaceBasedVariableResolver=h;class o{resolve(l){const{name:a}=l;if(a==="RANDOM")return Math.random().toString().slice(-6);if(a==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(a==="UUID")return(0,w.generateUuid)()}}e.RandomBasedVariableResolver=o}),define(X[357],ee([1,0,16,2,9,65,5,23,28,38,153,130,95,877,441]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class s{constructor(o,c,l){this._editor=o,this._snippet=c,this._snippetLineLeadingWhitespace=l,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 l of this._snippet.placeholders){const a=this._snippet.offset(l),u=this._snippet.fullLen(l),v=w.Range.fromPositions(o.getPositionAt(this._offset+a),o.getPositionAt(this._offset+a+u)),f=l.isFinalTabstop?s._decor.inactiveFinal:s._decor.inactive,m=c.addDecoration(v,f);this._placeholderDecorations.set(l,m)}})}move(o){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const a=[];for(const u of this._placeholderGroups[this._placeholderGroupsIdx])if(u.transform){const v=this._placeholderDecorations.get(u),f=this._editor.getModel().getDecorationRange(v),m=this._editor.getModel().getValueInRange(f),C=u.transform.resolve(m).split(/\r\n|\r|\n/);for(let L=1;L<C.length;L++)C[L]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+C[L]);a.push(E.EditOperation.replace(f,C.join(this._editor.getModel().getEOL())))}a.length>0&&this._editor.executeEdits("snippet.placeholderTransform",a)}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 l=this._editor.getModel().changeDecorations(a=>{const u=new Set,v=[];for(const f of this._placeholderGroups[this._placeholderGroupsIdx]){const m=this._placeholderDecorations.get(f),C=this._editor.getModel().getDecorationRange(m);v.push(new b.Selection(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)),c=c&&this._hasPlaceholderBeenCollapsed(f),a.changeDecorationOptions(m,f.isFinalTabstop?s._decor.activeFinal:s._decor.active),u.add(f);for(const L of this._snippet.enclosingPlaceholders(f)){const D=this._placeholderDecorations.get(L);a.changeDecorationOptions(D,L.isFinalTabstop?s._decor.activeFinal:s._decor.active),u.add(L)}}for(const[f,m]of this._placeholderDecorations)u.has(f)||a.changeDecorationOptions(m,f.isFinalTabstop?s._decor.inactiveFinal:s._decor.inactive);return v});return c?this.move(o):l??[]}_hasPlaceholderBeenCollapsed(o){let c=o;for(;c;){if(c instanceof t.Placeholder){const l=this._placeholderDecorations.get(c);if(this._editor.getModel().getDecorationRange(l).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 l;for(const a of c){if(a.isFinalTabstop)break;l||(l=[],o.set(a.index,l));const u=this._placeholderDecorations.get(a),v=this._editor.getModel().getDecorationRange(u);if(!v){o.delete(a.index);break}l.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 l=this._editor.getModel().getDecorationRange(c);if(l)return{range:l,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(l=>{for(const a 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 m of u._snippet.placeholderInfo.all)m.isFinalTabstop?m.index=a.index+(v+1)/this._nestingLevel:m.index=a.index+m.index/this._nestingLevel;this._snippet.replace(a,u._snippet.children);const f=this._placeholderDecorations.get(a);l.removeDecoration(f),this._placeholderDecorations.delete(a);for(const m of u._snippet.placeholders){const C=u._snippet.offset(m),L=u._snippet.fullLen(m),D=w.Range.fromPositions(c.getPositionAt(u._offset+C),c.getPositionAt(u._offset+C+L)),I=l.addDecoration(D,s._decor.inactive);this._placeholderDecorations.set(m,I)}}this._placeholderGroups=(0,_.groupBy)(this._snippet.placeholders,t.Placeholder.compareByIndex)})}}e.OneSnippet=s,s._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 bt{static adjustWhitespace(o,c,l,a,u){const v=o.getLineContent(c.lineNumber),f=(0,y.getLeadingWhitespace)(v,0,c.column-1);let m;return a.walk(C=>{if(!(C instanceof t.Text)||C.parent instanceof t.Choice||u&&!u.has(C))return!0;const L=C.value.split(/\r\n|\r|\n/);if(l){const I=a.offset(C);if(I===0)L[0]=o.normalizeIndentation(L[0]);else{m=m??a.toString();const T=m.charCodeAt(I-1);(T===10||T===13)&&(L[0]=o.normalizeIndentation(f+L[0]))}for(let T=1;T<L.length;T++)L[T]=o.normalizeIndentation(f+L[T])}const D=L.join(o.getEOL());return D!==C.value&&(C.parent.replace(C,[new t.Text(D)]),m=void 0),!0}),f}static adjustSelection(o,c,l,a){if(l!==0||a!==0){const{positionLineNumber:u,positionColumn:v}=c,f=v-l,m=v+a,C=o.validateRange({startLineNumber:u,startColumn:f,endLineNumber:u,endColumn:m});c=b.Selection.createWithDirection(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn,c.getDirection())}return c}static createEditsAndSnippetsFromSelections(o,c,l,a,u,v,f,m,C){const L=[],D=[];if(!o.hasModel())return{edits:L,snippets:D};const I=o.getModel(),T=o.invokeWithinContext(F=>F.get(n.IWorkspaceContextService)),O=o.invokeWithinContext(F=>new i.ModelBasedVariableResolver(F.get(p.ILabelService),I)),R=()=>f,A=I.getValueInRange(bt.adjustSelection(I,o.getSelection(),l,0)),N=I.getValueInRange(bt.adjustSelection(I,o.getSelection(),0,a)),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=bt.adjustSelection(I,F,l,0),$=bt.adjustSelection(I,F,0,a);A!==I.getValueInRange(V)&&(V=F),N!==I.getValueInRange($)&&($=F);const M=F.setStartPosition(V.startLineNumber,V.startColumn).setEndPosition($.endLineNumber,$.endColumn),Q=new t.SnippetParser().parse(c,!0,u),ie=M.getStartPosition(),re=bt.adjustWhitespace(I,ie,v||B>0&&P!==I.getLineFirstNonWhitespaceColumn(F.positionLineNumber),Q);Q.resolveVariables(new i.CompositeSnippetVariableResolver([O,new i.ClipboardBasedVariableResolver(R,B,x.length,o.getOption(76)==="spread"),new i.SelectionBasedVariableResolver(I,F,B,m),new i.CommentBasedVariableResolver(I,F,C),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(T),new i.RandomBasedVariableResolver])),L[B]=E.EditOperation.replace(M,Q.toString()),L[B].identifier={major:B,minor:0},L[B]._isTracked=!0,D[B]=new s(o,Q,re)}return{edits:L,snippets:D}}static createEditsAndSnippetsFromEdits(o,c,l,a,u,v,f){if(!o.hasModel()||c.length===0)return{edits:[],snippets:[]};const m=[],C=o.getModel(),L=new t.SnippetParser,D=new t.TextmateSnippet,I=new i.CompositeSnippetVariableResolver([o.invokeWithinContext(O=>new i.ModelBasedVariableResolver(O.get(p.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(n.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:A}=c[O];if(O>0){const B=c[O-1].range,V=w.Range.fromPositions(B.getEndPosition(),R.getStartPosition()),$=new t.Text(C.getValueInRange(V));D.appendChild($),T+=$.value.length}const N=L.parseFragment(A,D);bt.adjustWhitespace(C,R.getStartPosition(),!0,D,new Set(N)),D.resolveVariables(I);const P=D.toString(),x=P.slice(T);T=P.length;const F=E.EditOperation.replace(R,x);F.identifier={major:O,minor:0},F._isTracked=!0,m.push(F)}return L.ensureFinalTabstop(D,l,!0),{edits:m,snippets:[new s(o,D,"")]}}constructor(o,c,l=r,a){this._editor=o,this._template=c,this._options=l,this._languageConfigurationService=a,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"?bt.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):bt.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,l=>{const a=l.filter(u=>!!u.identifier);for(let u=0;u<c.length;u++)c[u].initialize(a[u].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):a.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:l,snippets:a}=bt.createEditsAndSnippetsFromSelections(this._editor,o,c.overwriteBefore,c.overwriteAfter,!0,c.adjustWhitespace,c.clipboardText,c.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",l,u=>{const v=u.filter(m=>!!m.identifier);for(let m=0;m<a.length;m++)a[m].initialize(v[m].textChange);const f=a[0].isTrivialSnippet;if(!f){for(const m of this._snippets)m.merge(a);console.assert(a.length===0)}return this._snippets[0].hasPlaceholder&&!f?this._move(void 0):v.map(m=>b.Selection.fromPositions(m.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 l of this._snippets){const a=l.move(o);c.push(...a)}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 l of this._snippets){const a=l.computePossibleSelections();if(c.size===0)for(const[u,v]of a){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(...a.get(v))})}o.sort(w.Range.compareRangesUsingStarts);for(const[l,a]of c){if(a.length!==o.length){c.delete(l);continue}a.sort(w.Range.compareRangesUsingStarts);for(let u=0;u<a.length;u++)if(!a[u].containsRange(o[u])){c.delete(l);continue}}return c.size>0}};e.SnippetSession=d=Me([fe(3,S.ILanguageConfigurationService)],d)}),define(X[245],ee([1,0,2,18,15,12,22,28,19,126,666,14,63,357]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const s={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r=e.SnippetController2=class Ht{static get(o){return o.getContribution(Ht.ID)}constructor(o,c,l,a,u){this._editor=o,this._logService=c,this._languageFeaturesService=l,this._languageConfigurationService=u,this._snippetListener=new _.DisposableStore,this._modelVersionId=-1,this._inSnippet=Ht.InSnippetMode.bindTo(a),this._hasNextTabstop=Ht.HasNextTabstop.bindTo(a),this._hasPrevTabstop=Ht.HasPrevTabstop.bindTo(a)}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"?s:Object.assign(Object.assign({},s),c))}catch(l){this.cancel(),this._logService.error(l),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 l;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(),!((l=this._session)===null||l===void 0)&&l.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(u,v)=>{if(!this._session||u!==this._editor.getModel()||!E.Position.equals(this._editor.getPosition(),v))return;const{activeChoice:f}=this._session;if(!f||f.choice.options.length===0)return;const m=u.getValueInRange(f.range),C=!!f.choice.options.find(D=>D.value===m),L=[];for(let D=0;D<f.choice.options.length;D++){const I=f.choice.options[D];L.push({kind:13,label:I.value,insertText:I.value,sortText:"a".repeat(D+1),range:f.range,filterText:C?`${m}_${I.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,p.localize)(3,null)}})}return{suggestions:L}}};const a=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(a)}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(a=>a.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 n.RawContextKey("inSnippetMode",!1,(0,p.localize)(0,null)),r.HasNextTabstop=new n.RawContextKey("hasNextTabstop",!1,(0,p.localize)(1,null)),r.HasPrevTabstop=new n.RawContextKey("hasPrevTabstop",!1,(0,p.localize)(2,null)),e.SnippetController2=r=Me([fe(1,t.ILogService),fe(2,S.ILanguageFeaturesService),fe(3,n.IContextKeyService),fe(4,b.ILanguageConfigurationService)],r),(0,y.registerEditorContribution)(r.ID,r,4);const d=y.EditorCommand.bindToContribution(r.get);(0,y.registerEditorCommand)(new d({id:"jumpToNextSnippetPlaceholder",precondition:n.ContextKeyExpr.and(r.InSnippetMode,r.HasNextTabstop),handler:h=>h.next(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:2}})),(0,y.registerEditorCommand)(new d({id:"jumpToPrevSnippetPlaceholder",precondition:n.ContextKeyExpr.and(r.InSnippetMode,r.HasPrevTabstop),handler:h=>h.prev(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:1026}})),(0,y.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,y.registerEditorCommand)(new d({id:"acceptSnippet",precondition:r.InSnippetMode,handler:h=>h.finish()}))}),define(X[878],ee([1,0,16,11,2,80,18,65,12,5,31,28,204,142,750,245,25,8]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsModel=e.VersionIdChangeReason=void 0;var o;(function(l){l[l.Undo=0]="Undo",l[l.Redo=1]="Redo",l[l.AcceptWord=2]="AcceptWord",l[l.Other=3]="Other"})(o||(e.VersionIdChangeReason=o={}));let c=e.InlineCompletionsModel=class extends y.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(a,u,v,f,m,C,L,D,I,T,O,R){super(),this.textModel=a,this.selectedSuggestItem=u,this.cursorPosition=v,this.textModelVersionId=f,this._debounceValue=m,this._suggestPreviewEnabled=C,this._suggestPreviewMode=L,this._inlineSuggestMode=D,this._enabled=I,this._instantiationService=T,this._commandService=O,this._languageConfigurationService=R,this._source=this._register(this._instantiationService.createInstance(s.InlineCompletionsSource,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,E.observableValue)("isActive",!1),this._forceUpdate=(0,E.observableSignal)("forceUpdate"),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._filteredInlineCompletionItems=(0,E.derived)("filteredInlineCompletionItems",F=>{const B=this._source.inlineCompletions.read(F);if(!B)return[];const V=this.cursorPosition.read(F);return B.inlineCompletions.filter(M=>M.isVisible(this.textModel,V,F))}),this._selectedInlineCompletionId=void 0,this._selectedInlineCompletionIdChangeSignal=(0,E.observableSignal)("selectedCompletionIdChanged"),this.selectedInlineCompletionIndex=(0,E.derived)("selectedCachedCompletionIndex",F=>{this._selectedInlineCompletionIdChangeSignal.read(F);const B=this._filteredInlineCompletionItems.read(F),V=this._selectedInlineCompletionId===void 0?-1:B.findIndex($=>$.semanticId===this._selectedInlineCompletionId);return V===-1?(this._selectedInlineCompletionId=void 0,0):V}),this.selectedInlineCompletion=(0,E.derived)("selectedCachedCompletion",F=>{const B=this._filteredInlineCompletionItems.read(F),V=this.selectedInlineCompletionIndex.read(F);return B[V]}),this.lastTriggerKind=this._source.inlineCompletions.map(F=>F?.request.context.triggerKind),this.inlineCompletionsCount=(0,E.derived)("selectedInlineCompletionsCount",F=>{if(this.lastTriggerKind.read(F)===p.InlineCompletionTriggerKind.Explicit)return this._filteredInlineCompletionItems.read(F).length}),this.ghostTextAndCompletion=(0,E.derived)("ghostTextAndCompletion",F=>{var B;const V=this.textModel,$=this.selectedSuggestItem.read(F);if($){const M=this._source.suggestWidgetInlineCompletions.read(F),Q=M?M.inlineCompletions:[this.selectedInlineCompletion.read(F)].filter(w.isDefined),ie=$.toSingleTextEdit().removeCommonPrefix(V),re=(0,_.mapFind)(Q,oe=>{let ce=oe.toSingleTextEdit(F);return ce=ce.removeCommonPrefix(V,g.Range.fromPositions(ce.range.getStartPosition(),$.range.getEndPosition())),ce.augments(ie)?{edit:ce,completion:oe}:void 0});if(!this._suggestPreviewEnabled.read(F)&&!re)return;const se=(B=re?.edit)!==null&&B!==void 0?B:ie,H=re?re.edit.text.length-ie.text.length:0,W=this._suggestPreviewMode.read(F),q=this.cursorPosition.read(F),Z=se.computeGhostText(V,W,q,H);return{ghostText:Z??new t.GhostText(se.range.endLineNumber,[]),completion:re?.completion}}else{if(!this._isActive.read(F))return;const M=this.selectedInlineCompletion.read(F);if(!M)return;const Q=M.toSingleTextEdit(F),ie=this._inlineSuggestMode.read(F),re=this.cursorPosition.read(F),ne=Q.computeGhostText(V,ie,re);return ne?{ghostText:ne,completion:M}:void 0}}),this.ghostText=(0,E.derived)("ghostText",F=>{const B=this.ghostTextAndCompletion.read(F);if(B)return B.ghostText});const A=new Set([o.Redo,o.Undo,o.AcceptWord]);let N=!1,P=p.InlineCompletionTriggerKind.Automatic;this._register((0,E.autorunHandleChanges)("update",{handleChange:F=>(F.didChange(this.textModelVersionId)&&A.has(F.change)?N=!0:F.didChange(this._forceUpdate)&&(P=F.change),!0)},F=>{var B,V;if(this._forceUpdate.read(F),this._enabled.read(F)&&this.selectedSuggestItem.read(F)||this._isActive.read(F)){const $=N||((V=(B=this.selectedInlineCompletion.get())===null||B===void 0?void 0:B.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&V!==void 0?V:!1),M=this.selectedSuggestItem.read(F),Q=this.cursorPosition.read(F);this.textModelVersionId.read(F);const ie=this._source.suggestWidgetInlineCompletions.get();if(ie&&!M){const re=this._source.inlineCompletions.get();re&&ie.request.versionId>re.request.versionId&&this._source.inlineCompletions.set(ie.clone(),void 0),this._source.clearSuggestWidgetInlineCompletions()}this._updatePromise=this._source.update(Q,{triggerKind:P,selectedSuggestionInfo:M?.toSelectedSuggestionInfo()},$?this.selectedInlineCompletion.get():void 0)}else this._updatePromise=void 0;N=!1,P=p.InlineCompletionTriggerKind.Automatic}));let x;this._register((0,E.autorun)("call handleItemDidShow",F=>{var B,V;const $=this.ghostTextAndCompletion.read(F),M=$?.completion;if(M?.semanticId!==x?.semanticId&&(x=M,M)){const Q=M.inlineCompletion,ie=Q.source;(V=(B=ie.provider).handleItemDidShow)===null||V===void 0||V.call(B,ie.inlineCompletions,Q.sourceInlineCompletion,Q.insertText)}}))}trigger(a){return we(this,void 0,void 0,function*(){this._isActive.set(!0,a),yield this._updatePromise})}triggerExplicitly(){return we(this,void 0,void 0,function*(){(0,E.transaction)(a=>{this._isActive.set(!0,a),this._forceUpdate.trigger(a,p.InlineCompletionTriggerKind.Explicit)}),yield this._updatePromise})}stop(a){if(!a){(0,E.transaction)(u=>this.stop(u));return}this._isActive.set(!1,a),this._source.clear(a)}deltaIndex(a){return we(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{const u=this._filteredInlineCompletionItems.get()||[];if(u.length>0){const v=(this.selectedInlineCompletionIndex.get()+a+u.length)%u.length;this._selectedInlineCompletionId=u[v].semanticId}else this._selectedInlineCompletionId=void 0;this._selectedInlineCompletionIdChangeSignal.trigger(void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return we(this,void 0,void 0,function*(){yield this.deltaIndex(1)})}previous(){return we(this,void 0,void 0,function*(){yield this.deltaIndex(-1)})}accept(a){var u,v;if(a.getModel()!==this.textModel)throw new k.BugIndicatingError;const f=this.ghostText.get(),m=(u=this.selectedInlineCompletion.get())===null||u===void 0?void 0:u.toInlineCompletion(void 0);!f||!m||(a.pushUndoStop(),m.snippetInfo?(a.executeEdits("inlineSuggestion.accept",[b.EditOperation.replaceMove(m.range,""),...m.additionalTextEdits]),a.setPosition(m.snippetInfo.range.getStartPosition()),(v=r.SnippetController2.get(a))===null||v===void 0||v.insert(m.snippetInfo.snippet,{undoStopBefore:!1})):a.executeEdits("inlineSuggestion.accept",[b.EditOperation.replaceMove(m.range,m.insertText),...m.additionalTextEdits]),m.command?this._commandService.executeCommand(m.command.id,...m.command.arguments||[]).finally(()=>{(0,E.transaction)(C=>{this._source.clear(C)})}).then(void 0,k.onUnexpectedExternalError):(0,E.transaction)(C=>{this._source.clear(C)}))}acceptNextWord(a){this.acceptNext(a,(u,v)=>{const f=this.textModel.getLanguageIdAtPosition(u.lineNumber,u.column),m=this._languageConfigurationService.getLanguageConfiguration(f),C=new RegExp(m.wordDefinition.source,m.wordDefinition.flags.replace("g","")),L=v.match(C);let D=0;L&&L.index!==void 0?L.index===0?D=L[0].length:D=L.index:D=v.length;const T=/\s+/g.exec(v);return T&&T.index!==void 0&&T.index+T[0].length<D&&(D=T.index+T[0].length),D})}acceptNextLine(a){this.acceptNext(a,(u,v)=>{const f=v.match(/\n/);return f&&f.index!==void 0?f.index+1:v.length})}acceptNext(a,u){var v;if(a.getModel()!==this.textModel)throw new k.BugIndicatingError;const f=this.ghostText.get(),m=(v=this.selectedInlineCompletion.get())===null||v===void 0?void 0:v.toInlineCompletion(void 0);if(!f||!m)return;if(m.snippetInfo||m.filterText!==m.insertText){this.accept(a);return}if(f.parts.length===0)return;const C=f.parts[0],L=new S.Position(f.lineNumber,C.column),D=C.lines.join(`
- `),I=u(L,D);if(I===D.length&&f.parts.length===1){this.accept(a);return}const T=D.substring(0,I);this._isAcceptingPartially=!0;try{a.pushUndoStop(),a.executeEdits("inlineSuggestion.accept",[b.EditOperation.replace(g.Range.fromPositions(L),T)]);const O=(0,i.lengthOfText)(T);a.setPosition((0,i.addPositions)(L,O))}finally{this._isAcceptingPartially=!1}if(m.source.provider.handlePartialAccept){const O=g.Range.fromPositions(m.range.getStartPosition(),(0,i.addPositions)(L,(0,i.lengthOfText)(T))),R=a.getModel().getValueInRange(O,1);m.source.provider.handlePartialAccept(m.source.inlineCompletions,m.sourceInlineCompletion,R.length)}}};e.InlineCompletionsModel=c=Me([fe(9,h.IInstantiationService),fe(10,d.ICommandService),fe(11,n.ILanguageConfigurationService)],c)}),define(X[358],ee([1,0,49,16,13,21,11,6,113,2,17,57,18,115,15,65,12,5,22,245,95,331,722,670,25,14,8,63,126,721,525,781,526,860,72,42,136]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R,A,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),q=ne.getPositionAt(W+1);this._marker=ne.deltaDecorations([],[{range:h.Range.fromPositions(se,q),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 gn{static get(ne){return ne.getContribution(gn.ID)}constructor(ne,se,H,W,q,Z,Y){this._memoryService=se,this._commandService=H,this._contextKeyService=W,this._instantiationService=q,this._logService=Z,this._telemetryService=Y,this._lineSuffix=new g.MutableDisposable,this._toDispose=new g.DisposableStore,this._selectors=new $(le=>le.priority),this._telemetryGate=0,this.editor=ne,this.model=q.createInstance(O.SuggestModel,this.editor),this._selectors.register({priority:0,select:(le,ue,j)=>this._memoryService.select(le,ue,j)});const oe=D.Context.InsertMode.bindTo(W);oe.set(ne.getOption(113).insertMode),this.model.onDidTrigger(()=>oe.set(ne.getOption(113).insertMode)),this.widget=this._toDispose.add(new y.IdleValue(()=>{const le=this._instantiationService.createInstance(A.SuggestWidget,this.editor);this._toDispose.add(le),this._toDispose.add(le.onDidSelect(J=>this._insertSuggestion(J,0),this));const ue=new T.CommitCharacterController(this.editor,le,this.model,J=>this._insertSuggestion(J,2));this._toDispose.add(ue);const j=D.Context.MakesTextEdit.bindTo(this._contextKeyService),z=D.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),U=D.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,g.toDisposable)(()=>{j.reset(),z.reset(),U.reset()})),this._toDispose.add(le.onDidFocus(({item:J})=>{const te=this.editor.getPosition(),G=J.editStart.column,ae=te.column;let me=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!J.completion.additionalTextEdits&&!(J.completion.insertTextRules&4)&&ae-G===J.completion.insertText.length&&(me=this.editor.getModel().getValueInRange({startLineNumber:te.lineNumber,startColumn:G,endLineNumber:te.lineNumber,endColumn:ae})!==J.completion.insertText),j.set(me),z.set(!d.Position.equals(J.editInsertEnd,J.editReplaceEnd)),U.set(!!J.provider.resolveCompletionItem||!!J.completion.documentation||J.completion.detail!==J.completion.label)})),this._toDispose.add(le.onDetailsKeyDown(J=>{if(J.toKeyCodeChord().equals(new S.KeyCodeChord(!0,!1,!1,!1,33))||p.isMacintosh&&J.toKeyCodeChord().equals(new S.KeyCodeChord(!1,!1,!1,!0,33))){J.stopPropagation();return}J.toKeyCodeChord().isModifierKey()||this.editor.focus()})),le})),this._overtypingCapturer=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new R.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new I.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(q.createInstance(u.WordContextKey,ne)),this._toDispose.add(this.model.onDidTrigger(le=>{this.widget.value.showTriggered(le.auto,le.shy?250:50),this._lineSuffix.value=new B(this.editor.getModel(),le.position)})),this._toDispose.add(this.model.onDidSuggest(le=>{var ue;if(le.triggerOptions.shy)return;let j=-1;for(const U of this._selectors.itemsOrderedByPriorityDesc)if(j=U.select(this.editor.getModel(),this.editor.getPosition(),le.completionModel.items),j!==-1)break;j===-1&&(j=0);let z=!1;if(le.triggerOptions.auto){const U=this.editor.getOption(113);U.snippetsPreventQuickSuggestions&&(!((ue=c.SnippetController2.get(this.editor))===null||ue===void 0)&&ue.isInSnippet())?z=!0:U.selectionMode==="never"||U.selectionMode==="always"?z=U.selectionMode==="never":U.selectionMode==="whenTriggerCharacter"?z=le.triggerOptions.triggerKind!==1:U.selectionMode==="whenQuickSuggestion"&&(z=le.triggerOptions.triggerKind===1&&!le.triggerOptions.refilter)}this.widget.value.showSuggestions(le.completionModel,j,le.isFrozen,le.triggerOptions.auto,z)})),this._toDispose.add(this.model.onDidCancel(le=>{le.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{F||(this.model.cancel(),this.model.clear())}));const ce=D.Context.AcceptSuggestionsOnEnter.bindTo(W),ge=()=>{const le=this.editor.getOption(1);ce.set(le==="on"||le==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>ge())),ge()}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(),q=W.getAlternativeVersionId(),{item:Z}=ne,Y=[],oe=new E.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 le=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))),le.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!Z.isResolved){const le=new n.StopWatch(!0);let ue;const j=W.onDidChangeContent(te=>{if(te.isFlush){oe.cancel(),j.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 J=this.editor.onWillType(()=>{J.dispose(),U=!0,z&2||this.editor.pushUndoStop()});Y.push(Z.resolve(oe.token).then(()=>{if(!Z.completion.additionalTextEdits||oe.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?)",le.elapsed(),te),j.dispose(),J.dispose()}))}let{insertText:ge}=Z.completion;Z.completion.insertTextRules&4||(ge=l.SnippetParser.escape(ge)),this.model.cancel(),H.insert(ge,{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===M.id?this.model.trigger({auto:!0,retrigger:!0}):Y.push(this._commandService.executeCommand(Z.completion.command.id,...Z.completion.command.arguments?[...Z.completion.command.arguments]:[]).catch(w.onUnexpectedError))),se&4&&this._alternatives.value.set(ne,le=>{for(oe.cancel();W.canUndo();){q!==W.getAlternativeVersionId()&&W.undo(),this._insertSuggestion(le,3|(se&8?8:0));break}}),this._alertCompletionItem(Z),Promise.all(Y).finally(()=>{this._reportSuggestionAcceptedTelemetry(Z,W,ne),this.model.clear(),oe.dispose()})}_reportSuggestionAcceptedTelemetry(ne,se,H){var W;if(this._telemetryGate++%100!==0)return;const q=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:q,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(113).insertMode==="replace";se&&(H=!H);const W=ne.position.column-ne.editStart.column,q=(H?ne.editReplaceEnd.column:ne.editInsertEnd.column)-ne.position.column,Z=this.editor.getPosition().column-ne.position.column,Y=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:W+Z,overwriteAfter:q+Y}}_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=q=>{if(q.completion.insertTextRules&4||q.completion.additionalTextEdits)return!0;const Z=this.editor.getPosition(),Y=q.editStart.column,oe=Z.column;return oe-Y!==q.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:Z.lineNumber,startColumn:Y,endLineNumber:Z.lineNumber,endColumn:oe})!==q.completion.insertText};b.Event.once(this.model.onDidTrigger)(q=>{const Z=[];b.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,g.dispose)(Z),H()},void 0,Z),this.model.onDidSuggest(({completionModel:Y})=>{if((0,g.dispose)(Z),Y.items.length===0){H();return}const oe=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),Y.items),ce=Y.items[oe];if(!W(ce)){H();return}this.editor.pushUndoStop(),this._insertSuggestion({index:oe,item:ce,model:Y},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=Me([fe(1,a.ISuggestMemoryService),fe(2,f.ICommandService),fe(3,m.IContextKeyService),fe(4,C.IInstantiationService),fe(5,L.ILogService),fe(6,N.ITelemetryService)],V);class ${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 M extends s.EditorAction{constructor(){super({id:M.id,label:v.localize(1,null),alias:"Trigger Suggest",precondition:m.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCompletionItemProvider,D.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 q;H&&typeof H=="object"&&H.auto===!0&&(q=!0),W.triggerSuggest(void 0,q,void 0)}}e.TriggerSuggestAction=M,M.id="editor.action.triggerSuggest",(0,s.registerEditorContribution)(V.ID,V,2),(0,s.registerEditorAction)(M);const Q=100+90,ie=s.EditorCommand.bindToContribution(V.get);(0,s.registerEditorCommand)(new ie({id:"acceptSelectedSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,D.Context.HasFocusedSuggestion),handler(re){re.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:m.ContextKeyExpr.and(D.Context.Visible,o.EditorContextKeys.textInputFocus),weight:Q},{primary:3,kbExpr:m.ContextKeyExpr.and(D.Context.Visible,o.EditorContextKeys.textInputFocus,D.Context.AcceptSuggestionsOnEnter,D.Context.MakesTextEdit),weight:Q}],menuOpts:[{menuId:D.suggestWidgetStatusbarMenu,title:v.localize(2,null),group:"left",order:1,when:D.Context.HasInsertAndReplaceRange.toNegated()},{menuId:D.suggestWidgetStatusbarMenu,title:v.localize(3,null),group:"left",order:1,when:m.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("insert"))},{menuId:D.suggestWidgetStatusbarMenu,title:v.localize(4,null),group:"left",order:1,when:m.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("replace"))}]})),(0,s.registerEditorCommand)(new ie({id:"acceptAlternativeSelectedSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,o.EditorContextKeys.textInputFocus,D.Context.HasFocusedSuggestion),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(re){re.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:D.suggestWidgetStatusbarMenu,group:"left",order:2,when:m.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("insert")),title:v.localize(5,null)},{menuId:D.suggestWidgetStatusbarMenu,group:"left",order:2,when:m.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("replace")),title:v.localize(6,null)}]})),f.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,s.registerEditorCommand)(new ie({id:"hideSuggestWidget",precondition:D.Context.Visible,handler:re=>re.cancelSuggestWidget(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,s.registerEditorCommand)(new ie({id:"selectNextSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,m.ContextKeyExpr.or(D.Context.MultipleSuggestions,D.Context.HasFocusedSuggestion.negate())),handler:re=>re.selectNextSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,s.registerEditorCommand)(new ie({id:"selectNextPageSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,m.ContextKeyExpr.or(D.Context.MultipleSuggestions,D.Context.HasFocusedSuggestion.negate())),handler:re=>re.selectNextPageSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,s.registerEditorCommand)(new ie({id:"selectLastSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,m.ContextKeyExpr.or(D.Context.MultipleSuggestions,D.Context.HasFocusedSuggestion.negate())),handler:re=>re.selectLastSuggestion()})),(0,s.registerEditorCommand)(new ie({id:"selectPrevSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,m.ContextKeyExpr.or(D.Context.MultipleSuggestions,D.Context.HasFocusedSuggestion.negate())),handler:re=>re.selectPrevSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,s.registerEditorCommand)(new ie({id:"selectPrevPageSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,m.ContextKeyExpr.or(D.Context.MultipleSuggestions,D.Context.HasFocusedSuggestion.negate())),handler:re=>re.selectPrevPageSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,s.registerEditorCommand)(new ie({id:"selectFirstSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,m.ContextKeyExpr.or(D.Context.MultipleSuggestions,D.Context.HasFocusedSuggestion.negate())),handler:re=>re.selectFirstSuggestion()})),(0,s.registerEditorCommand)(new ie({id:"focusSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,D.Context.HasFocusedSuggestion.negate()),handler:re=>re.focusSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,s.registerEditorCommand)(new ie({id:"focusAndAcceptSuggestion",precondition:m.ContextKeyExpr.and(D.Context.Visible,D.Context.HasFocusedSuggestion.negate()),handler:re=>{re.focusSuggestion(),re.acceptSelectedSuggestion(!0,!1)}})),(0,s.registerEditorCommand)(new ie({id:"toggleSuggestionDetails",precondition:m.ContextKeyExpr.and(D.Context.Visible,D.Context.HasFocusedSuggestion),handler:re=>re.toggleSuggestionDetails(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:D.suggestWidgetStatusbarMenu,group:"right",order:1,when:m.ContextKeyExpr.and(D.Context.DetailsVisible,D.Context.CanResolve),title:v.localize(7,null)},{menuId:D.suggestWidgetStatusbarMenu,group:"right",order:1,when:m.ContextKeyExpr.and(D.Context.DetailsVisible.toNegated(),D.Context.CanResolve),title:v.localize(8,null)}]})),(0,s.registerEditorCommand)(new ie({id:"toggleExplainMode",precondition:D.Context.Visible,handler:re=>re.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,s.registerEditorCommand)(new ie({id:"toggleSuggestionFocus",precondition:D.Context.Visible,handler:re=>re.toggleSuggestionFocus(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,s.registerEditorCommand)(new ie({id:"insertBestCompletion",precondition:m.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,m.ContextKeyExpr.equals("config.editor.tabCompletion","on"),u.WordContextKey.AtEnd,D.Context.Visible.toNegated(),I.SuggestAlternatives.OtherSuggestions.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:(re,ne)=>{re.triggerSuggestAndAcceptBest((0,t.isObject)(ne)?Object.assign({fallback:"tab"},ne):{fallback:"tab"})},kbOpts:{weight:Q,primary:2}})),(0,s.registerEditorCommand)(new ie({id:"insertNextSuggestion",precondition:m.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,m.ContextKeyExpr.equals("config.editor.tabCompletion","on"),I.SuggestAlternatives.OtherSuggestions,D.Context.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:re=>re.acceptNextSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),(0,s.registerEditorCommand)(new ie({id:"insertPrevSuggestion",precondition:m.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,m.ContextKeyExpr.equals("config.editor.tabCompletion","on"),I.SuggestAlternatives.OtherSuggestions,D.Context.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:re=>re.acceptPrevSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:1026}})),(0,s.registerEditorAction)(class extends s.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:v.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(re,ne){var se;(se=V.get(ne))===null||se===void 0||se.resetWidgetSize()}})}),define(X[879],ee([1,0,6,2,12,5,31,95,357,358,80,280,16]),function(K,e,_,k,y,E,w,b,S,g,p,n,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,p.observableValue)("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(h.onKeyDown(a=>{a.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(h.onKeyUp(a=>{a.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const l=g.SuggestController.get(this.editor);if(l){this._register(l.registerSelector({priority:100,select:(v,f,m)=>{var C;(0,p.transaction)(R=>this.checkModelVersion(R));const L=this.editor.getModel();if(!L)return-1;const D=(C=this.suggestControllerPreselector())===null||C===void 0?void 0:C.removeCommonPrefix(L);if(!D)return-1;const I=y.Position.lift(f),T=m.map((R,A)=>{const P=s.fromSuggestion(l,L,I,R,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(L),x=D.augments(P);return{index:A,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 a=!1;const u=()=>{a||(a=!0,this._register(l.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(l.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(l.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(_.Event.once(l.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,p.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(),l=this.editor.getModel();if(!(!o||!c||!l))return s.fromSuggestion(h,l,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 s{static fromSuggestion(h,o,c,l,a){let{insertText:u}=l.completion,v=!1;if(l.completion.insertTextRules&4){const m=new b.SnippetParser().parse(u);m.children.length<100&&S.SnippetSession.adjustWhitespace(o,c,!0,m),u=m.toString(),v=!0}const f=h.getOverwriteInfo(l,a);return new s(E.Range.fromPositions(c.delta(0,-f.overwriteBefore),c.delta(0,Math.max(f.overwriteAfter,0))),u,l.completion.kind,v)}constructor(h,o,c,l){this.range=h,this.insertText=o,this.completionItemKind=c,this.isSnippetText=l}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 n.SingleTextEdit(this.range,this.insertText)}}e.SuggestItemInfo=s;function r(d,h){return d===h?!0:!d||!h?!1:d.equals(h)}}),define(X[246],ee([1,0,49,6,2,80,135,184,12,70,19,203,717,228,242,878,879,181,25,26,14,8]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsController=void 0;let u=e.InlineCompletionsController=class fn extends y.Disposable{static get(f){return f.getContribution(fn.ID)}constructor(f,m,C,L,D,I,T,O){super(),this.editor=f,this.instantiationService=m,this.contextKeyService=C,this.configurationService=L,this.commandService=D,this.debounceService=I,this.languageFeaturesService=T,this.audioCueService=O,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.textModelVersionId=(0,E.observableValue)("textModelVersionId",-1),this.cursorPosition=(0,E.observableValue)("cursorPosition",new S.Position(1,1)),this.model=(0,w.disposableObservableValue)("inlineCompletionModel",void 0),this.ghostTextWidget=this._register(this.instantiationService.createInstance(t.GhostTextWidget,this.editor,{ghostText:this.model.map((N,P)=>N?.ghostText.read(P)),minReservedLineCount:(0,E.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));const R=(0,E.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(60).enabled);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=m.createInstance(r.InlineCompletionsModel,P,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,(0,E.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(113).preview),(0,E.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(113).previewMode),(0,E.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(60).mode),R);this.model.set(x,N)}})})),this._register(f.onDidChangeModelContent(N=>(0,w.transaction)(P=>{var x;return this.updateObservables(P,N.isUndoing?r.VersionIdChangeReason.Undo:N.isRedoing?r.VersionIdChangeReason.Redo:!((x=this.model.get())===null||x===void 0)&&x.isAcceptingPartially?r.VersionIdChangeReason.AcceptWord:r.VersionIdChangeReason.Other)}))),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),R.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,n.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(N.commandId)&&f.hasTextFocus()&&R.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||s.InlineSuggestionHintsContentWidget.dropDownVisible||(0,w.transaction)(N=>{var P;(P=this.model.get())===null||P===void 0||P.stop(N)})})),this._register((0,E.autorun)("forceRenderingAbove",N=>{const P=this.model.read(N),x=P?.ghostText.read(N);this.suggestWidgetAdaptor.selectedItem.read(N)?x&&x.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register((0,y.toDisposable)(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let A;this._register((0,E.autorun)("play audio cue & read suggestion",N=>{const P=this.model.read(N),x=P?.selectedInlineCompletion.read(N);if(!P||!x){A=void 0;return}const F=P?.ghostText.get();if(!F){A=void 0;return}const B=P.textModel.getLineContent(F.lineNumber);if(x.semanticId!==A){if(A=x.semanticId,P.isNavigatingCurrentInlineCompletion)return;this.audioCueService.playAudioCue(h.AudioCue.inlineSuggestion).then(()=>{this.editor.getOption(6)&&(0,_.alert)(F.renderForScreenReader(B))})}}))}updateObservables(f,m){var C,L;const D=this.editor.getModel();this.textModelVersionId.set((C=D?.getVersionId())!==null&&C!==void 0?C:-1,f,m),this.cursorPosition.set((L=this.editor.getPosition())!==null&&L!==void 0?L:new S.Position(1,1),f)}shouldShowHoverAt(f){var m;const C=(m=this.model.get())===null||m===void 0?void 0:m.ghostText.get();return C?C.parts.some(L=>f.containsPosition(new S.Position(C.lineNumber,L.column))):!1}shouldShowHoverAtViewZone(f){return this.ghostTextWidget.ownsViewZone(f)}};u.ID="editor.contrib.inlineCompletionsController",e.InlineCompletionsController=u=Me([fe(1,a.IInstantiationService),fe(2,l.IContextKeyService),fe(3,c.IConfigurationService),fe(4,o.ICommandService),fe(5,g.ILanguageFeatureDebounceService),fe(6,p.ILanguageFeaturesService),fe(7,h.IAudioCueService)],u)}),define(X[880],ee([1,0,80,15,22,203,228,246,647,29,26,14]),function(K,e,_,k,y,E,w,b,S,g,p,n){"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:n.ContextKeyExpr.and(y.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(a,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=E.showNextInlineSuggestionActionId;class i extends k.EditorAction{constructor(){super({id:i.ID,label:S.localize(1,null),alias:"Show Previous Inline Suggestion",precondition:n.ContextKeyExpr.and(y.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(a,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=E.showPreviousInlineSuggestionActionId;class s extends k.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:S.localize(2,null),alias:"Trigger Inline Suggestion",precondition:y.EditorContextKeys.writable})}run(a,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=s;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:n.ContextKeyExpr.and(y.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(a,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:n.ContextKeyExpr.and(y.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:g.MenuId.InlineSuggestionToolbar,title:S.localize(6,null),group:"secondary",order:2}]})}run(a,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:E.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:n.ContextKeyExpr.and(w.InlineCompletionContextKeys.inlineSuggestionVisible,y.EditorContextKeys.tabMovesFocus.toNegated(),w.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize)}})}run(a,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(a,u){return we(this,void 0,void 0,function*(){const v=b.InlineCompletionsController.get(u);(0,_.transaction)(f=>{var m;(m=v?.model.get())===null||m===void 0||m.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:w.InlineCompletionContextKeys.alwaysShowInlineSuggestionToolbar})}run(a,u){return we(this,void 0,void 0,function*(){const v=a.get(p.IConfigurationService),m=v.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";v.updateValue("editor.inlineSuggest.showToolbar",m)})}}e.ToggleAlwaysShowInlineSuggestionToolbar=c,c.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}),define(X[881],ee([1,0,7,61,2,80,5,39,94,246,242,125,648,89,8,52,72]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class h{constructor(l,a,u){this.owner=l,this.range=a,this.controller=u}isValidForHoverAnchor(l){return l.type===1&&this.range.startColumn<=l.range.startColumn&&this.range.endColumn>=l.range.endColumn}}e.InlineCompletionsHover=h;let o=e.InlineCompletionsHoverParticipant=class{constructor(l,a,u,v,f,m){this._editor=l,this._languageService=a,this._openerService=u,this.accessibilityService=v,this._instantiationService=f,this._telemetryService=m,this.hoverOrdinal=4}suggestHoverAnchor(l){const a=g.InlineCompletionsController.get(this._editor);if(!a)return null;const u=l.target;if(u.type===8){const v=u.detail;if(a.shouldShowHoverAtViewZone(v.viewZoneId))return new S.HoverForeignElementAnchor(1e3,this,w.Range.fromPositions(this._editor.getModel().validatePosition(v.positionBefore||v.position)),l.event.posx,l.event.posy,!1)}return u.type===7&&a.shouldShowHoverAt(u.range)?new S.HoverForeignElementAnchor(1e3,this,u.range,l.event.posx,l.event.posy,!1):u.type===6&&u.detail.mightBeForeignElement&&a.shouldShowHoverAt(u.range)?new S.HoverForeignElementAnchor(1e3,this,u.range,l.event.posx,l.event.posy,!1):null}computeSync(l,a){if(this._editor.getOption(60).showToolbar==="always")return[];const u=g.InlineCompletionsController.get(this._editor);return u&&u.shouldShowHoverAt(l.range)?[new h(this,l.range,u)]:[]}renderHoverParts(l,a){const u=new y.DisposableStore,v=a[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(l,v,u);const f=v.controller.model.get(),m=this._instantiationService.createInstance(p.InlineSuggestionHintsContentWidget,this._editor,!1,(0,E.constObservable)(null),f.selectedInlineCompletionIndex,f.inlineCompletionsCount,f.selectedInlineCompletion.map(C=>{var L;return(L=C?.inlineCompletion.source.inlineCompletions.commands)!==null&&L!==void 0?L:[]}));return l.fragment.appendChild(m.getDomNode()),f.triggerExplicitly(),u.add(m),u}renderScreenReaderText(l,a,u){const v=_.$,f=v("div.hover-row.markdown-hover"),m=_.append(f,v("div.hover-contents",{["aria-live"]:"assertive"})),C=u.add(new n.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),L=D=>{u.add(C.onDidRenderAsync(()=>{m.className="hover-contents code-hover-contents",l.onContentsChanged()}));const I=t.localize(0,null),T=u.add(C.render(new k.MarkdownString().appendText(I).appendCodeblock("text",D)));m.replaceChildren(T.element)};u.add((0,E.autorun)("update hover",D=>{var I;const T=(I=a.controller.model.read(D))===null||I===void 0?void 0:I.ghostText.read(D);if(T){const O=this._editor.getModel().getLineContent(T.lineNumber);L(T.renderForScreenReader(O))}else _.reset(m)})),l.fragment.appendChild(f)}};e.InlineCompletionsHoverParticipant=o=Me([fe(1,b.ILanguageService),fe(2,r.IOpenerService),fe(3,i.IAccessibilityService),fe(4,s.IInstantiationService),fe(5,d.ITelemetryService)],o)}),define(X[882],ee([1,0,15,94,880,881,246,29]),function(K,e,_,k,y,E,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(w.InlineCompletionsController.ID,w.InlineCompletionsController,3),(0,_.registerEditorAction)(y.TriggerInlineSuggestionAction),(0,_.registerEditorAction)(y.ShowNextInlineSuggestionAction),(0,_.registerEditorAction)(y.ShowPreviousInlineSuggestionAction),(0,_.registerEditorAction)(y.AcceptNextWordOfInlineCompletion),(0,_.registerEditorAction)(y.AcceptNextLineOfInlineCompletion),(0,_.registerEditorAction)(y.AcceptInlineCompletion),(0,_.registerEditorAction)(y.HideInlineCompletion),(0,b.registerAction2)(y.ToggleAlwaysShowInlineSuggestionToolbar),k.HoverParticipantRegistry.register(E.InlineCompletionsHoverParticipant)}),define(X[359],ee([1,0,8]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,_.createDecorator)("workspaceTrustManagementService")}),define(X[883],ee([1,0,13,27,61,2,17,9,15,41,38,270,111,39,312,94,238,805,678,26,8,52,79,73,359,446]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,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 m=e.UnicodeHighlighter=class extends E.Disposable{constructor(ne,se,H,W){super(),this._editor=ne,this._editorWorkerService=se,this._workspaceTrustService=H,this._highlighter=null,this._bannerClosed=!1,this._updateState=q=>{if(q&&q.hasMore){if(this._bannerClosed)return;const Z=Math.max(q.ambiguousCharacterCount,q.nonBasicAsciiCharacterCount,q.invisibleCharacterCount);let Y;if(q.nonBasicAsciiCharacterCount>=Z)Y={message:o.localize(1,null),command:new V};else if(q.ambiguousCharacterCount>=Z)Y={message:o.localize(2,null),command:new F};else if(q.invisibleCharacterCount>=Z)Y={message:o.localize(3,null),command:new B};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:Y.message,icon:e.warningIcon,actions:[{label:Y.command.shortLabel,href:`command:${Y.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(W.createInstance(h.BannerController,ne)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=ne.getOption(120),this._register(H.onDidChangeTrust(q=>{this._updateHighlighter()})),this._register(ne.onDidChangeConfiguration(q=>{q.hasChanged(120)&&(this._options=ne.getOption(120),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const 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 L(this._editor,se,this._updateState,this._editorWorkerService):this._highlighter=new D(this._editor,se,this._updateState)}getDecorationInfo(ne){return this._highlighter?this._highlighter.getDecorationInfo(ne):null}};m.ID="editor.contrib.unicodeHighlighter",e.UnicodeHighlighter=m=Me([fe(1,t.IEditorWorkerService),fe(2,f.IWorkspaceTrustManagementService),fe(3,l.IInstantiationService)],m);function C(re,ne){return{nonBasicASCII:ne.nonBasicASCII===g.inUntrustedWorkspace?!re:ne.nonBasicASCII,ambiguousCharacters:ne.ambiguousCharacters,invisibleCharacters:ne.invisibleCharacters,includeComments:ne.includeComments===g.inUntrustedWorkspace?!re:ne.includeComments,includeStrings:ne.includeStrings===g.inUntrustedWorkspace?!re:ne.includeStrings,allowedCharacters:ne.allowedCharacters,allowedLocales:ne.allowedLocales}}let L=class extends E.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,s.isModelDecorationVisible)(se,ne))return null;const H=se.getValueInRange(ne.range);return{reason:A(H,this._options),inComment:(0,s.isModelDecorationInComment)(se,ne),inString:(0,s.isModelDecorationInString)(se,ne)}}};L=Me([fe(3,t.IEditorWorkerService)],L);class D extends E.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 q=n.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,W);for(const Z of q.ranges)H.ranges.push(Z);H.ambiguousCharacterCount+=H.ambiguousCharacterCount,H.invisibleCharacterCount+=H.invisibleCharacterCount,H.nonBasicAsciiCharacterCount+=H.nonBasicAsciiCharacterCount,H.hasMore=H.hasMore||q.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,s.isModelDecorationVisible)(se,ne)?{reason:A(H,this._options),inComment:(0,s.isModelDecorationInComment)(se,ne),inString:(0,s.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(m.ID);if(!W)return[];const q=[];let Z=300;for(const Y of se){const oe=W.getDecorationInfo(Y);if(!oe)continue;const ge=H.getValueInRange(Y.range).codePointAt(0),le=O(ge);let ue;switch(oe.reason.kind){case 0:{(0,b.isBasicASCII)(oe.reason.confusableWith)?ue=o.localize(4,null,le,O(oe.reason.confusableWith.codePointAt(0))):ue=o.localize(5,null,le,O(oe.reason.confusableWith.codePointAt(0)));break}case 1:ue=o.localize(6,null,le);break;case 2:ue=o.localize(7,null,le);break}const j={codePoint:ge,reason:oe.reason,inComment:oe.inComment,inString:oe.inString},z=o.localize(8,null),U=`command:${$.ID}?${encodeURIComponent(JSON.stringify(j))}`,J=new y.MarkdownString("",!0).appendMarkdown(ue).appendText(" ").appendLink(U,z);q.push(new d.MarkdownHover(this,Y.range,[J],!1,Z++))}return q}renderHoverParts(ne,se){return(0,d.renderMarkdownHovers)(ne,se,this._editor,this._languageService,this._openerService)}};e.UnicodeHighlighterHoverParticipant=I=Me([fe(1,i.ILanguageService),fe(2,a.IOpenerService)],I);function T(re){return`U+${re.toString(16).padStart(4,"0")}`}function O(re){let ne=`\`${T(re)}\``;return b.InvisibleCharacters.isInvisibleCharacter(re)||(ne+=` "${`${R(re)}`}"`),ne}function R(re){return re===96?"`` ` ``":"`"+String.fromCodePoint(re)+"`"}function A(re,ne){return n.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(re,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=p.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 $ extends S.EditorAction{constructor(){super({id:$.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:q,inString:Z,inComment:Y}=H,oe=String.fromCodePoint(W),ce=ne.get(u.IQuickInputService),ge=ne.get(c.IConfigurationService);function le(z){return b.InvisibleCharacters.isInvisibleCharacter(z)?o.localize(20,null,T(z)):o.localize(21,null,`${T(z)} "${oe}"`)}const ue=[];if(q.kind===0)for(const z of q.notAmbiguousInLocales)ue.push({label:o.localize(22,null,z),run:()=>we(this,void 0,void 0,function*(){Q(ge,[z])})});if(ue.push({label:le(W),run:()=>M(ge,[W])}),Y){const z=new P;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(ge)})})}else if(Z){const z=new x;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(ge)})})}if(q.kind===0){const z=new F;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(ge)})})}else if(q.kind===1){const z=new B;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(ge)})})}else if(q.kind===2){const z=new V;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(ge)})})}else ie(q);const j=yield ce.pick(ue,{title:o.localize(23,null)});j&&(yield j.run())})}}e.ShowExcludeOptions=$,$.ID="editor.action.unicodeHighlight.showExcludeOptions";function M(re,ne){return we(this,void 0,void 0,function*(){const se=re.getValue(g.unicodeHighlightConfigKeys.allowedCharacters);let H;typeof se=="object"&&se?H=se:H={};for(const W of ne)H[String.fromCodePoint(W)]=!0;yield re.updateValue(g.unicodeHighlightConfigKeys.allowedCharacters,H,2)})}function Q(re,ne){var se;return we(this,void 0,void 0,function*(){const H=(se=re.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 q of ne)W[q]=!0;yield re.updateValue(g.unicodeHighlightConfigKeys.allowedLocales,W,2)})}function ie(re){throw new Error(`Unexpected value: ${re}`)}(0,S.registerEditorAction)(F),(0,S.registerEditorAction)(B),(0,S.registerEditorAction)(V),(0,S.registerEditorAction)($),(0,S.registerEditorContribution)(m.ID,m,1),r.HoverParticipantRegistry.register(I)}),define(X[884],ee([1,0,184,187,343,318,763,841,764,765,766,799,843,867,851,854,767,874,768,844,876,346,347,771,772,738,882,243,244,352,350,353,774,869,852,775,776,855,856,777,861,804,826,827,828,779,245,871,358,780,782,329,883,783,862,336,784,778,82,165]),function(K,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(X[247],ee([1,0,9,7,44,6,113,2,17,103,20,151,231,65,12,5,51,62,180,25,26,328,14,152,8,726,34,729,112,320,730,153,43,83,72,130,124,82,42,32,63,359,55,732,749,835,50,737,111,232,39,821,226,838,837,342,123,731,89,29,759,733,97,724,225,725,182,185,90,736,52,79,84,753,181,734,192,11,28,341,321,873,70,822,715]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R,A,N,P,x,F,B,V,$,M,Q,ie,re,ne,se,H,W,q,Z,Y,oe,ce,ge,le,ue,j,z,U,J,te,G,ae,me,Ce,Se,ye,Ee,De,ke,Ie,he,ve,de,pe,Le,Ne){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class be{constructor(Re){this.disposed=!1,this.model=Re,this._onWillDispose=new E.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let _e=class{constructor(Re){this.modelService=Re}createModelReference(Re){const We=this.modelService.getModel(Re);return We?Promise.resolve(new b.ImmortalReference(new be(We))):Promise.reject(new Error("Model not found"))}};_e=Me([fe(0,d.IModelService)],_e);class Te{show(){return Te.NULL_PROGRESS_RUNNER}showWhile(Re,We){return we(this,void 0,void 0,function*(){yield Re})}}Te.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Oe{}class Pe{confirm(Re){return we(this,void 0,void 0,function*(){return{confirmed:this.doConfirm(Re.message,Re.detail),checkboxChecked:!1}})}doConfirm(Re,We){let Ue=Re;return We&&(Ue=Ue+`
- `+We),window.confirm(Ue)}prompt(Re){var We,Ue;return we(this,void 0,void 0,function*(){let je;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),je=yield(Ue=Qe[0])===null||Ue===void 0?void 0:Ue.run({checkboxChecked:!1})}return{result:je}})}error(Re,We){return we(this,void 0,void 0,function*(){yield this.prompt({type:g.default.Error,message:Re,detail:We})})}}class Be{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 Be.NO_OP}prompt(Re,We,Ue,je){return Be.NO_OP}status(Re,We){return b.Disposable.None}}e.StandaloneNotificationService=Be,Be.NO_OP=new R.NoOpNotification;let Fe=e.StandaloneCommandService=class{constructor(Re){this._onWillExecuteCommand=new E.Emitter,this._onDidExecuteCommand=new E.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Re}executeCommand(Re,...We){const Ue=c.CommandsRegistry.getCommand(Re);if(!Ue)return Promise.reject(new Error(`command '${Re}' not found`));try{this._onWillExecuteCommand.fire({commandId:Re,args:We});const je=this._instantiationService.invokeFunction.apply(this._instantiationService,[Ue.handler,...We]);return this._onDidExecuteCommand.fire({commandId:Re,args:We}),Promise.resolve(je)}catch(je){return Promise.reject(je)}}};e.StandaloneCommandService=Fe=Me([fe(0,f.IInstantiationService)],Fe);let ze=e.StandaloneKeybindingService=class extends m.AbstractKeybindingService{constructor(Re,We,Ue,je,nt,Qe){super(Re,We,Ue,je,nt),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const ot=gt=>{const Ct=new b.DisposableStore;Ct.add(k.addDisposableListener(gt,k.EventType.KEY_DOWN,At=>{const Et=new y.StandardKeyboardEvent(At);this._dispatch(Et,Et.target)&&(Et.preventDefault(),Et.stopPropagation())})),Ct.add(k.addDisposableListener(gt,k.EventType.KEY_UP,At=>{const Et=new y.StandardKeyboardEvent(At);this._singleModifierDispatch(Et,Et.target)&&Et.preventDefault()})),this._domNodeListeners.push(new Ze(gt,Ct))},it=gt=>{for(let Ct=0;Ct<this._domNodeListeners.length;Ct++){const At=this._domNodeListeners[Ct];At.domNode===gt&&(this._domNodeListeners.splice(Ct,1),At.dispose())}},lt=gt=>{gt.getOption(59)||ot(gt.getContainerDomNode())},ft=gt=>{gt.getOption(59)||it(gt.getContainerDomNode())};this._register(Qe.onCodeEditorAdd(lt)),this._register(Qe.onCodeEditorRemove(ft)),Qe.listCodeEditors().forEach(lt);const Lt=gt=>{ot(gt.getContainerDomNode())},yt=gt=>{it(gt.getContainerDomNode())};this._register(Qe.onDiffEditorAdd(Lt)),this._register(Qe.onDiffEditorRemove(yt)),Qe.listDiffEditors().forEach(Lt)}addDynamicKeybinding(Re,We,Ue,je){return(0,b.combinedDisposable)(c.CommandsRegistry.registerCommand(Re,Ue),this.addDynamicKeybindings([{keybinding:We,command:Re,when:je}]))}addDynamicKeybindings(Re){const We=Re.map(Ue=>{var je;return{keybinding:(0,w.decodeKeybinding)(Ue.keybinding,S.OS),command:(je=Ue.command)!==null&&je!==void 0?je:null,commandArgs:Ue.commandArgs,when:Ue.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(We),this.updateResolver(),(0,b.toDisposable)(()=>{for(let Ue=0;Ue<this._dynamicKeybindings.length;Ue++)if(this._dynamicKeybindings[Ue]===We[0]){this._dynamicKeybindings.splice(Ue,We.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const Re=this._toNormalizedKeybindingItems(D.KeybindingsRegistry.getDefaultKeybindings(),!0),We=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new L.KeybindingResolver(Re,We,Ue=>this._log(Ue))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(Re,We){const Ue=[];let je=0;for(const nt of Re){const Qe=nt.when||void 0,ot=nt.keybinding;if(!ot)Ue[je++]=new I.ResolvedKeybindingItem(void 0,nt.command,nt.commandArgs,Qe,We,null,!1);else{const it=T.USLayoutResolvedKeybinding.resolveKeybinding(ot,S.OS);for(const lt of it)Ue[je++]=new I.ResolvedKeybindingItem(lt,nt.command,nt.commandArgs,Qe,We,null,!1)}}return Ue}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=ze=Me([fe(0,u.IContextKeyService),fe(1,c.ICommandService),fe(2,N.ITelemetryService),fe(3,R.INotificationService),fe(4,$.ILogService),fe(5,V.ICodeEditorService)],ze);class Ze extends b.Disposable{constructor(Re,We){super(),this.domNode=Re,this._register(We)}}function Ge(qe){return qe&&typeof qe=="object"&&(!qe.overrideIdentifier||typeof qe.overrideIdentifier=="string")&&(!qe.resource||qe.resource instanceof p.URI)}class tt{constructor(){this._onDidChangeConfiguration=new E.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const Re=new ve.DefaultConfiguration;this._configuration=new a.Configuration(Re.reload(),new a.ConfigurationModel,new a.ConfigurationModel,new a.ConfigurationModel),Re.dispose()}getValue(Re,We){const Ue=typeof Re=="string"?Re:void 0,je=Ge(Re)?Re:Ge(We)?We:{};return this._configuration.getValue(Ue,je,void 0)}updateValues(Re){const We={data:this._configuration.toData()},Ue=[];for(const je of Re){const[nt,Qe]=je;this.getValue(nt)!==Qe&&(this._configuration.updateValue(nt,Qe),Ue.push(nt))}if(Ue.length>0){const je=new a.ConfigurationChangeEvent({keys:Ue,overrides:[]},We,this._configuration);je.source=8,je.sourceConfig=null,this._onDidChangeConfiguration.fire(je)}return Promise.resolve()}updateValue(Re,We,Ue,je){return this.updateValues([[Re,We]])}inspect(Re,We={}){return this._configuration.inspect(Re,We,void 0)}}e.StandaloneConfigurationService=tt;let He=class{constructor(Re,We,Ue){this.configurationService=Re,this.modelService=We,this.languageService=Ue,this._onDidChangeConfiguration=new E.Emitter,this.configurationService.onDidChangeConfiguration(je=>{this._onDidChangeConfiguration.fire({affectedKeys:je.affectedKeys,affectsConfiguration:(nt,Qe)=>je.affectsConfiguration(Qe)})})}getValue(Re,We,Ue){const je=s.Position.isIPosition(We)?We:null,nt=je?typeof Ue=="string"?Ue:void 0:typeof We=="string"?We:void 0,Qe=Re?this.getLanguage(Re,je):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 Ue=this.modelService.getModel(Re);return Ue?We?Ue.getLanguageIdAtPosition(We.lineNumber,We.column):Ue.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(Re)}};He=Me([fe(0,l.IConfigurationService),fe(1,d.IModelService),fe(2,Z.ILanguageService)],He);let Ae=class{constructor(Re){this.configurationService=Re}getEOL(Re,We){const Ue=this.configurationService.getValue("files.eol",{overrideIdentifier:We,resource:Re});return Ue&&typeof Ue=="string"&&Ue!=="auto"?Ue:S.isLinux||S.isMacintosh?`
- `:`\r
- `}};Ae=Me([fe(0,l.IConfigurationService)],Ae);class xe{publicLog2(){}}class Ve{constructor(){const Re=p.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 $e(qe,Re,We){if(!Re||!(qe instanceof tt))return;const Ue=[];Object.keys(Re).forEach(je=>{(0,t.isEditorConfigurationKey)(je)&&Ue.push([`editor.${je}`,Re[je]]),We&&(0,t.isDiffEditorConfigurationKey)(je)&&Ue.push([`diffEditor.${je}`,Re[je]])}),Ue.length>0&&qe.updateValues(Ue)}e.updateConfigurationService=$e;let Je=class{constructor(Re){this._modelService=Re}hasPreviewHandler(){return!1}apply(Re,We){return we(this,void 0,void 0,function*(){const Ue=Array.isArray(Re)?Re:n.ResourceEdit.convert(Re),je=new Map;for(const ot of Ue){if(!(ot instanceof n.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const it=this._modelService.getModel(ot.resource);if(!it)throw new Error("bad edit - model not found");if(typeof ot.versionId=="number"&&it.getVersionId()!==ot.versionId)throw new Error("bad state - model changed in the meantime");let lt=je.get(it);lt||(lt=[],je.set(it,lt)),lt.push(i.EditOperation.replaceMove(r.Range.lift(ot.textEdit.range),ot.textEdit.text))}let nt=0,Qe=0;for(const[ot,it]of je)ot.pushStackElement(),ot.pushEditOperations([],it,()=>[]),ot.pushStackElement(),Qe+=1,nt+=it.length;return{ariaSummary:_.format(F.StandaloneServicesNLS.bulkEditServiceSummary,nt,Qe),isApplied:nt>0}})}};Je=Me([fe(0,d.IModelService)],Je);class Ke{getUriLabel(Re,We){return Re.scheme==="file"?Re.fsPath:Re.path}getUriBasenameLabel(Re){return(0,B.basename)(Re)}}let Xe=class extends ie.ContextViewService{constructor(Re,We){super(Re),this._codeEditorService=We}showContextView(Re,We,Ue){if(!We){const je=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();je&&(We=je.getContainerDomNode())}return super.showContextView(Re,We,Ue)}};Xe=Me([fe(0,x.ILayoutService),fe(1,V.ICodeEditorService)],Xe);class rt{constructor(){this._neverEmitter=new E.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class st extends re.LanguageService{constructor(){super()}}class dt extends pe.LogService{constructor(){super(new $.ConsoleLogger)}}let Ye=class extends ne.ContextMenuService{constructor(Re,We,Ue,je,nt,Qe){super(Re,We,Ue,je,nt,Qe),this.configure({blockMouse:!1})}};Ye=Me([fe(0,N.ITelemetryService),fe(1,R.INotificationService),fe(2,Q.IContextViewService),fe(3,C.IKeybindingService),fe(4,U.IMenuService),fe(5,u.IContextKeyService)],Ye);class at{playAudioCue(Re,We){return we(this,void 0,void 0,function*(){})}}(0,se.registerSingleton)(l.IConfigurationService,tt,0),(0,se.registerSingleton)(o.ITextResourceConfigurationService,He,0),(0,se.registerSingleton)(o.ITextResourcePropertiesService,Ae,0),(0,se.registerSingleton)(P.IWorkspaceContextService,Ve,0),(0,se.registerSingleton)(O.ILabelService,Ke,0),(0,se.registerSingleton)(N.ITelemetryService,xe,0),(0,se.registerSingleton)(v.IDialogService,Pe,0),(0,se.registerSingleton)(R.INotificationService,Be,0),(0,se.registerSingleton)(Ee.IMarkerService,De.MarkerService,0),(0,se.registerSingleton)(Z.ILanguageService,st,0),(0,se.registerSingleton)(ue.IStandaloneThemeService,le.StandaloneThemeService,0),(0,se.registerSingleton)($.ILogService,dt,0),(0,se.registerSingleton)(d.IModelService,ce.ModelService,0),(0,se.registerSingleton)(oe.IMarkerDecorationsService,Y.MarkerDecorationsService,0),(0,se.registerSingleton)(u.IContextKeyService,ae.ContextKeyService,0),(0,se.registerSingleton)(A.IProgressService,Oe,0),(0,se.registerSingleton)(A.IEditorProgressService,Te,0),(0,se.registerSingleton)(he.IStorageService,he.InMemoryStorageService,0),(0,se.registerSingleton)(W.IEditorWorkerService,q.EditorWorkerService,0),(0,se.registerSingleton)(n.IBulkEditService,Je,0),(0,se.registerSingleton)(M.IWorkspaceTrustManagementService,rt,0),(0,se.registerSingleton)(h.ITextModelService,_e,0),(0,se.registerSingleton)(z.IAccessibilityService,j.AccessibilityService,0),(0,se.registerSingleton)(ye.IListService,ye.ListService,0),(0,se.registerSingleton)(c.ICommandService,Fe,0),(0,se.registerSingleton)(C.IKeybindingService,ze,0),(0,se.registerSingleton)(Ie.IQuickInputService,ge.StandaloneQuickInputService,0),(0,se.registerSingleton)(Q.IContextViewService,Xe,0),(0,se.registerSingleton)(ke.IOpenerService,H.OpenerService,0),(0,se.registerSingleton)(G.IClipboardService,te.BrowserClipboardService,0),(0,se.registerSingleton)(Q.IContextMenuService,Ye,0),(0,se.registerSingleton)(U.IMenuService,J.MenuService,0),(0,se.registerSingleton)(de.IAudioCueService,at,0);var ut;(function(qe){const Re=new Se.ServiceCollection;for(const[Qe,ot]of(0,se.getSingletonServiceDescriptors)())Re.set(Qe,ot);const We=new Ce.InstantiationService(Re,!0);Re.set(f.IInstantiationService,We);function Ue(Qe){const ot=Re.get(Qe);if(!ot)throw new Error("Missing service "+Qe);return ot instanceof me.SyncDescriptor?We.invokeFunction(it=>it.get(Qe)):ot}qe.get=Ue;let je=!1;function nt(Qe){if(je)return We;je=!0;for(const[it,lt]of(0,se.getSingletonServiceDescriptors)())Re.get(it)||Re.set(it,lt);for(const it in Qe)if(Qe.hasOwnProperty(it)){const lt=(0,f.createDecorator)(it);Re.get(lt)instanceof me.SyncDescriptor&&Re.set(lt,Qe[it])}const ot=(0,Le.getEditorFeatures)();for(const it of ot)try{We.createInstance(it)}catch(lt){(0,Ne.onUnexpectedError)(lt)}return We}qe.initialize=nt})(ut||(e.StandaloneServices=ut={}))}),define(X[885],ee([1,0,49,2,32,187,343,262,247,123,29,25,26,14,55,8,34,43,24,89,82,97,83,51,39,341,71,28,19]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D){"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 E.CodeEditorWidget{constructor(B,V,$,M,Q,ie,re,ne,se,H,W,q){const Z=Object.assign({},V);Z.ariaLabel=Z.ariaLabel||l.StandaloneCodeEditorNLS.editorViewAccessibleLabel,Z.ariaLabel=Z.ariaLabel+";"+l.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(B,Z,{},$,M,Q,ie,ne,se,H,W,q),re instanceof S.StandaloneKeybindingService?this._standaloneKeybindingService=re:this._standaloneKeybindingService=null,O(Z.ariaContainerElement)}addCommand(B,V,$){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const M="DYNAMIC_"+ ++I,Q=i.ContextKeyExpr.deserialize($);return this._standaloneKeybindingService.addDynamicKeybinding(M,B,V,Q),M}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,$=B.label,M=i.ContextKeyExpr.and(i.ContextKeyExpr.equals("editorId",this.getId()),i.ContextKeyExpr.deserialize(B.precondition)),Q=B.keybindings,ie=i.ContextKeyExpr.and(M,i.ContextKeyExpr.deserialize(B.keybindingContext)),re=B.contextMenuGroupId||null,ne=B.contextMenuOrder||0,se=(Z,...Y)=>Promise.resolve(B.run(this,...Y)),H=new k.DisposableStore,W=this.getId()+":"+V;if(H.add(n.CommandsRegistry.registerCommand(W,se)),re){const Z={command:{id:W,title:$},when:M,group:re,order:ne};H.add(p.MenuRegistry.appendMenuItem(p.MenuId.EditorContext,Z))}if(Array.isArray(Q))for(const Z of Q)H.add(this._standaloneKeybindingService.addDynamicKeybinding(W,Z,se,ie));const q=new b.InternalEditorAction(W,$,$,M,(...Z)=>Promise.resolve(B.run(this,...Z)),this._contextKeyService);return this._actions.set(V,q),H.add((0,k.toDisposable)(()=>{this._actions.delete(V)})),H}_triggerCommand(B,V){if(this._codeEditorService instanceof m.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(B,V)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(B,V)}};e.StandaloneCodeEditor=R=Me([fe(2,r.IInstantiationService),fe(3,y.ICodeEditorService),fe(4,n.ICommandService),fe(5,i.IContextKeyService),fe(6,d.IKeybindingService),fe(7,o.IThemeService),fe(8,h.INotificationService),fe(9,c.IAccessibilityService),fe(10,L.ILanguageConfigurationService),fe(11,D.ILanguageFeaturesService)],R);let A=e.StandaloneEditor=class extends R{constructor(B,V,$,M,Q,ie,re,ne,se,H,W,q,Z,Y,oe){const ce=Object.assign({},V);(0,S.updateConfigurationService)(H,ce,!1);const ge=ne.registerEditorContainer(B);typeof ce.theme=="string"&&ne.setTheme(ce.theme),typeof ce.autoDetectHighContrast<"u"&&ne.setAutoDetectHighContrast(!!ce.autoDetectHighContrast);const le=ce.model;delete ce.model,super(B,ce,$,M,Q,ie,re,ne,se,W,Y,oe),this._configurationService=H,this._standaloneThemeService=ne,this._register(ge);let ue;if(typeof le>"u"){const j=Z.getLanguageIdByMimeType(ce.language)||ce.language||C.PLAINTEXT_LANGUAGE_ID;ue=P(q,Z,ce.value||"",j,void 0),this._ownsModel=!0}else ue=le,this._ownsModel=!1;if(this._attachModel(ue),ue){const j={oldModelUrl:null,newModelUrl:ue.uri};this._onDidChangeModel.fire(j)}}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=A=Me([fe(2,r.IInstantiationService),fe(3,y.ICodeEditorService),fe(4,n.ICommandService),fe(5,i.IContextKeyService),fe(6,d.IKeybindingService),fe(7,g.IStandaloneThemeService),fe(8,h.INotificationService),fe(9,t.IConfigurationService),fe(10,c.IAccessibilityService),fe(11,v.IModelService),fe(12,f.ILanguageService),fe(13,L.ILanguageConfigurationService),fe(14,D.ILanguageFeaturesService)],A);let N=e.StandaloneDiffEditor=class extends w.DiffEditorWidget{constructor(B,V,$,M,Q,ie,re,ne,se,H,W){const q=Object.assign({},V);(0,S.updateConfigurationService)(ne,q,!0);const Z=ie.registerEditorContainer(B);typeof q.theme=="string"&&ie.setTheme(q.theme),typeof q.autoDetectHighContrast<"u"&&ie.setAutoDetectHighContrast(!!q.autoDetectHighContrast),super(B,q,{},W,M,$,Q,ie,re,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,$){return B.createInstance(R,V,$)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(B,V,$){return this.getModifiedEditor().addCommand(B,V,$)}createContextKey(B,V){return this.getModifiedEditor().createContextKey(B,V)}addAction(B){return this.getModifiedEditor().addAction(B)}};e.StandaloneDiffEditor=N=Me([fe(2,r.IInstantiationService),fe(3,i.IContextKeyService),fe(4,y.ICodeEditorService),fe(5,g.IStandaloneThemeService),fe(6,h.INotificationService),fe(7,t.IConfigurationService),fe(8,s.IContextMenuService),fe(9,u.IEditorProgressService),fe(10,a.IClipboardService)],N);function P(F,B,V,$,M){if(V=V||"",!$){const Q=V.indexOf(`
- `);let ie=V;return Q!==-1&&(ie=V.substring(0,Q)),x(F,V,B.createByFilepathOrFirstLine(M||null,ie),M)}return x(F,V,B.createById($),M)}e.createTextModel=P;function x(F,B,V,$){return F.createModel(B,V,$)}}),define(X[886],ee([1,0,2,9,20,311,32,318,41,224,171,46,31,28,149,39,51,744,199,719,885,247,123,25,90,34,15,29,14,71,170,104,148,52,453]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r,d,h,o,c,l,a,u,v,f,m,C,L,D,I,T,O,R,A){"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(De,ke,Ie){return a.StandaloneServices.initialize(Ie||{}).createInstance(l.StandaloneEditor,De,ke)}e.create=N;function P(De){return a.StandaloneServices.get(w.ICodeEditorService).onCodeEditorAdd(Ie=>{De(Ie)})}e.onDidCreateEditor=P;function x(De){return a.StandaloneServices.get(w.ICodeEditorService).onDiffEditorAdd(Ie=>{De(Ie)})}e.onDidCreateDiffEditor=x;function F(){return a.StandaloneServices.get(w.ICodeEditorService).listCodeEditors()}e.getEditors=F;function B(){return a.StandaloneServices.get(w.ICodeEditorService).listDiffEditors()}e.getDiffEditors=B;function V(De,ke,Ie){return a.StandaloneServices.initialize(Ie||{}).createInstance(l.StandaloneDiffEditor,De,ke)}e.createDiffEditor=V;function $(De,ke){return a.StandaloneServices.initialize({}).createInstance(b.DiffNavigator,De,ke)}e.createDiffNavigator=$;function M(De){if(typeof De.id!="string"||typeof De.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return v.CommandsRegistry.registerCommand(De.id,De.run)}e.addCommand=M;function Q(De){if(typeof De.id!="string"||typeof De.label!="string"||typeof De.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const ke=D.ContextKeyExpr.deserialize(De.precondition),Ie=(ve,...de)=>C.EditorCommand.runEditorCommand(ve,de,ke,(pe,Le,Ne)=>Promise.resolve(De.run(Le,...Ne))),he=new _.DisposableStore;if(he.add(v.CommandsRegistry.registerCommand(De.id,Ie)),De.contextMenuGroupId){const ve={command:{id:De.id,title:De.label},when:ke,group:De.contextMenuGroupId,order:De.contextMenuOrder||0};he.add(L.MenuRegistry.appendMenuItem(L.MenuId.EditorContext,ve))}if(Array.isArray(De.keybindings)){const ve=a.StandaloneServices.get(m.IKeybindingService);if(!(ve instanceof a.StandaloneKeybindingService))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const de=D.ContextKeyExpr.and(ke,D.ContextKeyExpr.deserialize(De.keybindingContext));he.add(ve.addDynamicKeybindings(De.keybindings.map(pe=>({keybinding:pe,command:De.id,when:de}))))}}return he}e.addEditorAction=Q;function ie(De){return re([De])}e.addKeybindingRule=ie;function re(De){const ke=a.StandaloneServices.get(m.IKeybindingService);return ke instanceof a.StandaloneKeybindingService?ke.addDynamicKeybindings(De.map(Ie=>({keybinding:Ie.keybinding,command:Ie.command,commandArgs:Ie.commandArgs,when:D.ContextKeyExpr.deserialize(Ie.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),_.Disposable.None)}e.addKeybindingRules=re;function ne(De,ke,Ie){const he=a.StandaloneServices.get(r.ILanguageService),ve=he.getLanguageIdByMimeType(ke)||ke;return(0,l.createTextModel)(a.StandaloneServices.get(d.IModelService),he,De,ve,Ie)}e.createModel=ne;function se(De,ke){const Ie=a.StandaloneServices.get(r.ILanguageService),he=Ie.getLanguageIdByMimeType(ke)||ke||I.PLAINTEXT_LANGUAGE_ID;De.setLanguage(Ie.createById(he))}e.setModelLanguage=se;function H(De,ke,Ie){De&&a.StandaloneServices.get(f.IMarkerService).changeOne(ke,De.uri,Ie)}e.setModelMarkers=H;function W(De){a.StandaloneServices.get(f.IMarkerService).changeAll(De,[])}e.removeAllMarkers=W;function q(De){return a.StandaloneServices.get(f.IMarkerService).read(De)}e.getModelMarkers=q;function Z(De){return a.StandaloneServices.get(f.IMarkerService).onMarkerChanged(De)}e.onDidChangeMarkers=Z;function Y(De){return a.StandaloneServices.get(d.IModelService).getModel(De)}e.getModel=Y;function oe(){return a.StandaloneServices.get(d.IModelService).getModels()}e.getModels=oe;function ce(De){return a.StandaloneServices.get(d.IModelService).onModelAdded(De)}e.onDidCreateModel=ce;function ge(De){return a.StandaloneServices.get(d.IModelService).onModelRemoved(De)}e.onWillDisposeModel=ge;function le(De){return a.StandaloneServices.get(d.IModelService).onModelLanguageChanged(Ie=>{De({model:Ie.model,oldLanguage:Ie.oldLanguageId})})}e.onDidChangeModelLanguage=le;function ue(De){return(0,h.createWebWorker)(a.StandaloneServices.get(d.IModelService),a.StandaloneServices.get(i.ILanguageConfigurationService),De)}e.createWebWorker=ue;function j(De,ke){const Ie=a.StandaloneServices.get(r.ILanguageService),he=a.StandaloneServices.get(u.IStandaloneThemeService);return he.registerEditorContainer(De),c.Colorizer.colorizeElement(he,Ie,De,ke)}e.colorizeElement=j;function z(De,ke,Ie){const he=a.StandaloneServices.get(r.ILanguageService);return a.StandaloneServices.get(u.IStandaloneThemeService).registerEditorContainer(document.body),c.Colorizer.colorize(he,De,ke,Ie)}e.colorize=z;function U(De,ke,Ie=4){return a.StandaloneServices.get(u.IStandaloneThemeService).registerEditorContainer(document.body),c.Colorizer.colorizeModelLine(De,ke,Ie)}e.colorizeModelLine=U;function J(De){const ke=t.TokenizationRegistry.get(De);return ke||{getInitialState:()=>s.NullState,tokenize:(Ie,he,ve)=>(0,s.nullTokenize)(De,ve)}}function te(De,ke){t.TokenizationRegistry.getOrCreate(ke);const Ie=J(ke),he=(0,k.splitLines)(De),ve=[];let de=Ie.getInitialState();for(let pe=0,Le=he.length;pe<Le;pe++){const Ne=he[pe],be=Ie.tokenize(Ne,!0,de);ve[pe]=be.tokens,de=be.endState}return ve}e.tokenize=te;function G(De,ke){a.StandaloneServices.get(u.IStandaloneThemeService).defineTheme(De,ke)}e.defineTheme=G;function ae(De){a.StandaloneServices.get(u.IStandaloneThemeService).setTheme(De)}e.setTheme=ae;function me(){E.FontMeasurements.clearAllFontInfos()}e.remeasureFonts=me;function Ce(De,ke){return v.CommandsRegistry.registerCommand({id:De,handler:ke})}e.registerCommand=Ce;function Se(De){return a.StandaloneServices.get(A.IOpenerService).registerOpener({open(Ie){return we(this,void 0,void 0,function*(){return typeof Ie=="string"&&(Ie=y.URI.parse(Ie)),De.open(Ie)})}})}e.registerLinkOpener=Se;function ye(De){return a.StandaloneServices.get(w.ICodeEditorService).registerCodeEditorOpenHandler((Ie,he,ve)=>we(this,void 0,void 0,function*(){var de;if(!he)return null;const pe=(de=Ie.options)===null||de===void 0?void 0:de.selection;let Le;return pe&&typeof pe.endLineNumber=="number"&&typeof pe.endColumn=="number"?Le=pe:pe&&(Le={lineNumber:pe.startLineNumber,column:pe.startColumn}),(yield De.openCodeEditor(he,Ie.resource,Le))?he:null}))}e.registerEditorOpener=ye;function Ee(){return{create:N,getEditors:F,getDiffEditors:B,onDidCreateEditor:P,onDidCreateDiffEditor:x,createDiffEditor:V,createDiffNavigator:$,addCommand:M,addEditorAction:Q,addKeybindingRule:ie,addKeybindingRules:re,createModel:ne,setModelLanguage:se,setModelMarkers:H,getModelMarkers:q,removeAllMarkers:W,onDidChangeMarkers:Z,getModels:oe,getModel:Y,onDidCreateModel:ce,onWillDisposeModel:ge,onDidChangeModelLanguage:le,createWebWorker:ue,colorizeElement:j,colorize:z,colorizeModelLine:U,tokenize:te,defineTheme:G,setTheme:ae,remeasureFonts:me,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:n.TextModelResolvedOptions,FindMatch:n.FindMatch,ApplyUpdateResult:S.ApplyUpdateResult,LineRange:O.LineRange,LineRangeMapping:T.LineRangeMapping,RangeMapping:T.RangeMapping,EditorZoom:R.EditorZoom,EditorType:p.EditorType,EditorOptions:S.EditorOptions}}e.createMonacoEditorAPI=Ee}),define(X[887],ee([1,0,37,5,31,28,71,39,199,247,527,317,123,90,19,26]),function(K,e,_,k,y,E,w,b,S,g,p,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerInlayHintsProvider=e.registerInlineCompletionsProvider=e.registerDocumentRangeSemanticTokensProvider=e.registerDocumentSemanticTokensProvider=e.registerSelectionRangeProvider=e.registerDeclarationProvider=e.registerFoldingRangeProvider=e.registerColorProvider=e.registerCompletionItemProvider=e.registerLinkProvider=e.registerOnTypeFormattingEditProvider=e.registerDocumentRangeFormattingEditProvider=e.registerDocumentFormattingEditProvider=e.registerCodeActionProvider=e.registerCodeLensProvider=e.registerTypeDefinitionProvider=e.registerImplementationProvider=e.registerDefinitionProvider=e.registerLinkedEditingRangeProvider=e.registerDocumentHighlightProvider=e.registerDocumentSymbolProvider=e.registerHoverProvider=e.registerSignatureHelpProvider=e.registerRenameProvider=e.registerReferenceProvider=e.setMonarchTokensProvider=e.setTokensProvider=e.registerTokensProviderFactory=e.setColorMap=e.TokenizationSupportAdapter=e.EncodedTokenizationSupportAdapter=e.setLanguageConfiguration=e.onLanguageEncountered=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function 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 l(z,U){const te=g.StandaloneServices.get(b.ILanguageService).onDidRequestBasicLanguageFeatures(G=>{G===z&&(te.dispose(),U())});return te}e.onLanguageEncountered=l;function a(z,U){if(!g.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(z))throw new Error(`Cannot set configuration for unknown language ${z}`);return g.StandaloneServices.get(E.ILanguageConfigurationService).register(z,U,100)}e.setLanguageConfiguration=a;class u{constructor(U,J){this._languageId=U,this._actual=J}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(U,J,te){if(typeof this._actual.tokenize=="function")return v.adaptTokenize(this._languageId,this._actual,U,te);throw new Error("Not supported!")}tokenizeEncoded(U,J,te){const G=this._actual.tokenizeEncoded(U,te);return new y.EncodedTokenizationResult(G.tokens,G.endState)}}e.EncodedTokenizationSupportAdapter=u;class v{constructor(U,J,te,G){this._languageId=U,this._actual=J,this._languageService=te,this._standaloneThemeService=G}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(U,J){const te=[];let G=0;for(let ae=0,me=U.length;ae<me;ae++){const Ce=U[ae];let Se=Ce.startIndex;ae===0?Se=0:Se<G&&(Se=G),te[ae]=new y.Token(Se,Ce.scopes,J),G=Se}return te}static adaptTokenize(U,J,te,G){const ae=J.tokenize(te,G),me=v._toClassicTokens(ae.tokens,U);let Ce;return ae.endState.equals(G)?Ce=G:Ce=ae.endState,new y.TokenizationResult(me,Ce)}tokenize(U,J,te){return v.adaptTokenize(this._languageId,this._actual,U,te)}_toBinaryTokens(U,J){const te=U.encodeLanguageId(this._languageId),G=this._standaloneThemeService.getColorTheme().tokenTheme,ae=[];let me=0,Ce=0;for(let ye=0,Ee=J.length;ye<Ee;ye++){const De=J[ye],ke=G.match(te,De.scopes)|1024;if(me>0&&ae[me-1]===ke)continue;let Ie=De.startIndex;ye===0?Ie=0:Ie<Ce&&(Ie=Ce),ae[me++]=Ie,ae[me++]=ke,Ce=Ie}const Se=new Uint32Array(me);for(let ye=0;ye<me;ye++)Se[ye]=ae[ye];return Se}tokenizeEncoded(U,J,te){const G=this._actual.tokenize(U,te),ae=this._toBinaryTokens(this._languageService.languageIdCodec,G.tokens);let me;return G.endState.equals(te)?me=te:me=G.endState,new y.EncodedTokenizationResult(ae,me)}}e.TokenizationSupportAdapter=v;function f(z){return typeof z.getInitialState=="function"}function m(z){return"tokenizeEncoded"in z}function C(z){return z&&typeof z.then=="function"}function L(z){const U=g.StandaloneServices.get(t.IStandaloneThemeService);if(z){const J=[null];for(let te=1,G=z.length;te<G;te++)J[te]=_.Color.fromHex(z[te]);U.setColorMapOverride(J)}else U.setColorMapOverride(null)}e.setColorMap=L;function D(z,U){return m(U)?new u(z,U):new v(z,U,g.StandaloneServices.get(b.ILanguageService),g.StandaloneServices.get(t.IStandaloneThemeService))}function I(z,U){const J=new y.LazyTokenizationSupport(()=>we(this,void 0,void 0,function*(){const te=yield Promise.resolve(U.create());return te?f(te)?D(z,te):new n.MonarchTokenizer(g.StandaloneServices.get(b.ILanguageService),g.StandaloneServices.get(t.IStandaloneThemeService),z,(0,p.compile)(z,te),g.StandaloneServices.get(r.IConfigurationService)):null}));return y.TokenizationRegistry.registerFactory(z,J)}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}):y.TokenizationRegistry.register(z,D(z,U))}e.setTokensProvider=T;function O(z,U){const J=te=>new n.MonarchTokenizer(g.StandaloneServices.get(b.ILanguageService),g.StandaloneServices.get(t.IStandaloneThemeService),z,(0,p.compile)(z,te),g.StandaloneServices.get(r.IConfigurationService));return C(U)?I(z,{create:()=>U}):y.TokenizationRegistry.register(z,J(U))}e.setMonarchTokensProvider=O;function R(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).referenceProvider.register(z,U)}e.registerReferenceProvider=R;function A(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).renameProvider.register(z,U)}e.registerRenameProvider=A;function N(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).signatureHelpProvider.register(z,U)}e.registerSignatureHelpProvider=N;function P(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).hoverProvider.register(z,{provideHover:(te,G,ae)=>{const me=te.getWordAtPosition(G);return Promise.resolve(U.provideHover(te,G,ae)).then(Ce=>{if(Ce)return!Ce.range&&me&&(Ce.range=new k.Range(G.lineNumber,me.startColumn,G.lineNumber,me.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(s.ILanguageFeaturesService).documentSymbolProvider.register(z,U)}e.registerDocumentSymbolProvider=x;function F(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).documentHighlightProvider.register(z,U)}e.registerDocumentHighlightProvider=F;function B(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).linkedEditingRangeProvider.register(z,U)}e.registerLinkedEditingRangeProvider=B;function V(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).definitionProvider.register(z,U)}e.registerDefinitionProvider=V;function $(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).implementationProvider.register(z,U)}e.registerImplementationProvider=$;function M(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).typeDefinitionProvider.register(z,U)}e.registerTypeDefinitionProvider=M;function Q(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).codeLensProvider.register(z,U)}e.registerCodeLensProvider=Q;function ie(z,U,J){return g.StandaloneServices.get(s.ILanguageFeaturesService).codeActionProvider.register(z,{providedCodeActionKinds:J?.providedCodeActionKinds,documentation:J?.documentation,provideCodeActions:(G,ae,me,Ce)=>{const ye=g.StandaloneServices.get(i.IMarkerService).read({resource:G.uri}).filter(Ee=>k.Range.areIntersectingOrTouching(Ee,ae));return U.provideCodeActions(G,ae,{markers:ye,only:me.only,trigger:me.trigger},Ce)},resolveCodeAction:U.resolveCodeAction})}e.registerCodeActionProvider=ie;function re(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).documentFormattingEditProvider.register(z,U)}e.registerDocumentFormattingEditProvider=re;function ne(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(z,U)}e.registerDocumentRangeFormattingEditProvider=ne;function se(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).onTypeFormattingEditProvider.register(z,U)}e.registerOnTypeFormattingEditProvider=se;function H(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).linkProvider.register(z,U)}e.registerLinkProvider=H;function W(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).completionProvider.register(z,U)}e.registerCompletionItemProvider=W;function q(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).colorProvider.register(z,U)}e.registerColorProvider=q;function Z(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).foldingRangeProvider.register(z,U)}e.registerFoldingRangeProvider=Z;function Y(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).declarationProvider.register(z,U)}e.registerDeclarationProvider=Y;function oe(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).selectionRangeProvider.register(z,U)}e.registerSelectionRangeProvider=oe;function ce(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).documentSemanticTokensProvider.register(z,U)}e.registerDocumentSemanticTokensProvider=ce;function ge(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(z,U)}e.registerDocumentRangeSemanticTokensProvider=ge;function le(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).inlineCompletionsProvider.register(z,U)}e.registerInlineCompletionsProvider=le;function ue(z,U){return g.StandaloneServices.get(s.ILanguageFeaturesService).inlayHintsProvider.register(z,U)}e.registerInlayHintsProvider=ue;function j(){return{register:d,getLanguages:h,onLanguage:c,onLanguageEncountered:l,getEncodedLanguageId:o,setLanguageConfiguration:a,setColorMap:L,registerTokensProviderFactory:I,setTokensProvider:T,setMonarchTokensProvider:O,registerReferenceProvider:R,registerRenameProvider:A,registerCompletionItemProvider:W,registerSignatureHelpProvider:N,registerHoverProvider:P,registerDocumentSymbolProvider:x,registerDocumentHighlightProvider:F,registerLinkedEditingRangeProvider:B,registerDefinitionProvider:V,registerImplementationProvider:$,registerTypeDefinitionProvider:M,registerCodeLensProvider:Q,registerCodeActionProvider:ie,registerDocumentFormattingEditProvider:re,registerDocumentRangeFormattingEditProvider:ne,registerOnTypeFormattingEditProvider:se,registerLinkProvider:H,registerColorProvider:q,registerFoldingRangeProvider:Z,registerDeclarationProvider:Y,registerSelectionRangeProvider:oe,registerDocumentSemanticTokensProvider:ce,registerDocumentRangeSemanticTokensProvider:ge,registerInlineCompletionsProvider:le,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:y.FoldingRangeKind,SelectedSuggestionInfo:y.SelectedSuggestionInfo}}e.createMonacoLanguagesAPI=j}),define(X[888],ee([1,0,41,307,886,887,334]),function(K,e,_,k,y,E,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,p,n)=>Promise.resolve(g[0]));const b=(0,k.createMonacoBaseAPI)();b.editor=(0,y.createMonacoEditorAPI)(),b.languages=(0,E.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(K,e,_,k){k===void 0&&(k=_);var y=Object.getOwnPropertyDescriptor(e,_);(!y||("get"in y?!e.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return e[_]}}),Object.defineProperty(K,k,y)}:function(K,e,_,k){k===void 0&&(k=_),K[k]=e[_]}),ai=this&&this.__exportStar||function(K,e){for(var _ in K)_!=="default"&&!Object.prototype.hasOwnProperty.call(e,_)&&ri(e,K,_)};define(X[890],ee([1,0,888,884,785,786,787,755,830,831,791,872,833]),function(K,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),ai(_,e)})}).call(this);
- "use strict";/*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/basic-languages/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
- var 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)})});})();
- return moduleExports;
- });
- "use strict";/*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/language/css/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
- var 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);})();
- return moduleExports;
- });
- "use strict";/*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/language/html/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
- var 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);})();
- return moduleExports;
- });
- "use strict";/*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/language/json/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
- var 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);})();
- return moduleExports;
- });
- "use strict";/*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/language/typescript/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
- var 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);})();
- return moduleExports;
- });
- define("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; });
- //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map
|