/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ (function(){ var e=["require","exports","vs/base/common/lifecycle","vs/nls","vs/nls!vs/workbench/workbench.web.api","vs/platform/instantiation/common/instantiation","vs/base/common/event","vs/base/browser/dom","vs/platform/contextkey/common/contextkey","vs/platform/configuration/common/configuration","vs/base/common/uri","vs/platform/theme/common/themeService","vs/base/common/platform","vs/base/common/types","vs/base/common/arrays","vs/base/common/async","vs/platform/registry/common/platform","vs/base/common/resources","vs/editor/common/core/range","vs/css!vs/workbench/workbench.web.api","vs/platform/actions/common/actions","vs/base/common/errors","vs/workbench/services/editor/common/editorService","vs/platform/telemetry/common/telemetry","vs/base/common/strings","vs/platform/files/common/files","vs/platform/storage/common/storage","vs/platform/theme/common/colorRegistry","vs/platform/notification/common/notification","vs/base/common/network","vs/base/common/actions","vs/base/common/cancellation","vs/platform/commands/common/commands","vs/platform/instantiation/common/extensions","vs/platform/workspace/common/workspace","vs/platform/keybinding/common/keybinding","vs/platform/contextview/browser/contextView","vs/editor/browser/editorExtensions","vs/workbench/common/views","vs/platform/log/common/log","vs/workbench/services/environment/common/environmentService","vs/base/common/objects","vs/platform/opener/common/opener","vs/workbench/common/editor","vs/base/common/codicons","vs/editor/common/modes","vs/editor/common/services/modelService","vs/editor/common/core/position","vs/base/common/path","vs/platform/quickinput/common/quickInput","vs/editor/common/services/modeService","vs/workbench/services/extensions/common/extensions","vs/platform/label/common/label","vs/workbench/services/editor/common/editorGroupsService","vs/workbench/api/common/extHost.protocol","vs/base/common/color","vs/workbench/common/contributions","vs/platform/configuration/common/configurationRegistry","vs/editor/common/editorContextKeys","vs/platform/theme/common/styler","vs/editor/common/core/selection","vs/platform/product/common/productService","vs/workbench/services/textfile/common/textfiles","vs/workbench/services/layout/browser/layoutService","vs/editor/common/services/resolverService","vs/workbench/api/common/extHostCustomers","vs/base/common/buffer","vs/base/common/map","vs/platform/progress/common/progress","vs/platform/list/browser/listService","vs/workbench/common/actions","vs/platform/dialogs/common/dialogs","vs/editor/browser/services/codeEditorService","vs/workbench/browser/parts/views/viewPaneContainer","vs/base/browser/keyboardEvent","vs/editor/common/model/textModel","vs/platform/extensionManagement/common/extensionManagement","vs/workbench/services/host/browser/host","vs/base/browser/ui/actionbar/actionbar","vs/base/common/keyCodes","vs/base/browser/browser","vs/workbench/common/theme","vs/platform/keybinding/common/keybindingsRegistry","vs/workbench/contrib/debug/common/debug","vs/platform/environment/common/environment","vs/editor/browser/editorBrowser","vs/workbench/services/viewlet/browser/viewlet","vs/base/common/filters","vs/platform/clipboard/common/clipboardService","vs/platform/lifecycle/common/lifecycle","vs/platform/instantiation/common/descriptors","vs/workbench/contrib/notebook/common/notebookCommon","vs/base/common/uuid","vs/base/common/json","vs/platform/actions/browser/menuEntryActionViewItem","vs/base/common/decorators","vs/base/common/iterator","vs/base/common/severity","vs/platform/userDataSync/common/userDataSync","vs/base/browser/event","vs/base/browser/ui/actionbar/actionViewItems","vs/base/browser/mouseEvent","vs/base/browser/ui/widget","vs/base/browser/ui/aria/aria","vs/platform/extensions/common/extensions","vs/platform/accessibility/common/accessibility","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/markers/common/markers","vs/workbench/services/filesConfiguration/common/filesConfigurationService","vs/base/browser/fastDomNode","vs/base/common/labels","vs/editor/common/config/editorOptions","vs/editor/common/services/textResourceConfigurationService","vs/workbench/services/extensions/common/extensionsRegistry","vs/workbench/services/uriIdentity/common/uriIdentity","vs/editor/common/core/editOperation","vs/platform/userDataSync/common/storageKeys","vs/workbench/services/extensionManagement/common/extensionManagement","vs/workbench/services/preferences/common/preferences","vs/workbench/services/remote/common/remoteAgentService","vs/platform/workspaces/common/workspaces","vs/workbench/contrib/files/common/files","vs/base/common/glob","vs/workbench/contrib/extensions/common/extensions","vs/workbench/services/path/common/pathService","vs/workbench/services/workingCopy/common/workingCopyService","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/workbench/contrib/notebook/browser/notebookBrowser","vs/base/browser/touch","vs/editor/common/model","vs/base/common/errorMessage","vs/platform/instantiation/common/serviceCollection","vs/workbench/contrib/terminal/browser/terminal","vs/base/common/hash","vs/editor/common/modes/languageConfigurationRegistry","vs/base/common/functional","vs/base/common/extpath","vs/base/common/htmlContent","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/common/controller/cursorCommon","vs/editor/browser/widget/codeEditorWidget","vs/base/common/collections","vs/editor/browser/view/viewPart","vs/editor/browser/services/bulkEditService","vs/platform/theme/common/theme","vs/editor/common/view/editorColorRegistry","vs/workbench/contrib/notebook/common/notebookService","vs/workbench/services/statusbar/common/statusbar","vs/workbench/browser/dnd","vs/platform/undoRedo/common/undoRedo","vs/workbench/browser/parts/editor/editorPane","vs/workbench/browser/editor","vs/workbench/contrib/terminal/common/terminal","vs/workbench/services/panel/common/panelService","vs/base/browser/ui/inputbox/inputBox","vs/editor/common/services/editorWorkerService","vs/platform/contextkey/common/contextkeys","vs/platform/quickinput/common/quickAccess","vs/platform/remote/common/remoteAuthorityResolver","vs/workbench/contrib/webview/browser/webview","vs/workbench/services/backup/common/backup","vs/workbench/browser/labels","vs/workbench/services/themes/common/workbenchThemeService","vs/workbench/contrib/debug/common/debugModel","vs/base/common/jsonEdit","vs/base/browser/canIUse","vs/base/browser/dnd","vs/platform/request/common/request","vs/editor/contrib/snippet/snippetController2","vs/workbench/common/editor/diffEditorInput","vs/workbench/contrib/scm/common/scm","vs/workbench/services/activity/common/activity","vs/workbench/services/search/common/search","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/button/button","vs/base/browser/ui/list/listWidget","vs/editor/common/modes/modesRegistry","vs/editor/browser/core/editorState","vs/workbench/contrib/notebook/browser/constants","vs/workbench/services/configuration/common/configuration","vs/workbench/services/extensionRecommendations/common/extensionRecommendations","vs/workbench/browser/viewlet","vs/base/common/process","vs/base/browser/codicons","vs/base/common/mime","vs/base/browser/ui/iconLabel/iconLabel","vs/platform/layout/browser/layoutService","vs/editor/common/services/getIconClasses","vs/editor/contrib/peekView/peekView","vs/workbench/contrib/debug/common/debugUtils","vs/workbench/contrib/output/common/output","vs/workbench/contrib/debug/browser/debugActions","vs/workbench/browser/contextkeys","vs/workbench/services/workingCopy/common/workingCopyFileService","vs/base/common/linkedList","vs/base/common/numbers","vs/base/common/marshalling","vs/base/browser/ui/splitview/splitview","vs/base/common/date","vs/base/common/performance","vs/platform/quickinput/browser/pickerQuickAccess","vs/editor/browser/config/configuration","vs/platform/windows/common/windows","vs/workbench/common/memento","vs/workbench/common/resources","vs/workbench/contrib/tasks/common/taskService","vs/workbench/contrib/tasks/common/tasks","vs/workbench/services/output/common/output","vs/workbench/browser/actions/layoutActions","vs/workbench/common/editor/resourceEditorInput","vs/workbench/contrib/extensions/browser/extensionsActions","vs/base/common/errorsWithActions","vs/base/common/idGenerator","vs/base/browser/ui/countBadge/countBadge","vs/base/browser/ui/progressbar/progressbar","vs/editor/contrib/codeAction/types","vs/base/browser/ui/checkbox/checkbox","vs/base/browser/ui/toolbar/toolbar","vs/platform/editor/common/editor","vs/platform/browser/contextScopedHistoryWidget","vs/editor/contrib/suggest/suggest","vs/workbench/browser/quickaccess","vs/workbench/common/configuration","vs/workbench/contrib/preferences/common/preferences","vs/workbench/services/editor/common/editorOpenWith","vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService","vs/workbench/contrib/tasks/common/problemMatcher","vs/workbench/services/history/common/history","vs/workbench/services/workspaces/common/workspaceEditing","vs/base/browser/ui/tree/tree","vs/base/common/lazy","vs/base/common/scanCode","vs/base/common/stopwatch","vs/base/browser/ui/mouseCursor/mouseCursor","vs/base/browser/ui/sash/sash","vs/editor/common/viewModel/viewModel","vs/editor/contrib/snippet/snippetParser","vs/editor/contrib/documentSymbols/outlineModel","vs/editor/common/config/commonEditorConfig","vs/platform/remote/common/tunnel","vs/editor/contrib/codeAction/codeAction","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/contrib/find/findModel","vs/workbench/contrib/extensions/browser/extensionRecommendations","vs/workbench/contrib/markers/browser/constants","vs/workbench/contrib/search/browser/searchIcons","vs/workbench/contrib/search/common/constants","vs/workbench/services/configurationResolver/common/configurationResolver","vs/workbench/browser/parts/editor/editorCommands","vs/workbench/contrib/notebook/browser/contrib/coreActions","vs/workbench/services/authentication/browser/authenticationService","vs/workbench/contrib/search/common/searchModel","vs/workbench/services/userDataSync/common/userDataSync","vs/base/common/jsonFormatter","vs/base/common/comparers","vs/base/browser/globalMouseMoveMonitor","vs/base/browser/markdownRenderer","vs/base/browser/ui/list/listView","vs/editor/common/core/characterClassifier","vs/editor/common/commands/replaceCommand","vs/editor/common/core/stringBuilder","vs/editor/common/editorCommon","vs/editor/common/model/wordHelper","vs/editor/browser/view/dynamicViewOverlay","vs/editor/common/config/fontInfo","vs/editor/common/modes/nullMode","vs/editor/browser/controller/coreCommands","vs/editor/contrib/suggest/suggestController","vs/workbench/common/editor/textEditorModel","vs/workbench/browser/parts/notifications/notificationsCommands","vs/workbench/contrib/comments/browser/commentService","vs/workbench/contrib/customEditor/common/customEditor","vs/workbench/contrib/snippets/browser/snippets.contribution","vs/workbench/contrib/webviewPanel/browser/webviewEditorInput","vs/workbench/services/activityBar/browser/activityBarService","vs/workbench/services/configuration/common/jsonEditing","vs/workbench/services/decorations/browser/decorations","vs/workbench/browser/parts/editor/textEditor","vs/workbench/contrib/search/common/search","vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader","vs/workbench/services/extensions/common/extensionsUtil","vs/workbench/browser/parts/editor/editorWidgets","vs/workbench/services/mode/common/workbenchModeService","vs/workbench/contrib/preferences/browser/preferencesWidgets","vs/workbench/services/remote/common/remoteExplorerService","vs/workbench/contrib/search/common/queryBuilder","vs/workbench/contrib/debug/browser/baseDebugView","vs/workbench/contrib/search/browser/searchActions","vs/workbench/browser/actions/workspaceCommands","vs/workbench/browser/actions/workspaceActions","vs/base/common/keybindingParser","vs/base/common/stream","vs/base/common/fuzzyScorer","vs/base/common/marked/marked","vs/css!vs/workbench/contrib/scm/browser/media/scm","vs/editor/common/controller/wordCharacterClassifier","vs/editor/common/model/textModelSearch","vs/editor/common/modes/languageConfiguration","vs/editor/common/view/renderingContext","vs/editor/common/viewModel/prefixSumComputer","vs/editor/common/viewModel/viewEventHandler","vs/base/browser/ui/selectBox/selectBox","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/common/keybindingLabels","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/editor/common/model/editStack","vs/editor/common/modes/textToHtmlTokenizer","vs/platform/debug/common/extensionHostDebug","vs/editor/contrib/markdown/markdownRenderer","vs/platform/product/common/product","vs/editor/contrib/contextmenu/contextmenu","vs/editor/contrib/format/format","vs/editor/browser/widget/diffEditorWidget","vs/editor/contrib/find/findState","vs/editor/contrib/message/messageController","vs/platform/theme/common/tokenClassificationRegistry","vs/platform/url/common/url","vs/editor/contrib/find/findController","vs/platform/userDataSync/common/abstractSynchronizer","vs/platform/userDataSync/common/userDataSyncAccount","vs/workbench/browser/parts/editor/editor","vs/workbench/browser/part","vs/workbench/common/panel","vs/workbench/contrib/codeEditor/browser/menuPreventer","vs/workbench/contrib/files/common/explorerModel","vs/workbench/contrib/search/common/replace","vs/workbench/contrib/searchEditor/browser/constants","vs/workbench/contrib/terminal/common/environmentVariable","vs/workbench/contrib/terminal/common/terminalColorRegistry","vs/workbench/api/common/shared/editor","vs/workbench/contrib/tasks/common/taskDefinitionRegistry","vs/workbench/services/preferences/common/preferencesModels","vs/workbench/contrib/experiments/common/experimentService","vs/workbench/contrib/files/common/editors/fileEditorInput","vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/workbench/contrib/debug/common/replModel","vs/workbench/browser/parts/compositeBarActions","vs/workbench/contrib/files/browser/fileCommands","vs/base/browser/ui/list/list","vs/base/browser/ui/tree/objectTreeModel","vs/base/common/range","vs/base/common/uint","vs/base/browser/ui/codicons/codiconStyles","vs/css!vs/base/parts/quickinput/browser/media/quickInput","vs/css!vs/workbench/contrib/searchEditor/browser/media/searchEditor","vs/editor/common/config/editorZoom","vs/editor/contrib/folding/foldingRanges","vs/base/common/jsonErrorMessages","vs/editor/contrib/gotoSymbol/referencesModel","vs/editor/common/modes/languageFeatureRegistry","vs/editor/common/core/lineTokens","vs/editor/common/model/tokensStore","vs/editor/common/controller/cursorWordOperations","vs/editor/contrib/zoneWidget/zoneWidget","vs/platform/keybinding/common/resolvedKeybindingItem","vs/platform/remote/common/remoteHosts","vs/platform/serviceMachineId/common/serviceMachineId","vs/platform/sign/common/sign","vs/editor/contrib/clipboard/clipboard","vs/editor/contrib/documentSymbols/outlineTree","vs/editor/contrib/codeAction/codeActionCommands","vs/platform/update/common/update","vs/platform/userDataSync/common/content","vs/workbench/browser/parts/editor/breadcrumbs","vs/workbench/browser/composite","vs/workbench/browser/style","vs/workbench/common/viewlet","vs/workbench/contrib/extensions/common/extensionsInput","vs/workbench/contrib/markers/browser/markersModel","vs/workbench/contrib/markers/browser/messages","vs/workbench/contrib/notebook/browser/notebookRegistry","vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher","vs/workbench/contrib/terminal/browser/links/terminalBaseLinkProvider","vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers","vs/workbench/contrib/terminal/browser/links/terminalLink","vs/workbench/contrib/timeline/common/timeline","vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput","vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess","vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig","vs/workbench/browser/panel","vs/workbench/contrib/customEditor/browser/customEditorInput","vs/workbench/services/hover/browser/hover","vs/workbench/contrib/codeEditor/browser/simpleEditorOptions","vs/workbench/services/untitled/common/untitledTextEditorInput","vs/workbench/contrib/notebook/common/notebookEditorModelResolverService","vs/workbench/contrib/debug/browser/breakpointsView","vs/workbench/contrib/debug/browser/debugCommands","vs/workbench/contrib/files/browser/fileActions","vs/workbench/contrib/files/browser/explorerViewlet","vs/base/common/assert","vs/base/browser/ui/tree/indexTreeModel","vs/base/common/linkedText","vs/base/common/scrollable","vs/base/common/diff/diff","vs/base/common/console","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/codicons/codiconLabel","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/common/worker/simpleWorker","vs/base/worker/defaultWorkerFactory","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/editorDom","vs/editor/browser/view/viewLayer","vs/editor/common/core/token","vs/editor/common/modes/supports","vs/editor/common/modes/supports/richEditBrackets","vs/editor/common/modes/supports/tokenization","vs/editor/common/view/viewEvents","vs/editor/common/viewLayout/lineDecorations","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewModel/viewModelEventDispatcher","vs/editor/contrib/folding/syntaxRangeProvider","vs/base/browser/ui/menu/menu","vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/tree/objectTree","vs/base/browser/ui/tree/asyncDataTree","vs/editor/common/services/markersDecorationService","vs/editor/common/commands/shiftCommand","vs/editor/common/controller/cursorMoveOperations","vs/editor/common/controller/cursorDeleteOperations","vs/editor/common/controller/cursorTypeOperations","vs/editor/common/viewModel/splitLinesCollection","vs/platform/download/common/download","vs/platform/extensionRecommendations/common/extensionRecommendations","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/log/common/fileLogService","vs/platform/configuration/common/configurationModels","vs/platform/keybinding/common/keybindingResolver","vs/editor/contrib/colorPicker/colorDetector","vs/editor/contrib/parameterHints/provideSignatureHelp","vs/platform/telemetry/common/telemetryUtils","vs/editor/browser/controller/mouseTarget","vs/editor/contrib/find/findWidget","vs/platform/severityIcon/common/severityIcon","vs/editor/common/services/modelServiceImpl","vs/editor/contrib/gotoSymbol/peek/referencesController","vs/editor/contrib/hover/hover","vs/editor/contrib/multicursor/multicursor","vs/platform/userDataSync/common/userDataSyncMachines","vs/platform/userDataSync/common/userDataSyncStoreService","vs/workbench/browser/parts/views/viewMenuActions","vs/workbench/common/editor/binaryEditorModel","vs/workbench/common/component","vs/workbench/common/notifications","vs/workbench/browser/parts/notifications/notificationsActions","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview","vs/workbench/contrib/callHierarchy/common/callHierarchy","vs/workbench/contrib/codeEditor/browser/selectionClipboard","vs/workbench/contrib/extensions/common/extensionQuery","vs/workbench/contrib/logs/common/logConstants","vs/workbench/contrib/markers/browser/markersViewActions","vs/workbench/contrib/notebook/browser/diff/common","vs/workbench/contrib/notebook/browser/notebookEditorExtensions","vs/workbench/contrib/notebook/browser/notebookKernelAssociation","vs/workbench/contrib/notebook/common/notebookCellStatusBarService","vs/workbench/contrib/notebook/browser/contrib/fold/foldingModel","vs/workbench/contrib/scm/browser/util","vs/workbench/contrib/search/common/searchHistoryService","vs/workbench/contrib/tags/common/workspaceTags","vs/workbench/contrib/webviewView/browser/webviewViewService","vs/workbench/services/credentials/common/credentials","vs/workbench/services/editor/browser/editorDropService","vs/workbench/browser/parts/editor/editorQuickAccess","vs/workbench/contrib/debug/common/debugSource","vs/workbench/browser/parts/editor/binaryEditor","vs/workbench/services/extensions/common/extensionDevOptions","vs/workbench/contrib/quickaccess/browser/commandsQuickAccess","vs/workbench/api/browser/mainThreadWebviews","vs/workbench/services/keybinding/common/keymapInfo","vs/workbench/contrib/webviewPanel/browser/webviewEditor","vs/workbench/contrib/snippets/browser/tabCompletion","vs/workbench/contrib/comments/browser/simpleCommentEditor","vs/workbench/contrib/preferences/browser/settingsTreeModels","vs/workbench/contrib/preferences/browser/settingsWidgets","vs/workbench/contrib/remote/common/remote.contribution","vs/workbench/services/textMate/common/textMateService","vs/workbench/services/textfile/common/encoding","vs/workbench/common/editor/textResourceEditorInput","vs/workbench/contrib/files/browser/files","vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/workbench/contrib/url/browser/trustedDomains","vs/workbench/services/preferences/common/preferencesEditorInput","vs/workbench/services/themes/common/colorThemeSchema","vs/workbench/services/themes/common/productIconThemeSchema","vs/workbench/services/title/common/titleService","vs/workbench/browser/parts/editor/textResourceEditor","vs/workbench/services/progress/browser/progressIndicator","vs/workbench/browser/parts/editor/editorActions","vs/workbench/contrib/bulkEdit/browser/bulkCellEdits","vs/workbench/contrib/notebook/browser/notebookEditorInput","vs/workbench/contrib/searchEditor/browser/searchEditorInput","vs/workbench/contrib/search/browser/searchWidget","vs/workbench/services/untitled/common/untitledTextEditorService","vs/workbench/browser/parts/views/treeView","vs/workbench/contrib/debug/browser/debugActionViewItems","vs/workbench/contrib/debug/browser/debugToolBar","vs/workbench/contrib/debug/browser/variablesView","vs/workbench/contrib/terminal/browser/terminalActions","vs/base/browser/iframe","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/navigator","vs/base/common/history","vs/base/common/parsers","vs/base/common/search","vs/base/common/paging","vs/base/common/amd","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/common/codicon","vs/base/browser/ui/tree/treeIcons","vs/base/common/uriIpc","vs/base/parts/ipc/common/ipc","vs/base/parts/quickinput/common/quickInput","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/dropdown/dropdown","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/grid/gridview","vs/css!vs/base/browser/ui/list/list","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/list/listPaging","vs/base/browser/ui/grid/gridview","vs/base/browser/ui/grid/grid","vs/base/parts/quickinput/browser/quickInputUtils","vs/css!vs/workbench/browser/parts/editor/media/breadcrumbscontrol","vs/css!vs/workbench/browser/parts/notifications/media/notificationsActions","vs/css!vs/workbench/browser/parts/panel/media/panelpart","vs/css!vs/workbench/contrib/notebook/browser/media/notebook","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/controller/textAreaState","vs/editor/browser/widget/diffNavigator","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/core/rgba","vs/editor/browser/controller/textAreaInput","vs/editor/common/model/intervalTree","vs/editor/common/model/textChange","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/modes/linkComputer","vs/editor/common/view/overviewZoneManager","vs/editor/browser/viewParts/margin/margin","vs/editor/contrib/comment/blockCommentCommand","vs/editor/contrib/format/formattingEdit","vs/editor/contrib/gotoSymbol/link/clickLinkGesture","vs/editor/contrib/hover/hoverOperation","vs/editor/contrib/hover/hoverWidgets","vs/editor/contrib/indentation/indentUtils","vs/editor/contrib/smartSelect/bracketSelections","vs/base/browser/ui/dialog/dialog","vs/base/browser/ui/findinput/findInputCheckboxes","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/treeDefaults","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/controller/cursorMoveCommands","vs/editor/common/controller/cursor","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/contrib/documentSymbols/outline","vs/editor/common/services/editorWorkerServiceImpl","vs/editor/common/services/semanticTokensProviderStyling","vs/platform/log/common/bufferLog","vs/editor/contrib/gotoError/markerNavigationService","vs/platform/remote/common/remoteAgentConnection","vs/platform/extensionManagement/common/extensionEnablementService","vs/editor/contrib/codelens/codelens","vs/editor/contrib/colorPicker/color","vs/editor/contrib/gotoSymbol/goToSymbol","vs/editor/contrib/indentation/indentation","vs/editor/contrib/linesOperations/linesOperations","vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/editor/contrib/wordOperations/wordOperations","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/find/findDecorations","vs/editor/contrib/folding/folding","vs/editor/contrib/links/links","vs/editor/contrib/quickAccess/editorNavigationQuickAccess","vs/editor/contrib/quickAccess/gotoLineQuickAccess","vs/editor/contrib/gotoError/gotoError","vs/platform/theme/common/iconRegistry","vs/editor/contrib/gotoSymbol/goToCommands","vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/platform/userDataSync/common/extensionsMerge","vs/platform/quickinput/browser/commandsQuickAccess","vs/platform/userDataSync/common/extensionsSync","vs/platform/userDataSync/common/globalStateSync","vs/platform/userDataSync/common/keybindingsSync","vs/platform/userDataSync/common/settingsMerge","vs/platform/userDataSync/common/settingsSync","vs/platform/userDataSync/common/snippetsSync","vs/editor/contrib/snippet/snippetVariables","vs/workbench/browser/parts/editor/breadcrumbsModel","vs/workbench/common/activity","vs/workbench/common/editor/diffEditorModel","vs/workbench/common/editor/editorGroup","vs/workbench/common/editor/textDiffEditorModel","vs/workbench/common/editor/resourceEditorModel","vs/workbench/browser/parts/editor/sideBySideEditor","vs/workbench/browser/parts/notifications/notificationsList","vs/workbench/contrib/comments/browser/commentFormActions","vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/workbench/contrib/comments/common/commentContextKeys","vs/workbench/contrib/comments/common/commentModel","vs/workbench/contrib/comments/browser/commentsTreeViewer","vs/workbench/contrib/debug/browser/callStackEditorContribution","vs/workbench/contrib/extensions/common/extensionsFileTemplate","vs/workbench/contrib/markdown/common/markdownDocumentRenderer","vs/workbench/contrib/markers/browser/markersFilterOptions","vs/workbench/contrib/notebook/browser/diff/celllDiffViewModel","vs/workbench/contrib/notebook/browser/view/renderers/commonViewComponents","vs/workbench/contrib/notebook/browser/view/renderers/mdRenderer","vs/workbench/contrib/notebook/browser/view/renderers/sizeObserver","vs/workbench/api/common/extHostTypes","vs/workbench/contrib/notebook/browser/view/renderers/dnd","vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel","vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel","vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel","vs/workbench/contrib/notebook/browser/view/renderers/cellContextKeys","vs/workbench/contrib/notebook/common/services/notebookWorkerService","vs/workbench/contrib/preferences/browser/settingsLayout","vs/workbench/contrib/scm/browser/scmRepositoryRenderer","vs/workbench/contrib/search/browser/patternInputWidget","vs/workbench/contrib/snippets/browser/snippetCompletionProvider","vs/workbench/contrib/snippets/browser/snippetsFile","vs/workbench/contrib/tasks/common/taskSystem","vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/workbench/contrib/terminal/common/environmentVariableShared","vs/workbench/contrib/notebook/browser/view/output/transforms/errorTransform","vs/workbench/contrib/terminal/common/terminalConfiguration","vs/workbench/contrib/terminal/common/terminalEnvironment","vs/workbench/contrib/update/common/update","vs/workbench/contrib/welcome/common/viewsWelcomeExtensionPoint","vs/workbench/contrib/welcome/walkThrough/common/walkThroughUtils","vs/workbench/contrib/markers/browser/markers","vs/workbench/services/configuration/common/configurationModels","vs/workbench/services/configurationResolver/common/configurationResolverSchema","vs/workbench/services/configurationResolver/common/configurationResolverUtils","vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart","vs/workbench/browser/parts/editor/rangeDecorations","vs/workbench/browser/parts/editor/textDiffEditor","vs/workbench/contrib/debug/common/debugContentProvider","vs/workbench/contrib/search/browser/symbolsQuickAccess","vs/workbench/contrib/webviewPanel/browser/webviewEditorInputFactory","vs/workbench/browser/parts/editor/binaryDiffEditor","vs/workbench/services/experiment/common/experimentService","vs/workbench/contrib/extensions/common/extensionsUtils","vs/workbench/services/extensions/common/extensionHostProtocol","vs/workbench/browser/panecomposite","vs/workbench/api/common/menusExtensionPoint","vs/workbench/contrib/debug/common/debugSchemas","vs/workbench/contrib/tasks/common/jsonSchemaCommon","vs/workbench/contrib/tasks/browser/runAutomaticTasks","vs/workbench/contrib/tasks/browser/taskQuickPick","vs/workbench/contrib/tasks/browser/terminalTaskSystem","vs/workbench/contrib/terminal/common/terminalExtensionPoints","vs/workbench/services/extensions/common/proxyIdentifier","vs/workbench/api/browser/mainThreadEditor","vs/workbench/services/extensions/browser/extensionUrlHandler","vs/workbench/services/integrity/common/integrity","vs/workbench/services/keybinding/common/windowsKeyboardMapper","vs/workbench/contrib/snippets/browser/snippetsService","vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/workbench/contrib/comments/browser/commentsEditorContribution","vs/workbench/services/output/common/outputChannelModel","vs/workbench/services/preferences/common/keybindingsEditorModel","vs/workbench/browser/parts/titlebar/menubarControl","vs/workbench/contrib/preferences/browser/keybindingWidgets","vs/workbench/services/preferences/common/preferencesValidation","vs/workbench/contrib/preferences/browser/settingsTree","vs/workbench/contrib/preferences/browser/preferencesEditor","vs/workbench/contrib/codeEditor/browser/toggleWordWrap","vs/workbench/contrib/debug/browser/linkDetector","vs/workbench/api/common/shared/workspaceContains","vs/workbench/services/search/common/searchHelpers","vs/workbench/services/textMate/common/TMGrammars","vs/workbench/browser/parts/editor/breadcrumbsControl","vs/workbench/contrib/format/browser/formatModified","vs/workbench/contrib/tasks/browser/abstractTaskService","vs/workbench/contrib/views/browser/treeView","vs/workbench/services/configuration/common/jsonEditingService","vs/workbench/services/keybinding/common/keybindingEditing","vs/workbench/services/themes/common/hostColorSchemeService","vs/workbench/services/themes/common/themeConfiguration","vs/workbench/services/themes/browser/productIconThemeData","vs/workbench/browser/parts/compositePart","vs/workbench/services/timer/browser/timerService","vs/workbench/browser/actions/windowActions","vs/workbench/browser/parts/editor/editor.contribution","vs/workbench/api/browser/mainThreadEditors","vs/workbench/contrib/searchEditor/browser/searchEditorActions","vs/workbench/services/textfile/common/textFileEditorModel","vs/workbench/services/untitled/common/untitledTextEditorModel","vs/workbench/services/editor/browser/editorService","vs/workbench/api/browser/mainThreadDocuments","vs/workbench/services/workspaces/browser/workspaces","vs/workbench/browser/parts/compositeBar","vs/workbench/browser/parts/activitybar/activitybarPart","vs/workbench/browser/parts/editor/titleControl","vs/workbench/browser/parts/panel/panelPart","vs/workbench/browser/parts/views/viewsViewlet","vs/workbench/browser/parts/sidebar/sidebarPart","vs/workbench/browser/web.main","vs/workbench/contrib/debug/browser/breakpointEditorContribution","vs/workbench/contrib/debug/browser/repl","vs/workbench/contrib/debug/browser/debugEditorContribution","vs/workbench/contrib/debug/browser/welcomeView","vs/workbench/contrib/debug/browser/debugViewlet","vs/workbench/contrib/extensions/browser/extensionsWidgets","vs/workbench/contrib/extensions/browser/extensionsList","vs/workbench/contrib/extensions/browser/extensionsViewlet","vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler","vs/workbench/contrib/files/browser/views/explorerViewer","vs/workbench/contrib/notebook/browser/notebookEditorWidget","vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor","vs/workbench/contrib/notebook/browser/notebookEditor","vs/workbench/contrib/output/browser/outputView","vs/workbench/contrib/scm/browser/scmViewPane","vs/workbench/contrib/search/browser/searchView","vs/workbench/contrib/terminal/browser/terminalView","vs/base/browser/ui/list/splice","vs/base/common/diff/diffChange","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/common/cache","vs/base/common/processes","vs/base/browser/ui/list/rangeMap","vs/base/common/sequence","vs/base/common/skipList","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/selectBox/selectBoxNative","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/common/resourceTree","vs/base/parts/ipc/common/ipc.net","vs/base/parts/request/browser/request","vs/base/parts/storage/common/storage","vs/base/test/common/utils","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/breadcrumbs/breadcrumbsWidget","vs/css!vs/base/browser/ui/button/button","vs/css!vs/base/browser/ui/checkbox/checkbox","vs/css!vs/base/browser/ui/codicons/codicon/codicon","vs/css!vs/base/browser/ui/codicons/codicon/codicon-animations","vs/css!vs/base/browser/ui/codicons/codicon/codicon-modifications","vs/css!vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/dialog/dialog","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/menu/menubar","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/base/browser/ui/breadcrumbs/breadcrumbsWidget","vs/css!vs/base/browser/ui/selectBox/selectBox","vs/css!vs/base/browser/ui/selectBox/selectBoxCustom","vs/css!vs/base/browser/ui/splitview/paneview","vs/css!vs/base/browser/ui/splitview/splitview","vs/base/browser/ui/centered/centeredViewLayout","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/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/widget/media/diffEditor","vs/css!vs/editor/browser/widget/media/diffReview","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/contrib/anchorSelect/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/bracketMatching","vs/css!vs/editor/contrib/codeAction/lightBulbWidget","vs/css!vs/editor/contrib/codelens/codelensWidget","vs/css!vs/editor/contrib/colorPicker/colorPicker","vs/css!vs/editor/contrib/dnd/dnd","vs/css!vs/editor/contrib/documentSymbols/media/outlineTree","vs/css!vs/editor/contrib/documentSymbols/media/symbol-icons","vs/css!vs/editor/contrib/find/findWidget","vs/css!vs/editor/contrib/folding/folding","vs/css!vs/editor/contrib/gotoError/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/css!vs/editor/contrib/links/links","vs/css!vs/editor/contrib/message/messageController","vs/css!vs/editor/contrib/parameterHints/parameterHints","vs/css!vs/editor/contrib/peekView/media/peekViewWidget","vs/css!vs/editor/contrib/rename/media/onTypeRename","vs/css!vs/editor/contrib/rename/renameInputField","vs/css!vs/editor/contrib/snippet/snippetSession","vs/css!vs/editor/contrib/suggest/media/suggest","vs/css!vs/editor/contrib/suggest/media/suggestStatusBar","vs/css!vs/editor/contrib/zoneWidget/zoneWidget","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/css!vs/workbench/browser/actions/media/actions","vs/css!vs/workbench/browser/media/part","vs/css!vs/workbench/browser/media/style","vs/css!vs/workbench/browser/parts/activitybar/media/activityaction","vs/css!vs/workbench/browser/parts/activitybar/media/activitybarpart","vs/css!vs/workbench/browser/parts/editor/media/binaryeditor","vs/css!vs/workbench/browser/parts/editor/media/editordroptarget","vs/css!vs/workbench/browser/parts/editor/media/editorgroupview","vs/css!vs/workbench/browser/parts/editor/media/editorquickaccess","vs/css!vs/workbench/browser/parts/editor/media/editorstatus","vs/css!vs/workbench/browser/parts/editor/media/notabstitlecontrol","vs/css!vs/workbench/browser/parts/editor/media/tabstitlecontrol","vs/css!vs/workbench/browser/parts/editor/media/titlecontrol","vs/css!vs/workbench/browser/parts/media/compositepart","vs/css!vs/workbench/browser/parts/notifications/media/notificationsCenter","vs/css!vs/workbench/browser/parts/notifications/media/notificationsList","vs/css!vs/workbench/browser/parts/notifications/media/notificationsToasts","vs/css!vs/workbench/browser/parts/sidebar/media/sidebarpart","vs/css!vs/workbench/browser/parts/statusbar/media/statusbarpart","vs/css!vs/workbench/browser/parts/titlebar/media/titlebarpart","vs/css!vs/workbench/browser/parts/views/media/paneviewlet","vs/css!vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit","vs/css!vs/workbench/contrib/callHierarchy/browser/media/callHierarchy","vs/css!vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/css!vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget","vs/css!vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/css!vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/css!vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/css!vs/workbench/contrib/comments/browser/media/panel","vs/css!vs/workbench/contrib/comments/browser/media/review","vs/css!vs/workbench/contrib/debug/browser/media/breakpointWidget","vs/css!vs/workbench/contrib/debug/browser/media/debug.contribution","vs/css!vs/workbench/contrib/debug/browser/media/debugHover","vs/css!vs/workbench/contrib/debug/browser/media/debugToolBar","vs/css!vs/workbench/contrib/debug/browser/media/debugViewlet","vs/css!vs/workbench/contrib/debug/browser/media/exceptionWidget","vs/css!vs/workbench/contrib/debug/browser/media/repl","vs/css!vs/workbench/contrib/extensions/browser/media/extension","vs/css!vs/workbench/contrib/extensions/browser/media/extensionActions","vs/css!vs/workbench/contrib/extensions/browser/media/extensionEditor","vs/css!vs/workbench/contrib/extensions/browser/media/extensionsViewlet","vs/css!vs/workbench/contrib/extensions/browser/media/extensionsWidgets","vs/css!vs/workbench/contrib/feedback/browser/media/feedback","vs/css!vs/workbench/contrib/files/browser/media/explorerviewlet","vs/css!vs/workbench/contrib/files/browser/views/media/openeditors","vs/css!vs/workbench/contrib/markers/browser/media/markers","vs/css!vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind","vs/css!vs/workbench/contrib/notebook/browser/diff/notebookDiff","vs/css!vs/workbench/contrib/outline/browser/outlinePane","vs/css!vs/workbench/contrib/output/browser/media/output","vs/css!vs/workbench/contrib/preferences/browser/media/keybindings","vs/css!vs/workbench/contrib/preferences/browser/media/keybindingsEditor","vs/css!vs/workbench/contrib/preferences/browser/media/preferences","vs/css!vs/workbench/contrib/preferences/browser/media/settingsEditor2","vs/css!vs/workbench/contrib/preferences/browser/media/settingsWidgets","vs/css!vs/workbench/contrib/remote/browser/media/remoteViewlet","vs/css!vs/workbench/contrib/remote/browser/media/tunnelView","vs/css!vs/workbench/contrib/scm/browser/media/dirtydiffDecorator","vs/css!vs/workbench/contrib/search/browser/media/anythingQuickAccess","vs/css!vs/workbench/contrib/search/browser/media/searchview","vs/css!vs/workbench/contrib/terminal/browser/media/scrollbar","vs/css!vs/workbench/contrib/terminal/browser/media/terminal","vs/css!vs/workbench/contrib/terminal/browser/media/widgets","vs/css!vs/workbench/contrib/terminal/browser/media/xterm","vs/css!vs/workbench/contrib/timeline/browser/media/timelinePane","vs/css!vs/workbench/contrib/update/browser/media/releasenoteseditor","vs/css!vs/workbench/contrib/userDataSync/browser/media/userDataSyncViews","vs/css!vs/workbench/contrib/views/browser/media/views","vs/css!vs/workbench/contrib/watermark/browser/watermark","vs/css!vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay","vs/css!vs/workbench/contrib/welcome/page/browser/welcomePage","vs/css!vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart","vs/css!vs/workbench/services/hover/browser/media/hover","vs/css!vs/workbench/services/progress/browser/media/progressService","vs/editor/browser/config/charWidthReader","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/minimap/minimapCharRenderer","vs/editor/browser/viewParts/minimap/minimapPreBaked","vs/editor/browser/viewParts/minimap/minimapCharRendererFactory","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/diff/diffComputer","vs/editor/common/editorAction","vs/editor/common/model/indentationGuesser","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/textModelEvents","vs/editor/common/modes/abstractMode","vs/editor/common/modes/languageSelector","vs/editor/common/modes/supports/characterPair","vs/editor/common/modes/supports/indentRules","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/modes/supports/onEnter","vs/editor/common/modes/supports/electricCharacter","vs/editor/common/modes/tokenizationRegistry","vs/editor/common/standalone/standaloneEnums","vs/editor/common/standalone/standaloneBase","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/common/view/viewContext","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/model/mirrorTextModel","vs/editor/common/services/editorSimpleWorker","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/moveCaretCommand","vs/editor/contrib/colorPicker/colorPickerModel","vs/editor/contrib/comment/lineCommentCommand","vs/editor/contrib/dnd/dragAndDropCommand","vs/editor/contrib/find/replaceAllCommand","vs/editor/contrib/find/replacePattern","vs/editor/contrib/folding/foldingModel","vs/editor/contrib/folding/hiddenRangeModel","vs/editor/contrib/folding/intializingRangeProvider","vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/copyLinesCommand","vs/editor/contrib/linesOperations/sortLinesCommand","vs/editor/contrib/smartSelect/wordSelections","vs/editor/contrib/suggest/completionModel","vs/editor/contrib/suggest/suggestCommitCharacters","vs/editor/contrib/suggest/suggestOvertypingCapturer","vs/editor/contrib/suggest/wordDistance","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","vs/nls!vs/base/browser/ui/dialog/dialog","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/menu/menu","vs/nls!vs/base/browser/ui/menu/menubar","vs/nls!vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/findinput/findInput","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menubar","vs/base/parts/quickinput/browser/quickInputBox","vs/nls!vs/base/browser/ui/splitview/paneview","vs/base/browser/ui/splitview/paneview","vs/nls!vs/base/browser/ui/toolbar/toolbar","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/nls!vs/base/browser/ui/tree/treeDefaults","vs/nls!vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/base/common/jsonErrorMessages","vs/nls!vs/base/common/keybindingLabels","vs/nls!vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/editor/browser/controller/coreCommands","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/editorExtensions","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/browser/widget/inlineDiffMargin","vs/editor/browser/widget/inlineDiffMargin","vs/nls!vs/editor/common/config/commonEditorConfig","vs/nls!vs/editor/common/config/editorOptions","vs/editor/common/viewModel/viewModelDecorations","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/modes/modesRegistry","vs/nls!vs/editor/common/standaloneStrings","vs/editor/common/standaloneStrings","vs/nls!vs/editor/common/view/editorColorRegistry","vs/nls!vs/editor/contrib/anchorSelect/anchorSelect","vs/nls!vs/editor/contrib/bracketMatching/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/caretOperations","vs/nls!vs/editor/contrib/caretOperations/transpose","vs/nls!vs/editor/contrib/clipboard/clipboard","vs/nls!vs/editor/contrib/codeAction/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/codelensController","vs/nls!vs/editor/contrib/comment/comment","vs/nls!vs/editor/contrib/contextmenu/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/cursorUndo","vs/nls!vs/editor/contrib/documentSymbols/outlineTree","vs/nls!vs/editor/contrib/find/findController","vs/nls!vs/editor/contrib/find/findWidget","vs/nls!vs/editor/contrib/folding/folding","vs/nls!vs/editor/contrib/fontZoom/fontZoom","vs/nls!vs/editor/contrib/format/format","vs/nls!vs/editor/contrib/format/formatActions","vs/nls!vs/editor/contrib/gotoError/gotoError","vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/symbolNavigation","vs/nls!vs/editor/contrib/hover/hover","vs/nls!vs/editor/contrib/hover/modesContentHover","vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/indentation","vs/nls!vs/editor/contrib/linesOperations/linesOperations","vs/nls!vs/editor/contrib/links/links","vs/nls!vs/editor/contrib/message/messageController","vs/nls!vs/editor/contrib/multicursor/multicursor","vs/nls!vs/editor/contrib/parameterHints/parameterHints","vs/nls!vs/editor/contrib/parameterHints/parameterHintsWidget","vs/nls!vs/editor/contrib/peekView/peekView","vs/nls!vs/editor/contrib/quickAccess/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/gotoSymbolQuickAccess","vs/nls!vs/editor/contrib/rename/onTypeRename","vs/nls!vs/editor/contrib/rename/rename","vs/nls!vs/editor/contrib/rename/renameInputField","vs/nls!vs/editor/contrib/smartSelect/smartSelect","vs/nls!vs/editor/contrib/snippet/snippetVariables","vs/nls!vs/editor/contrib/suggest/suggestController","vs/nls!vs/editor/contrib/suggest/suggestWidget","vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/tokenization","vs/nls!vs/editor/contrib/unusualLineTerminators/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/files/browser/indexedDBFileSystemProvider","vs/nls!vs/platform/files/common/fileService","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/files/common/io","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/request/common/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/theme/common/tokenClassificationRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/nls!vs/platform/update/common/update.config.contribution","vs/nls!vs/platform/userDataSync/common/abstractSynchronizer","vs/nls!vs/platform/userDataSync/common/keybindingsSync","vs/nls!vs/platform/userDataSync/common/settingsSync","vs/nls!vs/platform/userDataSync/common/userDataAutoSyncService","vs/nls!vs/platform/userDataSync/common/userDataSync","vs/nls!vs/platform/userDataSync/common/userDataSyncMachines","vs/nls!vs/platform/workspaces/common/workspaces","vs/nls!vs/workbench/api/browser/mainThreadAuthentication","vs/nls!vs/workbench/api/browser/mainThreadCustomEditors","vs/nls!vs/workbench/api/browser/mainThreadExtensionService","vs/nls!vs/workbench/api/browser/mainThreadFileSystemEventService","vs/nls!vs/workbench/api/browser/mainThreadMessageService","vs/nls!vs/workbench/api/browser/mainThreadProgress","vs/nls!vs/workbench/api/browser/mainThreadSaveParticipant","vs/nls!vs/workbench/api/browser/mainThreadTask","vs/nls!vs/workbench/api/browser/mainThreadWebviews","vs/nls!vs/workbench/api/browser/mainThreadWorkspace","vs/nls!vs/workbench/api/browser/viewsExtensionPoint","vs/nls!vs/workbench/api/common/configurationExtensionPoint","vs/nls!vs/workbench/api/common/jsonValidationExtensionPoint","vs/nls!vs/workbench/api/common/menusExtensionPoint","vs/nls!vs/workbench/browser/actions/developerActions","vs/nls!vs/workbench/browser/actions/helpActions","vs/nls!vs/workbench/browser/actions/layoutActions","vs/nls!vs/workbench/browser/actions/navigationActions","vs/nls!vs/workbench/browser/actions/quickAccessActions","vs/nls!vs/workbench/browser/actions/textInputActions","vs/nls!vs/workbench/browser/actions/windowActions","vs/nls!vs/workbench/browser/actions/workspaceActions","vs/nls!vs/workbench/browser/actions/workspaceCommands","vs/nls!vs/workbench/browser/parts/activitybar/activitybarActions","vs/nls!vs/workbench/browser/parts/activitybar/activitybarPart","vs/nls!vs/workbench/browser/parts/compositeBar","vs/nls!vs/workbench/browser/parts/compositeBarActions","vs/nls!vs/workbench/browser/parts/compositePart","vs/nls!vs/workbench/browser/parts/editor/binaryDiffEditor","vs/nls!vs/workbench/browser/parts/editor/binaryEditor","vs/nls!vs/workbench/browser/parts/editor/breadcrumbs","vs/nls!vs/workbench/browser/parts/editor/breadcrumbsControl","vs/nls!vs/workbench/browser/parts/editor/breadcrumbsPicker","vs/nls!vs/workbench/browser/parts/editor/editor.contribution","vs/nls!vs/workbench/browser/parts/editor/editorActions","vs/nls!vs/workbench/browser/parts/editor/editorCommands","vs/nls!vs/workbench/browser/parts/editor/editorDropTarget","vs/nls!vs/workbench/browser/parts/editor/editorGroupView","vs/nls!vs/workbench/browser/parts/editor/editorQuickAccess","vs/nls!vs/workbench/browser/parts/editor/editorStatus","vs/nls!vs/workbench/browser/parts/editor/editorWidgets","vs/nls!vs/workbench/browser/parts/editor/tabsTitleControl","vs/nls!vs/workbench/browser/parts/editor/textDiffEditor","vs/nls!vs/workbench/browser/parts/editor/textEditor","vs/nls!vs/workbench/browser/parts/editor/textResourceEditor","vs/nls!vs/workbench/browser/parts/editor/titleControl","vs/nls!vs/workbench/browser/parts/notifications/notificationsActions","vs/nls!vs/workbench/browser/parts/notifications/notificationsAlerts","vs/nls!vs/workbench/browser/parts/notifications/notificationsCenter","vs/nls!vs/workbench/browser/parts/notifications/notificationsCommands","vs/nls!vs/workbench/browser/parts/notifications/notificationsList","vs/nls!vs/workbench/browser/parts/notifications/notificationsStatus","vs/nls!vs/workbench/browser/parts/notifications/notificationsViewer","vs/nls!vs/workbench/browser/parts/panel/panelActions","vs/nls!vs/workbench/browser/parts/panel/panelPart","vs/nls!vs/workbench/browser/parts/sidebar/sidebarPart","vs/nls!vs/workbench/browser/parts/statusbar/statusbarPart","vs/nls!vs/workbench/browser/parts/titlebar/menubarControl","vs/nls!vs/workbench/browser/parts/titlebar/titlebarPart","vs/nls!vs/workbench/browser/parts/views/viewPaneContainer","vs/nls!vs/workbench/browser/parts/views/viewsService","vs/nls!vs/workbench/browser/viewlet","vs/nls!vs/workbench/browser/workbench","vs/nls!vs/workbench/browser/workbench.contribution","vs/nls!vs/workbench/common/actions","vs/nls!vs/workbench/common/configuration","vs/nls!vs/workbench/common/editor","vs/nls!vs/workbench/common/editor/diffEditorInput","vs/nls!vs/workbench/common/theme","vs/nls!vs/workbench/common/views","vs/nls!vs/workbench/contrib/bulkEdit/browser/bulkEditService","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree","vs/nls!vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution","vs/nls!vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek","vs/nls!vs/workbench/contrib/callHierarchy/browser/callHierarchyTree","vs/nls!vs/workbench/contrib/codeActions/common/codeActionsContribution","vs/nls!vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint","vs/nls!vs/workbench/contrib/codeActions/common/documentationExtensionPoint","vs/nls!vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/nls!vs/workbench/contrib/codeEditor/browser/diffEditorHelper","vs/nls!vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget","vs/nls!vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/nls!vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/nls!vs/workbench/contrib/codeEditor/browser/inspectKeybindings","vs/nls!vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint","vs/nls!vs/workbench/contrib/codeEditor/browser/largeFileOptimizations","vs/nls!vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess","vs/nls!vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess","vs/nls!vs/workbench/contrib/codeEditor/browser/saveParticipants","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleColumnSelection","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleMinimap","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleWordWrap","vs/nls!vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/nls!vs/workbench/contrib/comments/browser/commentNode","vs/nls!vs/workbench/contrib/comments/browser/commentThreadWidget","vs/nls!vs/workbench/contrib/comments/browser/comments.contribution","vs/nls!vs/workbench/contrib/comments/browser/commentsEditorContribution","vs/nls!vs/workbench/contrib/comments/browser/commentsTreeViewer","vs/nls!vs/workbench/contrib/comments/browser/commentsView","vs/nls!vs/workbench/contrib/comments/browser/reactionsAction","vs/nls!vs/workbench/contrib/comments/common/commentModel","vs/nls!vs/workbench/contrib/customEditor/browser/customEditors","vs/nls!vs/workbench/contrib/customEditor/common/contributedCustomEditors","vs/nls!vs/workbench/contrib/customEditor/common/extensionPoint","vs/nls!vs/workbench/contrib/debug/browser/breakpointEditorContribution","vs/nls!vs/workbench/contrib/debug/browser/breakpointWidget","vs/nls!vs/workbench/contrib/debug/browser/breakpointsView","vs/nls!vs/workbench/contrib/debug/browser/callStackEditorContribution","vs/nls!vs/workbench/contrib/debug/browser/callStackView","vs/nls!vs/workbench/contrib/debug/browser/debug.contribution","vs/nls!vs/workbench/contrib/debug/browser/debugActionViewItems","vs/nls!vs/workbench/contrib/debug/browser/debugActions","vs/nls!vs/workbench/contrib/debug/browser/debugCommands","vs/nls!vs/workbench/contrib/debug/browser/debugConfigurationManager","vs/nls!vs/workbench/contrib/debug/browser/debugEditorActions","vs/nls!vs/workbench/contrib/debug/browser/debugEditorContribution","vs/nls!vs/workbench/contrib/debug/browser/debugHover","vs/nls!vs/workbench/contrib/debug/browser/debugQuickAccess","vs/nls!vs/workbench/contrib/debug/browser/debugService","vs/nls!vs/workbench/contrib/debug/browser/debugSession","vs/nls!vs/workbench/contrib/debug/browser/debugStatus","vs/nls!vs/workbench/contrib/debug/browser/debugTaskRunner","vs/nls!vs/workbench/contrib/debug/browser/debugToolBar","vs/nls!vs/workbench/contrib/debug/browser/debugViewlet","vs/nls!vs/workbench/contrib/debug/browser/exceptionWidget","vs/nls!vs/workbench/contrib/debug/browser/linkDetector","vs/nls!vs/workbench/contrib/debug/browser/loadedScriptsView","vs/nls!vs/workbench/contrib/debug/browser/rawDebugSession","vs/nls!vs/workbench/contrib/debug/browser/repl","vs/nls!vs/workbench/contrib/debug/browser/replFilter","vs/nls!vs/workbench/contrib/debug/browser/replViewer","vs/nls!vs/workbench/contrib/debug/browser/statusbarColorProvider","vs/nls!vs/workbench/contrib/debug/browser/variablesView","vs/nls!vs/workbench/contrib/debug/browser/watchExpressionsView","vs/nls!vs/workbench/contrib/debug/browser/welcomeView","vs/nls!vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/nls!vs/workbench/contrib/debug/common/debug","vs/nls!vs/workbench/contrib/debug/common/debugContentProvider","vs/nls!vs/workbench/contrib/debug/common/debugModel","vs/nls!vs/workbench/contrib/debug/common/debugSchemas","vs/nls!vs/workbench/contrib/debug/common/debugSource","vs/nls!vs/workbench/contrib/debug/common/debugger","vs/nls!vs/workbench/contrib/debug/common/replModel","vs/nls!vs/workbench/contrib/emmet/browser/actions/expandAbbreviation","vs/nls!vs/workbench/contrib/emmet/browser/actions/showEmmetCommands","vs/nls!vs/workbench/contrib/experiments/browser/experiments.contribution","vs/nls!vs/workbench/contrib/extensions/browser/configBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/exeBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/extensionEditor","vs/nls!vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService","vs/nls!vs/workbench/contrib/extensions/browser/extensions.contribution","vs/nls!vs/workbench/contrib/extensions/browser/extensionsActions","vs/nls!vs/workbench/contrib/extensions/browser/extensionsActivationProgress","vs/nls!vs/workbench/contrib/extensions/browser/extensionsDependencyChecker","vs/nls!vs/workbench/contrib/extensions/browser/extensionsQuickAccess","vs/nls!vs/workbench/contrib/extensions/browser/extensionsViewer","vs/nls!vs/workbench/contrib/extensions/browser/extensionsViewlet","vs/nls!vs/workbench/contrib/extensions/browser/extensionsViews","vs/nls!vs/workbench/contrib/extensions/browser/extensionsWidgets","vs/nls!vs/workbench/contrib/extensions/browser/extensionsWorkbenchService","vs/nls!vs/workbench/contrib/extensions/browser/fileBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller","vs/nls!vs/workbench/contrib/extensions/browser/workspaceRecommendations","vs/nls!vs/workbench/contrib/extensions/common/extensionsFileTemplate","vs/nls!vs/workbench/contrib/extensions/common/extensionsInput","vs/nls!vs/workbench/contrib/extensions/common/extensionsUtils","vs/nls!vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/nls!vs/workbench/contrib/feedback/browser/feedback","vs/nls!vs/workbench/contrib/feedback/browser/feedbackStatusbarItem","vs/nls!vs/workbench/contrib/files/browser/editors/binaryFileEditor","vs/nls!vs/workbench/contrib/files/browser/editors/textFileEditor","vs/nls!vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler","vs/nls!vs/workbench/contrib/files/browser/explorerViewlet","vs/nls!vs/workbench/contrib/files/browser/fileActions","vs/nls!vs/workbench/contrib/files/browser/fileActions.contribution","vs/nls!vs/workbench/contrib/files/browser/fileCommands","vs/nls!vs/workbench/contrib/files/browser/files.contribution","vs/nls!vs/workbench/contrib/files/browser/files.web.contribution","vs/nls!vs/workbench/contrib/files/browser/views/emptyView","vs/nls!vs/workbench/contrib/files/browser/views/explorerDecorationsProvider","vs/nls!vs/workbench/contrib/files/browser/views/explorerView","vs/nls!vs/workbench/contrib/files/browser/views/explorerViewer","vs/nls!vs/workbench/contrib/files/browser/views/openEditorsView","vs/nls!vs/workbench/contrib/files/common/dirtyFilesIndicator","vs/nls!vs/workbench/contrib/files/common/editors/fileEditorInput","vs/nls!vs/workbench/contrib/files/common/workspaceWatcher","vs/nls!vs/workbench/contrib/format/browser/formatActionsMultiple","vs/nls!vs/workbench/contrib/format/browser/formatActionsNone","vs/nls!vs/workbench/contrib/format/browser/formatModified","vs/nls!vs/workbench/contrib/issue/browser/issue.web.contribution","vs/nls!vs/workbench/contrib/keybindings/browser/keybindings.contribution","vs/nls!vs/workbench/contrib/logs/common/logs.contribution","vs/nls!vs/workbench/contrib/logs/common/logsActions","vs/nls!vs/workbench/contrib/markers/browser/markers","vs/nls!vs/workbench/contrib/markers/browser/markers.contribution","vs/nls!vs/workbench/contrib/markers/browser/markersFileDecorations","vs/nls!vs/workbench/contrib/markers/browser/markersTreeViewer","vs/nls!vs/workbench/contrib/markers/browser/markersView","vs/nls!vs/workbench/contrib/markers/browser/markersViewActions","vs/nls!vs/workbench/contrib/markers/browser/messages","vs/nls!vs/workbench/contrib/notebook/browser/contrib/coreActions","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/findController","vs/nls!vs/workbench/contrib/notebook/browser/contrib/fold/folding","vs/nls!vs/workbench/contrib/notebook/browser/contrib/format/formatting","vs/nls!vs/workbench/contrib/notebook/browser/contrib/status/editorStatus","vs/nls!vs/workbench/contrib/notebook/browser/diff/notebookDiffActions","vs/nls!vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor","vs/nls!vs/workbench/contrib/notebook/browser/extensionPoint","vs/nls!vs/workbench/contrib/notebook/browser/notebook.contribution","vs/nls!vs/workbench/contrib/notebook/browser/notebookEditor","vs/nls!vs/workbench/contrib/notebook/browser/notebookEditorWidget","vs/nls!vs/workbench/contrib/notebook/browser/notebookKernelAssociation","vs/nls!vs/workbench/contrib/notebook/browser/notebookServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/codeCell","vs/nls!vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel","vs/nls!vs/workbench/contrib/notebook/common/model/notebookTextModel","vs/nls!vs/workbench/contrib/notebook/common/notebookEditorModel","vs/nls!vs/workbench/contrib/outline/browser/outline.contribution","vs/nls!vs/workbench/contrib/outline/browser/outlinePane","vs/nls!vs/workbench/contrib/output/browser/logViewer","vs/nls!vs/workbench/contrib/output/browser/output.contribution","vs/nls!vs/workbench/contrib/output/browser/outputView","vs/nls!vs/workbench/contrib/performance/browser/performance.contribution","vs/nls!vs/workbench/contrib/performance/browser/perfviewEditor","vs/nls!vs/workbench/contrib/preferences/browser/keybindingWidgets","vs/nls!vs/workbench/contrib/preferences/browser/keybindingsEditor","vs/nls!vs/workbench/contrib/preferences/browser/keybindingsEditorContribution","vs/nls!vs/workbench/contrib/preferences/browser/keyboardLayoutPicker","vs/nls!vs/workbench/contrib/preferences/browser/preferences.contribution","vs/nls!vs/workbench/contrib/preferences/browser/preferencesActions","vs/nls!vs/workbench/contrib/preferences/browser/preferencesEditor","vs/nls!vs/workbench/contrib/preferences/browser/preferencesRenderers","vs/nls!vs/workbench/contrib/preferences/browser/preferencesWidgets","vs/nls!vs/workbench/contrib/preferences/browser/settingsEditor2","vs/nls!vs/workbench/contrib/preferences/browser/settingsLayout","vs/nls!vs/workbench/contrib/preferences/browser/settingsTree","vs/nls!vs/workbench/contrib/preferences/browser/settingsTreeModels","vs/nls!vs/workbench/contrib/preferences/browser/settingsWidgets","vs/nls!vs/workbench/contrib/preferences/browser/tocTree","vs/nls!vs/workbench/contrib/preferences/common/preferencesContribution","vs/nls!vs/workbench/contrib/quickaccess/browser/commandsQuickAccess","vs/nls!vs/workbench/contrib/quickaccess/browser/quickAccess.contribution","vs/nls!vs/workbench/contrib/quickaccess/browser/viewQuickAccess","vs/nls!vs/workbench/contrib/relauncher/browser/relauncher.contribution","vs/nls!vs/workbench/contrib/remote/browser/explorerViewItems","vs/nls!vs/workbench/contrib/remote/browser/remote","vs/nls!vs/workbench/contrib/remote/browser/remoteIndicator","vs/nls!vs/workbench/contrib/remote/browser/tunnelView","vs/nls!vs/workbench/contrib/remote/common/remote.contribution","vs/nls!vs/workbench/contrib/sash/browser/sash.contribution","vs/nls!vs/workbench/contrib/scm/browser/activity","vs/nls!vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/nls!vs/workbench/contrib/scm/browser/scm.contribution","vs/nls!vs/workbench/contrib/scm/browser/scmRepositoriesViewPane","vs/nls!vs/workbench/contrib/scm/browser/scmViewPane","vs/nls!vs/workbench/contrib/scm/browser/scmViewPaneContainer","vs/nls!vs/workbench/contrib/search/browser/anythingQuickAccess","vs/nls!vs/workbench/contrib/search/browser/patternInputWidget","vs/nls!vs/workbench/contrib/search/browser/replaceService","vs/nls!vs/workbench/contrib/search/browser/search.contribution","vs/nls!vs/workbench/contrib/search/browser/searchActions","vs/nls!vs/workbench/contrib/search/browser/searchResultsView","vs/nls!vs/workbench/contrib/search/browser/searchView","vs/nls!vs/workbench/contrib/search/browser/searchWidget","vs/nls!vs/workbench/contrib/search/browser/symbolsQuickAccess","vs/nls!vs/workbench/contrib/search/common/queryBuilder","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditor","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditor.contribution","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorActions","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorInput","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/nls!vs/workbench/contrib/snippets/browser/configureSnippets","vs/nls!vs/workbench/contrib/snippets/browser/insertSnippet","vs/nls!vs/workbench/contrib/snippets/browser/snippetCompletionProvider","vs/nls!vs/workbench/contrib/snippets/browser/snippets.contribution","vs/nls!vs/workbench/contrib/snippets/browser/snippetsFile","vs/nls!vs/workbench/contrib/snippets/browser/snippetsService","vs/nls!vs/workbench/contrib/surveys/browser/languageSurveys.contribution","vs/nls!vs/workbench/contrib/surveys/browser/nps.contribution","vs/nls!vs/workbench/contrib/tasks/browser/abstractTaskService","vs/nls!vs/workbench/contrib/tasks/browser/runAutomaticTasks","vs/nls!vs/workbench/contrib/tasks/browser/task.contribution","vs/nls!vs/workbench/contrib/tasks/browser/taskQuickPick","vs/nls!vs/workbench/contrib/tasks/browser/taskService","vs/nls!vs/workbench/contrib/tasks/browser/tasksQuickAccess","vs/nls!vs/workbench/contrib/tasks/browser/terminalTaskSystem","vs/nls!vs/workbench/contrib/tasks/common/jsonSchemaCommon","vs/nls!vs/workbench/contrib/tasks/common/jsonSchema_v1","vs/nls!vs/workbench/contrib/tasks/common/jsonSchema_v2","vs/nls!vs/workbench/contrib/tasks/common/problemMatcher","vs/nls!vs/workbench/contrib/tasks/common/taskConfiguration","vs/nls!vs/workbench/contrib/tasks/common/taskDefinitionRegistry","vs/nls!vs/workbench/contrib/tasks/common/taskTemplates","vs/nls!vs/workbench/contrib/tasks/common/tasks","vs/nls!vs/workbench/contrib/terminal/browser/environmentVariableInfo","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalLink","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalLinkManager","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalWordLinkProvider","vs/nls!vs/workbench/contrib/terminal/browser/terminal.contribution","vs/nls!vs/workbench/contrib/terminal/browser/terminalActions","vs/nls!vs/workbench/contrib/terminal/browser/terminalConfigHelper","vs/nls!vs/workbench/contrib/terminal/browser/terminalInstance","vs/nls!vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy","vs/nls!vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/nls!vs/workbench/contrib/terminal/browser/terminalService","vs/nls!vs/workbench/contrib/terminal/browser/terminalView","vs/nls!vs/workbench/contrib/terminal/common/terminal","vs/nls!vs/workbench/contrib/terminal/common/terminalColorRegistry","vs/nls!vs/workbench/contrib/terminal/common/terminalConfiguration","vs/nls!vs/workbench/contrib/terminal/common/terminalMenu","vs/nls!vs/workbench/contrib/themes/browser/themes.contribution","vs/nls!vs/workbench/contrib/timeline/browser/timeline.contribution","vs/nls!vs/workbench/contrib/timeline/browser/timelinePane","vs/nls!vs/workbench/contrib/update/browser/releaseNotesEditor","vs/nls!vs/workbench/contrib/update/browser/update","vs/nls!vs/workbench/contrib/update/browser/update.contribution","vs/nls!vs/workbench/contrib/url/browser/trustedDomains","vs/nls!vs/workbench/contrib/url/browser/trustedDomainsValidator","vs/nls!vs/workbench/contrib/url/browser/url.contribution","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncViews","vs/nls!vs/workbench/contrib/views/browser/treeView","vs/nls!vs/workbench/contrib/watermark/browser/watermark","vs/nls!vs/workbench/contrib/webview/browser/baseWebviewElement","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewCommands","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution","vs/nls!vs/workbench/contrib/welcome/common/viewsWelcomeContribution","vs/nls!vs/workbench/contrib/welcome/common/viewsWelcomeExtensionPoint","vs/nls!vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay","vs/nls!vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page","vs/nls!vs/workbench/contrib/welcome/page/browser/welcomePage","vs/nls!vs/workbench/contrib/welcome/page/browser/welcomePage.contribution","vs/nls!vs/workbench/contrib/welcome/telemetryOptOut/browser/telemetryOptOut","vs/nls!vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough","vs/nls!vs/workbench/contrib/welcome/walkThrough/browser/walkThrough.contribution","vs/nls!vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart","vs/nls!vs/workbench/services/authentication/browser/authenticationService","vs/nls!vs/workbench/services/configuration/common/configurationEditingService","vs/nls!vs/workbench/services/configuration/common/jsonEditingService","vs/nls!vs/workbench/services/configurationResolver/browser/configurationResolverService","vs/nls!vs/workbench/services/configurationResolver/common/configurationResolverSchema","vs/nls!vs/workbench/services/configurationResolver/common/configurationResolverUtils","vs/nls!vs/workbench/services/configurationResolver/common/variableResolver","vs/nls!vs/workbench/services/decorations/browser/decorationsService","vs/nls!vs/workbench/services/dialogs/browser/abstractFileDialogService","vs/nls!vs/workbench/services/dialogs/browser/dialogService","vs/nls!vs/workbench/services/dialogs/browser/simpleFileDialog","vs/nls!vs/workbench/services/editor/browser/editorService","vs/nls!vs/workbench/services/editor/common/editorOpenWith","vs/nls!vs/workbench/services/extensionManagement/common/extensionEnablementService","vs/nls!vs/workbench/services/extensionManagement/common/extensionManagementServerService","vs/nls!vs/workbench/services/extensionManagement/common/extensionManagementService","vs/nls!vs/workbench/services/extensionManagement/common/webExtensionManagementService","vs/nls!vs/workbench/services/extensionManagement/common/webExtensionsScannerService","vs/nls!vs/workbench/services/extensions/browser/extensionService","vs/nls!vs/workbench/services/extensions/browser/extensionUrlHandler","vs/nls!vs/workbench/services/extensions/browser/webWorkerExtensionHost","vs/nls!vs/workbench/services/extensions/common/abstractExtensionService","vs/nls!vs/workbench/services/extensions/common/extensionHostManager","vs/nls!vs/workbench/services/extensions/common/extensionsRegistry","vs/nls!vs/workbench/services/extensions/common/remoteExtensionHost","vs/nls!vs/workbench/services/keybinding/browser/keybindingService","vs/nls!vs/workbench/services/keybinding/browser/keymapService","vs/nls!vs/workbench/services/keybinding/common/keybindingEditing","vs/nls!vs/workbench/services/label/common/labelService","vs/nls!vs/workbench/services/lifecycle/browser/lifecycleService","vs/nls!vs/workbench/services/mode/common/workbenchModeService","vs/nls!vs/workbench/services/notification/common/notificationService","vs/nls!vs/workbench/services/preferences/browser/preferencesService","vs/nls!vs/workbench/services/preferences/common/keybindingsEditorModel","vs/nls!vs/workbench/services/preferences/common/preferences","vs/nls!vs/workbench/services/preferences/common/preferencesEditorInput","vs/nls!vs/workbench/services/preferences/common/preferencesModels","vs/nls!vs/workbench/services/preferences/common/preferencesValidation","vs/nls!vs/workbench/services/progress/browser/progressService","vs/nls!vs/workbench/services/remote/common/abstractRemoteAgentService","vs/nls!vs/workbench/services/textMate/browser/abstractTextMateService","vs/nls!vs/workbench/services/textMate/common/TMGrammarFactory","vs/nls!vs/workbench/services/textMate/common/TMGrammars","vs/nls!vs/workbench/services/textfile/browser/textFileService","vs/nls!vs/workbench/services/textfile/common/textFileEditorModel","vs/nls!vs/workbench/services/textfile/common/textFileEditorModelManager","vs/nls!vs/workbench/services/textfile/common/textFileSaveParticipant","vs/nls!vs/workbench/services/themes/browser/fileIconThemeData","vs/nls!vs/workbench/services/themes/browser/productIconThemeData","vs/nls!vs/workbench/services/themes/browser/workbenchThemeService","vs/nls!vs/workbench/services/themes/common/colorExtensionPoint","vs/nls!vs/workbench/services/themes/common/colorThemeData","vs/nls!vs/workbench/services/themes/common/colorThemeSchema","vs/nls!vs/workbench/services/themes/common/fileIconThemeSchema","vs/nls!vs/workbench/services/themes/common/productIconThemeSchema","vs/nls!vs/workbench/services/themes/common/themeConfiguration","vs/nls!vs/workbench/services/themes/common/themeExtensionPoints","vs/nls!vs/workbench/services/themes/common/tokenClassificationExtensionPoint","vs/nls!vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService","vs/nls!vs/workbench/services/userDataSync/common/userDataSync","vs/nls!vs/workbench/services/views/browser/viewDescriptorService","vs/nls!vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant","vs/nls!vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService","vs/platform/clipboard/browser/clipboardService","vs/platform/debug/common/extensionHostDebugIpc","vs/platform/driver/browser/baseDriver","vs/platform/driver/browser/driver","vs/platform/extensionManagement/common/configRemotes","vs/platform/extensionManagement/common/extensionManagementIpc","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensionValidator","vs/platform/instantiation/common/graph","vs/editor/common/model/textModelTokens","vs/editor/common/controller/cursorColumnSelection","vs/editor/common/controller/oneCursor","vs/editor/common/controller/cursorCollection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/folding/foldingDecorations","vs/editor/contrib/folding/indentRangeProvider","vs/editor/contrib/linesOperations/moveLinesCommand","vs/editor/contrib/gotoSymbol/documentSymbols","vs/editor/contrib/links/getLinks","vs/editor/contrib/suggest/suggestAlternatives","vs/editor/contrib/suggest/wordContextKey","vs/platform/files/browser/indexedDBFileSystemProvider","vs/platform/files/common/inMemoryFilesystemProvider","vs/platform/files/common/io","vs/platform/instantiation/common/instantiationService","vs/platform/issue/common/issueReporterUtil","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/contextview/browser/contextViewService","vs/editor/common/services/webWorker","vs/platform/files/common/fileService","vs/platform/lifecycle/common/lifecycleService","vs/platform/log/browser/log","vs/platform/log/common/logIpc","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/editor/contrib/hover/modesGlyphHover","vs/platform/opener/browser/link","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/common/services/languagesRegistry","vs/editor/common/services/modeServiceImpl","vs/editor/common/services/textResourceConfigurationServiceImpl","vs/platform/accessibility/common/accessibilityService","vs/platform/actions/common/menuService","vs/platform/contextkey/browser/contextKeyService","vs/platform/quickinput/browser/helpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/platform/remote/browser/remoteAuthorityResolverService","vs/platform/remote/browser/browserSocketFactory","vs/platform/request/browser/requestService","vs/platform/download/common/downloadService","vs/platform/extensionManagement/common/extensionTipsService","vs/platform/request/common/requestIpc","vs/platform/resource/common/resourceIdentityService","vs/platform/sign/browser/signService","vs/editor/contrib/suggest/suggestMemory","vs/platform/storage/browser/storageService","vs/platform/telemetry/common/errorTelemetry","vs/platform/telemetry/browser/errorTelemetry","vs/editor/browser/core/keybindingCancellation","vs/editor/browser/view/viewController","vs/editor/contrib/anchorSelect/anchorSelect","vs/editor/contrib/caretOperations/caretOperations","vs/editor/contrib/caretOperations/transpose","vs/editor/contrib/codeAction/codeActionMenu","vs/editor/contrib/codeAction/codeActionModel","vs/editor/contrib/codelens/codeLensCache","vs/editor/contrib/comment/comment","vs/editor/contrib/cursorUndo/cursorUndo","vs/editor/contrib/dnd/dnd","vs/editor/contrib/fontZoom/fontZoom","vs/editor/contrib/format/formatActions","vs/editor/contrib/gotoSymbol/symbolNavigation","vs/editor/contrib/hover/getHover","vs/editor/contrib/parameterHints/parameterHintsModel","vs/editor/contrib/smartSelect/smartSelect","vs/editor/contrib/tokenization/tokenization","vs/editor/contrib/unusualLineTerminators/unusualLineTerminators","vs/editor/contrib/wordPartOperations/wordPartOperations","vs/platform/extensionManagement/common/extensionGalleryService","vs/platform/telemetry/common/telemetryService","vs/platform/contextview/browser/contextMenuHandler","vs/platform/theme/browser/checkbox","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/services/codeEditorServiceImpl","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/browser/controller/textAreaHandler","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/browser/view/viewImpl","vs/editor/browser/widget/diffReview","vs/editor/common/services/markerDecorationsServiceImpl","vs/editor/contrib/bracketMatching/bracketMatching","vs/editor/contrib/codeAction/lightBulbWidget","vs/editor/contrib/codelens/codelensWidget","vs/editor/contrib/codelens/codelensController","vs/editor/contrib/colorPicker/colorPickerWidget","vs/editor/contrib/find/findOptionsWidget","vs/editor/contrib/gotoSymbol/peek/referencesTree","vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/editor/contrib/codeAction/codeActionUi","vs/editor/contrib/codeAction/codeActionContributions","vs/editor/contrib/parameterHints/parameterHintsWidget","vs/editor/contrib/parameterHints/parameterHints","vs/editor/contrib/quickAccess/gotoSymbolQuickAccess","vs/editor/contrib/rename/onTypeRename","vs/editor/contrib/rename/renameInputField","vs/editor/contrib/rename/rename","vs/editor/contrib/suggest/suggestWidget","vs/editor/contrib/wordHighlighter/wordHighlighter","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInput","vs/editor/contrib/gotoError/gotoErrorWidget","vs/editor/contrib/hover/modesContentHover","vs/editor/common/services/modelUndoRedoParticipant","vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens","vs/platform/undoRedo/common/undoRedoService","vs/platform/update/common/update.config.contribution","vs/platform/url/common/urlService","vs/platform/userDataSync/common/globalStateMerge","vs/platform/userDataSync/common/keybindingsMerge","vs/platform/userDataSync/common/snippetsMerge","vs/editor/contrib/quickAccess/commandsQuickAccess","vs/platform/userDataSync/common/userDataSyncBackupStoreService","vs/platform/userDataSync/common/userDataSyncLog","vs/platform/userDataSync/common/userDataAutoSyncService","vs/platform/userDataSync/common/userDataSyncResourceEnablementService","vs/platform/userDataSync/common/userDataSyncService","vs/platform/webview/common/mimeTypes","vs/platform/webview/common/resourceLoader","vs/platform/webview/common/webviewPortMapping","vs/editor/contrib/snippet/snippetSession","vs/editor/contrib/suggest/suggestModel","vs/editor/editor.all","vs/workbench/api/common/extHostRpcService","vs/workbench/api/common/shared/semanticTokensDto","vs/workbench/browser/actions/listCommands","vs/workbench/browser/parts/notifications/notificationsAlerts","vs/workbench/browser/actions/quickAccessActions","vs/workbench/browser/actions/helpActions","vs/workbench/browser/workbench.contribution","vs/workbench/browser/parts/notifications/notificationsViewer","vs/workbench/contrib/backup/common/backupTracker","vs/workbench/contrib/bulkEdit/browser/bulkTextEdits","vs/workbench/contrib/bulkEdit/browser/conflicts","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree","vs/workbench/contrib/callHierarchy/browser/callHierarchyTree","vs/workbench/contrib/codeActions/common/codeActionsContribution","vs/workbench/contrib/codeActions/common/documentationContribution","vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget","vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/workbench/contrib/codeEditor/browser/largeFileOptimizations","vs/workbench/contrib/codeEditor/browser/toggleColumnSelection","vs/workbench/contrib/codeEditor/browser/toggleMinimap","vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier","vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter","vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace","vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch","vs/workbench/contrib/comments/browser/commentMenus","vs/workbench/contrib/comments/browser/reactionsAction","vs/workbench/contrib/customEditor/common/customEditorModelManager","vs/workbench/contrib/debug/browser/debugColors","vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/workbench/contrib/debug/browser/debugProgress","vs/workbench/contrib/debug/common/debugCompoundRoot","vs/workbench/contrib/debug/common/debugTelemetry","vs/workbench/contrib/debug/browser/rawDebugSession","vs/workbench/contrib/debug/common/debugViewModel","vs/workbench/contrib/emmet/browser/actions/showEmmetCommands","vs/workbench/contrib/extensions/browser/configBasedRecommendations","vs/workbench/contrib/extensions/browser/exeBasedRecommendations","vs/workbench/contrib/extensions/browser/keymapRecommendations","vs/workbench/contrib/externalTerminal/common/externalTerminal","vs/workbench/contrib/files/common/workspaceWatcher","vs/workbench/contrib/issue/browser/issueService","vs/workbench/contrib/issue/common/commands","vs/workbench/contrib/issue/browser/issue.web.contribution","vs/workbench/contrib/notebook/browser/notebookCellStatusBarServiceImpl","vs/workbench/contrib/notebook/browser/view/output/outputRenderer","vs/workbench/contrib/notebook/browser/view/renderers/cellActionView","vs/workbench/contrib/notebook/browser/view/renderers/cellMenus","vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads","vs/workbench/contrib/notebook/browser/viewModel/cellEdit","vs/workbench/contrib/notebook/common/model/cellEdit","vs/workbench/contrib/notebook/common/model/notebookCellTextModel","vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider","vs/workbench/contrib/notebook/browser/diff/cellComponents","vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList","vs/workbench/contrib/notebook/browser/view/notebookCellList","vs/workbench/contrib/notebook/browser/view/output/transforms/streamTransform","vs/workbench/contrib/notebook/browser/view/renderers/markdownCell","vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel","vs/workbench/contrib/notebook/common/model/notebookTextModel","vs/workbench/contrib/notebook/common/notebookOutputRenderer","vs/workbench/contrib/notebook/common/notebookProvider","vs/workbench/contrib/notebook/browser/view/renderers/codeCell","vs/workbench/contrib/notebook/common/services/notebookWorkerServiceImpl","vs/workbench/contrib/keybindings/browser/keybindings.contribution","vs/workbench/contrib/output/common/outputLinkProvider","vs/workbench/contrib/preferences/common/smartSnippetInserter","vs/workbench/contrib/remote/browser/urlFinder","vs/workbench/contrib/sash/browser/sash","vs/workbench/contrib/sash/browser/sash.contribution","vs/workbench/contrib/scm/browser/menus","vs/workbench/contrib/scm/browser/scmViewService","vs/workbench/contrib/scm/common/scmService","vs/workbench/contrib/search/common/cacheState","vs/workbench/contrib/snippets/browser/insertSnippet","vs/workbench/contrib/surveys/browser/nps.contribution","vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations","vs/workbench/contrib/tags/browser/workspaceTagsService","vs/workbench/contrib/debug/browser/debugTaskRunner","vs/workbench/contrib/tasks/common/taskTemplates","vs/workbench/contrib/terminal/browser/addons/commandTrackerAddon","vs/workbench/contrib/terminal/browser/addons/navigationModeAddon","vs/workbench/contrib/terminal/browser/links/terminalExternalLinkProviderAdapter","vs/workbench/contrib/terminal/browser/links/terminalProtocolLinkProvider","vs/workbench/contrib/terminal/browser/terminalCommands","vs/workbench/contrib/terminal/browser/terminalInstanceService","vs/workbench/contrib/terminal/browser/widgets/widgetManager","vs/workbench/contrib/terminal/browser/environmentVariableInfo","vs/workbench/contrib/terminal/common/environmentVariableCollection","vs/workbench/contrib/terminal/browser/terminalFindWidget","vs/workbench/contrib/debug/browser/debugANSIHandling","vs/workbench/contrib/notebook/browser/view/output/transforms/richTransform","vs/workbench/contrib/terminal/browser/terminal.web.contribution","vs/workbench/contrib/terminal/common/terminalDataBuffering","vs/workbench/contrib/terminal/common/terminalMenu","vs/workbench/contrib/timeline/common/timelineService","vs/workbench/contrib/webview/browser/themeing","vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay","vs/workbench/contrib/webview/browser/webview.contribution","vs/workbench/contrib/webview/browser/webviewIconManager","vs/workbench/contrib/webview/common/webviewUri","vs/workbench/contrib/webviewView/browser/webviewView.contribution","vs/workbench/contrib/welcome/common/viewsWelcomeContribution","vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page","vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough","vs/workbench/contrib/welcome/walkThrough/common/walkThroughContentProvider","vs/workbench/services/clipboard/browser/clipboardService","vs/workbench/services/configuration/browser/configurationCache","vs/workbench/services/configuration/browser/configuration","vs/workbench/services/configurationResolver/common/variableResolver","vs/workbench/contrib/markers/browser/markersFileDecorations","vs/workbench/services/decorations/browser/decorationsService","vs/workbench/services/dialogs/browser/dialogService","vs/workbench/browser/parts/editor/editorsObserver","vs/workbench/api/common/extHostTypeConverters","vs/workbench/api/common/apiCommands","vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek","vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution","vs/workbench/contrib/codeEditor/browser/inspectKeybindings","vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess","vs/workbench/contrib/files/common/explorerService","vs/workbench/contrib/notebook/browser/contrib/find/findController","vs/workbench/contrib/notebook/browser/contrib/fold/folding","vs/workbench/contrib/notebook/browser/contrib/format/formatting","vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets","vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer","vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough","vs/workbench/contrib/welcome/walkThrough/browser/walkThroughActions","vs/workbench/contrib/welcome/walkThrough/browser/walkThrough.contribution","vs/workbench/services/editor/browser/codeEditorService","vs/workbench/services/environment/browser/environmentService","vs/workbench/contrib/logs/common/logsActions","vs/workbench/contrib/logs/common/logsDataCleaner","vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView","vs/workbench/contrib/remote/common/tunnelFactory","vs/workbench/contrib/url/browser/externalUriResolver","vs/workbench/contrib/webview/browser/baseWebviewElement","vs/workbench/contrib/webview/browser/webviewElement","vs/workbench/contrib/webview/browser/webviewService","vs/workbench/contrib/webview/browser/webview.web.contribution","vs/workbench/services/configurationResolver/browser/configurationResolverService","vs/workbench/services/credentials/browser/credentialsService","vs/workbench/services/extensionManagement/common/webExtensionManagementService","vs/workbench/services/extensionManagement/common/webExtensionsScannerService","vs/workbench/contrib/extensions/browser/workspaceRecommendations","vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService","vs/workbench/services/extensionResourceLoader/browser/extensionResourceLoaderService","vs/workbench/services/extensions/browser/webWorkerFileSystemProvider","vs/workbench/services/extensions/common/extensionDescriptionRegistry","vs/workbench/contrib/extensions/browser/extensionsActivationProgress","vs/workbench/contrib/format/browser/formatActionsMultiple","vs/workbench/contrib/terminal/common/environmentVariableService","vs/workbench/contrib/terminal/common/environmentVariable.contribution","vs/workbench/contrib/update/browser/releaseNotesEditor","vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay","vs/workbench/services/commands/common/commandService","vs/workbench/api/common/configurationExtensionPoint","vs/workbench/api/common/jsonValidationExtensionPoint","vs/workbench/contrib/notebook/browser/extensionPoint","vs/workbench/contrib/notebook/browser/notebookServiceImpl","vs/workbench/contrib/tasks/common/jsonSchema_v1","vs/workbench/contrib/tasks/common/problemCollectors","vs/workbench/contrib/debug/common/debugger","vs/workbench/contrib/tasks/common/jsonSchema_v2","vs/workbench/contrib/tasks/browser/tasksQuickAccess","vs/workbench/contrib/tasks/common/taskConfiguration","vs/workbench/contrib/terminal/common/terminalExtensionPoints.contribution","vs/workbench/contrib/welcome/common/viewsWelcome.contribution","vs/workbench/services/extensionManagement/common/extensionEnablementService","vs/workbench/services/extensionManagement/common/extensionManagementService","vs/workbench/services/extensionManagement/common/remoteExtensionManagementService","vs/workbench/services/extensions/common/lazyPromise","vs/workbench/api/browser/mainThreadClipboard","vs/workbench/api/browser/mainThreadCodeInsets","vs/workbench/api/browser/mainThreadCommands","vs/workbench/api/browser/mainThreadConfiguration","vs/workbench/api/browser/mainThreadDebugService","vs/workbench/api/browser/mainThreadDecorations","vs/workbench/api/browser/mainThreadDialogs","vs/workbench/api/browser/mainThreadDocumentContentProviders","vs/workbench/api/browser/mainThreadDownloadService","vs/workbench/api/browser/mainThreadErrors","vs/workbench/api/browser/mainThreadFileSystem","vs/workbench/api/browser/mainThreadKeytar","vs/workbench/api/browser/mainThreadLabelService","vs/workbench/api/browser/mainThreadLanguageFeatures","vs/workbench/api/browser/mainThreadLanguages","vs/workbench/api/browser/mainThreadLogService","vs/workbench/api/browser/mainThreadMessageService","vs/workbench/api/browser/mainThreadProgress","vs/workbench/api/browser/mainThreadQuickOpen","vs/workbench/api/browser/mainThreadRemoteConnectionData","vs/workbench/api/browser/mainThreadSCM","vs/workbench/api/browser/mainThreadStorage","vs/workbench/api/browser/mainThreadTask","vs/workbench/api/browser/mainThreadTelemetry","vs/workbench/api/browser/mainThreadTheming","vs/workbench/api/browser/mainThreadTimeline","vs/workbench/api/browser/mainThreadTreeViews","vs/workbench/api/browser/mainThreadWebviewViews","vs/workbench/api/browser/mainThreadWebviewPanels","vs/workbench/api/common/extHostTunnelService","vs/workbench/services/extensions/common/remoteConsoleUtil","vs/workbench/api/browser/mainThreadConsole","vs/workbench/services/extensions/common/rpcProtocol","vs/workbench/services/extensions/common/extensionHostManager","vs/workbench/services/extensions/common/webWorkerIframe","vs/workbench/contrib/customEditor/browser/customEditorInputFactory","vs/workbench/api/browser/mainThreadExtensionService","vs/workbench/api/browser/mainThreadWindow","vs/workbench/contrib/codeEditor/browser/diffEditorHelper","vs/workbench/contrib/extensions/browser/extensionsDependencyChecker","vs/workbench/contrib/extensions/browser/extensionsWorkbenchService","vs/workbench/contrib/relauncher/browser/relauncher.contribution","vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider","vs/workbench/contrib/update/browser/update","vs/workbench/contrib/update/browser/update.contribution","vs/workbench/api/browser/mainThreadUrls","vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget","vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget","vs/workbench/services/integrity/browser/integrityService","vs/workbench/services/keybinding/common/dispatchConfig","vs/workbench/services/keybinding/common/keybindingIO","vs/workbench/services/keybinding/common/keyboardMapper","vs/workbench/services/keybinding/browser/keybindingService","vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper","vs/workbench/services/keybinding/common/macLinuxKeyboardMapper","vs/workbench/services/keybinding/browser/keymapService","vs/workbench/browser/actions/textInputActions","vs/workbench/browser/parts/editor/editorControl","vs/workbench/browser/parts/notifications/notificationsCenter","vs/workbench/browser/parts/notifications/notificationsToasts","vs/workbench/contrib/debug/browser/statusbarColorProvider","vs/workbench/contrib/terminal/browser/terminalTab","vs/workbench/contrib/webviewPanel/browser/webviewCommands","vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution","vs/workbench/services/hover/browser/hoverWidget","vs/workbench/services/hover/browser/hoverService","vs/workbench/services/lifecycle/browser/lifecycleService","vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint","vs/workbench/contrib/codeActions/common/documentationExtensionPoint","vs/workbench/contrib/codeActions/common/codeActions.contribution","vs/workbench/contrib/customEditor/common/extensionPoint","vs/workbench/contrib/customEditor/common/contributedCustomEditors","vs/workbench/contrib/customEditor/browser/customEditors","vs/workbench/contrib/customEditor/browser/customEditor.contribution","vs/workbench/contrib/comments/browser/commentNode","vs/workbench/contrib/comments/browser/commentThreadWidget","vs/workbench/contrib/comments/browser/comments.contribution","vs/workbench/contrib/debug/browser/breakpointWidget","vs/workbench/services/notification/common/notificationService","vs/workbench/api/browser/mainThreadOutputService","vs/workbench/contrib/logs/common/logs.contribution","vs/workbench/services/extensions/browser/webWorkerExtensionHost","vs/workbench/services/extensions/common/remoteExtensionHost","vs/workbench/contrib/output/browser/outputServices","vs/workbench/services/output/common/outputChannelModelService","vs/workbench/services/activity/browser/activityService","vs/workbench/browser/parts/titlebar/titlebarPart","vs/workbench/contrib/preferences/browser/preferencesActions","vs/workbench/contrib/preferences/browser/keybindingsEditorContribution","vs/workbench/contrib/preferences/common/preferencesContribution","vs/workbench/contrib/preferences/browser/tocTree","vs/workbench/contrib/preferences/browser/preferencesRenderers","vs/workbench/contrib/preferences/browser/preferencesSearch","vs/workbench/services/quickinput/browser/quickInputService","vs/workbench/services/remote/common/remoteAgentEnvironmentChannel","vs/workbench/services/remote/common/remoteAgentFileSystemChannel","vs/workbench/api/browser/mainThreadAuthentication","vs/workbench/api/browser/mainThreadTerminalService","vs/workbench/contrib/debug/browser/extensionHostDebugService","vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy","vs/workbench/services/extensionManagement/common/extensionManagementServerService","vs/workbench/contrib/backup/common/backupRestorer","vs/workbench/contrib/backup/common/backup.contribution","vs/workbench/contrib/debug/browser/exceptionWidget","vs/workbench/contrib/terminal/browser/terminalProcessManager","vs/workbench/services/dialogs/browser/simpleFileDialog","vs/workbench/services/dialogs/browser/abstractFileDialogService","vs/workbench/services/dialogs/browser/fileDialogService","vs/workbench/services/label/common/labelService","vs/workbench/services/path/browser/pathService","vs/workbench/services/remote/common/abstractRemoteAgentService","vs/workbench/services/remote/browser/remoteAgentServiceImpl","vs/workbench/api/browser/mainThreadTunnelService","vs/workbench/contrib/remote/browser/explorerViewItems","vs/workbench/contrib/remote/common/showCandidate","vs/workbench/services/request/browser/requestService","vs/workbench/services/search/common/replace","vs/workbench/api/browser/mainThreadSearch","vs/workbench/contrib/terminal/browser/links/terminalWordLinkProvider","vs/workbench/contrib/terminal/browser/links/terminalLinkManager","vs/workbench/services/extensions/common/abstractExtensionService","vs/workbench/services/extensions/browser/extensionService","vs/workbench/services/search/common/searchService","vs/workbench/api/browser/mainThreadStatusBar","vs/workbench/browser/parts/notifications/notificationsStatus","vs/workbench/browser/parts/statusbar/statusbarPart","vs/workbench/contrib/debug/browser/debugStatus","vs/workbench/contrib/feedback/browser/feedback","vs/workbench/contrib/feedback/browser/feedbackStatusbarItem","vs/workbench/contrib/feedback/browser/feedback.contribution","vs/workbench/contrib/notebook/browser/contrib/status/editorStatus","vs/workbench/contrib/preferences/browser/keyboardLayoutPicker","vs/workbench/contrib/remote/browser/remoteIndicator","vs/workbench/services/telemetry/browser/workbenchCommonProperties","vs/workbench/services/telemetry/browser/telemetryService","vs/workbench/contrib/emmet/browser/emmetActions","vs/workbench/contrib/emmet/browser/actions/expandAbbreviation","vs/workbench/contrib/emmet/browser/emmet.contribution","vs/workbench/services/textMate/common/TMHelper","vs/workbench/services/textMate/common/TMScopeRegistry","vs/workbench/services/textMate/common/TMGrammarFactory","vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint","vs/workbench/services/textfile/common/textFileSaveParticipant","vs/workbench/api/browser/mainThreadSaveParticipant","vs/workbench/browser/parts/editor/breadcrumbsPicker","vs/workbench/contrib/customEditor/common/customTextEditorModel","vs/workbench/contrib/debug/browser/debugConfigurationManager","vs/workbench/contrib/extensions/browser/experimentalRecommendations","vs/workbench/contrib/files/browser/editors/textFileEditorTracker","vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/workbench/contrib/files/browser/editors/binaryFileEditor","vs/workbench/contrib/codeEditor/browser/saveParticipants","vs/workbench/contrib/search/browser/replaceService","vs/workbench/contrib/search/browser/replaceContributions","vs/workbench/contrib/searchEditor/browser/searchEditorModel","vs/workbench/contrib/snippets/browser/configureSnippets","vs/workbench/contrib/surveys/browser/languageSurveys.contribution","vs/workbench/contrib/tasks/browser/taskService","vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider","vs/workbench/contrib/url/browser/trustedDomainsValidator","vs/workbench/contrib/url/browser/url.contribution","vs/workbench/contrib/welcome/telemetryOptOut/browser/telemetryOptOut","vs/workbench/contrib/welcome/telemetryOptOut/browser/telemetryOptOut.contribution","vs/workbench/services/backup/common/backupFileService","vs/workbench/services/configuration/common/configurationEditingService","vs/workbench/services/configuration/browser/configurationService","vs/workbench/contrib/preferences/browser/keybindingsEditor","vs/workbench/contrib/userDataSync/browser/userDataSyncTrigger","vs/workbench/services/preferences/browser/preferencesService","vs/workbench/services/textresourceProperties/common/textResourcePropertiesService","vs/workbench/services/themes/common/colorExtensionPoint","vs/workbench/services/themes/browser/browserHostColorSchemeService","vs/workbench/services/themes/common/plistParser","vs/workbench/services/themes/common/fileIconThemeSchema","vs/workbench/services/themes/common/textMateScopeMatcher","vs/workbench/services/themes/common/themeCompatibility","vs/workbench/services/themes/common/tokenClassificationExtensionPoint","vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/workbench/contrib/codeEditor/browser/codeEditor.contribution","vs/workbench/services/textMate/browser/abstractTextMateService","vs/workbench/services/textMate/browser/textMateService","vs/workbench/services/themes/browser/fileIconThemeData","vs/workbench/services/themes/common/colorThemeData","vs/workbench/services/themes/common/themeExtensionPoints","vs/workbench/services/themes/browser/workbenchThemeService","vs/workbench/contrib/debug/browser/debugTitle","vs/workbench/browser/parts/editor/editorStatus","vs/workbench/contrib/output/browser/logViewer","vs/workbench/services/update/browser/updateService","vs/workbench/api/browser/mainThreadDiagnostics","vs/workbench/contrib/debug/common/debugStorage","vs/workbench/contrib/debug/browser/replFilter","vs/workbench/contrib/debug/browser/replViewer","vs/workbench/contrib/scm/browser/activity","vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService","vs/workbench/services/history/browser/history","vs/workbench/services/uriIdentity/common/uriIdentityService","vs/workbench/services/url/browser/urlService","vs/workbench/services/userDataSync/browser/userDataAutoSyncService","vs/workbench/services/userDataSync/browser/userDataSyncResourceEnablementService","vs/workbench/contrib/preferences/browser/settingsEditor2","vs/workbench/services/userData/browser/userDataInit","vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService","vs/workbench/services/userDataSync/common/userDataSyncUtil","vs/workbench/browser/actions/navigationActions","vs/workbench/contrib/debug/browser/debugSession","vs/workbench/contrib/debug/browser/debugService","vs/workbench/contrib/experiments/browser/experimentalPrompt","vs/workbench/contrib/experiments/browser/experiments.contribution","vs/workbench/contrib/extensions/browser/extensionsQuickAccess","vs/workbench/contrib/extensions/browser/fileBasedRecommendations","vs/workbench/contrib/extensions/browser/extensionRecommendationsService","vs/workbench/contrib/files/browser/editors/textFileEditor","vs/workbench/contrib/files/browser/files.web.contribution","vs/workbench/contrib/format/browser/formatActionsNone","vs/workbench/contrib/format/browser/format.contribution","vs/workbench/contrib/quickaccess/browser/viewQuickAccess","vs/workbench/contrib/quickaccess/browser/quickAccess.contribution","vs/workbench/contrib/telemetry/browser/telemetry.contribution","vs/workbench/contrib/themes/browser/themes.contribution","vs/workbench/contrib/welcome/page/browser/welcomePage","vs/workbench/contrib/welcome/page/browser/welcomePage.contribution","vs/workbench/services/progress/browser/progressService","vs/workbench/contrib/performance/browser/perfviewEditor","vs/workbench/contrib/performance/browser/performance.contribution","vs/workbench/services/views/common/viewContainerModel","vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant","vs/workbench/api/browser/mainThreadNotebook","vs/workbench/browser/actions/developerActions","vs/workbench/browser/parts/editor/editorAutoSave","vs/workbench/contrib/backup/browser/backupTracker","vs/workbench/contrib/backup/browser/backup.web.contribution","vs/workbench/contrib/files/common/dirtyFilesIndicator","vs/workbench/contrib/notebook/common/notebookEditorModel","vs/workbench/api/browser/mainThreadBulkEdits","vs/workbench/contrib/notebook/browser/notebookDiffEditorInput","vs/workbench/contrib/search/browser/anythingQuickAccess","vs/workbench/contrib/searchEditor/browser/searchEditor","vs/workbench/contrib/searchEditor/browser/searchEditor.contribution","vs/workbench/contrib/tasks/browser/task.contribution","vs/workbench/services/textmodelResolver/common/textModelResolverService","vs/workbench/api/browser/mainThreadCustomEditors","vs/workbench/api/browser/mainThreadDocumentsAndEditors","vs/workbench/api/browser/mainThreadFileSystemEventService","vs/workbench/api/browser/mainThreadWebviewManager","vs/workbench/contrib/bulkEdit/browser/bulkFileEdits","vs/workbench/contrib/bulkEdit/browser/bulkEditService","vs/workbench/services/textfile/common/textFileEditorModelManager","vs/workbench/services/textfile/browser/textFileService","vs/workbench/services/textfile/browser/browserTextFileService","vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService","vs/workbench/services/workspaces/browser/workspacesService","vs/workbench/api/browser/mainThreadWorkspace","vs/workbench/browser/parts/activitybar/activitybarActions","vs/workbench/browser/parts/editor/editorDropTarget","vs/workbench/browser/parts/editor/noTabsTitleControl","vs/workbench/browser/parts/editor/tabsTitleControl","vs/workbench/browser/parts/editor/editorGroupView","vs/workbench/browser/parts/editor/editorPart","vs/workbench/browser/parts/panel/panelActions","vs/workbench/browser/layout","vs/workbench/browser/parts/views/viewsService","vs/workbench/browser/workbench","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane","vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution","vs/workbench/contrib/comments/browser/commentsView","vs/workbench/api/browser/mainThreadComments","vs/workbench/api/browser/extensionHost.contribution","vs/workbench/contrib/debug/browser/callStackView","vs/workbench/contrib/debug/browser/debugEditorActions","vs/workbench/contrib/debug/browser/debugQuickAccess","vs/workbench/contrib/debug/browser/loadedScriptsView","vs/workbench/contrib/debug/browser/debugHover","vs/workbench/contrib/debug/browser/watchExpressionsView","vs/workbench/contrib/debug/browser/debug.contribution","vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService","vs/workbench/contrib/extensions/browser/extensionsViewer","vs/workbench/contrib/extensions/browser/extensionEditor","vs/workbench/contrib/extensions/browser/extensionsViews","vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller","vs/workbench/contrib/extensions/browser/extensions.contribution","vs/workbench/contrib/files/browser/fileActions.contribution","vs/workbench/contrib/files/browser/views/emptyView","vs/workbench/contrib/files/browser/views/explorerDecorationsProvider","vs/workbench/contrib/files/browser/views/explorerView","vs/workbench/contrib/files/browser/views/openEditorsView","vs/workbench/contrib/files/browser/files.contribution","vs/workbench/contrib/markers/browser/markersTreeViewer","vs/workbench/contrib/markers/browser/markersView","vs/workbench/contrib/markers/browser/markers.contribution","vs/workbench/contrib/notebook/browser/diff/notebookDiffActions","vs/workbench/contrib/notebook/browser/notebookEditorWidgetService","vs/workbench/contrib/notebook/browser/contrib/toc/tocProvider","vs/workbench/contrib/notebook/browser/notebook.contribution","vs/workbench/contrib/outline/browser/outlinePane","vs/workbench/contrib/outline/browser/outline.contribution","vs/workbench/contrib/output/browser/output.contribution","vs/workbench/contrib/preferences/browser/preferences.contribution","vs/workbench/contrib/remote/browser/tunnelView","vs/workbench/contrib/remote/browser/remote","vs/workbench/contrib/scm/browser/scmRepositoriesViewPane","vs/workbench/contrib/scm/browser/scmViewPaneContainer","vs/workbench/contrib/scm/browser/scm.contribution","vs/workbench/contrib/search/browser/searchResultsView","vs/workbench/contrib/search/browser/search.contribution","vs/workbench/contrib/terminal/browser/terminalConfigHelper","vs/workbench/contrib/terminal/browser/terminalInstance","vs/workbench/contrib/terminal/browser/terminalService","vs/workbench/contrib/terminal/browser/terminal.contribution","vs/workbench/contrib/timeline/browser/timelinePane","vs/workbench/contrib/timeline/browser/timeline.contribution","vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView","vs/workbench/contrib/userDataSync/browser/userDataSyncViews","vs/workbench/contrib/userDataSync/browser/userDataSync","vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/workbench/contrib/watermark/browser/watermark","vs/workbench/contrib/webviewView/browser/webviewViewPane","vs/workbench/api/browser/viewsExtensionPoint","vs/workbench/services/host/browser/browserHostService","vs/workbench/services/views/browser/viewDescriptorService","vs/workbench/services/workspaces/browser/workspaceEditingService","vs/workbench/workbench.common.main","vs/workbench/workbench.web.main","vs/base/common/insane/insane","semver-umd","vs/workbench/workbench.web.api"],t=function(t){ for(var i=[],n=0,o=t.length;n({accept:!1}),accept:()=>({accept:!0})};class i extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}t.ListError=i;t.CachedListVirtualDelegate=class{constructor(){this.cache=new WeakMap}getHeight(e){var t;return null!==(t=this.cache.get(e))&&void 0!==t?t:this.estimateHeight(e)}setDynamicHeight(e,t){t>0&&this.cache.set(e,t)}}})),define(e[720],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CombinedSpliceable=void 0;t.CombinedSpliceable=class{constructor(e){ this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}})),define(e[500],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarState=void 0;const i=20;class n{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new n(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e) ;return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=e}static _computeValues(e,t,n,o,s){const r=Math.max(0,n-e),a=Math.max(0,r-2*t),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(i,Math.floor(n*a/o))),d=(a-c)/(o-n),h=s*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=n._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;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;let t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}t.ScrollbarState=n})),define(e[229],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WeakMapper=t.TreeError=t.TreeDragOverReactions=t.TreeDragOverBubble=t.TreeMouseEventTarget=t.TreeVisibility=void 0,function(e){e[e.Hidden=0]="Hidden",e[e.Visible=1]="Visible",e[e.Recurse=2]="Recurse"}(t.TreeVisibility||(t.TreeVisibility={})), function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(t.TreeMouseEventTarget||(t.TreeMouseEventTarget={})),function(e){e[e.Down=0]="Down",e[e.Up=1]="Up"}(t.TreeDragOverBubble||(t.TreeDragOverBubble={})),t.TreeDragOverReactions={acceptBubbleUp:()=>({accept:!0,bubble:1}),acceptBubbleDown:(e=!1)=>({accept:!0,bubble:0,autoExpand:e}),acceptCopyBubbleUp:()=>({accept:!0,bubble:1,effect:0}),acceptCopyBubbleDown:(e=!1)=>({accept:!0,bubble:0,effect:0,autoExpand:e})};class i extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}t.TreeError=i;t.WeakMapper=class{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}})),define(e[389],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=void 0,t.ok=function(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}})),define(e[141],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{ value:!0}),t.SetMap=t.fromMap=t.groupBy=t.forEach=t.values=void 0;const i=Object.prototype.hasOwnProperty;t.values=function(e){const t=[];for(let n in e)i.call(e,n)&&t.push(e[n]);return t},t.forEach=function(e,t){for(let n in e)if(i.call(e,n)){if(!1===t({key:n,value:e[n]},(function(){delete e[n]})))return}},t.groupBy=function(e,t){const i=Object.create(null);for(const n of e){const e=t(n);let o=i[e];o||(o=i[e]=[]),o.push(n)}return i},t.fromMap=function(e){const t=Object.create(null);return e&&e.forEach((e,i)=>{t[i]=e}),t};t.SetMap=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}})),define(e[55],t([0,1]),(function(e,t){"use strict";function i(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}Object.defineProperty(t,"__esModule",{value:!0}),t.Color=t.HSVA=t.HSLA=t.RGBA=void 0;class n{constructor(e,t,n,o=1){ this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}t.RGBA=n;class o{constructor(e,t,n,o){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const d=(a+r)/2,h=r-a;if(h>0){switch(c=Math.min(d<=.5?h/(2*d):h/(2-2*d),1),r){case t:l=(i-n)/h+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:s,a:r}=e;let a,l,c;if(0===i)a=l=c=s;else{const e=s<.5?s*(1+i):s+i-s*i,n=2*s-e ;a=o._hue2rgb(n,e,t+1/3),l=o._hue2rgb(n,e,t),c=o._hue2rgb(n,e,t-1/3)}return new n(Math.round(255*a),Math.round(255*l),Math.round(255*c),r)}}t.HSLA=o;class s{constructor(e,t,n,o){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),r=o-Math.min(t,i,n),a=0===o?0:r/o;let l;return l=0===r?0:o===t?((i-n)/r%6+6)%6:o===i?(n-t)/r+2:(t-i)/r+4,new s(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:o,a:s}=e,r=o*i,a=r*(1-Math.abs(t/60%2-1)),l=o-r;let[c,d,h]=[0,0,0];return t<60?(c=r,d=a):t<120?(c=a,d=r):t<180?(d=r,h=a):t<240?(d=a,h=r):t<300?(c=a,h=r):t<360&&(c=r,h=a),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),h=Math.round(255*(h+l)),new n(c,d,h,s)}}t.HSVA=s;class r{constructor(e){if(!e)throw new Error("Color needs a value") ;if(e instanceof n)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}static fromHex(e){return r.Format.CSS.parseHex(e)||r.red}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)}equals(e){return!!e&&n.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)}getRelativeLuminance(){return i(.2126*r._relativeLuminanceForComponent(this.rgba.r)+.7152*r._relativeLuminanceForComponent(this.rgba.g)+.0722*r._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}getContrastRatio(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)}isDarker(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3<128}isLighter(){ return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()r._flatten(t,e));return r._flatten(this,t)}static _flatten(e,t){const i=1-e.rgba.a;return new r(new n(i*t.rgba.r+e.rgba.a*e.rgba.r,i*t.rgba.g+e.rgba.a*e.rgba.g,i*t.rgba.b+e.rgba.a*e.rgba.b))}toString(){return""+r.Format.CSS.format(this)}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(o-n)/o,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance();return i=i*(n-t.getRelativeLuminance())/n,e.darken(i)}}t.Color=r,r.white=new r(new n(255,255,255,1)),r.black=new r(new n(0,0,0,1)),r.red=new r(new n(255,0,0,1)),r.blue=new r(new n(0,0,255,1)),r.green=new r(new n(0,255,0,1)),r.cyan=new r(new n(0,255,255,1)),r.lightgrey=new r(new n(211,211,211,1)),r.transparent=new r(new n(0,0,0,0)),function(e){let t;!function(t){let i;!function(t){ function i(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function o(e){switch(e){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:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`}, t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*o(t.charCodeAt(1))+o(t.charCodeAt(2)),s=16*o(t.charCodeAt(3))+o(t.charCodeAt(4)),r=16*o(t.charCodeAt(5))+o(t.charCodeAt(6));return new e(new n(i,s,r,1))}if(9===i){const i=16*o(t.charCodeAt(1))+o(t.charCodeAt(2)),s=16*o(t.charCodeAt(3))+o(t.charCodeAt(4)),r=16*o(t.charCodeAt(5))+o(t.charCodeAt(6)),a=16*o(t.charCodeAt(7))+o(t.charCodeAt(8));return new e(new n(i,s,r,a/255))}if(4===i){const i=o(t.charCodeAt(1)),s=o(t.charCodeAt(2)),r=o(t.charCodeAt(3));return new e(new n(16*i+i,16*s+s,16*r+r))}if(5===i){const i=o(t.charCodeAt(1)),s=o(t.charCodeAt(2)),r=o(t.charCodeAt(3)),a=o(t.charCodeAt(4));return new e(new n(16*i+i,16*s+s,16*r+r,(16*a+a)/255))} return null}}(i=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(r=t.Color||(t.Color={}))})),define(e[95],t([0,1]),(function(e,t){"use strict";function i(e){return(t,i,n)=>{let o=null,s=null;if("function"==typeof n.value?(o="value",s=n.value):"function"==typeof n.get&&(o="get",s=n.get),!s)throw new Error("not supported");n[o]=e(s,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.debounce=t.memoize=t.createMemoizer=t.createDecorator=void 0,t.createDecorator=i;let n=0;function o(){const e=`$memoize${n++}`;let t=void 0;const i=function(i,n,o){let s=null,r=null;if("function"==typeof o.value?(s="value",0!==(r=o.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof o.get&&(s="get",r=o.get),!r)throw new Error("not supported");const a=`${e}:${n}`;o[s]=function(...e){return t=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,enumerable:!1,writable:!0,value:r.apply(this,e)}),this[a]}};return i.clear=()=>{ void 0!==t&&Object.getOwnPropertyNames(t).forEach(i=>{0===i.indexOf(e)&&delete t[i]})},i}t.createMemoizer=o,t.memoize=function(e,t,i){return o()(e,t,i)},t.debounce=function(e,t,n){return i((i,o)=>{const s=`$debounce$${o}`,r=`$debounce$result$${o}`;return function(...o){this[r]||(this[r]=n?n():void 0),clearTimeout(this[s]),t&&(this[r]=t(this[r],...o),o=[this[r]]),this[s]=setTimeout(()=>{i.apply(this,o),this[r]=n?n():void 0},e)}})},t.throttle=function(e,t,n){return i((i,o)=>{const s=`$throttle$timer$${o}`,r=`$throttle$result$${o}`,a=`$throttle$lastRun$${o}`,l=`$throttle$pending$${o}`;return function(...o){if(this[r]||(this[r]=n?n():void 0),null!==this[a]&&void 0!==this[a]||(this[a]=-Number.MAX_VALUE),t&&(this[r]=t(this[r],...o)),this[l])return;const c=this[a]+e;c<=Date.now()?(this[a]=Date.now(),i.apply(this,[this[r]]),this[r]=n?n():void 0):(this[l]=!0,this[s]=setTimeout(()=>{this[l]=!1,this[a]=Date.now(),i.apply(this,[this[r]]),this[r]=n?n():void 0},c-Date.now()))}})}})),define(e[721],t([0,1]),(function(e,t){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffChange=void 0;t.DiffChange=class{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}})),define(e[21],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotSupportedError=t.NotImplementedError=t.getErrorMessage=t.disposed=t.readonly=t.illegalState=t.illegalArgument=t.canceled=t.isPromiseCanceledError=t.transformErrorForSerialization=t.onUnexpectedExternalError=t.onUnexpectedError=t.setUnexpectedErrorHandler=t.errorHandler=t.ErrorHandler=void 0;class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})} _removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}t.ErrorHandler=i,t.errorHandler=new i,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=function(e){o(e)||t.errorHandler.onUnexpectedError(e)},t.onUnexpectedExternalError=function(e){o(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e};const n="Canceled";function o(e){return e instanceof Error&&e.name===n&&e.message===n}t.isPromiseCanceledError=o,t.canceled=function(){const e=new Error(n);return e.name=e.message,e},t.illegalArgument=function(e){ return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")},t.illegalState=function(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")},t.readonly=function(e){return e?new Error(`readonly property '${e} cannot be changed'`):new Error("readonly property cannot be changed")},t.disposed=function(e){const t=new Error(`${e} has been disposed`);return t.name="DISPOSED",t},t.getErrorMessage=function(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"};class s extends Error{constructor(e){super("NotImplemented"),e&&(this.message=e)}}t.NotImplementedError=s;class r extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}t.NotSupportedError=r})),define(e[14],t([0,1,21]),(function(e,t,i){"use strict";function n(e,t){let i=0,n=e.length;if(0===n)return 0;for(;in?e[l]=s[a++]:a>o?e[l]=s[r++]:t(s[a],s[r])<0?e[l]=s[a++]:e[l]=s[r++]}(t,i,n,r,o,s)}(e,t,0,e.length-1,[]),e}function s(e,t,i){const n=[];function o(e,t,i){if(0===t&&0===i.length)return;const o=n[n.length-1];o&&o.start+o.deleteCount===e?(o.deleteCount+=t,o.toInsert.push(...i)):n.push({start:e,deleteCount:t,toInsert:i})}let s=0,r=0;for(;;){if(s===e.length){o(s,0,t.slice(r));break}if(r===t.length){o(s,e.length-s,[]);break}const n=e[s],a=t[r],l=i(n,a);0===l?(s+=1,r+=1):l<0?(o(s,1,[]),s+=1):l>0&&(o(s,0,[a]),r+=1)}return n}function r(e,t,i,o,s){for(const r=i.length;ot(s,e)<0);i.splice(e,0,s)}}}function a(e,t){const i=e.indexOf(t);if(i>-1)return e.splice(i,1),t}Object.defineProperty(t,"__esModule",{value:!0}), t.getRandomElement=t.asArray=t.mapArrayOrNot=t.pushToEnd=t.pushToStart=t.shuffle=t.arrayInsert=t.remove=t.insert=t.index=t.range=t.flatten=t.commonPrefixLength=t.firstOrDefault=t.lastIndex=t.uniqueFilter=t.distinctES6=t.distinct=t.isNonEmptyArray=t.isFalsyOrEmpty=t.move=t.coalesceInPlace=t.coalesce=t.topAsync=t.top=t.delta=t.sortedDiff=t.groupBy=t.mergeSort=t.findFirstInSorted=t.binarySearch=t.equals=t.tail2=t.tail=void 0,t.tail=function(e,t=0){return e[e.length-(1+t)]},t.tail2=function(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]},t.equals=function(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n0))return s;o=s-1}}return-(n+1)},t.findFirstInSorted=n,t.mergeSort=o,t.groupBy=function(e,t){const i=[];let n=void 0 ;for(const s of o(e.slice(0),t))n&&0===t(n[0],s)?n.push(s):(n=[s],i.push(n));return i},t.sortedDiff=s,t.delta=function(e,t,i){const n=s(e,t,i),o=[],r=[];for(const t of n)o.push(...e.slice(t.start,t.start+t.deleteCount)),r.push(...t.toInsert);return{removed:o,added:r}},t.top=function(e,t,i){if(0===i)return[];const n=e.slice(0,i).sort(t);return r(e,t,n,i,e.length),n},t.topAsync=function(e,t,n,o,s){return 0===n?Promise.resolve([]):new Promise((a,l)=>{(async()=>{const a=e.length,l=e.slice(0,n).sort(t);for(let c=n,d=Math.min(n+o,a);cn&&await new Promise(e=>setTimeout(e)),s&&s.isCancellationRequested)throw i.canceled();r(e,t,l,c,d)}return l})().then(a,l)})},t.coalesce=function(e){return e.filter(e=>!!e)},t.coalesceInPlace=function(e){let t=0;for(let i=0;i0},t.distinct=function(e,t){if(!t)return e.filter((t,i)=>e.indexOf(t)===i);const i=Object.create(null);return e.filter(e=>{const n=t(e);return!i[n]&&(i[n]=!0,!0)})},t.distinctES6=function(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))},t.uniqueFilter=function(e){const t=Object.create(null);return i=>{const n=e(i);return!t[n]&&(t[n]=!0,!0)}},t.lastIndex=function(e,t){for(let i=e.length-1;i>=0;i--){if(t(e[i]))return i}return-1},t.firstOrDefault=function(e,t){return e.length>0?e[0]:t},t.commonPrefixLength=function(e,t,i=((e,t)=>e===t)){let n=0;for(let o=0,s=Math.min(e.length,t.length);ot;e--)n.push(e);return n},t.index=function(e,t,i){return e.reduce((e,n)=>(e[t(n)]=i?i(n):n,e),Object.create(null))},t.insert=function(e,t){ return e.push(t),()=>a(e,t)},t.remove=a,t.arrayInsert=function(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)},t.shuffle=function(e,t){let i;if("number"==typeof t){let e=t;i=()=>{const t=179426549*Math.sin(e++);return t-Math.floor(t)}}else i=Math.random;for(let t=e.length-1;t>0;t-=1){const n=Math.floor(i()*(t+1)),o=e[t];e[t]=e[n],e[n]=o}},t.pushToStart=function(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))},t.pushToEnd=function(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))},t.mapArrayOrNot=function(e,t){return Array.isArray(e)?e.map(t):t(e)},t.asArray=function(e){return Array.isArray(e)?e:[e]},t.getRandomElement=function(e){return e[Math.floor(Math.random()*e.length)]}})),define(e[211],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorWithActions=t.isErrorWithActions=void 0,t.isErrorWithActions=function(e){return e instanceof Error&&Array.isArray(e.actions)},t.createErrorWithActions=function(e,t=Object.create(null)){ const i=new Error(e);return t.actions&&(i.actions=t.actions),i}})),define(e[135],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=void 0,t.once=function(e){const t=this;let i,n=!1;return function(){return n?i:(n=!0,i=e.apply(t,arguments))}}})),define(e[212],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGenerator=t.IdGenerator=void 0;class i{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}t.IdGenerator=i,t.defaultGenerator=new i("id#")})),function e(t,i,n){function o(r,a){if(!i[r]){if(!t[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[r]={exports:{}};t[r][0].call(d.exports,(function(e){return o(t[r][1][e]||e)}),d,d.exports,e,t,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),i=!1):d.test(e)?p(a,v):c.test(e)&&p(r,m);var n;!function(){if(!i)return;var n,o=e.indexOf("<");o>=0?(n=e.substring(0,o),e=e.substring(o)):(n=e,e="");t.chars&&t.chars(n)}()}();var n=e===u;u=e,n&&(e="")}function p(t,n){var o=e.match(t);o&&(e=e.substring(o[0].length),o[0].replace(t,n),i=!1)}function m(e,i,r,a){var c={},d=o(i),u=s.voids[d]||!!a;r.replace(l,(function(e,t,i,o,s){c[t]=void 0===i&&void 0===o&&void 0===s?void 0:n.decode(i||o||s||"")})),u||h.push(d),t.start&&t.start(d,c,u)}function v(e,i){var n,s=0,r=o(i);if(r)for(s=h.length-1;s>=0&&h[s]!==r;s--);if(s>=0){for(n=h.length-1;n>=s;n--)t.end&&t.end(h[n]);h.length=s}}v()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,i){"use strict";var n=e("he"),o=e("./lowercase"),s=e("./attributes"),r=e("./elements");t.exports=function(e,t){var i,a=t||{};return h(),{start:function(e,t,r){var d=o(e);if(i.ignoring)return void c(d) ;if(-1===(a.allowedTags||[]).indexOf(d))return void c(d);if(a.filter&&!a.filter({tag:d,attrs:t}))return void c(d);l("<"),l(d),Object.keys(t).forEach((function(e){var i=t[e],r=(a.allowedClasses||{})[d]||[],c=(a.allowedAttributes||{})[d]||[];c=c.concat((a.allowedAttributes||{})["*"]||[]);var h=o(e);("class"===h&&-1===c.indexOf(h)?(i=i.split(" ").filter((function(e){return r&&-1!==r.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(h)&&(!0!==s.uris[h]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var i=e.indexOf(":");if(-1===i)return!0;var n=e.indexOf("?");if(-1!==n&&i>n)return!0;var o=e.indexOf("#");if(-1!==o&&i>o)return!0;return a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(i)))&&(l(" "),l(e),"string"==typeof i&&(l('="'),l(n.encode(i)),l('"')))})),l(r?"/>":">")},end:function(e){var t=o(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===i.ignoring?(l("")):d(t)},chars:function(e){!1===i.ignoring&&l(a.transformText?a.transformText(e):e)}};function l(t){e.push(t)} function c(e){r.voids[e]||(!1===i.ignoring?i={ignoring:e,depth:1}:i.ignoring===e&&i.depth++)}function d(e){i.ignoring===e&&--i.depth<=0&&h()}function h(){i={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,i){"use strict";var n={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","<":"<",">":">",""":'"',"'":"'"},s=/(&|<|>|"|')/g,r=/[&<>"']/g;function a(e){return n[e]}function l(e){return o[e]}function c(e){return null==e?"":String(e).replace(r,a)}function d(e){return null==e?"":String(e).replace(s,l)}c.options=d.options={},t.exports={encode:c,escape:c,decode:d,unescape:d,version:"1.0.0-browser"}},{}],10:[function(e,t,i){"use strict";function n(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(n,{})}},{}]},{},[4]),define("vs/base/common/insane/insane",(function(){return{insane:i}})),define(e[96],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Iterable=void 0, function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){for(const i of e)yield t(i)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.consume=function(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const o=t[Symbol.iterator]();for(let t=0;to}]}}(t.Iterable||(t.Iterable={}))})),define(e[93],t([0,1]),(function(e,t){"use strict";var i,n;function o(e,t=!1){let i=0,n=e.length,o="",l=0,c=16,d=0;function h(t){let n=0,o=0;for(;n=48&&t<=57)o=16*o+t-48;else if(t>=65&&t<=70)o=16*o+t-65+10;else{if(!(t>=97&&t<=102))break;o=16*o+t-97+10}i++,n++}return n=n)return l=n,c=17;let t=e.charCodeAt(i);if(s(t)){do{i++,o+=String.fromCharCode(t),t=e.charCodeAt(i)}while(s(t));return c=15}if(r(t))return i++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(i)&&(i++,o+="\n"),c=14;switch(t){case 123:return i++,c=1;case 125:return i++,c=2;case 91:return i++,c=3;case 93:return i++,c=4;case 58:return i++,c=6;case 44:return i++,c=5;case 34:return i++,o=function(){let t="",o=i;for(;;){if(i>=n){t+=e.substring(o,i),d=2;break}const s=e.charCodeAt(i);if(34===s){t+=e.substring(o,i),i++;break}if(92!==s){if(s>=0&&s<=31){if(r(s)){t+=e.substring(o,i),d=2;break}d=6}i++}else{if(t+=e.substring(o,i),++i>=n){d=2;break}switch(e.charCodeAt(i++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break ;case 117:const e=h(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}o=i}}return t}(),c=10;case 47:const s=i-1;if(47===e.charCodeAt(i+1)){for(i+=2;ii,scan:t?function(){let e;do{e=u()}while(e>=12&&e<=15);return e}:u,getToken:()=>c,getTokenValue:()=>o,getTokenOffset:()=>l,getTokenLength:()=>i-l,getTokenError:()=>d}}function s(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e>=48&&e<=57}function l(e,t,i=!1){return t>=e.offset&&te(s.getTokenOffset(),s.getTokenLength()):()=>!0}function a(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength()):()=>!0}const l=r(t.onObjectBegin),c=a(t.onObjectProperty),d=r(t.onObjectEnd),h=r(t.onArrayBegin),u=r(t.onArrayEnd),g=a(t.onLiteralValue),p=a(t.onSeparator),m=r(t.onComment),v=a(t.onError),f=n&&n.disallowComments,S=n&&n.allowTrailingComma;function b(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:f||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:f?_(10):m();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t=[],i=[]){if(v(e),t.length+i.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){b();break}if(-1!==i.indexOf(e))break;e=b()}}}function C(e){const t=s.getTokenValue();return e?g(t):c(t),b(),!0}function y(){switch(s.getToken()){case 3:return function(){h(),b();let e=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){ if(e||_(4,[],[]),p(","),b(),4===s.getToken()&&S)break}else e&&_(6,[],[]);y()||_(4,[],[4,5]),e=!0}return u(),4!==s.getToken()?_(8,[4],[]):b(),!0}();case 1:return function(){l(),b();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||_(4,[],[]),p(","),b(),2===s.getToken()&&S)break}else e&&_(6,[],[]);(10!==s.getToken()?(_(3,[],[2,5]),0):(C(!1),6===s.getToken()?(p(":"),b(),y()||_(4,[],[2,5])):_(5,[],[2,5]),1))||_(4,[],[2,5]),e=!0}return d(),2!==s.getToken()?_(7,[2],[]):b(),!0}();case 10:return C(!0);default:return function(){switch(s.getToken()){case 11:let e=0;try{"number"!=typeof(e=JSON.parse(s.getTokenValue()))&&(_(2),e=0)}catch(e){_(2)}g(e);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return b(),!0}()}}return b(),17===s.getToken()?!!n.allowEmptyContent||(_(4,[],[]),!1):y()?(17!==s.getToken()&&_(9,[],[]),!0):(_(4,[],[]),!1)}function d(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string" ;case"object":return e?Array.isArray(e)?"array":"object":"null";default:return"null"}}Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeType=t.stripComments=t.visit=t.findNodeAtOffset=t.contains=t.getNodeValue=t.getNodePath=t.findNodeAtLocation=t.parseTree=t.parse=t.getLocation=t.createScanner=t.ParseOptions=t.ParseErrorCode=t.SyntaxKind=t.ScanError=void 0,function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(t.ScanError||(t.ScanError={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword", e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(t.SyntaxKind||(t.SyntaxKind={})),function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber", e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(t.ParseErrorCode||(t.ParseErrorCode={})),function(e){e.DEFAULT={allowTrailingComma:!0}}(i=t.ParseOptions||(t.ParseOptions={})),t.createScanner=o,function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace", e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q", e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab", e[e.verticalTab=11]="verticalTab"}(n||(n={})),t.getLocation=function(e,t){const i=[],n=new Object;let o=void 0;const s={value:{},offset:0,length:0,type:"object",parent:void 0};let r=!1;function a(e,t,i,n){s.value=e,s.offset=t,s.length=i,s.type=n,s.colonOffset=void 0,o=s}try{c(e,{onObjectBegin:(e,s)=>{if(t<=e)throw n;o=void 0,r=t>e,i.push("")},onObjectProperty:(e,o,s)=>{if(t{if(t<=e)throw n;o=void 0,i.pop()},onArrayBegin:(e,s)=>{if(t<=e)throw n;o=void 0,i.push(0)},onArrayEnd:(e,s)=>{if(t<=e)throw n;o=void 0,i.pop()},onLiteralValue:(e,i,o)=>{if(t{if(t<=s)throw n;if(":"===e&&o&&"property"===o.type)o.colonOffset=s,r=!1,o=void 0;else if(","===e){const e=i[i.length-1];"number"==typeof e?i[i.length-1]=e+1:(r=!0,i[i.length-1]=""),o=void 0}}})}catch(e){if(e!==n)throw e}return{path:i,previousNode:o,isAtPropertyKey:r,matches:e=>{let t=0 ;for(let n=0;t{const e={};a(e),r.push(s),s=e,o=null},onObjectProperty:e=>{o=e},onObjectEnd:()=>{s=r.pop()},onArrayBegin:()=>{const e=[];a(e),r.push(s),s=e,o=null},onArrayEnd:()=>{s=r.pop()},onLiteralValue:a,onError:(e,i,n)=>{t.push({error:e,offset:i,length:n})}},n),s[0]},t.parseTree=function(e,t=[],n=i.DEFAULT){let o={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function r(e){return o.children.push(e),e}c(e,{onObjectBegin:e=>{o=r({type:"object",offset:e,length:-1,parent:o,children:[]})},onObjectProperty:(e,t,i)=>{(o=r({type:"property",offset:t,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:t,length:i,parent:o})},onObjectEnd:(e,t)=>{ o.length=e+t-o.offset,o=o.parent,s(e+t)},onArrayBegin:(e,t)=>{o=r({type:"array",offset:e,length:-1,parent:o,children:[]})},onArrayEnd:(e,t)=>{o.length=e+t-o.offset,o=o.parent,s(e+t)},onLiteralValue:(e,t,i)=>{r({type:d(e),offset:t,length:i,parent:o,value:e}),s(t+i)},onSeparator:(e,t,i)=>{"property"===o.type&&(":"===e?o.colonOffset=t:","===e&&s(t))},onError:(e,i,n)=>{t.push({error:e,offset:i,length:n})}},n);const a=o.children[0];return a&&delete a.parent,a},t.findNodeAtLocation=function(e,t){if(!e)return;let i=e;for(let e of t)if("string"==typeof e){if("object"!==i.type||!Array.isArray(i.children))return;let t=!1;for(const n of i.children)if(Array.isArray(n.children)&&n.children[0].value===e){i=n.children[1],t=!0;break}if(!t)return}else{const t=e;if("array"!==i.type||t<0||!Array.isArray(i.children)||t>=i.children.length)return;i=i.children[t]}return i},t.getNodePath=function e(t){if(!t.parent||!t.parent.children)return[];const i=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value ;i.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&i.push(e)}return i},t.getNodeValue=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const i=Object.create(null);for(let n of t.children){const t=n.children[1];t&&(i[n.children[0].value]=e(t))}return i;case"null":case"string":case"number":case"boolean":return t.value;default:return}},t.contains=l,t.findNodeAtOffset=function e(t,i,n=!1){if(l(t,i,n)){const o=t.children;if(Array.isArray(o))for(let t=0;t0&&!s(e,c-1);)c--;let i=h;for(;id&&e.substring(i,n)!==t&&_.push({offset:i,length:n-i,content:t})}let y=b() ;if(17!==y){const e=v.getTokenOffset()+c;C(n(g,a),c,e)}for(;17!==y;){let e=v.getTokenOffset()+v.getTokenLength()+c,t=b(),i="";for(;!p&&(12===t||13===t);){C(" ",e,v.getTokenOffset()+c),e=v.getTokenOffset()+v.getTokenLength()+c,i=12===t?S():"",t=b()}if(2===t)1!==y&&(m--,i=S());else if(4===t)3!==y&&(m--,i=S());else{switch(y){case 3:case 1:m++,i=S();break;case 5:case 12:i=S();break;case 13:i=p?S():" ";break;case 6:i=" ";break;case 10:if(6===t){i="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===t||13===t?i=" ":5!==t&&17!==t&&(f=!0);break;case 16:f=!0}!p||12!==t&&13!==t||(i=S())}C(i,e,v.getTokenOffset()+c),y=t}return _},t.getEOL=o,t.isEOL=s})),define(e[164],t([0,1,93,253,14]),(function(e,t,i,n,o){"use strict";function s(e,t,n,o,s){const a=t.slice(),l=i.parseTree(e,[]);let c=void 0,d=void 0;for(;a.length>0&&(d=a.pop(),void 0===(c=i.findNodeAtLocation(l,a))&&void 0!==n);)n="string"==typeof d?{[d]:n}:[n];if(c){if("object"===c.type&&"string"==typeof d&&Array.isArray(c.children)){ const t=i.findNodeAtLocation(c,[d]);if(void 0!==t){if(void 0===n){if(!t.parent)throw new Error("Malformed AST");const i=c.children.indexOf(t.parent);let n,s=t.parent.offset+t.parent.length;if(i>0){const e=c.children[i-1];n=e.offset+e.length}else if(n=c.offset+1,c.children.length>1){s=c.children[1].offset}return r(e,{offset:n,length:s-n,content:""},o)}return r(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},o)}{if(void 0===n)return[];const t=`${JSON.stringify(d)}: ${JSON.stringify(n)}`,i=s?s(c.children.map(e=>e.children[0].value)):c.children.length;let a;if(i>0){const e=c.children[i-1];a={offset:e.offset+e.length,length:0,content:","+t}}else a=0===c.children.length?{offset:c.offset+1,length:0,content:t}:{offset:c.offset+1,length:0,content:t+","};return r(e,a,o)}}if("array"===c.type&&"number"==typeof d&&Array.isArray(c.children)){if(void 0!==n){const t=`${JSON.stringify(n)}`;let i;if(0===c.children.length||0===d)i={offset:c.offset+1,length:0,content:0===c.children.length?t:t+","};else{ const e=-1===d||d>c.children.length?c.children.length:d,n=c.children[e-1];i={offset:n.offset+n.length,length:0,content:","+t}}return r(e,i,o)}{const t=d,i=c.children[t];let n;if(1===c.children.length)n={offset:c.offset+1,length:c.length-2,content:""};else if(c.children.length-1===t){const e=c.children[t-1],i=e.offset+e.length;n={offset:i,length:c.offset+c.length-2-i,content:""}}else n={offset:i.offset,length:c.children[t+1].offset-i.offset,content:""};return r(e,n,o)}}throw new Error(`Can not add ${"number"!=typeof d?"index":"property"} to parent of type ${c.type}`)}if(void 0===n)throw new Error("Can not delete in empty document");return r(e,{offset:l?l.offset:0,length:l?l.length:0,content:JSON.stringify(n)},o)}function r(e,t,i){let o=a(e,t),s=t.offset,r=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;s>0&&!n.isEOL(o,s-1);)s--;for(;r=0;e--){const t=l[e];o=a(o,t),s=Math.min(s,t.offset), r=Math.max(r,t.offset+t.length),r+=t.content.length-t.length}return[{offset:s,length:e.length-(o.length-r)-s,content:o.substring(s,r)}]}function a(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.applyEdits=t.applyEdit=t.withFormatting=t.setProperty=t.removeProperty=void 0,t.removeProperty=function(e,t,i){return s(e,t,void 0,i)},t.setProperty=s,t.withFormatting=r,t.applyEdit=a,t.applyEdits=function(e,t){let i=o.mergeSort(t,(e,t)=>{const i=e.offset-t.offset;return 0===i?e.length-t.length:i}),n=e.length;for(let t=i.length-1;t>=0;t--){let o=i[t];if(!(o.offset+o.length<=n))throw new Error("Overlapping edit");e=a(e,o),n=o.offset}return e}})),define(e[79],t([0,1,21]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolvedKeybinding=t.ResolvedKeybindingPart=t.ChordKeybinding=t.SimpleKeybinding=t.createSimpleKeybinding=t.createKeybinding=t.KeyChord=t.KeyMod=t.KeyCodeUtils=t.KeyCode=void 0,function(e){ e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M", e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH", e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(t.KeyCode||(t.KeyCode={}));class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e] }strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n;var a;function l(e,t){const i=!!(2048&e),n=!!(256&e);return new c(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}!function(){function e(e,t,i=t,n=i){o.define(e,t),s.define(e,i),r.define(e,n)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"), e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)}, e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||r.strToKeyCode(e)}}(t.KeyCodeUtils||(t.KeyCodeUtils={})),function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl",e[e.KeyCode=255]="KeyCode"}(a||(a={})),function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl"}(t.KeyMod||(t.KeyMod={})),t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new d(0!==n?[l(i,t),l(n,t)]:[l(i,t)])},t.createSimpleKeybinding=l;class c{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}getHashCode(){ return`${this.ctrlKey?"1":"0"}${this.shiftKey?"1":"0"}${this.altKey?"1":"0"}${this.metaKey?"1":"0"}${this.keyCode}`}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new d([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}t.SimpleKeybinding=c;class d{constructor(e){if(0===e.length)throw i.illegalArgument("parts");this.parts=e}getHashCode(){let e="";for(let t=0,i=this.parts.length;te(this.getValue()))}}t.Lazy=i})),define(e[2],t([0,1,135,96]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImmortalReference=t.ReferenceCollection=t.MutableDisposable=t.Disposable=t.DisposableStore=t.toDisposable=t.combinedDisposable=t.dispose=t.isDisposable=t.MultiDisposeError=void 0;const o=!1,s="__is_disposable_tracked__";function r(e){if(o&&e&&e!==h.None)try{e[s]=!0}catch(e){}}function a(e){if(!o)return e;const t=new Error("Potentially leaked disposable").stack;return setTimeout(()=>{e[s]||console.log(t)},3e3),e}class l extends Error{constructor(e){ super(`Encounter errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function c(e){if(n.Iterable.is(e)){let t=[];for(const i of e)if(i){r(i);try{i.dispose()}catch(e){t.push(e)}}if(1===t.length)throw t[0];if(t.length>1)throw new l(t);return Array.isArray(e)?[]:e}if(e)return r(e),e.dispose(),e}t.MultiDisposeError=l,t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=c,t.combinedDisposable=function(...e){return e.forEach(r),a({dispose:()=>c(e)})},t.toDisposable=function(e){const t=a({dispose:()=>{r(t),e()}});return t};class d{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(r(this),this._isDisposed=!0,this.clear())}clear(){try{c(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return r(e), 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(e),e}}t.DisposableStore=d,d.DISABLE_DISPOSED_WARNING=!1;class h{constructor(){this._store=new d,a(this)}dispose(){r(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}t.Disposable=h,h.None=Object.freeze({dispose(){}});t.MutableDisposable=class{constructor(){this._isDisposed=!1,a(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value&&this._value.dispose(),e&&r(e),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,r(this),this._value&&this._value.dispose(),this._value=void 0}};t.ReferenceCollection=class{constructor(){this.references=new Map}acquire(e,...t){let n=this.references.get(e);n||(n={counter:0, object:this.createReferencedObject(e,...t)},this.references.set(e,n));const{object:o}=n,s=i.once(()=>{0==--n.counter&&(this.destroyReferencedObject(e,n.object),this.references.delete(e))});return n.counter++,{object:o,dispose:s}}};t.ImmortalReference=class{constructor(e){this.object=e}dispose(){}}})),define(e[194],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0;class i{constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}i.Undefined=new i(void 0);t.LinkedList=class{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n, n.next=e,e.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==i.Undefined;)yield e.element,e=e.next}toArray(){const e=[];for(let t=this._first;t!==i.Undefined;t=t.next)e.push(t.element);return e}}})),define(e[6],t([0,1,21,135,2,194]),(function(e,t,i,n,o,s){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}), t.Relay=t.EventBufferer=t.EventMultiplexer=t.AsyncEmitter=t.PauseableEmitter=t.Emitter=t.setGlobalLeakWarningThreshold=t.Event=void 0,function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e(e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)},null,n),s&&o.dispose(),o}}function i(e,t){return a((i,n=null,o)=>e(e=>i.call(n,t(e)),null,o))}function n(e,t){return a((i,n=null,o)=>e(e=>{t(e),i.call(n,e)},null,o))}function s(e,t){return a((i,n=null,o)=>e(e=>t(e)&&i.call(n,e),null,o))}function r(e,t,n){let o=n;return i(e,e=>o=t(o,e))}function a(e){let t;const i=new c({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function l(e,t,i=100,n=!1,o){let s,r=void 0,a=void 0,l=0;const d=new c({leakWarningThreshold:o,onFirstListenerAdd(){s=e(e=>{l++,r=t(r,e),n&&!a&&(d.fire(r),r=void 0),clearTimeout(a),a=setTimeout(()=>{const e=r;r=void 0,a=void 0,(!n||l>1)&&d.fire(e),l=0},i)})},onLastListenerRemove(){s.dispose()}});return d.event}function d(e){let t,i=!0;return s(e,e=>{ const n=i||e!==t;return i=!1,t=e,n})}e.None=()=>o.Disposable.None,e.once=t,e.map=i,e.forEach=n,e.filter=s,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>o.combinedDisposable(...e.map(e=>e(e=>t.call(i,e),null,n)))},e.reduce=r,e.snapshot=a,e.debounce=l,e.stopwatch=function(e){const n=(new Date).getTime();return i(t(e),e=>(new Date).getTime()-n)},e.latch=d,e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e(e=>{n?n.push(e):r.fire(e)});const s=()=>{n&&n.forEach(e=>r.fire(e)),n=null},r=new c({onFirstListenerAdd(){o||(o=e(e=>r.fire(e)))},onFirstListenerDidAdd(){n&&(t?setTimeout(s):s())},onLastListenerRemove(){o&&o.dispose(),o=null}});return r.event};class h{constructor(e){this.event=e}map(e){return new h(i(this.event,e))}forEach(e){return new h(n(this.event,e))}filter(e){return new h(s(this.event,e))}reduce(e,t){return new h(r(this.event,e,t))}latch(){return new h(d(this.event))}debounce(e,t=100,i=!1,n){return new h(l(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){ return t(this.event)(e,i,n)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new c({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new c({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.fromPromise=function(e){const t=new c;let i=!1;return e.then(void 0,()=>null).then(()=>{i?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),i=!0,t.event},e.toPromise=function(e){return new Promise(i=>t(e)(i))}}(r=t.Event||(t.Event={}));let a=-1;t.setGlobalLeakWarningThreshold=function(e){const t=a;return a=e,{dispose(){a=t}}};class l{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=a ;if("number"==typeof this.customThreshold&&(t=this.customThreshold),t<=0||e{const e=this._stacks.get(i)||0;this._stacks.set(i,e-1)}}}class c{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=a>0?new l(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=(e,t,i)=>{this._listeners||(this._listeners=new s.LinkedList);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(t?[e,t]:e);let a,l ;return n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t),this._leakageMon&&(a=this._leakageMon.check(this._listeners.size)),l={dispose:()=>{if(a&&a(),l.dispose=c._noop,!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)}}},i instanceof o.DisposableStore?i.add(l):Array.isArray(i)&&i.push(l),l}),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s.LinkedList);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(;this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){i.onUnexpectedError(e)}}}}dispose(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(), this._disposed=!0}}t.Emitter=c,c._noop=function(){};t.PauseableEmitter=class extends c{constructor(e){super(e),this._isPaused=0,this._eventQueue=new s.LinkedList,this._mergeFn=e&&e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=this._eventQueue.toArray();this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}};t.AsyncEmitter=class extends c{async fireAsync(e,t,n){if(this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new s.LinkedList);for(const t of this._listeners)this._asyncDeliveryQueue.push([t,e]);for(;this._asyncDeliveryQueue.size>0&&!t.isCancellationRequested;){const[e,t]=this._asyncDeliveryQueue.shift(),o=[],s=Object.assign(Object.assign({},t),{waitUntil:t=>{if(Object.isFrozen(o))throw new Error("waitUntil can NOT be called asynchronous") ;n&&(t=n(t,"function"==typeof e?e:e[0])),o.push(t)}});try{"function"==typeof e?e.call(void 0,s):e[0].call(e[1],s)}catch(e){i.onUnexpectedError(e);continue}Object.freeze(o),await Promise.all(o).catch(e=>i.onUnexpectedError(e))}}}};t.EventMultiplexer=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new c({onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);return o.toDisposable(n.once(()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(e=>this.emitter.fire(e))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}};t.EventBufferer=class{ constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(e=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>t.call(i,e)):t.call(i,e)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(e=>e()),i}};t.Relay=class{constructor(){this.listening=!1,this.inputEvent=r.None,this.inputEventListener=o.Disposable.None,this.emitter=new c({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}})),define(e[80],t([0,1,6]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.isStandalone=t.isEdgeWebView=t.isIPad=t.isWebkitWebView=t.isSafari=t.isChrome=t.isWebKit=t.isFirefox=t.isOpera=t.isEdge=t.onDidChangeFullscreen=t.isFullscreen=t.setFullscreen=t.getPixelRatio=t.setZoomFactor=t.getZoomFactor=t.onDidChangeZoomLevel=t.getTimeSinceLastZoomLevelChanged=t.getZoomLevel=t.setZoomLevel=void 0;class n{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new i.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1,this._fullscreen=!1,this._onDidChangeFullscreen=new i.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}setZoomLevel(e,t){this._zoomLevel!==e&&(this._zoomLevel=e,this._lastZoomLevelChangeTime=t?0:Date.now(),this._onDidChangeZoomLevel.fire(this._zoomLevel))}getZoomFactor(){return this._zoomFactor}setZoomFactor(e){this._zoomFactor=e}getPixelRatio(){ let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}setFullscreen(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())}isFullscreen(){return this._fullscreen}}n.INSTANCE=new n,t.setZoomLevel=function(e,t){n.INSTANCE.setZoomLevel(e,t)},t.getZoomLevel=function(){return n.INSTANCE.getZoomLevel()},t.getTimeSinceLastZoomLevelChanged=function(){return n.INSTANCE.getTimeSinceLastZoomLevelChanged()},t.onDidChangeZoomLevel=function(e){return n.INSTANCE.onDidChangeZoomLevel(e)},t.getZoomFactor=function(){return n.INSTANCE.getZoomFactor()},t.setZoomFactor=function(e){n.INSTANCE.setZoomFactor(e)},t.getPixelRatio=function(){return n.INSTANCE.getPixelRatio()},t.setFullscreen=function(e){n.INSTANCE.setFullscreen(e)},t.isFullscreen=function(){return n.INSTANCE.isFullscreen()}, t.onDidChangeFullscreen=n.INSTANCE.onDidChangeFullscreen;const o=navigator.userAgent;t.isEdge=o.indexOf("Edge/")>=0,t.isOpera=o.indexOf("Opera")>=0,t.isFirefox=o.indexOf("Firefox")>=0,t.isWebKit=o.indexOf("AppleWebKit")>=0,t.isChrome=o.indexOf("Chrome")>=0,t.isSafari=!t.isChrome&&o.indexOf("Safari")>=0,t.isWebkitWebView=!t.isChrome&&!t.isSafari&&t.isWebKit,t.isIPad=o.indexOf("iPad")>=0||t.isSafari&&navigator.maxTouchPoints>0,t.isEdgeWebView=t.isEdge&&o.indexOf("WebView/")>=0,t.isStandalone=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches})),define(e[99],t([0,1,6]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stop=t.domEvent=void 0;t.domEvent=(e,t,n)=>{const o=e=>s.fire(e),s=new i.Emitter({onFirstListenerAdd:()=>{e.addEventListener(t,o,n)},onLastListenerRemove:()=>{e.removeEventListener(t,o,n)}});return s.event},t.stop=function(e){return i.Event.map(e,e=>(e.preventDefault(),e.stopPropagation(),e))}})), define(e[390],t([0,1,229,14,6,96]),(function(e,t,i,n,o,s){"use strict";function r(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function a(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function l(e){return"boolean"==typeof e.collapsible}Object.defineProperty(t,"__esModule",{value:!0}),t.IndexTreeModel=t.getVisibleState=t.isFilterResult=void 0,t.isFilterResult=r,t.getVisibleState=a;t.IndexTreeModel=class{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new o.EventBufferer,this._onDidChangeCollapseState=new o.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new o.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new o.Emitter,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter, this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=s.Iterable.empty(),o,r){if(0===e.length)throw new i.TreeError(this.user,"Invalid tree location");const{parentNode:a,listIndex:l,revealed:c,visible:d}=this.getParentNodeWithListIndex(e),h=[],u=s.Iterable.map(n,e=>this.createTreeNode(e,a,a.visible?1:0,c,h,o)),g=e[e.length-1];let p=0;for(let e=g;e>=0&&ee+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,f-e),this.list.splice(l,e,h)}if(S.length>0&&r){const e=t=>{r(t),t.children.forEach(e)};S.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:S});let _=a;for(;_;){if(2===_.visibility){this.refilter();break}_=_.parent}}rerender(e){if(0===e.length)throw new i.TreeError(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e);t.visible&&o&&this.list.splice(n,1,[t])}updateElementHeight(e,t){if(0===e.length)throw new i.TreeError(this.user,"Invalid tree location");const{listIndex:n}=this.getTreeNodeWithListIndex(e);this.list.updateElementHeight(n,t)}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e) ;void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!l(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n ;if(e===this.root?n=!1:(l(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!l(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,i,n,o,r){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&o.push(a) ;const c=e.children||s.Iterable.empty(),d=n&&0!==l&&!a.collapsed,h=s.Iterable.map(c,e=>this.createTreeNode(e,a,l,d,o,r));let u=0,g=1;for(const e of h)a.children.push(e),g+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=u++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=2===l?u>0:1===l,a.visible?a.collapsed||(a.renderNodeCount=g):(a.renderNodeCount=0,n&&o.pop()),r&&r(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i), this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(0===(o=this._filterNode(e,t)))return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):r(i)?(e.filterData=i.data,a(i.visibility)):(e.filterData=void 0,a(i))}hasTreeNode(e,t=this.root){ if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[n,...o]=e;if(n<0||n>t.children.length)throw new i.TreeError(this.user,"Invalid tree location");return this.getTreeNode(o,t.children[n])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:o,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new i.TreeError(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:n,revealed:o,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,o=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new i.TreeError(this.user,"Invalid tree location");for(let e=0;ei.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}get size(){return this.nodes.size}setChildren(e,t=i.Iterable.empty(),n,o){const s=this.getElementLocation(e);this._setChildren(s,this.preserveCollapseState(t),n,o)}_setChildren(e,t=i.Iterable.empty(),n,o){const s=new Set,r=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,e=>{if(null===e.element)return;const t=e;if(s.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();r.add(e),this.nodesByIdentity.set(e,t)}n&&n(t)},e=>{if(null===e.element)return;const t=e;if(s.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();r.has(e)||this.nodesByIdentity.delete(e)}o&&o(t)})}preserveCollapseState(e=i.Iterable.empty()){ return this.sorter&&(e=s.mergeSort([...e],this.sorter.compare.bind(this.sorter))),i.Iterable.map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}updateElementHeight(e,t){const i=this.getElementLocation(e);this.model.updateElementHeight(i,t)}resort(e=null,t=!0){if(!this.sorter)return;const i=this.getElementLocation(e),n=this.model.getNode(i);this._setChildren(i,this.resortChildren(n,t))}resortChildren(e,t,n=!0){let o=[...e.children];return(t||n)&&(o=s.mergeSort(o,this.sorter.compare.bind(this.sorter))), i.Iterable.map(o,e=>({element:e.element,collapsible:e.collapsible,collapsed:e.collapsed,children:this.resortChildren(e,t,!1)}))}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}getLastElementAncestor(e=null){const t=this.getElementLocation(e);return this.model.getLastElementAncestor(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()} getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new o.TreeError(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new o.TreeError(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new o.TreeError(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new o.TreeError(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}})),define(e[722],t([0,1,96,6,229,339]),(function(e,t,i,n,o,s){"use strict";function r(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:i.Iterable.map(i.Iterable.from(e.children),r),collapsible:e.collapsible,collapsed:e.collapsed}}function a(e){ const t=[e.element],n=e.incompressible||!1;let o,s;for(;[s,o]=i.Iterable.consume(i.Iterable.from(e.children),2),1===s.length&&!(e=s[0]).incompressible;)t.push(e.element);return{element:{elements:t,incompressible:n},children:i.Iterable.map(i.Iterable.concat(s,o),a),collapsible:e.collapsible,collapsed:e.collapsed}}function l(e){return function e(t,n=0){let o;return o=ne(t,0)),0===n&&t.element.incompressible?{element:t.element.elements[n],children:o,incompressible:!0,collapsible:t.collapsible,collapsed:t.collapsed}:{element:t.element.elements[n],children:o,collapsible:t.collapsible,collapsed:t.collapsed}}(e,0)}Object.defineProperty(t,"__esModule",{value:!0}),t.CompressibleObjectTreeModel=t.DefaultElementMapper=t.CompressedObjectTreeModel=t.decompress=t.compress=void 0,t.compress=a,t.decompress=l;class c{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new s.ObjectTreeModel(e,t,i), this.enabled=void 0===i.compressionEnabled||i.compressionEnabled}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get size(){return this.nodes.size}setChildren(e,t=i.Iterable.empty()){if(null===e){const e=i.Iterable.map(t,this.enabled?a:r);return void this._setChildren(null,e)}const n=this.nodes.get(e);if(!n)throw new Error("Unknown compressed tree node");const o=this.model.getNode(n),s=this.model.getParentNodeLocation(n),c=this.model.getNode(s),d=function e(t,n,o){return t.element===n?Object.assign(Object.assign({},t),{children:o}):Object.assign(Object.assign({},t),{children:i.Iterable.map(i.Iterable.from(t.children),t=>e(t,n,o))})}(l(o),e,t),h=(this.enabled?a:r)(d),u=c.children.map(e=>e===o?h:e);this._setChildren(c.element,u)}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e ;const t=this.model.getNode().children,n=i.Iterable.map(t,l),o=i.Iterable.map(n,e?a:r);this._setChildren(null,o)}_setChildren(e,t){const i=new Set;this.model.setChildren(e,t,e=>{for(const t of e.element.elements)i.add(t),this.nodes.set(t,e.element)},e=>{for(const t of e.element.elements)i.has(t)||this.nodes.delete(t)})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)} getLastElementAncestor(e){const t=void 0===e?void 0:this.getCompressedNode(e);return this.model.getLastElementAncestor(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}updateElementHeight(e,t){const i=this.getCompressedNode(e);i&&this.model.updateElementHeight(i,t)}refilter(){this.model.refilter()}resort(e=null,t=!0){const i=this.getCompressedNode(e);this.model.resort(i,t)}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new o.TreeError(this.user,`Tree element not found: ${e}`);return t}}t.CompressedObjectTreeModel=c ;t.DefaultElementMapper=e=>e[e.length-1];class d{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new d(this.unwrapper,e))}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}}t.CompressibleObjectTreeModel=class{constructor(e,i,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||t.DefaultElementMapper;const s=e=>this.elementMapper(e.elements);this.nodeMapper=new o.WeakMapper(e=>new d(s,e)),this.model=new c(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map(t=>e.map(t)))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,i),function(e,t){ return Object.assign(Object.assign({},t),{sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(s,n))}get onDidSplice(){return n.Event.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return n.Event.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return n.Event.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=i.Iterable.empty()){this.model.setChildren(e,t)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){ return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}getLastElementAncestor(e){const t=this.model.getLastElementAncestor(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}updateElementHeight(e,t){this.model.updateElementHeight(e,t)}refilter(){return this.model.refilter()}resort(e=null,t=!0){return this.model.resort(e,t)}getCompressedTreeNode(e=null){return this.model.getNode(e)}}})),define(e[30],t([0,1,2,6]),(function(e,t,i,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.SubmenuAction=t.Separator=t.RadioGroup=t.ActionRunner=t.Action=void 0;class o extends i.Disposable{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({ enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)}}t.Action=o;class s extends i.Disposable{constructor(){super(...arguments),this._onDidBeforeRun=this._register(new n.Emitter),this.onDidBeforeRun=this._onDidBeforeRun.event,this._onDidRun=this._register(new n.Emitter),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return Promise.resolve(null);this._onDidBeforeRun.fire({action:e});try{const i=await this.runAction(e,t);this._onDidRun.fire({action:e,result:i})}catch(t){this._onDidRun.fire({action:e,error:t})}}runAction(e,t){const i=t?e.run(t):e.run();return Promise.resolve(i)}}t.ActionRunner=s;class r extends i.Disposable{constructor(e){super(),this.actions=e;for(const t of e)this._register(t.onDidChange(i=>{if(i.checked&&t.checked)for(const i of e)i!==t&&(i.checked=!1)}))}}t.RadioGroup=r ;class a extends o{constructor(e){super(a.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}t.Separator=a,a.ID="vs.actions.separator";t.SubmenuAction=class extends o{constructor(e,t,i,n){super(e,t,n,!0),this._actions=i}get actions(){return Array.isArray(this._actions)?this._actions:this._actions()}}})),define(e[31],t([0,1,6]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var o;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof s||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n}) }(o=t.CancellationToken||(t.CancellationToken={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?n:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}t.CancellationTokenSource=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=o.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof s&&this._token.dispose():this._token=o.None}}})),define(e[15],t([0,1,31,21,6,2]),(function(e,t,i,n,o,s){ "use strict";function r(e){return e&&"function"==typeof e.then}function a(e){const t=new i.CancellationTokenSource,o=e(t.token),s=new Promise((e,i)=>{t.token.onCancellationRequested(()=>{i(n.canceled())}),Promise.resolve(o).then(i=>{t.dispose(),e(i)},e=>{t.dispose(),i(e)})});return new class{cancel(){t.cancel()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.TaskSequentializer=t.retry=t.IdleValue=t.runWhenIdle=t.RunOnceWorker=t.RunOnceScheduler=t.IntervalTimer=t.TimeoutTimer=t.ResourceQueue=t.Queue=t.Limiter=t.first=t.sequence=t.ignoreErrors=t.disposableTimeout=t.timeout=t.Barrier=t.ThrottledDelayer=t.Delayer=t.SequencerByKey=t.Sequencer=t.Throttler=t.asPromise=t.raceTimeout=t.raceCancellablePromises=t.raceCancellation=t.createCancelablePromise=t.isThenable=void 0,t.isThenable=r,t.createCancelablePromise=a,t.raceCancellation=function(e,t,i){ return Promise.race([e,new Promise(e=>t.onCancellationRequested(()=>e(i)))])},t.raceCancellablePromises=async function(e){let t=-1;const i=e.map((e,i)=>e.then(e=>(t=i,e))),n=await Promise.race(i);return e.forEach((e,i)=>{i!==t&&e.cancel()}),n},t.raceTimeout=function(e,t,i){let n=void 0;const o=setTimeout(()=>{null==n||n(void 0),null==i||i()},t);return Promise.race([e.finally(()=>clearTimeout(o)),new Promise(e=>n=e)])},t.asPromise=function(e){return new Promise((t,i)=>{const n=e();r(n)?n.then(t,i):t(n)})};class l{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=e(),new Promise((e,t)=>{ this.activePromise.then(t=>{this.activePromise=null,e(t)},e=>{this.activePromise=null,t(e)})})}}t.Throttler=l;t.Sequencer=class{constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then(()=>e())}};t.SequencerByKey=class{constructor(){this.promiseMap=new Map}queue(e,t){var i;const n=(null!==(i=this.promiseMap.get(e))&&void 0!==i?i:Promise.resolve()).catch(()=>{}).then(t).finally(()=>{this.promiseMap.get(e)===n&&this.promiseMap.delete(e)});return this.promiseMap.set(e,n),n}};class c{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})),this.timeout=setTimeout(()=>{this.timeout=null, this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(n.canceled()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}t.Delayer=c;t.ThrottledDelayer=class{constructor(e){this.delayer=new c(e),this.throttler=new l}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}};function d(e,t){return t?new Promise((i,o)=>{const s=setTimeout(i,e);t.onCancellationRequested(()=>{clearTimeout(s),o(n.canceled())})}):a(t=>d(e,t))}t.Barrier=class{constructor(){this._isOpen=!1,this._promise=new Promise((e,t)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}},t.timeout=d, t.disposableTimeout=function(e,t=0){const i=setTimeout(e,t);return s.toDisposable(()=>clearTimeout(i))},t.ignoreErrors=function(e){return e.then(void 0,e=>void 0)},t.sequence=function(e){const t=[];let i=0;const n=e.length;return Promise.resolve(null).then((function o(s){null!=s&&t.push(s);const r=i!!e),i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then(e=>t(e)?Promise.resolve(e):s())};return s()};class h{constructor(e){this._size=0,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new o.Emitter}get onFinished(){return this._onFinished.event}get size(){return this._size}queue(e){return this._size++,new Promise((t,i)=>{this.outstandingPromises.push({factory:e,c:t,e:i}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()}dispose(){this._onFinished.dispose()}}t.Limiter=h;class u extends h{constructor(){super(1)}}t.Queue=u;t.ResourceQueue=class{constructor(){this.queues=new Map}queueFor(e){const t=e.toString();if(!this.queues.has(t)){const e=new u;e.onFinished(()=>{e.dispose(),this.queues.delete(t)}),this.queues.set(t,e)}return this.queues.get(t)}dispose(){this.queues.forEach(e=>e.dispose()),this.queues.clear()}};t.TimeoutTimer=class{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){ -1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}};t.IntervalTimer=class{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}};class g{constructor(e,t){this.timeoutToken=-1,this.runner=e,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(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}t.RunOnceScheduler=g;t.RunOnceWorker=class extends g{constructor(e,t){super(e,t),this.units=[]}work(e){this.units.push(e),this.isScheduled()||this.schedule()}doRun(){const e=this.units;this.units=[], this.runner&&this.runner(e)}dispose(){this.units=[],super.dispose()}},function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});t.runWhenIdle=t=>{const i=setTimeout(()=>t(e));let n=!1;return{dispose(){n||(n=!0,clearTimeout(i))}}}}else t.runWhenIdle=(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}}}();t.IdleValue=class{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=t.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}},t.retry=async function(e,t,i){let n;for(let o=0;onull==i?void 0:i(),promise:t},t.then(()=>this.donePending(e),()=>this.donePending(e)),t}donePending(e){this._pending&&e===this._pending.taskId&&(this._pending=void 0,this.triggerNext())}triggerNext(){if(this._next){const e=this._next;this._next=void 0,e.run().then(e.promiseResolve,e.promiseReject)}}setNext(e){if(this._next)this._next.run=e;else{let t,i;const n=new Promise((e,n)=>{t=e,i=n});this._next={run:e,promise:n,promiseResolve:t,promiseReject:i}}return this._next.promise}}})),define(e[723],t([0,1,15,2]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarVisibilityController=void 0;class o extends n.Disposable{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t, this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new i.TimeoutTimer)}applyVisibilitySetting(e){return 2!==this._visibility&&(3===this._visibility||e)}setShouldBeVisible(e){let t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}t.ScrollbarVisibilityController=o})), define(e[724],t([0,1,31]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;t.Cache=class{constructor(e){this.task=e,this.result=null}get(){if(this.result)return this.result;const e=new i.CancellationTokenSource,t=this.task(e.token);return this.result={promise:t,dispose:()=>{this.result=null,e.cancel(),e.dispose()}},this.result}}}));var n,o=this&&this.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};function s(e){e.MonacoPerformanceMarks=e.MonacoPerformanceMarks||[];const t=2,i="function"==typeof console.timeStamp?console.timeStamp.bind(console):()=>{};return{mark:function(t){e.MonacoPerformanceMarks.push(t,Date.now()),i(t)},getEntries:function(){const i=[],n=e.MonacoPerformanceMarks ;for(let e=0;e=0;e-=t)if(o[e]===s){if(s!==n)return o[r+1]-o[e+1];r=e,s=i}return 0},importEntries:function(t){e.MonacoPerformanceMarks.splice(0,0,...t)},exportEntries:function(){return e.MonacoPerformanceMarks.slice(0)}}}define(e[391],t([0,1,95]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseLinkedText=t.LinkedText=void 0;class n{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>"string"==typeof e?e:e.label).join("")}}o([i.memoize],n.prototype,"toString",null),t.LinkedText=n;const s=/\[([^\]]+)\]\(((?:https?:\/\/|command:)[^\)\s]+)(?: ("|')([^\3]+)(\3))?\)/gi;t.parseLinkedText=function(e){const t=[];let i,o=0;for(;i=s.exec(e);){i.index-o>0&&t.push(e.substring(o,i.index));const[,n,s,,r]=i;r?t.push({label:n,href:s,title:r}):t.push({label:n,href:s}),o=i.index+i[0].length} return oe.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}} throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var n=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),o=(n.defaults,n.getDefaults,n.changeDefaults,/[&<>"']/),s=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">", '"':""","'":"'"},c=function(e){return l[e]};var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(d,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var u=/(^|[^\[])\^/g;var g=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var m={},v=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(v.test(e)?m[" "+e]=e+"/":m[" "+e]=_(e,"/",!0));var i=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(f,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(S,"$1")+t:e+t}function _(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i.length>t)i.splice(t);else for(;i.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var i=this.rules.block.code.exec(e);if(i){var n=t[t.length-1];if(n&&"paragraph"===n.type)return{raw:i[0],text:i[0].trimRight()};var o=i[0].replace(/^ {4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?o:M(o,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t ;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var i={type:"table",header:L(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(i.header.length===i.align.length){var n,o=i.align.length;for(n=0;n ?/gm,"");return{type:"blockquote",raw:t[0],text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var i,n,o,s,r,a,l,c=t[0],d=t[2],h=d.length>1,u=")"===d[d.length-1],g={type:"list",raw:c,ordered:h,start:h?+d.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,v=p.length,f=0;f1||this.options.smartLists&&o!==d)&&(s=p.slice(f+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),f=v-1)),r=m||/\n\n(?!\s*$)/.test(i),f!==v-1&&(m="\n"===i.charAt(i.length-1),r||(r=m)),r&&(g.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(i))&&(l=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,"")),g.items.push({type:"list_item",raw:c, task:a,checked:l,loose:r,text:i});return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:L(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o=i.align.length;for(n=0;n/i.test(n[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:i, text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=N(t[2],"()");if(i>-1){var n=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,n).trim(),t[3]=""}var o=t[2],s="";if(this.options.pedantic){var r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);r?(o=r[1],s=r[3]):s=""}else s=t[3]?t[3].slice(1,-1):"";return P(t,{href:(o=o.trim().replace(/^<([\s\S]*)>$/,"$1"))?o.replace(this.rules.inline._escapes,"$1"):o,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0])}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return P(i,n,i[0])}},t.strong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.strong.start.exec(e) ;if(n&&(!n[1]||n[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){t=t.slice(-1*e.length);var o,s="**"===n[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(n=s.exec(t));)if(o=this.rules.inline.strong.middle.exec(t.slice(0,n.index+3)))return{type:"strong",raw:e.slice(0,o[0].length),text:e.slice(2,o[0].length-2)}}},t.em=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.em.start.exec(e);if(n&&(!n[1]||n[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){t=t.slice(-1*e.length);var o,s="*"===n[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(n=s.exec(t));)if(o=this.rules.inline.em.middle.exec(t.slice(0,n.index+2)))return{type:"em",raw:e.slice(0,o[0].length),text:e.slice(1,o[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=i.startsWith(" ")&&i.endsWith(" ");return n&&o&&(i=i.substring(1,i.length-1)),i=O(i,!0),{type:"codespan",raw:t[0],text:i}} },t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=O(this.options.mangle?t(o[1]):o[1])):i=O(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=O(this.options.mangle?t(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);n=O(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,i){var n,o=this.rules.inline.text.exec(e);if(o)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):O(o[0]):o[0]:O(this.options.smartypants?i(o[0]):o[0]),{type:"text",raw:o[0],text:n}},e}(),B=I,V=w,W=x,z={ newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, _paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};z.def=V(z.def).replace("label",z._label).replace("title",z._title).getRegex(),z.bullet=/(?:[*+-]|\d{1,9}[.)])/,z.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,z.item=V(z.item,"gm").replace(/bull/g,z.bullet).getRegex(),z.list=V(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex(),z._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",z._comment=/|$)/, z.html=V(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z.paragraph=V(z._paragraph).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",z._tag).getRegex(),z.blockquote=V(z.blockquote).replace("paragraph",z.paragraph).getRegex(),z.normal=W({},z),z.gfm=W({},z.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}), z.gfm.nptable=V(z.gfm.nptable).replace("hr",z.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",")|<(?:script|pre|style|!--)").replace("tag",z._tag).getRegex(),z.gfm.table=V(z.gfm.table).replace("hr",z.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",")|<(?:script|pre|style|!--)").replace("tag",z._tag).getRegex(),z.pedantic=W({},z.normal,{ html:V("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:V(z.normal._paragraph).replace("hr",z.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var U={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^", link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/, endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};U.punctuation=V(U.punctuation).replace(/punctuation/g,U._punctuation).getRegex(),U._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",U._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",U._comment=V(z._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),U.em.start=V(U.em.start).replace(/punctuation/g,U._punctuation).getRegex(),U.em.middle=V(U.em.middle).replace(/punctuation/g,U._punctuation).replace(/overlapSkip/g,U._overlapSkip).getRegex(),U.em.endAst=V(U.em.endAst,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.em.endUnd=V(U.em.endUnd,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.strong.start=V(U.strong.start).replace(/punctuation/g,U._punctuation).getRegex(), U.strong.middle=V(U.strong.middle).replace(/punctuation/g,U._punctuation).replace(/blockSkip/g,U._blockSkip).getRegex(),U.strong.endAst=V(U.strong.endAst,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.strong.endUnd=V(U.strong.endUnd,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.blockSkip=V(U._blockSkip,"g").getRegex(),U.overlapSkip=V(U._overlapSkip,"g").getRegex(),U._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,U._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,U._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])?)+(?![-_])/,U.autolink=V(U.autolink).replace("scheme",U._scheme).replace("email",U._email).getRegex(),U._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,U.tag=V(U.tag).replace("comment",U._comment).replace("attribute",U._attribute).getRegex(),U._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,U._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/, U._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,U.link=V(U.link).replace("label",U._label).replace("href",U._href).replace("title",U._title).getRegex(),U.reflink=V(U.reflink).replace("label",U._label).getRegex(),U.reflinkSearch=V(U.reflinkSearch,"g").replace("reflink",U.reflink).replace("nolink",U.nolink).getRegex(),U.normal=W({},U),U.pedantic=W({},U.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:V(/^!?\[(label)\]\((.*?)\)/).replace("label",U._label).getRegex(),reflink:V(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",U._label).getRegex()}),U.gfm=W({},U.normal,{escape:V(U.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";" ;return n}var Y=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||H,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:G.normal,inline:$.normal};this.options.pedantic?(t.block=G.pedantic,t.inline=$.pedantic):this.options.gfm&&(t.block=G.gfm,this.options.breaks?t.inline=$.breaks:t.inline=$.gfm),this.tokenizer.rules=t}t.lex=function(e,i){return new t(i).lex(e)};var i,n,o,s=t.prototype;return s.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},s.blockTokens=function(e,t,i){var n,o,s,r;for(void 0===t&&(t=[]),void 0===i&&(i=!0),e=e.replace(/^ +$/gm,"");e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e,t))e=e.substring(n.raw.length),n.type?t.push(n):((r=t[t.length-1]).raw+="\n"+n.raw, r.text+="\n"+n.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],i),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),s=n.items.length,o=0;o0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(s=this.tokenizer.escape(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.tag(e,i,n))e=e.substring(s.raw.length),i=s.inLink,n=s.inRawBlock,t.push(s);else if(s=this.tokenizer.link(e))e=e.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,n)),t.push(s);else if(s=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(s.raw.length), "link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,n)),t.push(s);else if(s=this.tokenizer.strong(e,a,o))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,n),t.push(s);else if(s=this.tokenizer.em(e,a,o))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,n),t.push(s);else if(s=this.tokenizer.codespan(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.br(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.del(e))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,n),t.push(s);else if(s=this.tokenizer.autolink(e,q))e=e.substring(s.raw.length),t.push(s);else if(i||!(s=this.tokenizer.url(e,q))){if(s=this.tokenizer.inlineText(e,n,j))e=e.substring(s.raw.length),o=s.raw.slice(-1),t.push(s);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(s.raw.length),t.push(s);return t},i=t,o=[{key:"rules",get:function(){return{block:G,inline:$}}}], (n=null)&&e(i.prototype,n),o&&e(i,o),t}(),X=n.defaults,Q=E,J=C,Z=function(){function e(e){this.options=e||X}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return n?'
'+(i?e:J(e,!0))+"
\n":"
"+(i?e:J(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "}, t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,i){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"},t.image=function(e,t,i){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){} var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),ie=n.defaults,ne=y,oe=function(){function e(e){this.options=e||ie,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer, this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,i){return new e(i).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_="",C=e.length;for(i=0;i0&&"text"===v.tokens[0].type?(v.tokens[0].text=b+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=b+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(v.tokens,p),d+=this.renderer.listitem(m,S,f);_+=this.renderer.list(d,u,g);continue;case"html":_+=this.renderer.html(h.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(d=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+ae(e.message+"",!0)+"
    ";throw e}}return he.options=he.setOptions=function(e){return se(he.defaults,e),ce(he.defaults),he}, he.getDefaults=le,he.defaults=de,he.use=function(e){var t=se({},e);if(e.renderer&&function(){var i=he.defaults.renderer||new Z,n=function(t){var n=i[t];i[t]=function(){for(var o=arguments.length,s=new Array(o),r=0;rthis._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 t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}})), define(e[195],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MovingAverage=t.Counter=t.rot=t.clamp=void 0,t.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},t.rot=function(e,t){return(t+e%t)%t};t.Counter=class{constructor(){this._next=0}getNext(){return this._next++}};t.MovingAverage=class{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}})),define(e[503],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=t.ValidationStatus=t.ValidationState=void 0,function(e){e[e.OK=0]="OK",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Fatal=4]="Fatal"}(t.ValidationState||(t.ValidationState={}));t.ValidationStatus=class{constructor(){this._state=0}get state(){return this._state}set state(e){e>this._state&&(this._state=e)}isOK(){return 0===this._state}isFatal(){return 4===this._state}};t.Parser=class{constructor(e){ this._problemReporter=e}reset(){this._problemReporter.status.state=0}get problemReporter(){return this._problemReporter}info(e){this._problemReporter.info(e)}warn(e){this._problemReporter.warn(e)}error(e){this._problemReporter.error(e)}fatal(e){this._problemReporter.fatal(e)}}})),n="object"==typeof global?global:"object"==typeof self?self:{},"function"==typeof define?define("vs/base/common/performance",[],(function(){return s(n)})):"object"==typeof module&&"object"==typeof module.exports?module.exports=s(n):n.perf=s(n),define(e[12],t([0,1]),(function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.isLittleEndian=t.OS=t.OperatingSystem=t.setImmediate=t.globals=t.translationsConfigFile=t.locale=t.Language=t.language=t.isRootUser=t.userAgent=t.platform=t.isIOS=t.isWeb=t.isNative=t.isLinux=t.isMacintosh=t.isWindows=t.PlatformToString=t.Platform=void 0;let n=!1,o=!1,s=!1,r=!1,a=!1,l=!1,c=void 0,d="en",h=void 0,u=void 0;const g="object"==typeof self?self:"object"==typeof global?global:{} ;let p=void 0;"undefined"!=typeof process?p=process:void 0!==g.vscode&&(p=g.vscode.process);const m="string"==typeof(null===(i=null==p?void 0:p.versions)||void 0===i?void 0:i.electron)&&"renderer"===p.type;if("object"!=typeof navigator||m)if("object"==typeof p){n="win32"===p.platform,o="darwin"===p.platform,s="linux"===p.platform,c="en",d="en";const e=p.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];c=t.locale,d=i||"en",h=t._translationsConfigFile}catch(e){}r=!0}else console.error("Unable to resolve platform.");else u=navigator.userAgent,n=u.indexOf("Windows")>=0,o=u.indexOf("Macintosh")>=0,l=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,s=u.indexOf("Linux")>=0,a=!0,d=c=navigator.language;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(t.Platform||(t.Platform={})),t.PlatformToString=function(e){switch(e){case 0:return"Web";case 1:return"Mac" ;case 2:return"Linux";case 3:return"Windows"}};let v=0;o?v=1:n?v=3:s&&(v=2),t.isWindows=n,t.isMacintosh=o,t.isLinux=s,t.isNative=r,t.isWeb=a,t.isIOS=l,t.platform=v,t.userAgent=u,t.isRootUser=function(){return!!p&&!n&&0===p.getuid()},t.language=d,function(e){e.value=function(){return t.language},e.isDefaultVariant=function(){return 2===t.language.length?"en"===t.language:t.language.length>=3&&("e"===t.language[0]&&"n"===t.language[1]&&"-"===t.language[2])},e.isDefault=function(){return"en"===t.language}}(t.Language||(t.Language={})),t.locale=c,t.translationsConfigFile=h,t.globals=g,t.setImmediate=function(){if(t.globals.setImmediate)return t.globals.setImmediate.bind(t.globals);if("function"==typeof t.globals.postMessage&&!t.globals.importScripts){let e=[];t.globals.addEventListener("message",t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let i=0,n=e.length;i{const o=++i;e.push({id:o, callback:n}),t.globals.postMessage({vscodeSetImmediateId:o},"*")}}if(p)return p.nextTick.bind(p);const e=Promise.resolve();return t=>e.then(t)}(),function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=o||l?2:n?1:3;let f=!0,S=!1;t.isLittleEndian=function(){if(!S){S=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);f=513===t[0]}return f}})),define(e[165],t([0,1,80,12]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserFeatures=t.KeyboardSupport=void 0,function(e){e[e.Always=0]="Always",e[e.FullScreen=1]="FullScreen",e[e.None=2]="None"}(t.KeyboardSupport||(t.KeyboardSupport={})),t.BrowserFeatures={clipboard:{writeText:n.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:n.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText),richText:(()=>{ if(i.isEdge){let e=navigator.userAgent.indexOf("Edge/"),t=parseInt(navigator.userAgent.substring(e+5,navigator.userAgent.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0})()},keyboard:(()=>n.isNative||i.isStandalone?0:navigator.keyboard||i.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}})),define(e[74],t([0,1,80,79,12]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StandardKeyboardEvent=t.printStandardKeyboardEvent=t.printKeyboardEvent=t.getCodeForKeyCode=void 0;let s=new Array(230),r=new Array(112);!function(){for(let e=0;ei.setImmediate(e),get env(){return Object.create(null)},cwd:()=>"/",getuid:()=>-1},t.cwd=n.cwd,t.env=n.env,t.platform=n.platform,t.nextTick=n.nextTick})),define(e[48],t([0,1,182]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delimiter=t.sep=t.toNamespacedPath=t.parse=t.format=t.extname=t.basename=t.dirname=t.relative=t.resolve=t.join=t.isAbsolute=t.normalize=t.posix=t.win32=void 0;const n=65,o=97,s=90,r=122,a=46,l=47,c=92;class d extends Error{constructor(e,t,i){let n ;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;super(s+=`. Received type ${typeof i}`),this.code="ERR_INVALID_ARG_TYPE"}}function h(e,t){if("string"!=typeof e)throw new d(t,"string",e)}function u(e){return e===l||e===c}function g(e){return e===l}function p(e){return e>=n&&e<=s||e>=o&&e<=r}function m(e,t,i,n){let o="",s=0,r=-1,c=0,d=0;for(let h=0;h<=e.length;++h){if(h2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):s=(o=o.slice(0,e)).length-1-o.lastIndexOf(i),r=h,c=0;continue}if(0!==o.length){o="",s=0,r=h,c=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,h)}`:o=e.slice(r+1,h),s=h-r-1;r=h,c=0}else d===a&&-1!==c?++c:c=-1}return o}function v(e,t){ if(null===t||"object"!=typeof t)throw new d("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}t.win32={resolve(...e){let t="",n="",o=!1;for(let s=e.length-1;s>=-1;s--){let r;if(s>=0){if(h(r=e[s],"path"),0===r.length)continue}else 0===t.length?r=i.cwd():(void 0===(r=i.env[`=${t}`]||i.cwd())||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===c)&&(r=`${t}\\`);const a=r.length;let l=0,d="",g=!1;const m=r.charCodeAt(0);if(1===a)u(m)&&(l=1,g=!0);else if(u(m))if(g=!0,u(r.charCodeAt(1))){let e=2,t=e;for(;e2&&u(r.charCodeAt(2))&&(g=!0,l=3));if(d.length>0)if(t.length>0){if(d.toLowerCase()!==t.toLowerCase())continue}else t=d;if(o){if(t.length>0)break }else if(n=`${r.slice(l)}\\${n}`,o=g,g&&t.length>0)break}return n=m(n,!o,"\\",u),o?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){h(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return g(s)?"\\":e;if(u(s))if(o=!0,u(e.charCodeAt(1))){let o=2,s=o;for(;o2&&u(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&u(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){h(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return u(i)||t>2&&p(i)&&58===e.charCodeAt(1)&&u(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let i,n ;for(let t=0;t0&&(void 0===i?i=n=o:i+=`\\${o}`)}if(void 0===i)return".";let o=!0,s=0;if("string"==typeof n&&u(n.charCodeAt(0))){++s;const e=n.length;e>1&&u(n.charCodeAt(1))&&(++s,e>2&&(u(n.charCodeAt(2))?++s:o=!1))}if(o){for(;s=2&&(i=`\\${i.slice(s)}`)}return t.win32.normalize(i)},relative(e,i){if(h(e,"from"),h(i,"to"),e===i)return"";const n=t.win32.resolve(e),o=t.win32.resolve(i);if(n===o)return"";if((e=n.toLowerCase())===(i=o.toLowerCase()))return"";let s=0;for(;ss&&e.charCodeAt(r-1)===c;)r--;const a=r-s;let l=0;for(;ll&&i.charCodeAt(d-1)===c;)d--;const u=d-l,g=ag){if(i.charCodeAt(l+m)===c)return o.slice(l+m+1);if(2===m)return o.slice(l+m)} a>g&&(e.charCodeAt(s+m)===c?p=m:2===m&&(p=3)),-1===p&&(p=0)}let v="";for(m=s+p+1;m<=r;++m)m!==r&&e.charCodeAt(m)!==c||(v+=0===v.length?"..":"\\..");return l+=p,v.length>0?`${v}${o.slice(l,d)}`:(o.charCodeAt(l)===c&&++l,o.slice(l,d))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const i=t.win32.resolve(e);if(i.length<=2)return e;if(i.charCodeAt(0)===c){if(i.charCodeAt(1)===c){const e=i.charCodeAt(2);if(63!==e&&e!==a)return`\\\\?\\UNC\\${i.slice(2)}`}}else if(p(i.charCodeAt(0))&&58===i.charCodeAt(1)&&i.charCodeAt(2)===c)return`\\\\?\\${i}`;return e},dirname(e){h(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return u(o)?e:".";if(u(o)){if(i=n=1,u(e.charCodeAt(1))){let o=2,s=o;for(;o2&&u(e.charCodeAt(2))?3:2);let s=-1,r=!0 ;for(let i=t-1;i>=n;--i)if(u(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&h(t,"ext"),h(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&p(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(u(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(u(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){h(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&58===e.charCodeAt(1)&&p(e.charCodeAt(0))&&(t=n=2);for(let l=e.length-1;l>=t;--l){const t=e.charCodeAt(l);if(u(t)){if(!s){n=l+1;break}}else-1===o&&(s=!1,o=l+1),t===a?-1===i?i=l:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)}, format:v.bind(null,"\\"),parse(e){h(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return u(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(u(o)){if(n=1,u(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let s=-1,r=n,l=-1,c=!0,d=e.length-1,g=0;for(;d>=n;--d)if(u(o=e.charCodeAt(d))){if(!c){r=d+1;break}}else-1===l&&(c=!1,l=d+1),o===a?-1===s?s=d:1!==g&&(g=1):-1!==s&&(g=-1);return-1!==l&&(-1===s||0===g||1===g&&s===l-1&&s===r+1?t.base=t.name=e.slice(r,l):(t.name=e.slice(r,s),t.base=e.slice(r,l),t.ext=e.slice(s,l))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},t.posix={resolve(...e){ let t="",n=!1;for(let o=e.length-1;o>=-1&&!n;o--){const s=o>=0?e[o]:i.cwd();h(s,"path"),0!==s.length&&(t=`${s}/${t}`,n=s.charCodeAt(0)===l)}return t=m(t,!n,"/",g),n?`/${t}`:t.length>0?t:"."},normalize(e){if(h(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===l,i=e.charCodeAt(e.length-1)===l;return 0===(e=m(e,!t,"/",g)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(h(e,"path"),e.length>0&&e.charCodeAt(0)===l),join(...e){if(0===e.length)return".";let i;for(let t=0;t0&&(void 0===i?i=n:i+=`/${n}`)}return void 0===i?".":t.posix.normalize(i)},relative(e,i){if(h(e,"from"),h(i,"to"),e===i)return"";if((e=t.posix.resolve(e))===(i=t.posix.resolve(i)))return"";const n=e.length,o=n-1,s=i.length-1,r=or){if(i.charCodeAt(1+c)===l)return i.slice(1+c+1);if(0===c)return i.slice(1+c)}else o>r&&(e.charCodeAt(1+c)===l?a=c:0===c&&(a=0)) ;let d="";for(c=1+a+1;c<=n;++c)c!==n&&e.charCodeAt(c)!==l||(d+=0===d.length?"..":"/..");return`${d}${i.slice(1+a)}`},toNamespacedPath:e=>e,dirname(e){if(h(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===l;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===l){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&h(t,"ext"),h(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const c=e.charCodeAt(i);if(c===l){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(c===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===l){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){h(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const c=e.charCodeAt(r);if(c!==l)-1===n&&(o=!1,n=r+1), c===a?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:v.bind(null,"/"),parse(e){h(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===l;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,c=!0,d=e.length-1,u=0;for(;d>=n;--d){const t=e.charCodeAt(d);if(t!==l)-1===r&&(c=!1,r=d+1),t===a?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){s=d+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===u||1===u&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null},t.posix.win32=t.win32.win32=t.win32,t.posix.posix=t.win32.posix=t.posix,t.normalize="win32"===i.platform?t.win32.normalize:t.posix.normalize,t.isAbsolute="win32"===i.platform?t.win32.isAbsolute:t.posix.isAbsolute,t.join="win32"===i.platform?t.win32.join:t.posix.join, t.resolve="win32"===i.platform?t.win32.resolve:t.posix.resolve,t.relative="win32"===i.platform?t.win32.relative:t.posix.relative,t.dirname="win32"===i.platform?t.win32.dirname:t.posix.dirname,t.basename="win32"===i.platform?t.win32.basename:t.posix.basename,t.extname="win32"===i.platform?t.win32.extname:t.posix.extname,t.format="win32"===i.platform?t.win32.format:t.posix.format,t.parse="win32"===i.platform?t.win32.parse:t.posix.parse,t.toNamespacedPath="win32"===i.platform?t.win32.toNamespacedPath:t.posix.toNamespacedPath,t.sep="win32"===i.platform?t.win32.sep:t.posix.sep,t.delimiter="win32"===i.platform?t.win32.delimiter:t.posix.delimiter})),define(e[254],t([0,1,48,15]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareByPrefix=t.compareAnything=t.comparePaths=t.compareFileExtensionsDefault=t.compareFileExtensions=t.noIntlCompareFileNames=t.compareFileNamesDefault=t.compareFileNames=void 0;const o=new n.IdleValue(()=>{const e=new Intl.Collator(void 0,{numeric:!0, sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}),s=new n.IdleValue(()=>{return{collator:new Intl.Collator(void 0,{numeric:!0})}}),r=new n.IdleValue(()=>{return{collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}});function a(e,t,i=!1){const n=e||"",s=t||"",r=o.value.collator.compare(n,s);return o.value.collatorIsNumeric&&0===r&&n!==s?no.length)return 1}return 0}t.comparePaths=function(e,t,n=!1){const o=e.split(i.sep),s=t.split(i.sep),r=o.length-1,l=s.length-1;let c,d;for(let e=0;;e++){if(d=l===e,(c=r===e)&&d)return a(o[e],s[e],n);if(c)return-1;if(d)return 1;const t=u(o[e],s[e],n);if(0!==t)return t}}, t.compareAnything=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=g(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const l=a(n,o);return 0!==l?l:n.localeCompare(o)},t.compareByPrefix=g})),define(e[725],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeProcessEnvironment=t.TerminateResponseCode=t.Source=void 0,function(e){e[e.stdout=0]="stdout",e[e.stderr=1]="stderr"}(t.Source||(t.Source={})),function(e){e[e.Success=0]="Success",e[e.Unknown=1]="Unknown",e[e.AccessDenied=2]="AccessDenied",e[e.ProcessNotFound=3]="ProcessNotFound"}(t.TerminateResponseCode||(t.TerminateResponseCode={})),t.sanitizeProcessEnvironment=function(e,...t){const i=t.reduce((e,t)=>(e[t]=!0,e),{}),n=[/^ELECTRON_.+$/,/^GOOGLE_API_KEY$/,/^VSCODE_.+$/,/^SNAP(|_.*)$/];Object.keys(e).filter(e=>!i[e]).forEach(t=>{for(let i=0;i=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(t.Range||(t.Range={}))})),define(e[726],t([0,1,340]),(function(e,t,i){"use strict";function n(e,t){const n=[];for(let o of t){if(e.start>=o.range.end)continue;if(e.end({range:o(e.range,r),size:e.size})),c=i.map((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size}));this.groups=function(...e){return s(e.reduce((e,t)=>e.concat(t),[]))}(a,c,l),this._size=this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(eo[e]||0,toEnum:e=>n[e]||0,toString:e=>i[e]||"None"},t.IMMUTABLE_CODE_TO_KEY_CODE=[],t.IMMUTABLE_KEY_CODE_TO_CODE=[];t.ScanCodeBinding=class{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.scanCode=o}equals(e){ return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.scanCode===e.scanCode}isDuplicateModifierCase(){return this.ctrlKey&&(157===this.scanCode||161===this.scanCode)||this.shiftKey&&(158===this.scanCode||162===this.scanCode)||this.altKey&&(159===this.scanCode||163===this.scanCode)||this.metaKey&&(160===this.scanCode||164===this.scanCode)}},function(){function e(e,t){i[e]=t,n[t]=e,o[t.toLowerCase()]=e}e(0,"None"),e(1,"Hyper"),e(2,"Super"),e(3,"Fn"),e(4,"FnLock"),e(5,"Suspend"),e(6,"Resume"),e(7,"Turbo"),e(8,"Sleep"),e(9,"WakeUp"),e(10,"KeyA"),e(11,"KeyB"),e(12,"KeyC"),e(13,"KeyD"),e(14,"KeyE"),e(15,"KeyF"),e(16,"KeyG"),e(17,"KeyH"),e(18,"KeyI"),e(19,"KeyJ"),e(20,"KeyK"),e(21,"KeyL"),e(22,"KeyM"),e(23,"KeyN"),e(24,"KeyO"),e(25,"KeyP"),e(26,"KeyQ"),e(27,"KeyR"),e(28,"KeyS"),e(29,"KeyT"),e(30,"KeyU"),e(31,"KeyV"),e(32,"KeyW"),e(33,"KeyX"),e(34,"KeyY"),e(35,"KeyZ"),e(36,"Digit1"),e(37,"Digit2"),e(38,"Digit3"),e(39,"Digit4"),e(40,"Digit5"), e(41,"Digit6"),e(42,"Digit7"),e(43,"Digit8"),e(44,"Digit9"),e(45,"Digit0"),e(46,"Enter"),e(47,"Escape"),e(48,"Backspace"),e(49,"Tab"),e(50,"Space"),e(51,"Minus"),e(52,"Equal"),e(53,"BracketLeft"),e(54,"BracketRight"),e(55,"Backslash"),e(56,"IntlHash"),e(57,"Semicolon"),e(58,"Quote"),e(59,"Backquote"),e(60,"Comma"),e(61,"Period"),e(62,"Slash"),e(63,"CapsLock"),e(64,"F1"),e(65,"F2"),e(66,"F3"),e(67,"F4"),e(68,"F5"),e(69,"F6"),e(70,"F7"),e(71,"F8"),e(72,"F9"),e(73,"F10"),e(74,"F11"),e(75,"F12"),e(76,"PrintScreen"),e(77,"ScrollLock"),e(78,"Pause"),e(79,"Insert"),e(80,"Home"),e(81,"PageUp"),e(82,"Delete"),e(83,"End"),e(84,"PageDown"),e(85,"ArrowRight"),e(86,"ArrowLeft"),e(87,"ArrowDown"),e(88,"ArrowUp"),e(89,"NumLock"),e(90,"NumpadDivide"),e(91,"NumpadMultiply"),e(92,"NumpadSubtract"),e(93,"NumpadAdd"),e(94,"NumpadEnter"),e(95,"Numpad1"),e(96,"Numpad2"),e(97,"Numpad3"),e(98,"Numpad4"),e(99,"Numpad5"),e(100,"Numpad6"),e(101,"Numpad7"),e(102,"Numpad8"),e(103,"Numpad9"),e(104,"Numpad0"),e(105,"NumpadDecimal"), e(106,"IntlBackslash"),e(107,"ContextMenu"),e(108,"Power"),e(109,"NumpadEqual"),e(110,"F13"),e(111,"F14"),e(112,"F15"),e(113,"F16"),e(114,"F17"),e(115,"F18"),e(116,"F19"),e(117,"F20"),e(118,"F21"),e(119,"F22"),e(120,"F23"),e(121,"F24"),e(122,"Open"),e(123,"Help"),e(124,"Select"),e(125,"Again"),e(126,"Undo"),e(127,"Cut"),e(128,"Copy"),e(129,"Paste"),e(130,"Find"),e(131,"AudioVolumeMute"),e(132,"AudioVolumeUp"),e(133,"AudioVolumeDown"),e(134,"NumpadComma"),e(135,"IntlRo"),e(136,"KanaMode"),e(137,"IntlYen"),e(138,"Convert"),e(139,"NonConvert"),e(140,"Lang1"),e(141,"Lang2"),e(142,"Lang3"),e(143,"Lang4"),e(144,"Lang5"),e(145,"Abort"),e(146,"Props"),e(147,"NumpadParenLeft"),e(148,"NumpadParenRight"),e(149,"NumpadBackspace"),e(150,"NumpadMemoryStore"),e(151,"NumpadMemoryRecall"),e(152,"NumpadMemoryClear"),e(153,"NumpadMemoryAdd"),e(154,"NumpadMemorySubtract"),e(155,"NumpadClear"),e(156,"NumpadClearEntry"),e(157,"ControlLeft"),e(158,"ShiftLeft"),e(159,"AltLeft"),e(160,"MetaLeft"),e(161,"ControlRight"), e(162,"ShiftRight"),e(163,"AltRight"),e(164,"MetaRight"),e(165,"BrightnessUp"),e(166,"BrightnessDown"),e(167,"MediaPlay"),e(168,"MediaRecord"),e(169,"MediaFastForward"),e(170,"MediaRewind"),e(171,"MediaTrackNext"),e(172,"MediaTrackPrevious"),e(173,"MediaStop"),e(174,"Eject"),e(175,"MediaPlayPause"),e(176,"MediaSelect"),e(177,"LaunchMail"),e(178,"LaunchApp2"),e(179,"LaunchApp1"),e(180,"SelectTask"),e(181,"LaunchScreenSaver"),e(182,"BrowserSearch"),e(183,"BrowserHome"),e(184,"BrowserBack"),e(185,"BrowserForward"),e(186,"BrowserStop"),e(187,"BrowserRefresh"),e(188,"BrowserFavorites"),e(189,"ZoomToggle"),e(190,"MailReply"),e(191,"MailForward"),e(192,"MailSend")}(),function(){for(let e=0;e<=193;e++)t.IMMUTABLE_CODE_TO_KEY_CODE[e]=-1;for(let e=0;e<=112;e++)t.IMMUTABLE_KEY_CODE_TO_CODE[e]=-1;function e(e,i){t.IMMUTABLE_CODE_TO_KEY_CODE[e]=i,0!==i&&3!==i&&5!==i&&4!==i&&6!==i&&57!==i&&(t.IMMUTABLE_KEY_CODE_TO_CODE[i]=e)}t.IMMUTABLE_KEY_CODE_TO_CODE[3]=46,e(0,0),e(1,0),e(2,0),e(3,0),e(4,0),e(5,0),e(6,0),e(7,0),e(8,0), e(9,0),e(46,3),e(47,9),e(48,1),e(49,2),e(50,10),e(63,8),e(64,59),e(65,60),e(66,61),e(67,62),e(68,63),e(69,64),e(70,65),e(71,66),e(72,67),e(73,68),e(74,69),e(75,70),e(76,0),e(77,79),e(78,7),e(79,19),e(80,14),e(81,11),e(82,20),e(83,13),e(84,12),e(85,17),e(86,15),e(87,18),e(88,16),e(89,78),e(90,108),e(91,103),e(92,106),e(93,104),e(94,3),e(95,94),e(96,95),e(97,96),e(98,97),e(99,98),e(100,99),e(101,100),e(102,101),e(103,102),e(104,93),e(105,107),e(107,58),e(108,0),e(109,0),e(110,71),e(111,72),e(112,73),e(113,74),e(114,75),e(115,76),e(116,77),e(117,0),e(118,0),e(119,0),e(120,0),e(121,0),e(122,0),e(123,0),e(124,0),e(125,0),e(126,0),e(127,0),e(128,0),e(129,0),e(130,0),e(131,0),e(132,0),e(133,0),e(134,105),e(136,0),e(138,0),e(139,0),e(140,0),e(141,0),e(142,0),e(143,0),e(144,0),e(145,0),e(146,0),e(147,0),e(148,0),e(149,0),e(150,0),e(151,0),e(152,0),e(153,0),e(154,0),e(155,0),e(156,0),e(157,5),e(158,4),e(159,6),e(160,57),e(161,5),e(162,4),e(163,6),e(164,57),e(165,0),e(166,0),e(167,0),e(168,0),e(169,0),e(170,0),e(171,0), e(172,0),e(173,0),e(174,0),e(175,0),e(176,0),e(177,0),e(178,0),e(179,0),e(180,0),e(181,0),e(182,0),e(183,0),e(184,0),e(185,0),e(186,0),e(187,0),e(188,0),e(189,0),e(190,0),e(191,0),e(192,0)}()})),define(e[290],t([0,1,79,231]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeybindingParser=void 0;t.KeybindingParser=class{static _readModifiers(e){e=e.toLowerCase().trim();let t,i,n=!1,o=!1,s=!1,r=!1;do{t=!1,/^ctrl(\+|\-)/.test(e)&&(n=!0,e=e.substr("ctrl-".length),t=!0),/^shift(\+|\-)/.test(e)&&(o=!0,e=e.substr("shift-".length),t=!0),/^alt(\+|\-)/.test(e)&&(s=!0,e=e.substr("alt-".length),t=!0),/^meta(\+|\-)/.test(e)&&(r=!0,e=e.substr("meta-".length),t=!0),/^win(\+|\-)/.test(e)&&(r=!0,e=e.substr("win-".length),t=!0),/^cmd(\+|\-)/.test(e)&&(r=!0,e=e.substr("cmd-".length),t=!0)}while(t);const a=e.indexOf(" ");return a>0?(i=e.substring(0,a),e=e.substring(a)):(i=e,e=""),{remains:e,ctrl:n,shift:o,alt:s,meta:r,key:i}}static parseSimpleKeybinding(e){ const t=this._readModifiers(e),n=i.KeyCodeUtils.fromUserSettings(t.key);return[new i.SimpleKeybinding(t.ctrl,t.shift,t.alt,t.meta,n),t.remains]}static parseKeybinding(e,t){if(!e)return null;const n=[];let o;do{[o,e]=this.parseSimpleKeybinding(e),n.push(o)}while(e.length>0);return new i.ChordKeybinding(n)}static parseSimpleUserBinding(e){const t=this._readModifiers(e),o=t.key.match(/^\[([^\]]+)\]$/);if(o){const e=o[1],i=n.ScanCodeUtils.lowerCaseToEnum(e);return[new n.ScanCodeBinding(t.ctrl,t.shift,t.alt,t.meta,i),t.remains]}const s=i.KeyCodeUtils.fromUserSettings(t.key);return[new i.SimpleKeybinding(t.ctrl,t.shift,t.alt,t.meta,s),t.remains]}static parseUserBinding(e){if(!e)return[];const t=[];let i;for(;e.length>0;)[i,e]=this.parseSimpleUserBinding(e),t.push(i);return t}}})),define(e[392],t([0,1,6,2]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmoothScrollingOperation=t.SmoothScrollingUpdate=t.Scrollable=t.ScrollState=t.ScrollbarVisibility=void 0,function(e){ e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(t.ScrollbarVisibility||(t.ScrollbarVisibility={}));class o{constructor(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o|=0,s|=0,this.rawScrollLeft=i,this.rawScrollTop=s,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),s+n>o&&(s=o-n),s<0&&(s=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=o,this.scrollTop=s}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){ return new o(this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e){const t=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,n=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,s=this.scrollHeight!==e.scrollHeight,r=this.scrollTop!==e.scrollTop;return{oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:i,scrollLeftChanged:n,heightChanged:o,scrollHeightChanged:s,scrollTopChanged:r}}}t.ScrollState=o;class s extends n.Disposable{constructor(e,t){super(),this._onScroll=this._register(new i.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t, this._state=new o(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)}setScrollPositionSmooth(e){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft, scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const t=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===t.scrollLeft&&this._smoothScrolling.to.scrollTop===t.scrollTop)return;const i=this._smoothScrolling.combine(this._state,t,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=l.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(), void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})):void 0}_setState(e){const t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))}}t.Scrollable=s;class r{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function a(e,t){const i=t-e;return function(t){return e+i*(1-function(e){return Math.pow(e,3)}(1-t))}}t.SmoothScrollingUpdate=r;class l{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this._startTime=i,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(e,t,i){if(Math.abs(e-t)>2.5*i){let r,l;return e({start:this.elements.length,deleteCount:0,toInsert:[e]})),i.Event.map(i.Event.filter(i.Event.map(n,e=>this.elements.indexOf(e)),e=>e>-1),e=>({start:e,deleteCount:1,toInsert:[]}))),this.disposable=this.onDidSplice(({start:e,deleteCount:t,toInsert:i})=>this._elements.splice(e,t,...i))}get elements(){return this._elements}dispose(){this.disposable.dispose()}}})),define(e[728],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SkipList=void 0;class i{constructor(e,t,i){this.level=e,this.key=t,this.value=i,this.forward=[]}}const n=void 0;class o{constructor(e,t=65536){this.comparator=e,this[Symbol.toStringTag]="SkipList",this._level=0,this._size=0,this._maxLevel=Math.max(1,0|Math.log2(t)),this._header=new i(this._maxLevel,n,n)}get size(){return this._size}clear(){this._header=new i(this._maxLevel,n,n)}has(e){ return Boolean(o._search(this,e,this.comparator))}get(e){var t;return null===(t=o._search(this,e,this.comparator))||void 0===t?void 0:t.value}set(e,t){return o._insert(this,e,t,this.comparator)&&(this._size+=1),this}delete(e){const t=o._delete(this,e,this.comparator);return t&&(this._size-=1),t}forEach(e,t){let i=this._header.forward[0];for(;i;)e.call(t,i.value,i.key,this),i=i.forward[0]}[Symbol.iterator](){return this.entries()}*entries(){let e=this._header.forward[0];for(;e;)yield[e.key,e.value],e=e.forward[0]}*keys(){let e=this._header.forward[0];for(;e;)yield e.key,e=e.forward[0]}*values(){let e=this._header.forward[0];for(;e;)yield e.value,e=e.forward[0]}toString(){let e="[SkipList]:",t=this._header.forward[0];for(;t;)e+=`node(${t.key}, ${t.value}, lvl:${t.level})`,t=t.forward[0];return e}static _search(e,t,i){let n=e._header;for(let o=e._level-1;o>=0;o--)for(;n.forward[o]&&i(n.forward[o].key,t)<0;)n=n.forward[o];if((n=n.forward[0])&&0===i(n.key,t))return n}static _insert(e,t,n,s){let r=[],a=e._header ;for(let i=e._level-1;i>=0;i--){for(;a.forward[i]&&s(a.forward[i].key,t)<0;)a=a.forward[i];r[i]=a}if((a=a.forward[0])&&0===s(a.key,t))return a.value=n,!1;{let s=o._randomLevel(e);if(s>e._level){for(let t=e._level;t=0;n--){for(;s.forward[n]&&i(s.forward[n].key,t)<0;)s=s.forward[n];o[n]=s}if(!(s=s.forward[0])||0!==i(s.key,t))return!1;for(let t=0;t0&&e._header.forward[e._level-1]===n;)e._level-=1;return!0}}t.SkipList=o})),define(e[232],t([0,1,12]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopWatch=void 0;const n=i.globals.performance&&"function"==typeof i.globals.performance.now;class o{constructor(e){ this._highResolution=n&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new o(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?i.globals.performance.now():(new Date).getTime()}}t.StopWatch=o})),define(e[291],t([0,1,2]),(function(e,t,i){"use strict";function n(e){const t=e;return t&&[t.on,t.pause,t.resume,t.destroy].every(e=>"function"==typeof e)}function o(e,t){return new s(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=t.toReadable=t.toStream=t.peekStream=t.consumeStream=t.peekReadable=t.consumeReadable=t.newWriteableStream=t.isReadableBufferedStream=t.isReadableStream=void 0,t.isReadableStream=n,t.isReadableBufferedStream=function(e){const t=e;return t&&n(t.stream)&&Array.isArray(t.buffer)&&"boolean"==typeof t.ended},t.newWriteableStream=o;class s{constructor(e,t){this.reducer=e,this.options=t,this.state={flowing:!1,ended:!1,destroyed:!1}, this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(e){var t;if(!this.state.destroyed)if(this.state.flowing)this.listeners.data.forEach(t=>t(e));else if(this.buffer.data.push(e),"number"==typeof(null===(t=this.options)||void 0===t?void 0:t.highWaterMark)&&this.buffer.data.length>this.options.highWaterMark)return new Promise(e=>this.pendingWritePromises.push(e))}error(e){this.state.destroyed||(this.state.flowing?this.listeners.error.forEach(t=>t(e)):this.buffer.error.push(e))}end(e){this.state.destroyed||(e instanceof Error?this.error(e):e&&this.write(e),this.state.flowing?(this.listeners.end.forEach(e=>e()),this.destroy()):this.state.ended=!0)}on(e,t){if(!this.state.destroyed)switch(e){case"data":this.listeners.data.push(t),this.resume();break;case"end":this.listeners.end.push(t), this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(t),this.state.flowing&&this.flowErrors()}}removeListener(e,t){if(this.state.destroyed)return;let i=void 0;switch(e){case"data":i=this.listeners.data;break;case"end":i=this.listeners.end;break;case"error":i=this.listeners.error}if(i){const e=i.indexOf(t);e>=0&&i.splice(e,1)}}flowData(){if(this.buffer.data.length>0){const e=this.reducer(this.buffer.data);this.listeners.data.forEach(t=>t(e)),this.buffer.data.length=0;const t=[...this.pendingWritePromises];this.pendingWritePromises.length=0,t.forEach(e=>e())}}flowErrors(){if(this.listeners.error.length>0){for(const e of this.buffer.error)this.listeners.error.forEach(t=>t(e));this.buffer.error.length=0}}flowEnd(){return!!this.state.ended&&(this.listeners.end.forEach(e=>e()),this.listeners.end.length>0)}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0, this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}t.consumeReadable=function(e,t){const i=[];let n;for(;null!==(n=e.read());)i.push(n);return t(i)},t.peekReadable=function(e,t,i){const n=[];let o=void 0;for(;null!==(o=e.read())&&n.length0?t(n):{read:()=>{if(n.length>0)return n.shift();if(void 0!==o){const e=o;return o=void 0,e}return e.read()}}},t.consumeStream=function(e,t){return new Promise((i,n)=>{const o=[];e.on("data",e=>o.push(e)),e.on("error",e=>n(e)),e.on("end",()=>i(t(o)))})},t.peekStream=function(e,t){return new Promise((n,o)=>{const s=new i.DisposableStore,r=[],a=i=>{if(r.push(i),r.length>t)return s.dispose(),e.pause(),n({stream:e,buffer:r,ended:!1})};s.add(i.toDisposable(()=>e.removeListener("data",a))),e.on("data",a);const l=e=>o(e);s.add(i.toDisposable(()=>e.removeListener("error",l))),e.on("error",l);const c=()=>n({stream:e,buffer:r,ended:!0});s.add(i.toDisposable(()=>e.removeListener("end",c))),e.on("end",c) })},t.toStream=function(e,t){const i=o(t);return i.end(e),i},t.toReadable=function(e){let t=!1;return{read:()=>t?null:(t=!0,e)}},t.transform=function(e,t,i){const n=o(i);return e.on("data",e=>n.write(t.data(e))),e.on("end",()=>n.end()),e.on("error",e=>n.error(t.error?t.error(e):e)),n}})),define(e[24],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.GraphemeBreakType=t.breakBetweenGraphemeBreakType=t.getGraphemeBreakType=t.singleLetterHash=t.getNLines=t.uppercaseFirstLetter=t.containsUppercaseCharacter=t.fuzzyContains=t.stripUTF8BOM=t.startsWithUTF8BOM=t.UTF8_BOM_CHARACTER=t.removeAnsiEscapeCodes=t.lcut=t.isEmojiImprecise=t.isFullWidthCharacter=t.containsFullWidthCharacter=t.containsUnusualLineTerminators=t.UNUSUAL_LINE_TERMINATORS=t.isBasicASCII=t.containsEmoji=t.containsRTL=t.decodeUTF8=t.encodeUTF8=t.getCharContainingOffset=t.prevCharLength=t.nextCharLength=t.getNextCodePoint=t.computeCodePoint=t.isLowSurrogate=t.isHighSurrogate=t.commonSuffixLength=t.commonPrefixLength=t.startsWithIgnoreCase=t.equalsIgnoreCase=t.isUpperAsciiLetter=t.isLowerAsciiLetter=t.compareSubstringIgnoreCase=t.compareIgnoreCase=t.compareSubstring=t.compare=t.lastNonWhitespaceIndex=t.getLeadingWhitespace=t.firstNonWhitespaceIndex=t.regExpFlags=t.regExpContainsBackreference=t.regExpLeadsToEndlessLoop=t.createRegExp=t.stripWildcards=t.convertSimple2RegExpPattern=t.rtrim=t.ltrim=t.trim=t.escapeRegExpCharacters=t.escape=t.format=t.pad=t.isFalsyOrWhitespace=void 0, t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,i="0"){const n=""+e,o=[n];for(let e=n.length;es)return 1}const r=n-i,a=s-o;return ra?1:0}function a(e,t,i=0,n=e.length,o=0,s=t.length){for(;id?1:0}function l(e){return e>=97&&e<=122}function c(e){return e>=65&&e<=90}function d(e){return l(e)||c(e)}function h(e,t,i=e.length){for(let n=0;n1){const n=e.charCodeAt(t-2);if(u(n))return p(n,i)}return i}function f(e,t){const i=k.getInstance(),n=e.length,o=t,s=m(e,n,t),r=i.getGraphemeBreakType(s);t+=s>=65536?2:1;let a=r;for(;t=65536?2:1,a=s}const l=t;for(t=o,a=r;t>0;){const n=v(e,t),o=i.getGraphemeBreakType(n);if(x(o,a))break;t-=n>=65536?2:1,a=o}return[t,l]}t.format=function(e,...t){return 0===t.length?e:e.replace(i,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))},t.escape=function(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))},t.escapeRegExpCharacters=n,t.trim=function(e,t=" "){return s(o(e,t),t)},t.ltrim=o,t.rtrim=s,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.createRegExp=function(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let o="";return i.global&&(o+="g"), i.matchCase||(o+="i"),i.multiline&&(o+="m"),i.unicode&&(o+="u"),new RegExp(e,o)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)},t.regExpContainsBackreference=function(e){return!!e.match(/([^\\]|^)(\\\\)*\\\d+/)},t.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1},t.compare=function(e,t){return et?1:0},t.compareSubstring=r,t.compareIgnoreCase=function(e,t){return a(e,t,0,e.length,0,t.length)},t.compareSubstringIgnoreCase=a, t.isLowerAsciiLetter=l,t.isUpperAsciiLetter=c,t.equalsIgnoreCase=function(e,t){return e.length===t.length&&h(e,t)},t.startsWithIgnoreCase=function(e,t){const i=t.length;return!(t.length>e.length)&&h(e,t,i)},t.commonPrefixLength=function(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i=65536?2:1;let r=i.getGraphemeBreakType(s);for(;t=65536?2:1,r=s}return t-n},t.prevCharLength=function(e,t){const i=k.getInstance(),n=t,o=v(e,t);t-=o>=65536?2:1;let s=i.getGraphemeBreakType(o);for(;t>0;){const n=v(e,t),o=i.getGraphemeBreakType(n) ;if(x(o,s))break;t-=n>=65536?2:1,s=o}return n-t},t.getCharContainingOffset=function(e,t){return t>0&&g(e.charCodeAt(t))?f(e,t-1):f(e,t)},t.encodeUTF8=function(e){const t=e.length;let i=0,n=0;for(;n=65536?2:1,i+=o<128?1:o<2048?2:o<65536?3:4}const o=new Uint8Array(i);n=0;let s=0;for(;n=65536?2:1,i<128?o[s++]=i:i<2048?(o[s++]=192|(1984&i)>>>6,o[s++]=128|(63&i)>>>0):i<65536?(o[s++]=224|(61440&i)>>>12,o[s++]=128|(4032&i)>>>6,o[s++]=128|(63&i)>>>0):(o[s++]=240|(1835008&i)>>>18,o[s++]=128|(258048&i)>>>12,o[s++]=128|(4032&i)>>>6,o[s++]=128|(63&i)>>>0)}return o},t.decodeUTF8=function(e){const t=e.byteLength,i=[];let n=0;for(;n=240&&n+3>>0|(63&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=224&&n+2>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=192&&n+1>>0|(63&e[n++])<<0>>>0:e[n++])>=0&&s<=55295||s>=57344&&s<=65535)i.push(String.fromCharCode(s));else if(s>=65536&&s<=1114111){const e=s-65536,t=55296+((1047552&e)>>>10),n=56320+((1023&e)>>>0);i.push(String.fromCharCode(t)),i.push(String.fromCharCode(n))}else i.push(String.fromCharCode(65533))}return i.join("")};const S=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/ ;t.containsRTL=function(e){return S.test(e)};const b=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;t.containsEmoji=function(e){return b.test(e)};const _=/^[\t\n\r\x20-\x7E]*$/;function C(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}t.isBasicASCII=function(e){return _.test(e)},t.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/,t.containsUnusualLineTerminators=function(e){return t.UNUSUAL_LINE_TERMINATORS.test(e)},t.containsFullWidthCharacter=function(e){for(let t=0,i=e.length;t=127462&&e<=127487||e>=9728&&e<=10175||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129651||e>=129656&&e<=129666||e>=129680&&e<=129685},t.lcut=function(e,t){if(e.length0&&65279===e.charCodeAt(0))}function x(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(y,"")).replace(w,"")).replace(E,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=I,t.stripUTF8BOM=function(e){return I(e)?e.substr(1):e},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length0&&i>=0);return i>=0?e.substr(0,i):e},t.singleLetterHash=function(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)},t.getGraphemeBreakType=function(e){return k.getInstance().getGraphemeBreakType(e)},t.breakBetweenGraphemeBreakType=x,function(e){e[e.Other=0]="Other",e[e.Prepend=1]="Prepend",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.Control=4]="Control",e[e.Extend=5]="Extend",e[e.Regional_Indicator=6]="Regional_Indicator",e[e.SpacingMark=7]="SpacingMark",e[e.L=8]="L",e[e.V=9]="V",e[e.T=10]="T",e[e.LV=11]="LV",e[e.LVT=12]="LVT",e[e.ZWJ=13]="ZWJ",e[e.Extended_Pictographic=14]="Extended_Pictographic"}(t.GraphemeBreakType||(t.GraphemeBreakType={}));class k{constructor(){ this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]") }static getInstance(){return k._INSTANCE||(k._INSTANCE=new k),k._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}k._INSTANCE=null})),define(e[66],t([0,1,24,291]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newWriteableBufferStream=t.streamToBufferReadableStream=t.bufferToStream=t.bufferedStreamToBuffer=t.streamToBuffer=t.bufferToReadable=t.readableToBuffer=t.writeUInt8=t.readUInt8=t.writeUInt32LE=t.readUInt32LE=t.writeUInt32BE=t.readUInt32BE=t.writeUInt16LE=t.readUInt16LE=t.VSBuffer=void 0;const o="undefined"!=typeof Buffer,s="undefined"!=typeof TextEncoder,r="undefined"!=typeof TextDecoder;let a,l;class c{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static alloc(e){return new c(o?Buffer.allocUnsafe(e):new Uint8Array(e))}static wrap(e){ return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new c(e)}static fromString(e){return o?new c(Buffer.from(e)):s?(a||(a=new TextEncoder),new c(a.encode(e))):new c(i.encodeUTF8(e))}static concat(e,t){if(void 0===t){t=0;for(let i=0,n=e.length;i>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t} function u(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0|e[t+2]<<16>>>0|e[t+3]<<24>>>0}function g(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t,t>>>=8,e[i+2]=255&t,t>>>=8,e[i+3]=255&t}function p(e,t){return e[t]}function m(e,t,i){e[i]=t}function v(e){return n.consumeStream(e,e=>c.concat(e))}t.VSBuffer=c,t.readUInt16LE=function(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0},t.writeUInt16LE=function(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t},t.readUInt32BE=d,t.writeUInt32BE=h,t.readUInt32LE=u,t.writeUInt32LE=g,t.readUInt8=p,t.writeUInt8=m,t.readableToBuffer=function(e){return n.consumeReadable(e,e=>c.concat(e))},t.bufferToReadable=function(e){return n.toReadable(e)},t.streamToBuffer=v,t.bufferedStreamToBuffer=async function(e){return e.ended?c.concat(e.buffer):c.concat([...e.buffer,await v(e.stream)])},t.bufferToStream=function(e){return n.toStream(e,e=>c.concat(e))},t.streamToBufferReadableStream=function(e){return n.transform(e,{data:e=>"string"==typeof e?c.fromString(e):c.wrap(e)},e=>c.concat(e))}, t.newWriteableBufferStream=function(e){return n.newWriteableStream(e=>c.concat(e),e)}})),define(e[133],t([0,1,24]),(function(e,t,i){"use strict";function n(e,t){switch(typeof e){case"object":return null===e?o(349,t):Array.isArray(e)?(i=e,r=o(104579,r=t),i.reduce((e,t)=>n(t,e),r)):function(e,t){return t=o(181387,t),Object.keys(e).sort().reduce((t,i)=>(t=s(i,t),n(e[i],t)),t)}(e,t);case"string":return s(e,t);case"boolean":return function(e,t){return o(e?433:863,t)}(e,t);case"number":return o(e,t);case"undefined":return o(937,t);default:return o(617,t)}var i,r}function o(e,t){return(t<<5)-t+e|0}function s(e,t){t=o(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function l(e,t=0,i=e.byteLength,n=0){for(let o=0;o>>0).toString(16),t/4)}t.Hasher=class{constructor(){this._value=0}get value(){return this._value}hash(e){return this._value=n(e,this._value),this._value}},function(e){e[e.BLOCK_SIZE=64]="BLOCK_SIZE",e[e.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"}(r||(r={}));class d{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);;){let l=o;if(i.isHighSurrogate(o)){if(!(s+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}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()),c(this._h0)+c(this._h1)+c(this._h2)+c(this._h3)+c(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,l(this._buff,this._buffLen),this._buffLen>56&&(this._step(),l(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=d._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1) ;for(let t=64;t<320;t+=4)e.setUint32(t,a(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,l=this._h2,c=this._h3,h=this._h4;for(let t=0;t<80;t++)t<20?(i=r&l|~r&c,n=1518500249):t<40?(i=r^l^c,n=1859775393):t<60?(i=r&l|r&c|l&c,n=2400959708):(i=r^l^c,n=3395469782),o=a(s,5)+i+h+n+e.getUint32(4*t,!1)&4294967295,h=c,c=l,l=a(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+h&4294967295}}t.StringSHA1=d,d._bigBlock32=new DataView(new ArrayBuffer(320))})),define(e[393],t([0,1,721,133]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LcsDiff=t.MyArray=t.Debug=t.stringDiff=t.StringDiffSequence=void 0;class o{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new i.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(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e), 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 c{constructor(e,t,i=null){this.ContinueProcessingPredicate=i;const[n,o,s]=c._getElements(e),[r,a,l]=c._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(c._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,o=t.length;i=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){let r ;return n<=o?(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new i.DiffChange(e,0,n,o-n+1)]):e<=t?(s.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[new i.DiffChange(e,t-e+1,n,0)]):(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}const a=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,o,a,l,r),d=a[0],h=l[0];if(null!==c)return c;if(!r[0]){const s=this.ComputeDiffRecursive(e,d,n,h,r);let a=[];return a=r[0]?[new i.DiffChange(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,r),this.ConcatenateChanges(s,a)}return[new i.DiffChange(e,t-e+1,n,o-n+1)]}WALKTRACE(e,t,n,o,s,r,a,c,d,h,u,g,p,m,v,f,S,b){let _=null,C=null,y=new l,w=t,E=n,I=p[0]-f[0]-o,x=-1073741824,k=this.m_forwardHistory.length-1;do{const t=I+e;t===w||t=0&&(e=(d=this.m_forwardHistory[k])[0],w=1,E=d.length-1)}while(--k>=-1);if(_=y.getReverseChanges(),b[0]){let e=p[0]+1,t=f[0]+1;if(null!==_&&_.length>0){const i=_[_.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}C=[new i.DiffChange(e,g-e+1,t,v-t+1)]}else{y=new l,w=r,E=a,I=p[0]-f[0]-c,x=1073741824,k=S?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=I+s;e===w||e=h[e+1]?(m=(u=h[e+1]-1)-I-c,u>x&&y.MarkNextChange(),x=u+1,y.AddOriginalElement(u+1,m+1),I=e+1-s):(m=(u=h[e-1])-I-c,u>x&&y.MarkNextChange(),x=u,y.AddModifiedElement(u+1,m+1),I=e-1-s),k>=0&&(s=(h=this.m_reverseHistory[k])[0],w=1,E=h.length-1)}while(--k>=-1);C=y.getChanges()}return this.ConcatenateChanges(_,C)}ComputeRecursionPoint(e,t,n,o,s,a,l){let c=0,d=0,h=0,u=0,g=0,p=0;e--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[] ;const m=t-e+(o-n),v=m+1,f=new Int32Array(v),S=new Int32Array(v),b=o-n,_=t-e,C=e-n,y=t-o,w=(_-b)%2==0;f[b]=e,S[_]=t,l[0]=!1;for(let E=1;E<=m/2+1;E++){let m=0,I=0;h=this.ClipDiagonalBound(b-E,E,b,v),u=this.ClipDiagonalBound(b+E,E,b,v);for(let e=h;e<=u;e+=2){d=(c=e===h||em+I&&(m=c,I=d),!w&&Math.abs(e-_)<=E-1&&c>=S[e])return s[0]=c,a[0]=d,i<=S[e]&&E<=1448?this.WALKTRACE(b,h,u,C,_,g,p,y,f,S,c,t,s,d,o,a,w,l):null}const x=(m-e+(I-n)-E)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,x))return l[0]=!0,s[0]=m,a[0]=I,x>0&&E<=1448?this.WALKTRACE(b,h,u,C,_,g,p,y,f,S,c,t,s,d,o,a,w,l):(e++,n++,[new i.DiffChange(e,t-e+1,n,o-n+1)]);g=this.ClipDiagonalBound(_-E,E,_,v),p=this.ClipDiagonalBound(_+E,E,_,v);for(let i=g;i<=p;i+=2){d=(c=i===g||i=S[i+1]?S[i+1]-1:S[i-1])-(i-_)-y;const r=c;for(;c>e&&d>n&&this.ElementsAreEqual(c,d);)c--,d--;if(S[i]=c, w&&Math.abs(i-b)<=E&&c<=f[i])return s[0]=c,a[0]=d,r>=f[i]&&E<=1448?this.WALKTRACE(b,h,u,C,_,g,p,y,f,S,c,t,s,d,o,a,w,l):null}if(E<=1447){let e=new Int32Array(u-h+2);e[0]=b-h+1,r.Copy2(f,h,e,1,u-h+1),this.m_forwardHistory.push(e),(e=new Int32Array(p-g+2))[0]=_-g+1,r.Copy2(S,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,h,u,C,_,g,p,y,f,S,c,t,s,d,o,a,w,l)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];i.originalLength>0&&(n=i.originalStart+i.originalLength),i.modifiedLength>0&&(o=i.modifiedStart+i.modifiedLength)}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a}return e}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1} _ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return r.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],r.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return r.Copy(e,0,i,0,e.length),r.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,n){if(s.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"), s.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i.DiffChange(o,s,r,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e0?t[0].toUpperCase()+t.substr(1):t}return t}function o(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function s(e,t,i){const o=t.split(i),s=e[0].split(i);let r="";return o.forEach((e,t)=>{r+=n([s[t]],e)+i}),r.slice(0,-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.buildReplaceStringWithCasePreserved=void 0,t.buildReplaceStringWithCasePreserved=n})),define(e[97],t([0,1,24]),(function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",n="warning",o="warn",s="info";e.fromValue=function(r){ return r?i.equalsIgnoreCase(t,r)?e.Error:i.equalsIgnoreCase(n,r)||i.equalsIgnoreCase(o,r)?e.Warning:i.equalsIgnoreCase(s,r)?e.Info:e.Ignore:e.Ignore}}(n||(n={})),t.default=n})),define(e[13],t([0,1]),(function(e,t){"use strict";function i(e){return"string"==typeof e}function n(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return void 0===e}function s(e){return o(e)||null===e}Object.defineProperty(t,"__esModule",{value:!0}),t.NotImplementedProxy=t.withUndefinedAsNull=t.withNullAsUndefined=t.createProxyObject=t.getAllMethodNames=t.getAllPropertyNames=t.validateConstraint=t.validateConstraints=t.areFunctions=t.isFunction=t.isEmptyObject=t.assertAllDefined=t.assertIsDefined=t.assertType=t.isUndefinedOrNull=t.isDefined=t.isUndefined=t.isBoolean=t.isNumber=t.isObject=t.isStringArray=t.isString=t.isArray=void 0,t.isArray=function(e){return Array.isArray(e)},t.isString=i,t.isStringArray=function(e){return Array.isArray(e)&&e.every(e=>i(e))}, t.isObject=n,t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isDefined=function(e){return!s(e)},t.isUndefinedOrNull=s,t.assertType=function(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")},t.assertIsDefined=function(e){if(s(e))throw new Error("Assertion Failed: argument is undefined or null");return e},t.assertAllDefined=function(...e){const t=[];for(let i=0;i0&&e.every(a)},t.validateConstraints=function(e,t){const i=Math.min(e.length,t.length);for(let n=0;n(function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)});let n={};for(const t of e)n[t]=i(t);return n},t.withNullAsUndefined=function(e){return null===e?void 0:e},t.withUndefinedAsNull=function(e){ return void 0===e?null:e},t.NotImplementedProxy=function(e){return class{constructor(){return new Proxy({},{get(t,i){if(t[i])return t[i];throw new Error(`Not Implemented: ${e}->${String(i)}`)}})}}}})),define(e[136],t([0,1,12,24,48,13]),(function(e,t,i,n,o,s){"use strict";function r(e){return 47===e||92===e}Object.defineProperty(t,"__esModule",{value:!0}),t.parseLineAndColumnAware=t.indexOfPath=t.isRootOrDriveLetter=t.sanitizeFilePath=t.isWindowsDriveLetter=t.isEqualOrParent=t.isEqual=t.isValidBasename=t.isUNC=t.getRoot=t.toSlashes=t.isPathSeparator=void 0,t.isPathSeparator=r,t.toSlashes=function(e){return e.replace(/[\\/]/g,o.posix.sep)},t.getRoot=function(e,t=o.posix.sep){if(!e)return"";const i=e.length,n=e.charCodeAt(0);if(r(n)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const o=n;for(;n\|]/g,l=/[\\/]/g,c=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function d(e){return e>=65&&e<=90||e>=97&&e<=122}t.isValidBasename=function(e,t=i.isWindows){const n=t?a:l;return!(!e||0===e.length||/^\s+$/.test(e))&&(n.lastIndex=0,!n.test(e)&&((!t||!c.test(e))&&("."!==e&&".."!==e&&((!t||"."!==e[e.length-1])&&((!t||e.length===e.trim().length)&&!(e.length>255))))))},t.isEqual=function(e,t,i){const o=e===t;return!i||o?o:!(!e||!t)&&n.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,t,i,s=o.sep){if(e===t)return!0 ;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!n.startsWithIgnoreCase(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)},t.isWindowsDriveLetter=d,t.sanitizeFilePath=function(e,t){return i.isWindows&&e.endsWith(":")&&(e+=o.sep),o.isAbsolute(e)||(e=o.join(t,e)),e=o.normalize(e),i.isWindows?(e=n.rtrim(e,o.sep)).endsWith(":")&&(e+=o.sep):(e=n.rtrim(e,o.sep))||(e=o.sep),e},t.isRootOrDriveLetter=function(e){const t=o.normalize(e);return i.isWindows?!(e.length>3)&&(d(t.charCodeAt(0))&&58===t.charCodeAt(1)&&(2===e.length||92===t.charCodeAt(2))):t===o.posix.sep},t.indexOfPath=function(e,t,i){return t.length>e.length?-1:e===t?0:(i&&(e=e.toLowerCase(),t=t.toLowerCase()),e.indexOf(t))},t.parseLineAndColumnAware=function(e){const t=e.split(":");let i=void 0,n=void 0,o=void 0;if(t.forEach(e=>{const t=Number(e);s.isNumber(t)?void 0===n?n=t:void 0===o&&(o=t):i=i?[i,e].join(":"):e}), !i)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:i,line:void 0!==n?n:void 0,column:void 0!==o?o:void 0!==n?1:void 0}}})),define(e[41],t([0,1,13]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=t.getOrDefault=t.safeStringify=t.equals=t.mixin=t.cloneAndChange=t.deepFreeze=t.deepClone=void 0,t.deepClone=function e(t){if(!t||"object"!=typeof t)return t;if(t instanceof RegExp)return t;const i=Array.isArray(t)?[]:{};return Object.keys(t).forEach(n=>{t[n]&&"object"==typeof t[n]?i[n]=e(t[n]):i[n]=t[n]}),i},t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(n.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e};const n=Object.prototype.hasOwnProperty;function o(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1 ;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i{s in t?o&&(i.isObject(t[s])&&i.isObject(n[s])?e(t[s],n[s],o):t[s]=n[s]):t[s]=n[s]}),t):n},t.equals=o,t.safeStringify=function(e){const t=new Set;return JSON.stringify(e,(e,n)=>{ if(i.isObject(n)||Array.isArray(n)){if(t.has(n))return"[Circular]";t.add(n)}return n})},t.getOrDefault=function(e,t,i){const n=t(e);return void 0===n?i:n},t.distinct=function(e,t){const i=Object.create(null);return e&&t?(Object.keys(t).forEach(n=>{const s=e[n],r=t[n];o(s,r)||(i[n]=r)}),i):i}})),define(e[505],t([0,1,13,31,21,14]),(function(e,t,i,n,o,s){"use strict";function r(e){return{isResolved:!!e,promise:null,cts:null,promiseIndexes:new Set,elements:e||[]}}function a(e){return{firstPage:e,total:e.length,pageSize:e.length,getPage:(t,i)=>Promise.resolve(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.mergePagers=t.mapPager=t.DelayedPagedModel=t.PagedModel=t.singlePagePager=void 0,t.singlePagePager=a;t.PagedModel=class{constructor(e){this.pages=[],this.pager=i.isArray(e)?a(e):e;const t=Math.ceil(this.pager.total/this.pager.pageSize);this.pages=[r(this.pager.firstPage.slice()),...s.range(t-1).map(()=>r())]}get length(){return this.pager.total}isResolved(e){const t=Math.floor(e/this.pager.pageSize) ;return!!this.pages[t].isResolved}get(e){const t=Math.floor(e/this.pager.pageSize),i=e%this.pager.pageSize;return this.pages[t].elements[i]}resolve(e,t){if(t.isCancellationRequested)return Promise.reject(o.canceled());const i=Math.floor(e/this.pager.pageSize),s=e%this.pager.pageSize,r=this.pages[i];return r.isResolved?Promise.resolve(r.elements[s]):(r.promise||(r.cts=new n.CancellationTokenSource,r.promise=this.pager.getPage(i,r.cts.token).then(e=>{r.elements=e,r.isResolved=!0,r.promise=null,r.cts=null},e=>(r.isResolved=!1,r.promise=null,r.cts=null,Promise.reject(e)))),t.onCancellationRequested(()=>{r.cts&&(r.promiseIndexes.delete(e),0===r.promiseIndexes.size&&r.cts.cancel())}),r.promiseIndexes.add(e),r.promise.then(()=>r.elements[s]))}};t.DelayedPagedModel=class{constructor(e,t=500){this.model=e,this.timeout=t}get length(){return this.model.length}isResolved(e){return this.model.isResolved(e)}get(e){return this.model.get(e)}resolve(e,t){return new Promise((i,n)=>{ if(t.isCancellationRequested)return n(o.canceled());const s=setTimeout(()=>{if(t.isCancellationRequested)return n(o.canceled());r.dispose(),this.model.resolve(e,t).then(i,n)},this.timeout),r=t.onCancellationRequested(()=>{clearTimeout(s),r.dispose(),n(o.canceled())})})}},t.mapPager=function(e,t){return{firstPage:e.firstPage.map(t),total:e.total,pageSize:e.pageSize,getPage:(i,n)=>e.getPage(i,n).then(e=>e.map(t))}},t.mergePagers=function(e,t){return{firstPage:[...e.firstPage,...t.firstPage],total:e.total+t.total,pageSize:e.pageSize+t.pageSize,getPage:(i,n)=>Promise.all([e.getPage(i,n),t.getPage(i,n)]).then(([e,t])=>[...e,...t])}}})),define(e[341],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUint32=t.toUint8=t.Constants=void 0,function(e){e[e.MAX_SAFE_SMALL_INTEGER=1073741824]="MAX_SAFE_SMALL_INTEGER",e[e.MIN_SAFE_SMALL_INTEGER=-1073741824]="MIN_SAFE_SMALL_INTEGER",e[e.MAX_UINT_8=255]="MAX_UINT_8",e[e.MAX_UINT_16=65535]="MAX_UINT_16", e[e.MAX_UINT_32=4294967295]="MAX_UINT_32",e[e.UNICODE_SUPPLEMENTARY_PLANE_BEGIN=65536]="UNICODE_SUPPLEMENTARY_PLANE_BEGIN"}(t.Constants||(t.Constants={})),t.toUint8=function(e){return e<0?0:e>255?255:0|e},t.toUint32=function(e){return e<0?0:e>4294967295?4294967295:0|e}})),define(e[10],t([0,1,12,48]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const o=/^\w[\w\d+.-]*$/,s=/^\//,r=/^\/\//;const a="",l="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(e,t,i,n,c,d=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,d),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,i||a),this.query=n||a,this.fragment=c||a,function(e,t){ if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(r.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,d))}static isUri(e){return e instanceof d||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}get fsPath(){return v(this,!1)}with(e){if(!e)return this ;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===i?i=this.authority:null===i&&(i=a),void 0===n?n=this.path:null===n&&(n=a),void 0===o?o=this.query:null===o&&(o=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new u(t,i,n,o,s)}static parse(e,t=!1){const i=c.exec(e);return i?new u(i[2]||a,b(i[4]||a),b(i[5]||a),b(i[7]||a),b(i[9]||a),t):new u(a,a,a,a,a)}static file(e){let t=a;if(i.isWindows&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){const i=e.indexOf(l,2);-1===i?(t=e.substring(2),e=l):(t=e.substring(2,i),e=e.substring(i)||l)}return new u("file",t,e,a,a)}static from(e){return new u(e.scheme,e.authority,e.path,e.query,e.fragment)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPaths on URI without path");let o;return o=i.isWindows&&"file"===e.scheme?d.file(n.win32.join(v(e,!0),...t)).path:n.posix.join(e.path,...t),e.with({path:o})} toString(e=!1){return f(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}t.URI=d;const h=i.isWindows?1:void 0;class u extends d{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={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 p(e,t){ let i=void 0,n=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=g[s];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function m(e){let t=void 0;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.isWindows&&(n=n.replace(/\//g,"\\")),n}function f(e,t){ const i=t?m:p;let n="",{scheme:o,authority:s,path:r,query:a,fragment:c}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=l,n+=l),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),-1===(e=t.indexOf(":"))?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}-1===(e=(s=s.toLowerCase()).indexOf(":"))?n+=i(s,!1):(n+=i(s.substr(0,e),!1),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0)}return a&&(n+="?",n+=i(a,!1)),c&&(n+="#",n+=t?c:p(c,!1)),n}t.uriToFsPath=v;const S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(S)?e.replace(S,e=>(function e(t){try{return decodeURIComponent(t)}catch(i){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}})(e)):e}})),define(e[506],t([0,1,10]),(function(e,t,i){"use strict" ;function n(e,t){return i.URI.parse(e.toUrl(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.getUriFromAmdModule=t.getPathFromAmdModule=void 0,t.getPathFromAmdModule=function(e,t){return n(e,t).fsPath},t.getUriFromAmdModule=n})),define(e[394],t([0,1,10]),(function(e,t,i){"use strict";function n(e){const t=[];let i;try{const n=JSON.parse(e.arguments),o=n[n.length-1];o&&o.__$stack&&(n.pop(),i=o.__$stack),t.push(...n)}catch(i){t.push("Unable to log remote console arguments",e.arguments)}return{args:t,stack:i}}function o(e){if(!e)return e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function s(e){return`color: ${e}`}Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.getFirstFrame=t.parse=t.isRemoteConsoleLog=void 0,t.isRemoteConsoleLog=function(e){const t=e;return t&&"string"==typeof t.type&&"string"==typeof t.severity},t.parse=n,t.getFirstFrame=function e(t){if("string"!=typeof t)return e(n(t).stack);if(t){ const e=o(t),n=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(e||"");if(n&&4===n.length)return{uri:i.URI.file(n[1]),line:Number(n[2]),column:Number(n[3])}}},t.log=function(e,t){const{args:i,stack:r}=n(e),a="string"==typeof i[0]&&1===i.length;let l=o(r);l&&(l=`(${l.trim()})`);let c=[];if(c="string"==typeof i[0]?l&&a?[`%c[${t}] %c${i[0]} %c${l}`,s("blue"),s(""),s("grey")]:[`%c[${t}] %c${i[0]}`,s("blue"),s(""),...i.slice(1)]:[`%c[${t}]%`,s("blue"),...i],l&&!a&&c.push(l),"function"!=typeof console[e.severity])throw new Error("Unknown console method");console[e.severity].apply(console,c)}})),define(e[196],t([0,1,66,24,10]),(function(e,t,i,n,o){"use strict";function s(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:n.regExpFlags(t)}:t}function r(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.URI.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof i.VSBuffer||e instanceof Uint8Array)return e ;if(Array.isArray(e))for(let i=0;it.split(" ").forEach(t=>this.addClass(e,t)))}addClass(e,t){t&&e.classList&&e.classList.add(t)}removeClass(e,t){t&&e.classList&&e.classList.remove(t)}removeClasses(e,...t){t.forEach(t=>t.split(" ").forEach(t=>this.removeClass(e,t)))}toggleClass(e,t,i){e.classList&&e.classList.toggle(t,i)}};t.hasClass=function(e,t){return p.hasClass(e,t)},t.addClass=function(e,t){return p.addClass(e,t)},t.addClasses=function(e,...t){return p.addClasses(e,...t)},t.removeClass=function(e,t){return p.removeClass(e,t)},t.removeClasses=function(e,...t){return p.removeClasses(e,...t)},t.toggleClass=function(e,t,i){return p.toggleClass(e,t,i)};class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!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 v(e,t,i,n){return new m(e,t,i,n)}function f(e){return function(t){return e(new s.StandardMouseEvent(t))}}t.addDisposableListener=v;t.addStandardDisposableListener=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t?s=f(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=function(e){return function(t){return e(new o.StandardKeyboardEvent(t))}}(i)),v(e,t,s,n)};t.addStandardDisposableGenericMouseDownListner=function(e,t,i){return S(e,f(t),i)};function S(e,i,n){return v(e,d.isIOS&&g.BrowserFeatures.pointerEvents?t.EventType.POINTER_DOWN:t.EventType.MOUSE_DOWN,i,n)}function b(e,i,n){return v(e,d.isIOS&&g.BrowserFeatures.pointerEvents?t.EventType.POINTER_UP:t.EventType.MOUSE_UP,i,n)}t.addStandardDisposableGenericMouseUpListner=function(e,t,i){return b(e,f(t),i)}, t.addDisposableGenericMouseDownListner=S,t.addDisposableGenericMouseMoveListner=function(e,i,n){return v(e,d.isIOS&&g.BrowserFeatures.pointerEvents?t.EventType.POINTER_MOVE:t.EventType.MOUSE_MOVE,i,n)},t.addDisposableGenericMouseUpListner=b,t.addDisposableNonBubblingMouseOutListener=function(e,t){return v(e,"mouseout",i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)})},t.addDisposableNonBubblingPointerOutListener=function(e,t){return v(e,"pointerout",i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)})};let _=null;class C{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){a.onUnexpectedError(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],i=null,n=!1,o=!1,s=()=>{for(n=!1,i=e,e=[],o=!0;i.length>0;){i.sort(C.sort),i.shift().execute()}o=!1};t.scheduleAtNextAnimationFrame=(t,i=0)=>{let o=new C(t,i);return e.push(o),n||(n=!0,function(e){if(!_){ const e=e=>setTimeout(()=>e((new Date).getTime()),0);_=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}_.call(self,e)}(s)),o},t.runAtThisOrScheduleAtNextAnimationFrame=(e,n)=>{if(o){let t=new C(e,n);return i.push(t),t}return t.scheduleAtNextAnimationFrame(e,n)}}(),t.measure=function(e){return t.scheduleAtNextAnimationFrame(e,1e4)},t.modify=function(e){return t.scheduleAtNextAnimationFrame(e,-1e4)};const y=16,w=function(e,t){return t};class E extends c.Disposable{constructor(e,t,i,n=w,o=y){super();let s=null,a=0,l=this._register(new r.TimeoutTimer),c=()=>{a=(new Date).getTime(),i(s),s=null};this._register(v(e,t,e=>{s=n(s,e);let t=(new Date).getTime()-a;t>=o?(l.cancel(),c()):l.setIfNotSet(c,o-t)}))}}function I(e){return document.defaultView.getComputedStyle(e,null)}t.addDisposableThrottledListener=function(e,t,i,n,o){return new E(e,t,i,n,o)},t.getComputedStyle=I,t.getClientArea=function(e){ if(e!==document.body)return new k(e.clientWidth,e.clientHeight);if(d.isIOS&&window.visualViewport){const e=window.visualViewport.width,t=window.visualViewport.height-(i.isStandalone?24:0);return new k(e,t)}if(window.innerWidth&&window.innerHeight)return new k(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new k(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new k(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")};class x{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=I(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),x.convertToPixels(e,o)}static getBorderLeftWidth(e){return x.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){ return x.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return x.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return x.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return x.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return x.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return x.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return x.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return x.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return x.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return x.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return x.getDimension(e,"margin-bottom","marginBottom")}}class k{constructor(e,t){this.width=e,this.height=t}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}} function D(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=L(e)?null:I(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=x.getBorderLeftWidth(e),i+=x.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function T(e){let t=x.getMarginLeft(e)+x.getMarginRight(e);return e.offsetWidth+t}function R(e){let t=x.getMarginLeft(e)+x.getMarginRight(e);return e.scrollWidth+t}function A(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function M(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function L(e){return e&&!!e.host&&!!e.mode}function O(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return L(e)?e:null}function N(e=document.getElementsByTagName("head")[0]){ let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}t.Dimension=k,t.getTopLeftOffset=D,t.size=function(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)},t.position=function(e,t,i,n,o,s="absolute"){"number"==typeof t&&(e.style.top=`${t}px`),"number"==typeof i&&(e.style.right=`${i}px`),"number"==typeof n&&(e.style.bottom=`${n}px`),"number"==typeof o&&(e.style.left=`${o}px`),e.style.position=s},t.getDomNodePagePosition=function(e){let i=e.getBoundingClientRect();return{left:i.left+t.StandardWindow.scrollX,top:i.top+t.StandardWindow.scrollY,width:i.width,height:i.height}},t.StandardWindow=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}},t.getTotalWidth=T,t.getContentWidth=function(e){ let t=x.getBorderLeftWidth(e)+x.getBorderRightWidth(e),i=x.getPaddingLeft(e)+x.getPaddingRight(e);return e.offsetWidth-t-i},t.getTotalScrollWidth=R,t.getContentHeight=function(e){let t=x.getBorderTopWidth(e)+x.getBorderBottomWidth(e),i=x.getPaddingTop(e)+x.getPaddingBottom(e);return e.offsetHeight-t-i},t.getTotalHeight=function(e){let t=x.getMarginTop(e)+x.getMarginBottom(e);return e.offsetHeight+t},t.getLargestChildWidth=function(e,t){let i=t.map(t=>Math.max(R(t),T(t))+function(e,t){if(null===e)return 0;let i=D(e),n=D(t);return i.left-n.left}(t,e)||0);return Math.max(...i)},t.isAncestor=A,t.findParentWithClass=M,t.hasParentWithClass=function(e,t,i){return!!M(e,t,i)},t.isShadowRoot=L,t.isInShadowDOM=function(e){return!!O(e)},t.getShadowRoot=O,t.getActiveElement=function(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e},t.createStyleSheet=N,t.createMetaElement=function(e=document.getElementsByTagName("head")[0]){let t=document.createElement("meta") ;return e.appendChild(t),t};let P=null;function F(){return P||(P=N()),P}t.createCSSRule=function(e,t,i=F()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)},t.removeCSSRulesContainingSelector=function(e,t=F()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t=0;e--)t.sheet.deleteRule(n[e])},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:i.isEdge?"mousewheel":"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown", POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:i.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:i.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:i.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=function(e){let t=[] ;for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t},t.restoreParentsScrollTop=function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode};class B extends c.Disposable{constructor(e){super(),this._onDidFocus=this._register(new l.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new l.Emitter),this.onDidBlur=this._onDidBlur.event;let i=A(document.activeElement,e),o=!1;const s=()=>{o=!1,i||(i=!0,this._onDidFocus.fire())},r=()=>{i&&(o=!0,window.setTimeout(()=>{o&&(o=!1,i=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{A(document.activeElement,e)!==i&&(i?r():s())},this._register(n.domEvent(e,t.EventType.FOCUS,!0)(s)),this._register(n.domEvent(e,t.EventType.BLUR,!0)(r))}refreshState(){this._refreshStateHandler()}}t.trackFocus=function(e){return new B(e)},t.after=function(e,t){return e.after(t),t},t.append=function(e,...t){return t.forEach(t=>e.appendChild(t)),t[t.length-1]}, t.prepend=function(e,t){return e.insertBefore(t,e.firstChild),t},t.reset=function(e,...t){e.innerText="";for(const i of t)i instanceof Node?e.appendChild(i):"string"==typeof i&&e.appendChild(document.createTextNode(i))};const V=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var W,z;function U(e,t,i,...n){let o=V.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let s,r=o[1]||"div";s=e!==W.HTML?document.createElementNS(e,r):document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach(e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?s[e]=t:"selected"===e?t&&s.setAttribute(e,"true"):s.setAttribute(e,t))});for(const e of n)e instanceof Node?s.appendChild(e):"string"==typeof e&&s.appendChild(document.createTextNode(e));return s}function K(e,t,...i){return U(W.HTML,e,t,...i)}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(W=t.Namespace||(t.Namespace={})),t.$=K,K.SVG=function(e,t,...i){ return U(W.SVG,e,t,...i)},t.join=function(e,t){const i=[];return e.forEach((e,n)=>{n>0&&(t instanceof Node?i.push(t.cloneNode()):i.push(document.createTextNode(t))),i.push(e)}),i},t.show=function(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")},t.hide=function(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")},t.removeTabIndexAndUpdateFocus=function(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){let t=function(e,t){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}},t.getElementsByTagName=function(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)},t.finalHandler=function(e){return t=>{t.preventDefault(),t.stopPropagation(),e(t)}},t.domContentLoaded=function(){return new Promise(e=>{ "complete"===document.readyState||document&&null!==document.body?d.setImmediate(e):window.addEventListener("DOMContentLoaded",e,!1)})},t.computeScreenAwareSize=function(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio},t.windowOpenNoOpener=function(e){if(d.isNative||i.isEdgeWebView)window.open(e);else{let t=window.open();t&&(t.opener=null,t.location.href=e)}},t.animate=function(e){const i=()=>{e(),n=t.scheduleAtNextAnimationFrame(i)};let n=t.scheduleAtNextAnimationFrame(i);return c.toDisposable(()=>n.dispose())},u.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http"),t.asCSSUrl=function(e){return e?`url('${u.FileAccess.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"},t.triggerDownload=function(e,t){let i;if(h.URI.isUri(e))i=e.toString(!0);else{const t=new Blob([e]);i=URL.createObjectURL(t),setTimeout(()=>URL.revokeObjectURL(i))}const n=document.createElement("a");document.body.appendChild(n),n.download=t, n.href=i,n.click(),setTimeout(()=>document.body.removeChild(n))},function(e){e[e.DOCUMENT=1]="DOCUMENT",e[e.BROWSER=2]="BROWSER"}(z=t.DetectedFullscreenMode||(t.DetectedFullscreenMode={})),t.detectFullscreen=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.webkitIsFullScreen?{mode:z.DOCUMENT,guess:!1}:window.innerHeight===screen.height?{mode:z.BROWSER,guess:!1}:(d.isMacintosh||d.isLinux)&&window.outerHeight===screen.height&&window.outerWidth===screen.width?{mode:z.BROWSER,guess:!0}:null}})),define(e[183],t([0,1,7]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderCodicons=void 0;const n=/(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi;t.renderCodicons=function(e){const t=new Array;let o,s=0,r=0;for(;null!==(o=n.exec(e));){r=o.index||0,t.push(e.substring(s,r)),s=(o.index||0)+o[0].length;const[,n,a,l,c]=o;t.push(n?`$(${a})`:i.$(`span.codicon.codicon-${l}${c?`.codicon-animation-${c}`:""}`))}return s{e.preventDefault(),this.timeout||(this.timeout=setTimeout(()=>{t(),this.timeout=null},800))})),["dragleave","drop","dragend"].forEach(t=>{this._register(n.addDisposableListener(e,t,()=>{this.clearDragTimeout()}))})}clearDragTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){super.dispose(),this.clearDragTimeout()}}t.DelayedDragHandler=o,t.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"},t.applyDragImage=function(e,t,i){const n=document.createElement("div");n.className=i,n.textContent=t,e.dataTransfer&&(document.body.appendChild(n),e.dataTransfer.setDragImage(n,-10,-10),setTimeout(()=>document.body.removeChild(n),0))} ;t.DragAndDropData=class{constructor(e){this.data=e}update(){}getData(){return this.data}},t.StaticDND={CurrentDragAndDropData:void 0}})),define(e[395],t([0,1,7]),(function(e,t,i){"use strict";function n(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=t.renderFormattedText=t.renderText=void 0,t.renderText=function(e,t={}){const i=n(t);return i.textContent=e,i},t.renderFormattedText=function(e,t={}){const s=n(t);return function e(t,n,o){let s;if(2===n.type)s=document.createTextNode(n.content||"");else if(3===n.type)s=document.createElement("b");else if(4===n.type)s=document.createElement("i");else if(5===n.type&&o){const e=document.createElement("a");e.href="#",o.disposeables.add(i.addStandardDisposableListener(e,"click",e=>{o.callback(String(n.index),e)})),s=e}else 7===n.type?s=document.createElement("br"):1===n.type&&(s=t);s&&t!==s&&t.appendChild(s) ;s&&Array.isArray(n.children)&&n.children.forEach(t=>{e(s,t,o)})}(s,function(e){const t={type:1,children:[]};let i=0,n=t;const s=[],a=new o(e);for(;!a.eos();){let e=a.next();const t="\\"===e&&0!==r(a.peek());if(t&&(e=a.next()),t||0===r(e)||e!==a.peek())if("\n"===e)2===n.type&&(n=s.pop()),n.children.push({type:7});else if(2!==n.type){const t={type:2,content:e};n.children.push(t),s.push(n),n=t}else n.content+=e;else{a.advance(),2===n.type&&(n=s.pop());const t=r(e);if(n.type===t||5===n.type&&6===t)n=s.pop();else{const e={type:t,children:[]};5===t&&(e.index=i,i++),n.children.push(e),s.push(n),n=e}}}2===n.type&&(n=s.pop());s.length;return t}(e),t.actionHandler),s},t.createElement=n;class o{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}var s;function r(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}!function(e){ e[e.Invalid=0]="Invalid",e[e.Root=1]="Root",e[e.Text=2]="Text",e[e.Bold=3]="Bold",e[e.Italics=4]="Italics",e[e.Action=5]="Action",e[e.ActionClose=6]="ActionClose",e[e.NewLine=7]="NewLine"}(s||(s={}))})),define(e[255],t([0,1,7,12,499,101,2,165]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalMouseMoveMonitor=t.standardMouseMoveMerger=void 0,t.standardMouseMoveMerger=function(e,t){let i=new s.StandardMouseEvent(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}};t.GlobalMouseMoveMonitor=class{constructor(){this._hooks=new r.DisposableStore,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const t=this._onStopCallback;this._onStopCallback=null,e&&t&&t()}isMonitoring(){ return!!this._mouseMoveEventMerger}startMonitoring(e,t,r,l,c){if(this.isMonitoring())return;this._mouseMoveEventMerger=r,this._mouseMoveCallback=l,this._onStopCallback=c;const d=o.IframeUtils.getSameOriginWindowChain(),h=n.isIOS&&a.BrowserFeatures.pointerEvents?"pointermove":"mousemove",u=n.isIOS&&a.BrowserFeatures.pointerEvents?"pointerup":"mouseup",g=d.map(e=>e.window.document),p=i.getShadowRoot(e);p&&g.unshift(p);for(const e of g)this._hooks.add(i.addDisposableThrottledListener(e,h,e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)},(e,t)=>this._mouseMoveEventMerger(e,t))),this._hooks.add(i.addDisposableListener(e,u,e=>this.stopMonitoring(!0)));if(o.IframeUtils.hasDifferentOriginAncestor()){let e=d[d.length-1];this._hooks.add(i.addDisposableListener(e.window.document,"mouseout",e=>{"html"===new s.StandardMouseEvent(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(i.addDisposableListener(e.window.document,"mouseover",e=>{ "html"===new s.StandardMouseEvent(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(i.addDisposableListener(e.window.document.body,"mouseleave",e=>{this.stopMonitoring(!0)}))}}}})),define(e[128],t([0,1,14,2,7,95]),(function(e,t,i,n,s,r){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.Gesture=t.EventType=void 0,function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(a=t.EventType||(t.EventType={}));class l extends n.Disposable{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(s.addDisposableListener(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(s.addDisposableListener(document,"touchend",e=>this.onTouchEnd(e))),this._register(s.addDisposableListener(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))} static addTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.targets.push(e),{dispose:()=>{l.INSTANCE.targets=l.INSTANCE.targets.filter(t=>t!==e)}}):n.Disposable.None}static ignoreTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.ignoreTargets.push(e),{dispose:()=>{l.INSTANCE.ignoreTargets=l.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):n.Disposable.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=l.HOLD_DELAY&&Math.abs(r.initialPageX-i.tail(r.rollingPageX))<30&&Math.abs(r.initialPageY-i.tail(r.rollingPageY))<30){let e=this.newGestureEvent(a.Contextmenu,r.initialTarget);e.pageX=i.tail(r.rollingPageX),e.pageY=i.tail(r.rollingPageY),this.dispatchEvent(e)}else if(1===n){ let e=i.tail(r.rollingPageX),n=i.tail(r.rollingPageY),o=i.tail(r.rollingTimestamps)-r.rollingTimestamps[0],s=e-r.rollingPageX[0],a=n-r.rollingPageY[0];const l=this.targets.filter(e=>r.initialTarget instanceof Node&&e.contains(r.initialTarget));this.inertia(l,t,Math.abs(s)/o,s>0?1:-1,e,Math.abs(a)/o,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(a.End,r.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===a.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==a.Change&&e.type!==a.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,i,n,o,r,c,d){this.handle=s.scheduleAtNextAnimationFrame(()=>{let s=Date.now(),h=s-t,u=0,g=0,p=!0;i+=l.SCROLL_FRICTION*h,r+=l.SCROLL_FRICTION*h,i>0&&(p=!1,u=n*i*h),r>0&&(p=!1,g=c*r*h);let m=this.newGestureEvent(a.Change);m.translationX=u,m.translationY=g,e.forEach(e=>e.dispatchEvent(m)),p||this.inertia(e,s,i,n,o+u,r,c,d+g)})}onTouchMove(e){let t=Date.now();for(let n=0,o=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(), s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}l.SCROLL_FRICTION=-.005,l.HOLD_DELAY=700,l.CLEAR_TAP_COUNT_TIME=400,o([r.memoize],l,"isTouchDevice",null),t.Gesture=l})),define(e[396],t([0,1,7,183]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodiconLabel=void 0;t.CodiconLabel=class{constructor(e){this._container=e}set text(e){i.reset(this._container,...n.renderCodicons(null!=e?e:""))}set title(e){this._container.title=e}}})),define(e[173],t([0,1,41,7,183]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HighlightedLabel=void 0;class s{constructor(e,t){this.supportCodicons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){ return this.domNode}set(e,t=[],n="",o){e||(e=""),o&&(e=s.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===n&&i.equals(this.highlights,t)||(this.text=e,this.title=n,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i ;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"})}}t.HighlightedLabel=s})),define(e[729],t([0,1,7]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowCache=void 0;t.RowCache=class{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const n=i.$(".monaco-list-row");t={domNode:n,templateId:e,templateData:this.getRenderer(e).renderTemplate(n)}}return t}release(e){e&&this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),function(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(e){}}(t)),this.getTemplateCache(i).push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e){this.getRenderer(t).disposeTemplate(i.templateData),i.domNode=null,i.templateData=null}}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e) ;if(!t)throw new Error(`No renderer found for ${e}`);return t}}})),define(e[730],t([0,1,2,6,7,14,12,128]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectBoxNative=void 0;class l extends i.Disposable{constructor(e,t,i,o){super(),this.selected=0,this.selectBoxOptions=o||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),this._onDidSelect=this._register(new n.Emitter),this.styles=i,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(a.Gesture.addTarget(this.selectElement)),[a.EventType.Tap].forEach(e=>{this._register(o.addDisposableListener(this.selectElement,e,e=>{this.selectElement.focus()}))}),this._register(o.addStandardDisposableListener(this.selectElement,"click",e=>{o.EventHelper.stop(e,!0)})), this._register(o.addStandardDisposableListener(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(o.addStandardDisposableListener(this.selectElement,"keydown",e=>{let t=!1;r.isMacintosh?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&s.equals(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))})),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected, this.selectedt(new o.StandardMouseEvent(e))))}onmousedown(e,t){this._register(i.addDisposableListener(e,i.EventType.MOUSE_DOWN,e=>t(new o.StandardMouseEvent(e))))}onmouseover(e,t){this._register(i.addDisposableListener(e,i.EventType.MOUSE_OVER,e=>t(new o.StandardMouseEvent(e))))}onnonbubblingmouseout(e,t){this._register(i.addDisposableNonBubblingMouseOutListener(e,e=>t(new o.StandardMouseEvent(e))))}onkeydown(e,t){this._register(i.addDisposableListener(e,i.EventType.KEY_DOWN,e=>t(new n.StandardKeyboardEvent(e))))}onkeyup(e,t){this._register(i.addDisposableListener(e,i.EventType.KEY_UP,e=>t(new n.StandardKeyboardEvent(e))))}oninput(e,t){this._register(i.addDisposableListener(e,i.EventType.INPUT,t))}onblur(e,t){ this._register(i.addDisposableListener(e,i.EventType.BLUR,t))}onfocus(e,t){this._register(i.addDisposableListener(e,i.EventType.FOCUS,t))}onchange(e,t){this._register(i.addDisposableListener(e,i.EventType.CHANGE,t))}ignoreGesture(e){r.Gesture.ignoreTarget(e)}}t.Widget=a})),define(e[397],t([0,1,255,102,15,7]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarArrow=t.ARROW_IMG_SIZE=void 0,t.ARROW_IMG_SIZE=11;class r extends n.Widget{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"), this.domNode.className=e.className,s.addClasses(this.domNode,e.icon.classNames),this.domNode.style.position="absolute",this.domNode.style.width=t.ARROW_IMG_SIZE+"px",this.domNode.style.height=t.ARROW_IMG_SIZE+"px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new i.GlobalMouseMoveMonitor),this.onmousedown(this.bgDomNode,e=>this._arrowMouseDown(e)),this.onmousedown(this.domNode,e=>this._arrowMouseDown(e)),this._mousedownRepeatTimer=this._register(new o.IntervalTimer),this._mousedownScheduleRepeatTimer=this._register(new o.TimeoutTimer)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)},200), this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,i.standardMouseMoveMerger,e=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}t.ScrollbarArrow=r})),define(e[507],t([0,1,7,109,255,397,723,102,12]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractScrollbar=void 0;const c=140;class d extends a.Widget{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new r.ScrollbarVisibilityController(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new o.GlobalMouseMoveMonitor),this._shouldRender=!0,this.domNode=n.createFastDomNode(document.createElement("div")), this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,e=>this._domNodeMouseDown(e))}_createArrow(e){let t=this._register(new s.ScrollbarArrow(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,o){this.slider=n.createFastDomNode(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof o&&this.slider.setHeight(o),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){ return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()), this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,n;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{const o=i.getDomNodePagePosition(this.domNode.domNode);t=e.posx-o.left,n=e.posy-o.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))} _sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,o.standardMouseMoveMerger,e=>{const t=this._sliderOrthogonalMousePosition(e),o=Math.abs(t-n);if(l.isWindows&&o>c)return void this._setDesiredScrollPositionNow(s.getScrollPosition());const r=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(r))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}}t.AbstractScrollbar=d})),define(e[67],t([0,1,10,24,29,12]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{ value:!0}),t.LRUCache=t.LinkedMap=t.Touch=t.ResourceMap=t.TernarySearchTree=t.UriIterator=t.PathIterator=t.StringIterator=t.setToString=t.mapToString=t.getOrSet=void 0,t.getOrSet=function(e,t,i){let n=e.get(t);return void 0===n&&(n=i,e.set(t,n)),n},t.mapToString=function(e){const t=[];return e.forEach((e,i)=>{t.push(`${i} => ${e}`)}),`Map(${e.size}) {${t.join(", ")}}`},t.setToString=function(e){const t=[];return e.forEach(e=>{t.push(e)}),`Set(${e.size}) {${t.join(", ")}}`};class r{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos0)n.left||(n.left=new d,n.left.segment=i.value()),n=n.left;else if(e<0)n.right||(n.right=new d,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new d,n.mid.segment=i.value()),n=n.mid}}const o=n.value;return n.value=t,n.key=e,o}get(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i?i.value:void 0}delete(e){const t=this._iter.reset(e),i=[];let n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)i.push([1,n]), n=n.left;else if(e<0)i.push([-1,n]),n=n.right;else{if(!t.hasNext()){for(n.value=void 0;i.length>0&&n.isEmpty();){let[e,t]=i.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}n=t}break}t.next(),i.push([0,n]),n=n.mid}}}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n=void 0;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),n=i.value||n,i=i.mid}}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._nodeIterator(i.mid):void 0;t.next(),i=i.mid}}}_nodeIterator(e){let t,i,n;return{next:()=>(n||(n=[],i=0,this._forEach(e,e=>n.push(e))),i>=n.length?{done:!0,value:void 0}:(t?t.value=n[i++]:t={done:!1,value:n[i++]},t))}}forEach(e){this._forEach(this._root,e)}_forEach(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))}} t.TernarySearchTree=h;class u{constructor(e,t){this[Symbol.toStringTag]="ResourceMap",e instanceof u?(this.map=new Map(e.map),this.toKey=null!=t?t:u.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:u.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,n]of this.map)e(n,i.URI.parse(t),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield i.URI.parse(e)}*entries(){for(let e of this.map.entries())yield[i.URI.parse(e[0]),e[1]]}*[Symbol.iterator](){for(let e of this.map)yield[i.URI.parse(e[0]),e[1]]}}t.ResourceMap=u,u.defaultToKey=e=>e.toString(),function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(t.Touch||(t.Touch={}));class g{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0, this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:default:this.addItemLast(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head ;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1} ;return i=i.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous ;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}t.LinkedMap=g;t.LRUCache=class extends g{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){ this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}})),define(e[87],t([0,1,67,24]),(function(e,t,i,n){"use strict";function o(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function r(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function a(e,t){return function e(t,i,n,o){if(n===t.length)return[];if(o===i.length)return null;if(t[n]===i[o]){let s=null;return(s=e(t,i,n+1,o+1))?m({start:o,end:o+1},s):null}return e(t,i,n,o+1)}(e.toLowerCase(),t.toLowerCase(),0,0)}function l(e){return 97<=e&&e<=122}function c(e){return 65<=e&&e<=90} function d(e){return 48<=e&&e<=57}function h(e){return 32===e||9===e||10===e||13===e}Object.defineProperty(t,"__esModule",{value:!0}),t.fuzzyScoreGraceful=t.fuzzyScoreGracefulAggressive=t.fuzzyScore=t.FuzzyScore=t.isPatternInWord=t.createMatches=t.anyScore=t.matchesFuzzy2=t.matchesFuzzy=t.matchesWords=t.matchesCamelCase=t.isUpper=t.matchesSubString=t.matchesContiguousSubString=t.matchesPrefix=t.matchesStrictPrefix=t.or=void 0,t.or=o,t.matchesStrictPrefix=s.bind(void 0,!1),t.matchesPrefix=s.bind(void 0,!0),t.matchesContiguousSubString=r,t.matchesSubString=a,t.isUpper=c;const u=new Set;function g(e){return h(e)||u.has(e)}function p(e){return l(e)||c(e)||d(e)}function m(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function v(e,t){for(let i=t;i0&&!p(e.charCodeAt(i-1)))return i}return e.length}function f(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{ let o=null,s=n+1;for(o=f(e,t,i+1,n+1);!o&&(s=v(t,s))60)return null;const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&g(e.charCodeAt(i-1)))return i;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(e=>u.add(e.charCodeAt(0))),t.matchesCamelCase=S,t.matchesWords=function(e,t,i=!1){if(!t||0===t.length)return null;let n=null,o=0;for(e=e.toLowerCase(),t=t.toLowerCase();o=0)l+=1,a+=2**i,c=i+1;else if(0!==a)break}return[l,a,s]},t.createMatches=E;const I=128;function x(){const e=[],t=[0];for(let e=1;e<=I;e++)t.push(-e);for(let i=0;i<=I;i++){const n=t.slice(0);n[0]=-i,e.push(n)}return e}const k=x(),D=x(),T=x(),R=!1;function A(e,t,i,n,o){function s(e,t,i=" "){for(;e.lengths(e,3)).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,o+1).map(e=>s(e.toString(),3)).join("|")+"\n";return r}function M(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47: case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function L(e,t,i){return t[e]!==i[e]}function O(e,t,i,n,o,s){for(;tI?I:e.length,l=n.length>I?I:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!O(t,i,a,o,s,l))return;let c=1,d=1,h=i,u=s,g=!1;for(c=1,h=i;h1&&(g=!0),D[c][d]=s;const r=k[c-1][d-1]+(s>1?1:s),a=k[c-1][d]+-1,l=k[c][d-1]+-1;l>=a?l>r?(k[c][d]=l,T[c][d]=4):l===r?(k[c][d]=l,T[c][d]=6):(k[c][d]=r,T[c][d]=2):a>r?(k[c][d]=a,T[c][d]=1):a===r?(k[c][d]=a,T[c][d]=3):(k[c][d]=r,T[c][d]=2)}return R&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(A(k,e,e.length,i,i.length)),console.log(A(T,e,e.length,i,i.length)),console.log(A(D,e,e.length,i,i.length))}(e,i,n,s),(g||r)&&(B=0,W=-100,z=s,U=r,function e(t,i,n,o,s){if(B>=10||n<-25)return;let r=0;for(;t>0&&i>0;){const a=D[t][i],l=T[t][i];if(4===l)i-=1,s?n-=5:0!==o&&(n-=1),s=!1, r=0;else{if(!(2&l))return;if(4&l&&e(t,i-1,0!==o?n-1:n,o,s),n+=a,t-=1,s=!0,o+=2**((i-=1)+z),1===a){if(r+=1,0===t&&!U)return}else n+=1+r*(a-1),r=0}}n-=i>=3?9:3*i;B+=1;n>W&&(W=n,V=o)}(c-1,d-1,a===l?1:0,0,!1),0!==B)?[W,V,s]:void 0}function F(e,t,i,n,o,s,r){return t[i]!==s[r]?-1:r===i-n?e[i]===o[r]?7:5:!L(r,o,s)||0!==r&&L(r-1,o,s)?!M(s,r)||0!==r&&M(s,r-1)?M(s,r-1)||function(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}(s,r-1)?5:1:5:e[i]===o[r]?7:5}t.isPatternInWord=O,function(e){e[e.Top=1]="Top",e[e.Diag=2]="Diag",e[e.Left=4]="Left"}(N||(N={})),function(e){e.Default=Object.freeze([-100,0,0]),e.isDefault=function(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}}(t.FuzzyScore||(t.FuzzyScore={})),t.fuzzyScore=P;let B=0,V=0,W=0,z=0,U=!1;function K(e,t,i,n,o,s,r,a){let l=P(e,t,i,n,o,s,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e)) }}}return l}function H(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}t.fuzzyScoreGracefulAggressive=function(e,t,i,n,o,s,r){return K(e,t,i,n,o,s,!0,r)},t.fuzzyScoreGraceful=function(e,t,i,n,o,s,r){return K(e,t,i,n,o,s,!1,r)}})),define(e[508],t([0,1,87,24]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchesFuzzyCodiconAware=t.parseCodicons=t.codiconStartMarker=void 0,t.codiconStartMarker="$(",t.parseCodicons=function(e){const i=e.indexOf(t.codiconStartMarker);return-1===i?{text:e}:function(e,i){const n=[];let o="";function s(e){if(e){o+=e;for(const t of e)n.push(d)}}let r,a,l=-1,c="",d=0,h=i;const u=e.length;s(e.substr(0,i));for(;ht?e:`\\${e}`)} ;const a=/\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;t.markdownEscapeEscapedCodicons=function(e){return e.replace(a,e=>`\\${e}`)};const l=/(\\)?\$\\\(([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?)\\\)/gi;t.markdownUnescapeCodicons=function(e){return e.replace(l,(e,t,i)=>t?e:`$(${i})`)};const c=/(\s)?(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)(\s)?/gi;t.stripCodicons=function(e){return-1===e.indexOf(i.codiconStartMarker)?e:e.replace(c,(e,t,i,n)=>i?e:t||n||"")}})),define(e[731],t([0,1,101,507,397,500,44]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalScrollbar=void 0;const a=r.registerIcon("scrollbar-button-left",r.Codicon.triangleLeft),l=r.registerIcon("scrollbar-button-right",r.Codicon.triangleRight);class c extends n.AbstractScrollbar{constructor(e,t,n){const r=e.getScrollDimensions(),c=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n, scrollbarState:new s.ScrollbarState(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,r.width,r.scrollWidth,c.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e}),t.horizontalHasArrows){let e=(t.arrowSize-o.ARROW_IMG_SIZE)/2,n=(t.horizontalScrollbarSize-o.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:a,top:n,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new i.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:l,top:n,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new i.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){ this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}}t.HorizontalScrollbar=c})),define(e[732],t([0,1,101,507,397,500,44]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerticalScrollbar=void 0;const a=r.registerIcon("scrollbar-button-up",r.Codicon.triangleUp),l=r.registerIcon("scrollbar-button-down",r.Codicon.triangleDown);class c extends n.AbstractScrollbar{constructor(e,t,n){const r=e.getScrollDimensions(),c=e.getCurrentScrollPosition() ;if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new s.ScrollbarState(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,c.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e}),t.verticalHasArrows){let e=(t.arrowSize-o.ARROW_IMG_SIZE)/2,n=(t.verticalScrollbarSize-o.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:a,top:e,left:n,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new i.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:l,top:void 0,left:n,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new i.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t), this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}}t.VerticalScrollbar=c})),define(e[509],t([0,1,44]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treeItemLoadingIcon=t.treeFilterClearIcon=t.treeFilterOnTypeOffIcon=t.treeFilterOnTypeOnIcon=t.treeItemExpandedIcon=void 0,t.treeItemExpandedIcon=i.registerIcon("tree-item-expanded",i.Codicon.chevronDown),t.treeFilterOnTypeOnIcon=i.registerIcon("tree-filter-on-type-on",i.Codicon.listFilter), t.treeFilterOnTypeOffIcon=i.registerIcon("tree-filter-on-type-off",i.Codicon.listSelection),t.treeFilterClearIcon=i.registerIcon("tree-filter-clear",i.Codicon.close),t.treeItemLoadingIcon=i.registerIcon("tree-item-loading",i.Codicon.loading)})),define(e[292],t([0,1,254,87,48,12,24]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pieceToQuery=t.prepareQuery=t.compareItemsByFuzzyScore=t.scoreItemFuzzy=t.scoreFuzzy2=t.scoreFuzzy=void 0;const a=0,l=[a,[]];function c(e,t,i,n){if(!e||!t)return l;const o=e.length,s=t.length;if(o0,g=e[c],p=t[c];for(let e=0;e0,s=i+e,c=s-1,m=h+e-1,v=t?r[c]:0,f=u&&t?r[m]:0,S=u&&t?l[m]:0;let b;(b=!f&&u?0:d(g,p,n,o,e,S))&&f+b>=v?(l[s]=S+1,r[s]=f+b):(l[s]=a,r[s]=v)}}const c=[];let h=i-1,u=s-1;for(;h>=0&&u>=0;){l[h*s+u]===a?u--:(c.push(u),h--,u--)}return[r[i*s-1],c.reverse()]}(t,i,s,e,r,o):l} function d(e,t,i,o,s,r){let a=0;if(!function(e,t){if(e===t)return!0;if("/"===e||"\\"===e)return"/"===t||"\\"===t;return!1}(t,o[s]))return a;if(a+=1,r>0&&(a+=5*r),e===i[s]&&(a+=1),0===s)a+=8;else{const e=function(e){switch(e){case 47:case 92:return 5;case 95:case 45:case 46:case 32:case 39:case 34:case 58:return 4;default:return 0}}(i.charCodeAt(s-1));e?a+=e:n.isUpper(i.charCodeAt(s))&&(a+=2)}return a}t.scoreFuzzy=c;const h=[void 0,[]];function u(e,t,i,o){const s=n.fuzzyScore(t.original,t.originalLowercase,i,e,e.toLowerCase(),o,!0);return s?[s[0],n.createMatches(s)]:h}t.scoreFuzzy2=function(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=u(e,r,i,n);if("number"!=typeof t)return h;o+=t,s.push(...a)}return[o,_(s)]}(e,o.values,i,n):u(e,t,i,n)};const g=Object.freeze({score:0}),p=1<<18,m=1<<17,v=65536;function f(e,t,i,n,o){if(!e||!t.normalized)return g;const l=n.getItemLabel(e);if(!l)return g;const c=n.getItemDescription(e);let d ;const h=o[d=c?`${l}${c}${t.normalized}${Array.isArray(t.values)?t.values.length:""}${i}`:`${l}${t.normalized}${Array.isArray(t.values)?t.values.length:""}${i}`];if(h)return h;const u=function(e,t,i,n,o){const l=!i||!n.containsPathSeparator;if(i&&(s.isLinux?n.pathNormalized===i:r.equalsIgnoreCase(n.pathNormalized,i)))return{score:p,labelMatch:[{start:0,end:e.length}],descriptionMatch:t?[{start:0,end:t.length}]:void 0};if(n.values&&n.values.length>1)return function(e,t,i,n,o,s){let r=0;const l=[],c=[];for(const d of n){const{score:n,labelMatch:h,descriptionMatch:u}=S(e,t,i,d,o,s);if(n===a)return g;r+=n,h&&l.push(...h),u&&c.push(...u)}return{score:r,labelMatch:_(l),descriptionMatch:_(c)}}(e,t,i,n.values,l,o);return S(e,t,i,n,l,o)}(l,c,n.getItemPath(e),t,i);return o[d]=u,u}function S(e,t,i,s,r,a){if(r||!t){const[t,i]=c(e,s.normalized,s.normalizedLowercase,a);if(t){const o=n.matchesPrefix(s.normalized,e);let r;if(o){r=m,r+=Math.round(s.normalized.length/e.length*100)}else r=v;return{score:r+t,labelMatch:o||b(i)}} }if(t){let n=t;i&&(n=`${t}${o.sep}`);const r=n.length,l=`${n}${e}`,[d,h]=c(l,s.normalized,s.normalizedLowercase,a);if(d){const e=b(h),t=[],i=[];return e.forEach(e=>{e.startr?(t.push({start:0,end:e.end-r}),i.push({start:e.start,end:r})):e.start>=r?t.push({start:e.start-r,end:e.end-r}):i.push(e)}),{score:d,labelMatch:t,descriptionMatch:i}}}return g}function b(e){const t=[];if(!e)return t;let i;for(const n of e)i&&i.end===n?i.end+=1:(i={start:n,end:n+1},t.push(i));return t}function _(e){const t=e.sort((e,t)=>e.start-t.start),i=[];let n=void 0;for(const e of t)n&&C(n,e)?(n.start=Math.min(n.start,e.start),n.end=Math.max(n.end,e.end)):(n=e,i.push(e));return i}function C(e,t){return!(e.endv||d>v){if(c!==d)return c>d?-1:1;if(cd?-1:1;const h=Array.isArray(a.labelMatch)&&a.labelMatch.length>0,u=Array.isArray(l.labelMatch)&&l.labelMatch.length>0;if(h&&!u)return-1;if(u&&!h)return 1;const g=y(e,a,s),S=y(t,l,s) ;return g&&S&&g!==S?S>g?-1:1:function(e,t,n,o){const s=o.getItemLabel(e)||"",r=o.getItemLabel(t)||"",a=o.getItemDescription(e),l=o.getItemDescription(t),c=s.length+(a?a.length:0),d=r.length+(l?l.length:0);if(c!==d)return c-d;const h=o.getItemPath(e),u=o.getItemPath(t);if(h&&u&&h.length!==u.length)return h.length-u.length;if(s!==r)return i.compareAnything(s,r,n.normalized);if(a&&l&&a!==l)return i.compareAnything(a,l,n.normalized);if(h&&u&&h!==u)return i.compareAnything(h,u,n.normalized);return 0}(e,t,n,s)};const w=" ";function E(e){"string"!=typeof e&&(e="");const t=e.toLowerCase(),{pathNormalized:i,normalized:n,normalizedLowercase:s}=I(e),r=i.indexOf(o.sep)>=0;let a=void 0;const l=e.split(w);if(l.length>1)for(const e of l){const{pathNormalized:t,normalized:i,normalizedLowercase:n}=I(e);i&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:t,normalized:i,normalizedLowercase:n}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:s,values:a, containsPathSeparator:r}}function I(e){let t;t=s.isWindows?e.replace(/\//g,o.sep):e.replace(/\\/g,o.sep);const i=r.stripWildcards(t).replace(/\s/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}t.prepareQuery=E,t.pieceToQuery=function(e){return Array.isArray(e)?E(e.map(e=>e.original).join(w)):E(e.original)}})),define(e[122],t([0,1,24,136,48,67,15]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTerms=t.getBasenameTerms=t.isRelativePattern=t.hasSiblingFn=t.hasSiblingPromiseFn=t.parse=t.match=t.splitGlobAware=t.getEmptyExpression=void 0,t.getEmptyExpression=function(){return Object.create(null)};const a="**",l="/",c="[/\\\\]",d="[^/\\\\]",h=/\//g;function u(e){switch(e){case 0:return"";case 1:return`${d}*?`;default:return`(?:${c}|${d}+${c}|${c}${d}+)*?`}}function g(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break ;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}t.splitGlobAware=g;const p=/^\*\*\/\*\.[\w\.-]+$/,m=/^\*\*\/([\w\.-]+)\/?$/,v=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,f=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,S=/^\*\*((\/[\w\.-]+)+)\/?$/,b=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,_=new s.LRUCache(1e4),C=function(){return!1},y=function(){return null};function w(e,t){if(!e)return y;let n;const o=`${n=(n="string"!=typeof e?e.pattern:e).trim()}_${!!t.trimForExclusions}`;let s,r=_.get(o);if(r)return E(r,e);if(p.test(n)){const e=n.substr(4);r=function(t,i){return"string"==typeof t&&t.endsWith(e)?n:null}}else r=(s=m.exec(I(n,t)))?function(e,t){const i=`/${e}`,n=`\\${e}`,o=function(o,s){return"string"!=typeof o?null:s?s===e?t:null:o===e||o.endsWith(i)||o.endsWith(n)?t:null},s=[e];return o.basenames=s,o.patterns=[t],o.allBasenames=s,o}(s[1],n):(t.trimForExclusions?f:v).test(n)?function(e,t){ const i=R(e.slice(1,-1).split(",").map(e=>w(e,t)).filter(e=>e!==y),e),n=i.length;if(!n)return y;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o!!e.allBasenames);s&&(o.allBasenames=s.allBasenames);const r=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);r.length&&(o.allPaths=r);return o}(n,t):(s=S.exec(I(n,t)))?x(s[1].substr(1),n,!0):(s=b.exec(I(n,t)))?x(s[1],n,!1):function(e){try{const t=new RegExp(`^${function e(t){if(!t)return"";let n="";const o=g(t,l);if(o.every(e=>e===a))n=".*";else{let t=!1;o.forEach((s,r)=>{if(s===a)return void(t||(n+=u(2),t=!0));let h=!1,p="",m=!1,v="";for(const t of s)if("}"!==t&&h)p+=t;else if(!m||"]"===t&&v)switch(t){case"{":h=!0;continue;case"[":m=!0;continue;case"}":const o=`(?:${g(p,",").map(t=>e(t)).join("|")})`;n+=o,h=!1,p="";break;case"]":n+="["+v+"]",m=!1,v="";break;case"?":n+=d;continue;case"*":n+=u(1);continue;default:n+=i.escapeRegExpCharacters(t)}else{let e ;v+=e="-"===t?t:"^"!==t&&"!"!==t||v?t===l?"":i.escapeRegExpCharacters(t):"^"}r(function(e,t,i){if(!1===t)return y;const n=w(e,i);if(n===y)return y;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,s,a)=>{if(!a||!n(t,o))return null;const l=a(i.replace("$(basename)",s));return r.isThenable(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return n})(i,e[i],t)).filter(e=>e!==y)),n=i.length;if(!n)return y;if(!i.some(e=>!!e.requiresSiblings)){if(1===n)return i[0];const e=function(e,t){for(let n=0,o=i.length;n!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const o=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return o.length&&(e.allPaths=o),e}const s=function(e,t,n){let s=void 0;for(let r=0,a=i.length;r!!e.allBasenames) ;a&&(s.allBasenames=a.allBasenames);const l=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);l.length&&(s.allPaths=l);return s}(e,t)}function D(e){const t={};for(const i of e)t[i]=!0;return t}function T(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}function R(e,t){const i=e.filter(e=>!!e.basenames);if(i.length<2)return e;const n=i.reduce((e,t)=>{const i=t.basenames;return i?e.concat(i):e},[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e},[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter(e=>!e.basenames);return r.push(s),r}t.match=function(e,t,i){return!(!e||"string"!=typeof t)&&k(e)(t,void 0,i)},t.parse=k,t.hasSiblingPromiseFn=function(e){if(!e)return;let t ;return i=>(t||(t=(e()||Promise.resolve([])).then(e=>e?D(e):{})),t.then(e=>!!e[i]))},t.hasSiblingFn=function(e){if(!e)return;let t;return i=>{if(!t){const i=e();t=i?D(i):{}}return!!t[i]}},t.isRelativePattern=T,t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}})),define(e[137],t([0,1,14,44,21]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHrefAndDimensions=t.removeMarkdownEscapes=t.markedStringsEquals=t.isMarkdownString=t.isEmptyMarkdownString=t.MarkdownString=void 0;class s{constructor(e="",t=!1){var i,n;if(this._value=e,"string"!=typeof this._value)throw o.illegalArgument("value");"boolean"==typeof t?(this._isTrusted=t,this._supportThemeIcons=!1):(this._isTrusted=null!==(i=t.isTrusted)&&void 0!==i&&i,this._supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n)}get value(){return this._value}get isTrusted(){return this._isTrusted}get supportThemeIcons(){return this._supportThemeIcons}appendText(e){ return this._value+=(this._supportThemeIcons?n.escapeCodicons(e):e).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&").replace(/\n/g,"\n\n"),this}appendMarkdown(e){return this._value+=e,this}appendCodeblock(e,t){return this._value+="\n```",this._value+=e,this._value+="\n",this._value+=t,this._value+="\n```\n",this}}function r(e){return e instanceof s||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function a(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons)}t.MarkdownString=s,t.isEmptyMarkdownString=function e(t){return r(t)?!t.value:!Array.isArray(t)||t.every(e)},t.isMarkdownString=r,t.markedStringsEquals=function(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?i.equals(e,t,a):!(!r(e)||!r(t))&&a(e,t))},t.removeMarkdownEscapes=function(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}, t.parseHrefAndDimensions=function(e){const t=[],i=e.split("|").map(e=>e.trim());e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}})),define(e[17],t([0,1,136,48,10,24,29,12,122,67]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";function d(e){return o.uriToFsPath(e,!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.toLocalResource=t.ResourceGlobMatcher=t.DataUri=t.distinctParents=t.addTrailingPathSeparator=t.removeTrailingPathSeparator=t.hasTrailingPathSeparator=t.isEqualAuthority=t.isAbsolutePath=t.resolvePath=t.relativePath=t.normalizePath=t.joinPath=t.dirname=t.extname=t.basename=t.basenameOrAuthority=t.getComparisonKey=t.isEqualOrParent=t.isEqual=t.extUriIgnorePathCase=t.extUriBiasedIgnorePathCase=t.extUri=t.ExtUri=t.originalFSPath=void 0,t.originalFSPath=d;class h{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){ return e===t?0:s.compare(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,n,o=!1){if(e.scheme===n.scheme){if(e.scheme===r.Schemas.file)return i.isEqualOrParent(d(e),d(n),this._ignorePathCasing(e))&&e.query===n.query&&(o||e.fragment===n.fragment);if(t.isEqualAuthority(e.authority,n.authority))return i.isEqualOrParent(e.path,n.path,this._ignorePathCasing(e),"/")&&e.query===n.query&&(o||e.fragment===n.fragment)}return!1}joinPath(e,...t){return o.URI.joinPath(e,...t)}basenameOrAuthority(e){return t.basename(e)||e.authority}basename(e){return n.posix.basename(e.path)}extname(e){return n.posix.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.Schemas.file?t=o.URI.file(n.dirname(d(e))).path:(t=n.posix.dirname(e.path), e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.Schemas.file?o.URI.file(n.normalize(d(e))).path:n.posix.normalize(e.path),e.with({path:t})}relativePath(e,o){if(e.scheme!==o.scheme||!t.isEqualAuthority(e.authority,o.authority))return;if(e.scheme===r.Schemas.file){const t=n.relative(d(e),d(o));return a.isWindows?i.toSlashes(t):t}let s=e.path||"/",l=o.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(s.length,l.length);ei.getRoot(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,i=n.sep){return t.hasTrailingPathSeparator(e,i)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,o=n.sep){let s=!1;if(e.scheme===r.Schemas.file){const t=d(e);s=void 0!==t&&t.length===i.getRoot(t).length&&t[t.length-1]===o}else{o="/";const t=e.path;s=1===t.length&&47===t.charCodeAt(t.length-1)}return s||t.hasTrailingPathSeparator(e,o)?e:e.with({path:e.path+"/"})}}t.ExtUri=h,t.extUri=new h(()=>!1),t.extUriBiasedIgnorePathCase=new h(e=>e.scheme!==r.Schemas.file||!a.isLinux),t.extUriIgnorePathCase=new h(e=>!0),t.isEqual=t.extUri.isEqual.bind(t.extUri),t.isEqualOrParent=t.extUri.isEqualOrParent.bind(t.extUri), t.getComparisonKey=t.extUri.getComparisonKey.bind(t.extUri),t.basenameOrAuthority=t.extUri.basenameOrAuthority.bind(t.extUri),t.basename=t.extUri.basename.bind(t.extUri),t.extname=t.extUri.extname.bind(t.extUri),t.dirname=t.extUri.dirname.bind(t.extUri),t.joinPath=t.extUri.joinPath.bind(t.extUri),t.normalizePath=t.extUri.normalizePath.bind(t.extUri),t.relativePath=t.extUri.relativePath.bind(t.extUri),t.resolvePath=t.extUri.resolvePath.bind(t.extUri),t.isAbsolutePath=t.extUri.isAbsolutePath.bind(t.extUri),t.isEqualAuthority=t.extUri.isEqualAuthority.bind(t.extUri),t.hasTrailingPathSeparator=t.extUri.hasTrailingPathSeparator.bind(t.extUri),t.removeTrailingPathSeparator=t.extUri.removeTrailingPathSeparator.bind(t.extUri),t.addTrailingPathSeparator=t.extUri.addTrailingPathSeparator.bind(t.extUri),t.distinctParents=function(e,i){const n=[];for(let o=0;on!==o&&t.isEqualOrParent(s,i(e)))||n.push(e[o])}return n},function(e){e.META_DATA_LABEL="label", e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)});const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(t.DataUri||(t.DataUri={}));t.ResourceGlobMatcher=class{constructor(e,t){this.expressionsByRoot=c.TernarySearchTree.forUris(),this.globalExpression=l.parse(e);for(const e of t)this.expressionsByRoot.set(e.root,{root:e.root,expression:l.parse(e.expression)})}matches(e){const i=this.expressionsByRoot.findSubstr(e);if(i){const n=t.relativePath(i.root,e);if(n&&i.expression(n))return!0}return!!this.globalExpression(e.path)}},t.toLocalResource=function(e,t,i){if(t){let o=e.path;return o&&o[0]!==n.posix.sep&&(o=n.posix.sep+o),e.with({scheme:i,authority:t,path:o})}return e.with({scheme:i})}})), define(e[256],t([0,1,7,395,21,137,212,293,2107,196,41,24,10,29,44,17,101,183]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderMarkdown=void 0,t.renderMarkdown=function(e,t={},S={}){var b;const _=n.createElement(t),C=function(t){let i;try{i=c.parse(decodeURIComponent(t))}catch(e){}return i?(i=d.cloneAndChange(i,t=>e.uris&&e.uris[t]?u.URI.revive(e.uris[t]):void 0),encodeURIComponent(JSON.stringify(i))):t},y=function(t,i){const n=e.uris&&e.uris[t];if(!n)return t;let o=u.URI.revive(n);return u.URI.parse(t).toString()===o.toString()?t:i?g.FileAccess.asBrowserUri(o).toString(!0):(o.query&&(o=o.with({query:C(o.query)})),o.toString())};let w;const E=new Promise(e=>w=e),I=new a.Renderer;I.image=(e,i,n)=>{let o=[],r=[];if(e){({href:e,dimensions:o}=s.parseHrefAndDimensions(e)),e=y(e,!0);try{const i=u.URI.parse(e);t.baseUrl&&i.scheme===g.Schemas.file&&(e=m.resolvePath(t.baseUrl,e).toString())}catch(e){}r.push(`src="proxy.php?url=https%3A%2F%2Fvscode.glenstack.workers.dev%2F%24%7Be%7D"`)} return n&&r.push(`alt="${n}"`),i&&r.push(`title="${i}"`),o.length&&(r=r.concat(o)),""},I.link=(i,n,o)=>{if(i===o&&(o=s.removeMarkdownEscapes(o)),i=y(i,!1),t.baseUrl){/^\w[\w\d+.-]*:/.test(i)||(i=m.resolvePath(t.baseUrl,i).toString())}return n=s.removeMarkdownEscapes(n),!(i=s.removeMarkdownEscapes(i))||i.match(/^data:|javascript:/i)||i.match(/^command:/i)&&!e.isTrusted||i.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?o:`
    /g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${n||i}">${o}`},I.paragraph=t=>{if(e.supportThemeIcons){t=f.renderCodicons(t).map(e=>"string"==typeof e?e:e.outerHTML).join("")}return`

    ${t}

    `},t.codeBlockRenderer&&(I.code=(e,i)=>{const n=t.codeBlockRenderer(i,e),o=r.defaultGenerator.nextId(),s=Promise.all([n,E]).then(e=>{const t=e[0],i=_.querySelector(`div[data-code="${o}"]`);i&&(i.innerHTML=t)}).catch(e=>{}) ;return t.codeBlockRenderCallback&&s.then(t.codeBlockRenderCallback),`
    ${h.escape(e)}
    `});const x=t.actionHandler;x&&[i.EventType.CLICK,i.EventType.AUXCLICK].forEach(e=>{x.disposeables.add(i.addDisposableListener(_,e,e=>{const t=new v.StandardMouseEvent(e);if(!t.leftButton&&!t.middleButton)return;let i=t.target;if("A"===i.tagName||(i=i.parentElement)&&"A"===i.tagName)try{const e=i.dataset.href;e&&x.callback(e,t)}catch(e){o.onUnexpectedError(e)}finally{t.preventDefault()}}))}),S.sanitizer=t=>{return(e.isTrusted?t.match(/^()|(<\/\s*span>)$/):void 0)?t:""},S.sanitize=!0,S.renderer=I;const k=[g.Schemas.http,g.Schemas.https,g.Schemas.mailto,g.Schemas.data,g.Schemas.file,g.Schemas.vscodeRemote,g.Schemas.vscodeRemoteResource];e.isTrusted&&k.push(g.Schemas.command);let D=null!==(b=e.value)&&void 0!==b?b:"";D.length>1e5&&(D=`${D.substr(0,1e5)}…`);const T=a.parse(e.supportThemeIcons?p.markdownEscapeEscapedCodicons(D):D,S);return _.innerHTML=l.insane(T,{allowedSchemes:k, allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:function(t){return"span"!==t.tag||!e.isTrusted||1!==Object.keys(t.attrs).length||(t.attrs.style?!!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!!t.attrs.class&&!!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-animation-[a-z\-]+)?$/))}}),w(),_}})),define(e[110],t([0,1,10,48,24,29,12,17]),(function(e,t,i,n,o,s,r,a){"use strict";function l(e){return!(!r.isWindows||!e||":"!==e[1])}function c(e){return l(e)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.defineProperty(t,"__esModule",{value:!0}), t.splitName=t.unmnemonicLabel=t.mnemonicButtonLabel=t.mnemonicMenuLabel=t.template=t.shorten=t.untildify=t.tildify=t.normalizeDriveLetter=t.getBaseLabel=t.getPathLabel=void 0,t.getPathLabel=function(e,t,o){if("string"==typeof e&&(e=i.URI.file(e)),o){const t=o.getWorkspaceFolder(e);if(t){const i=o.getWorkspace().folders.length>1;let n;if(n=a.isEqual(t.uri,e)?"":a.relativePath(t.uri,e),i){const e=t.name?t.name:a.basename(t.uri);n=n?e+" • "+n:e}return n}}if(e.scheme!==s.Schemas.file&&e.scheme!==s.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(l(e.fsPath))return n.normalize(c(e.fsPath));let d=n.normalize(e.fsPath);return!r.isWindows&&(null==t?void 0:t.userHome)&&(d=h(d,t.userHome.fsPath)),d},t.getBaseLabel=function(e){if(!e)return;"string"==typeof e&&(e=i.URI.file(e));const t=a.basename(e)||(e.scheme===s.Schemas.file?e.fsPath:e.path);return l(t)?c(t):t},t.normalizeDriveLetter=c;let d=Object.create(null);function h(e,t){if(r.isWindows||!e||!t)return e ;let i=d.original===t?d.normalized:void 0;return i||(i=`${o.rtrim(t,n.posix.sep)}${n.posix.sep}`,d={original:t,normalized:i}),(r.isLinux?e.startsWith(i):o.startsWithIgnoreCase(e,i))&&(e=`~/${e.substr(i.length)}`),e}t.tildify=h,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,`${t}$1`)};const u="…",g="\\\\",p="~";var m;t.shorten=function(e,t=n.sep){const i=new Array(e.length);let o=!1;for(let n=0;n=0;l--){o=!1;let c=a.slice(l,l+s).join(t);for(let i=0;!o&&i-1){ const n=l+s===a.length,r=l>0&&e[i].indexOf(t)>-1?t+c:c,d=e[i].endsWith(r);o=!n||d}if(!o){let e="";(a[0].endsWith(":")||""!==r)&&(1===l&&(l=0,s++,c=a[0]+t+c),l>0&&(e=a[0]+t),e=r+e),l>0&&(e=e+u+t),e+=c,l+s{if(e.type===m.SEPARATOR){return[i[t-1],i[t+1]].every(e=>e&&(e.type===m.VARIABLE||e.type===m.TEXT)&&e.value.length>0)}return!0}).map(e=>e.value).join("")},t.mnemonicMenuLabel=function(e,t){ return r.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,"").replace(/&/g,r.isMacintosh?"&":"&&"):e.replace(/&&|&/g,e=>"&"===e?"&&":"&")},t.mnemonicButtonLabel=function(e,t){return r.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,""):r.isWindows?e.replace(/&&|&/g,e=>"&"===e?"&&":"&"):e.replace(/&&/g,"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")},t.splitName=function(e){const t=-1!==e.indexOf("/")?n.posix:n.win32,i=t.basename(e),o=t.dirname(e);return i.length?{name:i,parentPath:o}:{name:o,parentPath:""}}})),define(e[184],t([0,1,48,24,122,29,17]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExtensionForMimeType=t.getMediaMime=t.isUnspecific=t.guessMimeTypes=t.clearTextMimes=t.registerTextMime=t.MIME_UNKNOWN=t.MIME_BINARY=t.MIME_TEXT=void 0,t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";let a=[],l=[],c=[];function d(e,t,i){let n=null,s=null,r=null;for(let a=i.length-1;a>=0;a--){const l=i[a] ;if(t===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;o.match(l.filepatternLowercase,i)&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return n?n.mime:s?s.mime:r?r.mime:null}t.registerTextMime=function(e,t=!1){const n=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(i.posix.sep)>=0}}(e);a.push(n),n.userConfigured?c.push(n):l.push(n),t&&!n.userConfigured&&a.forEach(e=>{ e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})},t.clearTextMimes=function(e){e?(a=a.filter(e=>!e.userConfigured),c=[]):(a=[],l=[],c=[])},t.guessMimeTypes=function(e,o){let h;if(e)switch(e.scheme){case s.Schemas.file:h=e.fsPath;break;case s.Schemas.data:h=r.DataUri.parseMetaData(e).get(r.DataUri.META_DATA_LABEL);break;default:h=e.path}if(!h)return[t.MIME_UNKNOWN];h=h.toLowerCase();const u=i.basename(h),g=d(h,u,c);if(g)return[g,t.MIME_TEXT];const p=d(h,u,l);if(p)return[p,t.MIME_TEXT];if(o){ const e=function(e){n.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(let t=a.length-1;t>=0;t--){const i=a[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return null}(o);if(e)return[e,t.MIME_TEXT]}return[t.MIME_UNKNOWN]},t.isUnspecific=function e(i){return!i||("string"==typeof i?i===t.MIME_BINARY||i===t.MIME_TEXT||i===t.MIME_UNKNOWN:1===i.length&&e(i[0]))};const h={".aac":"audio/x-aac",".avi":"video/x-msvideo",".bmp":"image/bmp",".flv":"video/x-flv",".gif":"image/gif",".ico":"image/x-icon",".jpe":"image/jpg",".jpeg":"image/jpg",".jpg":"image/jpg",".m1v":"video/mpeg",".m2a":"audio/mpeg",".m2v":"video/mpeg",".m3a":"audio/mpeg",".mid":"audio/midi",".midi":"audio/midi",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".mkv":"video/x-matroska",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4a":"audio/mp4",".mp4v":"video/mp4",".mpe":"video/mpeg",".mpeg":"video/mpeg", ".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".ogv":"video/ogg",".png":"image/png",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".spx":"audio/ogg",".svg":"image/svg+xml",".tga":"image/x-tga",".tif":"image/tiff",".tiff":"image/tiff",".wav":"audio/x-wav",".webm":"video/webm",".webp":"image/webp",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".woff":"application/font-woff"};t.getMediaMime=function(e){const t=i.extname(e);return h[t.toLowerCase()]},t.getExtensionForMimeType=function(e){for(const t in h)if(h[t]===e)return t}})),define(e[733],t([0,1,95,48,17,10,67]),(function(e,t,i,n,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTree=void 0;class l{constructor(e,t,i,n,o){this.uri=e,this.relativePath=t,this.context=i,this.element=n,this.parent=o,this._children=new Map}get childrenCount(){return this._children.size}get children(){return this._children.values()}get name(){return n.posix.basename(this.relativePath)} get(e){return this._children.get(e)}set(e,t){this._children.set(e,t)}delete(e){this._children.delete(e)}clear(){this._children.clear()}}o([i.memoize],l.prototype,"name",null);t.ResourceTree=class{constructor(e,t=r.URI.file("/")){this.root=new l(t,"",e)}static getRoot(e){for(;e.parent;)e=e.parent;return e}static collect(e){return function e(t,i){void 0!==t.element&&i.push(t.element);for(const n of t.children)e(n,i);return i}(e,[])}static isResourceNode(e){return e instanceof l}add(e,t){const i=s.relativePath(this.root.uri,e)||e.fsPath,n=new a.PathIterator(!1).reset(i);let o=this.root,r="";for(;;){const e=n.value();r=r+"/"+e;let i=o.get(e);if(i?n.hasNext()||(i.element=t):(i=new l(s.joinPath(this.root.uri,r),r,this.root.context,n.hasNext()?void 0:t,o),o.set(e,i)),o=i,!n.hasNext())return;n.next()}}delete(e){const t=s.relativePath(this.root.uri,e)||e.fsPath,i=new a.PathIterator(!1).reset(t);return this._delete(this.root,i)}_delete(e,t){const i=t.value(),n=e.get(i);if(n){if(t.hasNext()){ const o=this._delete(n,t.next());return void 0!==o&&0===n.childrenCount&&e.delete(i),o}return e.delete(i),n.element}}clear(){this.root.clear()}getNode(e){const t=s.relativePath(this.root.uri,e)||e.fsPath,i=new a.PathIterator(!1).reset(t);let n=this.root;for(;;){const e=i.value(),t=n.get(e);if(!t||!i.hasNext())return t;n=t,i.next()}}}})),define(e[510],t([0,1,10]),(function(e,t,i){"use strict";function n(e){return e.toJSON()}Object.defineProperty(t,"__esModule",{value:!0}),t.transformAndReviveIncomingURIs=t.transformIncomingURIs=t.transformOutgoingURIs=t.DefaultURITransformer=t.URITransformer=void 0;function o(e,t,n,s){if(!e||s>200)return null;if("object"==typeof e){if(1===e.$mid)return n?i.URI.revive(t.transformIncoming(e)):t.transformIncoming(e);for(let i in e)if(Object.hasOwnProperty.call(e,i)){const r=o(e[i],t,n,s+1);null!==r&&(e[i]=r)}}return null}t.URITransformer=class{constructor(e){this._uriTransformer=e}transformIncoming(e){const t=this._uriTransformer.transformIncoming(e) ;return t===e?e:n(i.URI.from(t))}transformOutgoing(e){const t=this._uriTransformer.transformOutgoing(e);return t===e?e:n(i.URI.from(t))}transformOutgoingURI(e){const t=this._uriTransformer.transformOutgoing(e);return t===e?e:i.URI.from(t)}transformOutgoingScheme(e){return this._uriTransformer.transformOutgoingScheme(e)}},t.DefaultURITransformer=new class{transformIncoming(e){return e}transformOutgoing(e){return e}transformOutgoingURI(e){return e}transformOutgoingScheme(e){return e}},t.transformOutgoingURIs=function(e,t){const n=function e(t,n,o){if(!t||o>200)return null;if("object"==typeof t){if(t instanceof i.URI)return n.transformOutgoing(t);for(let i in t)if(Object.hasOwnProperty.call(t,i)){const s=e(t[i],n,o+1);null!==s&&(t[i]=s)}}return null}(e,t,0);return null===n?e:n},t.transformIncomingURIs=function(e,t){const i=o(e,t,!1,0);return null===i?e:i},t.transformAndReviveIncomingURIs=function(e,t){const i=o(e,t,!0,0);return null===i?e:i}})),define(e[92],t([0,1]),(function(e,t){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.isUUID=void 0;const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;t.isUUID=function(e){return i.test(e)};const n=new Uint8Array(16),o=[];for(let e=0;e<256;e++)o.push(e.toString(16).padStart(2,"0"));const s=function(e){for(let t=0;t{this._pendingReplies[i]={resolve:n,reject:o},this._send({vsWorker:this._workerId,req:i,method:e,args:t})})}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let i=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&((e=new Error).name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void i.reject(e)}return void i.resolve(t.res)} let t=e,n=t.req;this._handler.handleMessage(t.method,t.args).then(e=>{this._send({vsWorker:this._workerId,seq:n,res:e,err:void 0})},e=>{e.detail instanceof Error&&(e.detail=i.transformErrorForSerialization(e.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:i.transformErrorForSerialization(e)})})}_send(e){let t=[];if(e.req){const i=e;for(let e=0;e{this._protocol.handleMessage(e)},e=>{n&&n(e)})),this._protocol=new l({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}}}), this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==self.require&&"function"==typeof self.require.getConfig?o=self.require.getConfig():void 0!==self.requirejs&&(o=self.requirejs.s.contexts._.config);const a=s.getAllMethodNames(i);this._onModuleLoaded=this._protocol.sendMessage(r,[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,a]);const c=(e,t)=>this._request(e,t);this._lazyProxy=new Promise((e,i)=>{n=i,this._onModuleLoaded.then(t=>{e(s.createProxyObject(t,c))},e=>{i(e),this._onError("Worker failed to load "+t,e)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((i,n)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(i,n)},n)})}_onError(e,t){console.error(e),console.info(t)}}t.SimpleWorkerClient=c;class d{constructor(e,t){this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new l({sendMessage:(t,i)=>{e(t,i)},handleMessage:(e,t)=>this._handleMessage(e,t)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t){ if(e===r)return this.initialize(t[0],t[1],t[2],t[3]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return Promise.reject(e)}}initialize(e,t,i,n){this._protocol.setWorkerId(e);const o=s.createProxyObject(n,(e,t)=>this._protocol.sendMessage(e,t));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(s.getAllMethodNames(this._requestHandler))):(t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,t.catchError=!0,self.require.config(t)),new Promise((e,t)=>{self.require([i],i=>{this._requestHandler=i.create(o),this._requestHandler?e(s.getAllMethodNames(this._requestHandler)):t(new Error("No RequestHandler!"))},t)}))}}t.SimpleWorkerServer=d,t.create=function(e){return new d(e,null)}})), define(e[511],t([0,1,6,2,15,31,21,66,14,13,196,24]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";var u,g;function p(e){switch(e){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}function m(e){switch(e){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}Object.defineProperty(t,"__esModule",{value:!0}),t.IPCLogger=t.logWithColors=t.createChannelSender=t.createChannelReceiver=t.StaticRouter=t.getNextTickChannel=t.getDelayedChannel=t.IPCClient=t.IPCServer=t.ChannelClient=t.RequestInitiator=t.ChannelServer=t.ResponseType=t.RequestType=void 0,function(e){e[e.Promise=100]="Promise",e[e.PromiseCancel=101]="PromiseCancel",e[e.EventListen=102]="EventListen",e[e.EventDispose=103]="EventDispose"}(t.RequestType||(t.RequestType={})),function(e){e[e.Initialize=200]="Initialize",e[e.PromiseSuccess=201]="PromiseSuccess",e[e.PromiseError=202]="PromiseError",e[e.PromiseErrorObj=203]="PromiseErrorObj", e[e.EventFire=204]="EventFire"}(t.ResponseType||(t.ResponseType={})),function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(u||(u={}));class v{constructor(e){this.buffer=e,this.pos=0}read(e){const t=this.buffer.slice(this.pos,this.pos+e);return this.pos+=t.byteLength,t}}class f{constructor(){this.buffers=[]}get buffer(){return a.VSBuffer.concat(this.buffers)}write(e){this.buffers.push(e)}}function S(e){const t=a.VSBuffer.alloc(4);return t.writeUInt32BE(e,0),t}function b(e){return e.read(4).readUInt32BE(0)}function _(e){const t=a.VSBuffer.alloc(1);return t.writeUInt8(e,0),t}!function(e){e[e.Undefined=0]="Undefined",e[e.String=1]="String",e[e.Buffer=2]="Buffer",e[e.VSBuffer=3]="VSBuffer",e[e.Array=4]="Array",e[e.Object=5]="Object"}(g||(g={}));const C={Undefined:_(g.Undefined),String:_(g.String),Buffer:_(g.Buffer),VSBuffer:_(g.VSBuffer),Array:_(g.Array),Object:_(g.Object)},y="undefined"!=typeof Buffer;function w(e,t){if(void 0===t)e.write(C.Undefined);else if("string"==typeof t){ const i=a.VSBuffer.fromString(t);e.write(C.String),e.write(S(i.byteLength)),e.write(i)}else if(y&&Buffer.isBuffer(t)){const i=a.VSBuffer.wrap(t);e.write(C.Buffer),e.write(S(i.byteLength)),e.write(i)}else if(t instanceof a.VSBuffer)e.write(C.VSBuffer),e.write(S(t.byteLength)),e.write(t);else if(Array.isArray(t)){e.write(C.Array),e.write(S(t.length));for(const i of t)w(e,i)}else{const i=a.VSBuffer.fromString(JSON.stringify(t));e.write(C.Object),e.write(S(i.byteLength)),e.write(i)}}function E(e){switch(e.read(1).readUInt8(0)){case g.Undefined:return;case g.String:return e.read(b(e)).toString();case g.Buffer:return e.read(b(e)).buffer;case g.VSBuffer:return e.read(b(e));case g.Array:{const t=b(e),i=[];for(let n=0;nthis.onRawMessage(e)),this.sendResponse({type:200})}registerChannel(e,t){this.channels.set(e,t),setTimeout(()=>this.flushPendingRequests(e),0)}sendResponse(e){switch(e.type){case 200:{const t=this.send([e.type]);return void(this.logger&&this.logger.logOutgoing(t,0,1,m(e.type)))}case 201:case 202:case 204:case 203:{const t=this.send([e.type,e.id],e.data);return void(this.logger&&this.logger.logOutgoing(t,e.id,1,m(e.type),e.data))}}}send(e,t){const i=new f;return w(i,e),w(i,t),this.sendBuffer(i.buffer)}sendBuffer(e){try{return this.protocol.send(e),e.byteLength}catch(e){return 0}}onRawMessage(e){const t=new v(e),i=E(t),n=E(t),o=i[0];switch(o){case 100:return this.logger&&this.logger.logIncoming(e.byteLength,i[1],1,`${p(o)}: ${i[2]}.${i[3]}`,n),this.onPromise({type:o,id:i[1],channelName:i[2],name:i[3],arg:n});case 102:return this.logger&&this.logger.logIncoming(e.byteLength,i[1],1,`${p(o)}: ${i[2]}.${i[3]}`,n),this.onEventListen({type:o,id:i[1],channelName:i[2], name:i[3],arg:n});case 101:case 103:return this.logger&&this.logger.logIncoming(e.byteLength,i[1],1,`${p(o)}`),this.disposeActiveRequest({type:o,id:i[1]})}}onPromise(e){const t=this.channels.get(e.channelName);if(!t)return void this.collectPendingRequest(e);const i=new s.CancellationTokenSource;let o;try{o=t.call(this.ctx,e.name,e.arg,i.token)}catch(e){o=Promise.reject(e)}const r=e.id;o.then(t=>{this.sendResponse({id:r,data:t,type:201}),this.activeRequests.delete(e.id)},t=>{t instanceof Error?this.sendResponse({id:r,data:{message:t.message,name:t.name,stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:202}):this.sendResponse({id:r,data:t,type:203}),this.activeRequests.delete(e.id)});const a=n.toDisposable(()=>i.cancel());this.activeRequests.set(e.id,a)}onEventListen(e){const t=this.channels.get(e.channelName);if(!t)return void this.collectPendingRequest(e);const i=e.id,n=t.listen(this.ctx,e.name,e.arg)(e=>this.sendResponse({id:i,data:e,type:204}));this.activeRequests.set(e.id,n)} disposeActiveRequest(e){const t=this.activeRequests.get(e.id);t&&(t.dispose(),this.activeRequests.delete(e.id))}collectPendingRequest(e){let t=this.pendingRequests.get(e.channelName);t||(t=[],this.pendingRequests.set(e.channelName,t));const i=setTimeout(()=>{console.error(`Unknown channel: ${e.channelName}`),100===e.type&&this.sendResponse({id:e.id,data:{name:"Unknown channel",message:`Channel name '${e.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);t.push({request:e,timeoutTimer:i})}flushPendingRequests(e){const t=this.pendingRequests.get(e);if(t){for(const e of t)switch(clearTimeout(e.timeoutTimer),e.request.type){case 100:this.onPromise(e.request);break;case 102:this.onEventListen(e.request)}this.pendingRequests.delete(e)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelServer=I,function(e){e[e.LocalSide=0]="LocalSide", e[e.OtherSide=1]="OtherSide"}(t.RequestInitiator||(t.RequestInitiator={}));class x{constructor(e,t=null){this.protocol=e,this.state=u.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new i.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(e=>this.onBuffer(e)),this.logger=t}getChannel(e){const t=this;return{call:(i,n,o)=>t.requestPromise(e,i,n,o),listen:(i,n)=>t.requestEvent(e,i,n)}}requestPromise(e,t,i,a=s.CancellationToken.None){const l=this.lastRequestId++,c={id:l,type:100,channelName:e,name:t,arg:i};if(a.isCancellationRequested)return Promise.reject(r.canceled());let d;return new Promise((e,t)=>{if(a.isCancellationRequested)return t(r.canceled());const i=()=>{this.handlers.set(l,i=>{switch(i.type){case 201:this.handlers.delete(l),e(i.data);break;case 202:this.handlers.delete(l);const n=new Error(i.data.message);n.stack=i.data.stack,n.name=i.data.name,t(n);break;case 203:this.handlers.delete(l), t(i.data)}}),this.sendRequest(c)};let s=null;this.state===u.Idle?i():(s=o.createCancelablePromise(e=>this.whenInitialized())).then(()=>{s=null,i()});const h=()=>{s?(s.cancel(),s=null):this.sendRequest({id:l,type:101}),t(r.canceled())},g=a.onCancellationRequested(h);d=n.combinedDisposable(n.toDisposable(h),g),this.activeRequests.add(d)}).finally(()=>{this.activeRequests.delete(d)})}requestEvent(e,t,n){const s=this.lastRequestId++,r={id:s,type:102,channelName:e,name:t,arg:n};let a=null;const l=new i.Emitter({onFirstListenerAdd:()=>{(a=o.createCancelablePromise(e=>this.whenInitialized())).then(()=>{a=null,this.activeRequests.add(l),this.sendRequest(r)})},onLastListenerRemove:()=>{a?(a.cancel(),a=null):(this.activeRequests.delete(l),this.sendRequest({id:s,type:103}))}});return this.handlers.set(s,e=>l.fire(e.data)),l.event}sendRequest(e){switch(e.type){case 100:case 102:{const t=this.send([e.type,e.id,e.channelName,e.name],e.arg) ;return void(this.logger&&this.logger.logOutgoing(t,e.id,0,`${p(e.type)}: ${e.channelName}.${e.name}`,e.arg))}case 101:case 103:{const t=this.send([e.type,e.id]);return void(this.logger&&this.logger.logOutgoing(t,e.id,0,p(e.type)))}}}send(e,t){const i=new f;return w(i,e),w(i,t),this.sendBuffer(i.buffer)}sendBuffer(e){try{return this.protocol.send(e),e.byteLength}catch(e){return 0}}onBuffer(e){const t=new v(e),i=E(t),n=E(t),o=i[0];switch(o){case 200:return this.logger&&this.logger.logIncoming(e.byteLength,0,0,m(o)),this.onResponse({type:i[0]});case 201:case 202:case 204:case 203:return this.logger&&this.logger.logIncoming(e.byteLength,i[1],0,m(o),n),this.onResponse({type:i[0],id:i[1],data:n})}}onResponse(e){if(200===e.type)return this.state=u.Idle,void this._onDidInitialize.fire();const t=this.handlers.get(e.id);t&&t(e)}whenInitialized(){return this.state===u.Idle?Promise.resolve():i.Event.toPromise(this.onDidInitialize)}dispose(){this.protocolListener&&(this.protocolListener.dispose(), this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelClient=x;t.IPCServer=class{constructor(e){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new i.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new i.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,e(({protocol:e,onDidClientDisconnect:t})=>{i.Event.once(e.onMessage)(i=>{const n=E(new v(i)),o=new I(e,n),s=new x(e);this.channels.forEach((e,t)=>o.registerChannel(t,e));const r={channelServer:o,channelClient:s,ctx:n};this._connections.add(r),this._onDidAddConnection.fire(r),t(()=>{o.dispose(),s.dispose(),this._connections.delete(r),this._onDidRemoveConnection.fire(r)})})})}get connections(){const e=[];return this._connections.forEach(t=>e.push(t)),e}getChannel(e,t){const n=this;return{call(o,s,r){let a;if(c.isFunction(t)){let e=l.getRandomElement(n.connections.filter(t)) ;a=e?Promise.resolve(e):i.Event.toPromise(i.Event.filter(n.onDidAddConnection,t))}else a=t.routeCall(n,o,s);return k(a.then(t=>t.channelClient.getChannel(e))).call(o,s,r)},listen(i,o){if(c.isFunction(t))return n.getMulticastEvent(e,t,i,o);return k(t.routeEvent(n,i,o).then(t=>t.channelClient.getChannel(e))).listen(i,o)}}}getMulticastEvent(e,t,o,s){const r=this;let a=new n.DisposableStore;const l=new i.Emitter({onFirstListenerAdd:()=>{a=new n.DisposableStore;const c=new i.EventMultiplexer,d=new Map,h=t=>{const i=t.channelClient.getChannel(e).listen(o,s),n=c.add(i);d.set(t,n)};r.connections.filter(t).forEach(h),i.Event.filter(r.onDidAddConnection,t)(h,void 0,a),r.onDidRemoveConnection(e=>{const t=d.get(e);t&&(t.dispose(),d.delete(e))},void 0,a),c.event(l.fire,l,a),a.add(c)},onLastListenerRemove:()=>{a.dispose()}});return l.event}registerChannel(e,t){this.channels.set(e,t),this._connections.forEach(i=>{i.channelServer.registerChannel(e,t)})}dispose(){this.channels.clear(),this._connections.clear(), this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}};function k(e){return{call:(t,i,n)=>e.then(e=>e.call(t,i,n)),listen(t,n){const o=new i.Relay;return e.then(e=>o.input=e.listen(t,n)),o.event}}}t.IPCClient=class{constructor(e,t,i=null){const n=new f;w(n,t),e.send(n.buffer),this.channelClient=new x(e,i),this.channelServer=new I(e,t,i)}getChannel(e){return this.channelClient.getChannel(e)}registerChannel(e,t){this.channelServer.registerChannel(e,t)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}},t.getDelayedChannel=k,t.getNextTickChannel=function(e){let t=!1;return{call:(i,n,s)=>t?e.call(i,n,s):o.timeout(0).then(()=>t=!0).then(()=>e.call(i,n,s)),listen(n,s){if(t)return e.listen(n,s);const r=new i.Relay;return o.timeout(0).then(()=>t=!0).then(()=>r.input=e.listen(n,s)),r.event}}};function D(e){return"o"===e[0]&&"n"===e[1]&&h.isUpperAsciiLetter(e.charCodeAt(2))}t.StaticRouter=class{constructor(e){this.fn=e}routeCall(e){return this.route(e)}routeEvent(e){ return this.route(e)}async route(e){for(const t of e.connections)if(await Promise.resolve(this.fn(t.ctx)))return Promise.resolve(t);return await i.Event.toPromise(e.onDidAddConnection),await this.route(e)}},t.createChannelReceiver=function(e,t){const n=e,o=t&&t.disableMarshalling,s=new Map;for(const e in n)D(e)&&s.set(e,i.Event.buffer(n[e],!0));return new class{listen(e,t){const i=s.get(t);if(i)return i;throw new Error(`Event not found: ${t}`)}call(e,t,i){const s=n[t];if("function"==typeof s){if(!o&&Array.isArray(i))for(let e=0;ethis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const i=this._chunks[0];return t&&(this._chunks.shift(),this._totalLength-=e),i}if(this._chunks[0].byteLength>e){const i=this._chunks[0].slice(0,e);return t&&(this._chunks[0]=this._chunks[0].slice(e),this._totalLength-=e),i}let i=s.VSBuffer.alloc(e),n=0,o=0;for(;e>0;){const s=this._chunks[o] ;if(s.byteLength>e){const r=s.slice(0,e);i.set(r,n),n+=e,t&&(this._chunks[o]=s.slice(e),this._totalLength-=e),e-=e}else i.set(s,n),n+=s.byteLength,t?(this._chunks.shift(),this._totalLength-=s.byteLength):o++,e-=s.byteLength}return i}}var h;t.ChunkStream=d,function(e){e[e.None=0]="None",e[e.Regular=1]="Regular",e[e.Control=2]="Control",e[e.Ack=3]="Ack",e[e.KeepAlive=4]="KeepAlive",e[e.Disconnect=5]="Disconnect"}(h||(h={})),function(e){e[e.HeaderLength=13]="HeaderLength",e[e.AcknowledgeTime=2e3]="AcknowledgeTime",e[e.AcknowledgeTimeoutTime=2e4]="AcknowledgeTimeoutTime",e[e.KeepAliveTime=5e3]="KeepAliveTime",e[e.KeepAliveTimeoutTime=2e4]="KeepAliveTimeoutTime",e[e.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",e[e.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime"}(t.ProtocolConstants||(t.ProtocolConstants={}));class u{constructor(e,t,i,n){this.type=e,this.id=t,this.ack=i,this.data=n,this.writtenTime=0}get size(){return this.data.byteLength}}class g extends o.Disposable{constructor(e){super(), this._onMessage=this._register(new i.Emitter),this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=e,this._isDisposed=!1,this._incomingData=new d,this._register(this._socket.onData(e=>this.acceptChunk(e))),this.lastReadTime=Date.now()}acceptChunk(e){if(e&&0!==e.byteLength)for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(e);this._incomingData.byteLength>=this._state.readLen;){const e=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=e.readUInt32BE(9),this._state.messageType=e.readUInt8(0),this._state.id=e.readUInt32BE(1),this._state.ack=e.readUInt32BE(5);else{const t=this._state.messageType,i=this._state.id,n=this._state.ack;if(this._state.readHead=!0,this._state.readLen=13,this._state.messageType=0,this._state.id=0,this._state.ack=0,this._onMessage.fire(new u(t,i,n,e)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)} dispose(){this._isDisposed=!0,super.dispose()}}class p{constructor(e){this._isDisposed=!1,this._socket=e,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){this.flush(),this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}write(e){if(this._isDisposed)return;e.writtenTime=Date.now(),this.lastWriteTime=Date.now();const t=s.VSBuffer.alloc(13);t.writeUInt8(e.type,0),t.writeUInt32BE(e.id,1),t.writeUInt32BE(e.ack,5),t.writeUInt32BE(e.data.byteLength,9),this._writeSoon(t,e.data)}_bufferAdd(e,t){const i=0===this._totalLength;return this._data.push(e,t),this._totalLength+=e.byteLength+t.byteLength,i}_bufferTake(){const e=s.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,e}_writeSoon(e,t){this._bufferAdd(e,t)&&r.setImmediate(()=>{this._writeNow()})}_writeNow(){0!==this._totalLength&&this._socket.write(this._bufferTake())}}class m extends o.Disposable{constructor(e){super(),this._onMessage=new i.Emitter, this.onMessage=this._onMessage.event,this._onClose=new i.Emitter,this.onClose=this._onClose.event,this._socket=e,this._socketWriter=this._register(new p(this._socket)),this._socketReader=this._register(new g(this._socket)),this._register(this._socketReader.onMessage(e=>{1===e.type&&this._onMessage.fire(e.data)})),this._register(this._socket.onClose(()=>this._onClose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(e){this._socketWriter.write(new u(1,0,0,e))}}t.Protocol=m;class v extends n.IPCClient{constructor(e,t,i=null){super(e,t,i),this.protocol=e}static fromSocket(e,t){return new v(new m(e),t)}get onClose(){return this.protocol.onClose}dispose(){super.dispose();const e=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),e.end()}}t.Client=v;class f{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new i.Emitter({onFirstListenerAdd:()=>{this._hasListeners=!0, a.nextTick(()=>this._deliverMessages())},onLastListenerRemove:()=>{this._hasListeners=!1}}),this.event=this._emitter.event}_deliverMessages(){if(!this._isDeliveringMessages){for(this._isDeliveringMessages=!0;this._hasListeners&&this._bufferedMessages.length>0;)this._emitter.fire(this._bufferedMessages.shift());this._isDeliveringMessages=!1}}fire(e){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(e):this._emitter.fire(e):this._bufferedMessages.push(e)}flushBuffer(){this._bufferedMessages=[]}}t.BufferedEmitter=f;class S{constructor(e){this.data=e,this.next=null}}class b{constructor(){this._first=null,this._last=null}peek(){return this._first?this._first.data:null}toArray(){let e=[],t=0,i=this._first;for(;i;)e[t++]=i.data,i=i.next;return e}pop(){if(this._first)return this._first===this._last?(this._first=null,void(this._last=null)):void(this._first=this._first.next)}push(e){const t=new S(e);if(!this._first)return this._first=t,void(this._last=t);this._last.next=t,this._last=t}} class _{constructor(){this.lastRuns=[];const e=Date.now();for(let t=0;t<_._HISTORY_LENGTH;t++)this.lastRuns[t]=e-1e3*t;setInterval(()=>{for(let e=_._HISTORY_LENGTH;e>=1;e--)this.lastRuns[e]=this.lastRuns[e-1];this.lastRuns[0]=Date.now()},1e3)}static getInstance(){return _._INSTANCE||(_._INSTANCE=new _),_._INSTANCE}load(){const e=Date.now(),t=1e3*(1+_._HISTORY_LENGTH);let i=0;for(let n=0;n<_._HISTORY_LENGTH;n++)e-this.lastRuns[n]<=t&&i++;return 1-i/_._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}}_._HISTORY_LENGTH=10,_._INSTANCE=null;t.PersistentProtocol=class{constructor(e,t=null){this._loadEstimator=_.getInstance(),this._onControlMessage=new f,this.onControlMessage=this._onControlMessage.event,this._onMessage=new f,this.onMessage=this._onMessage.event,this._onClose=new f,this.onClose=this._onClose.event,this._onSocketClose=new f,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new f,this.onSocketTimeout=this._onSocketTimeout.event,this._isReconnecting=!1,this._outgoingUnackMsg=new b, this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._outgoingKeepAliveTimeout=null,this._incomingKeepAliveTimeout=null,this._socketDisposables=[],this._socket=e,this._socketWriter=new p(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new g(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(e=>this._receiveMessage(e))),this._socketDisposables.push(this._socket.onClose(()=>this._onSocketClose.fire())),t&&this._socketReader.acceptChunk(t),this._sendKeepAliveCheck(),this._recvKeepAliveCheck()}get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null), this._outgoingKeepAliveTimeout&&(clearTimeout(this._outgoingKeepAliveTimeout),this._outgoingKeepAliveTimeout=null),this._incomingKeepAliveTimeout&&(clearTimeout(this._incomingKeepAliveTimeout),this._incomingKeepAliveTimeout=null),this._socketDisposables=o.dispose(this._socketDisposables)}drain(){return this._socketWriter.drain()}sendDisconnect(){const e=new u(5,0,0,c());this._socketWriter.write(e),this._socketWriter.flush()}_sendKeepAliveCheck(){if(this._outgoingKeepAliveTimeout)return;const e=Date.now()-this._socketWriter.lastWriteTime;if(e>=5e3){const e=new u(4,0,0,c());return this._socketWriter.write(e),void this._sendKeepAliveCheck()}this._outgoingKeepAliveTimeout=setTimeout(()=>{this._outgoingKeepAliveTimeout=null,this._sendKeepAliveCheck()},5e3-e+5)}_recvKeepAliveCheck(){if(this._incomingKeepAliveTimeout)return;const e=Date.now()-this._socketReader.lastReadTime;e>=2e4&&!this._loadEstimator.hasHighLoad()?this._onSocketTimeout.fire(void 0):this._incomingKeepAliveTimeout=setTimeout(()=>{ this._incomingKeepAliveTimeout=null,this._recvKeepAliveCheck()},Math.max(2e4-e,0)+5)}getSocket(){return this._socket}beginAcceptReconnection(e,t){this._isReconnecting=!0,this._socketDisposables=o.dispose(this._socketDisposables),this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._socket=e,this._socketWriter=new p(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new g(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(e=>this._receiveMessage(e))),this._socketDisposables.push(this._socket.onClose(()=>this._onSocketClose.fire())),this._socketReader.acceptChunk(t)}endAcceptReconnection(){this._isReconnecting=!1;const e=this._outgoingUnackMsg.toArray();for(let t=0,i=e.length;tthis._outgoingAckId)for(this._outgoingAckId=e.ack;;){const t=this._outgoingUnackMsg.peek();if(!(t&&t.id<=e.ack))break;this._outgoingUnackMsg.pop()}1===e.type?e.id>this._incomingMsgId&&(e.id!==this._incomingMsgId+1&&console.error(`PROTOCOL CORRUPTION, LAST SAW MSG ${this._incomingMsgId} AND HAVE NOW RECEIVED MSG ${e.id}`),this._incomingMsgId=e.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(e.data)):2===e.type?this._onControlMessage.fire(e.data):5===e.type&&this._onClose.fire()}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(e){const t=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;const i=new u(1,t,this._incomingAckId,e);this._outgoingUnackMsg.push(i),this._isReconnecting||(this._socketWriter.write(i),this._recvAckCheck())}sendControl(e){const t=new u(2,0,0,e);this._socketWriter.write(t)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId)return ;if(this._incomingAckTimeout)return;const e=Date.now()-this._incomingMsgLastTime;e>=2e3?this._sendAck():this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-e+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId)return;if(this._outgoingAckTimeout)return;const e=this._outgoingUnackMsg.peek(),t=Date.now()-e.writtenTime;t>=2e4&&!this._loadEstimator.hasHighLoad()?this._onSocketTimeout.fire(void 0):this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},Math.max(2e4-t,0)+5)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const e=new u(3,0,this._incomingAckId,c());this._socketWriter.write(e)}}})),define(e[512],t([0,1,29]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.quickPickItemScorerAccessor=t.QuickPickItemScorerAccessor=t.ItemActivation=t.NO_KEY_MODS=void 0,t.NO_KEY_MODS={ctrlCmd:!1,alt:!1},function(e){e[e.NONE=0]="NONE", e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(t.ItemActivation||(t.ItemActivation={}));class n{constructor(e){this.options=e}getItemLabel(e){return e.label}getItemDescription(e){var t;if(null===(t=this.options)||void 0===t||!t.skipDescription)return e.description}getItemPath(e){var t,n,o;if(null===(t=this.options)||void 0===t||!t.skipPath)return(null===(n=e.resource)||void 0===n?void 0:n.scheme)===i.Schemas.file?e.resource.fsPath:null===(o=e.resource)||void 0===o?void 0:o.path}}t.QuickPickItemScorerAccessor=n,t.quickPickItemScorerAccessor=new n})),define(e[735],t([0,1,21,66]),(function(e,t,i,n){"use strict";function o(e){const t=Object.create(null);for(const i of e.getAllResponseHeaders().split(/\r\n|\n|\r/g))if(i){const e=i.indexOf(":");t[i.substr(0,e).trim().toLowerCase()]=i.substr(e+1).trim()}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.request=void 0,t.request=function(e,t){e.proxyAuthorization&&(e.headers=Object.assign(Object.assign({},e.headers||{}),{ "Proxy-Authorization":e.proxyAuthorization}));const s=new XMLHttpRequest;return new Promise((r,a)=>{s.open(e.type||"GET",e.url||"",!0,e.user,e.password),function(e,t){if(t.headers)e:for(let i in t.headers){switch(i){case"User-Agent":case"Accept-Encoding":case"Content-Length":continue e}e.setRequestHeader(i,t.headers[i])}}(s,e),s.responseType="arraybuffer",s.onerror=e=>a(new Error(s.statusText&&"XHR failed: "+s.statusText||"XHR failed")),s.onload=e=>{r({res:{statusCode:s.status,headers:o(s)},stream:n.bufferToStream(n.VSBuffer.wrap(new Uint8Array(s.response)))})},s.ontimeout=t=>a(new Error(`XHR timeout: ${e.timeout}ms`)),e.timeout&&(s.timeout=e.timeout),s.send(e.data),t.onCancellationRequested(()=>{s.abort(),a(i.canceled())})})}})),define(e[736],t([0,1,2,6,15,13]),(function(e,t,i,n,o,s){"use strict";var r,a;Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryStorageDatabase=t.Storage=t.StorageHint=void 0,function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST" }(r=t.StorageHint||(t.StorageHint={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(a||(a={}));class l extends i.Disposable{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new n.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=a.None,this.cache=new Map,this.flushDelayer=this._register(new o.ThrottledDelayer(l.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach((e,t)=>this.accept(t,e)),null===(i=e.deleted)||void 0===i||i.forEach(e=>this.accept(e,void 0))}accept(e,t){if(this.state===a.Closed)return;let i=!1;if(s.isUndefinedOrNull(t))i=this.cache.delete(e);else{this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0)} i&&this._onDidChangeStorage.fire(e)}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===a.None&&(this.state=a.Initialized,this.options.hint!==r.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(e,t){const i=this.cache.get(e);return s.isUndefinedOrNull(i)?t:i}getBoolean(e,t){const i=this.get(e);return s.isUndefinedOrNull(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return s.isUndefinedOrNull(i)?t:parseInt(i,10)}set(e,t){if(this.state===a.Closed)return Promise.resolve();if(s.isUndefinedOrNull(t))return this.delete(e);const i=String(t);return this.cache.get(e)===i?Promise.resolve():(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending()))}delete(e){if(this.state===a.Closed)return Promise.resolve();return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e), this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())):Promise.resolve()}async close(){if(this.state===a.Closed)return Promise.resolve();this.state=a.Closed;try{await this.flushDelayer.trigger(()=>this.flushPending(),0)}catch(e){}await this.database.close(()=>this.cache)}flushPending(){if(0===this.pendingInserts.size&&0===this.pendingDeletes.size)return Promise.resolve();const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e)}}t.Storage=l,l.DEFAULT_FLUSH_DELAY=100;t.InMemoryStorageDatabase=class{constructor(){this.onDidChangeItemsExternal=n.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(e){e.insert&&e.insert.forEach((e,t)=>this.items.set(t,e)),e.delete&&e.delete.forEach(e=>this.items.delete(e))}async close(){}}})),define(e[737],t([0,1,48,10,21,12]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.testRepeatOnly=t.testRepeat=t.suiteRepeat=t.toResource=t.DeferredPromise=void 0;function r(e,t,i){for(let n=0;n{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),t()})}error(e){return new Promise(t=>{this.errorCallback(e),t()})}cancel(){new Promise(e=>{this.errorCallback(o.canceled()),e()})}},t.toResource=function(e){return s.isWindows?n.URI.file(i.join("C:\\",btoa(this.test.fullTitle()),e)):n.URI.file(i.join("/",btoa(this.test.fullTitle()),e))},t.suiteRepeat=function(e,t,i){for(let n=0;nr(e,t,i))}})),define(e[399],t([0,1,12,398]),(function(e,t,i,n){"use strict";function o(t,i,n=!1){if(n||/^((http:)|(https:)|(file:))/.test(t)){ const o=String(window.location),s=o.substr(0,o.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(n||t.substring(0,s.length)!==s){const o="vs/base/worker/defaultWorkerFactory.js",s=`/*${i}*/self.MonacoEnvironment={baseUrl: '${e.toUrl(o).slice(0,-o.length)}'};importScripts('${t}');/*${i}*/`;if(n){return`data:text/javascript;charset=utf-8,${encodeURIComponent(s)}`}const r=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(r)}}return t+"#"+i}Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultWorkerFactory=t.getWorkerBootstrapUrl=void 0,t.getWorkerBootstrapUrl=o;class s{constructor(t,n,s,r,a){this.id=n;const l=function(t,n){if(i.globals.MonacoEnvironment){if("function"==typeof i.globals.MonacoEnvironment.getWorker)return i.globals.MonacoEnvironment.getWorker(t,n);if("function"==typeof i.globals.MonacoEnvironment.getWorkerUrl)return new Worker(i.globals.MonacoEnvironment.getWorkerUrl(t,n))}if("function"==typeof e){ const i=o(e.toUrl("./"+t),n);return new Worker(i,{name:n})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",s);"function"==typeof l.then?this.worker=l:this.worker=Promise.resolve(l),this.postMessage(t,[]),this.worker.then(e=>{e.onmessage=function(e){r(e.data)},e.onmessageerror=a,"function"==typeof e.addEventListener&&e.addEventListener("error",a)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(i=>i.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class r{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let o=++r.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new s(e,o,this._label||"anonymous"+o,t,e=>{n.logOnceWebWorkerWarning(e),this._webWorkerFailedBeforeError=e,i(e)})}}t.DefaultWorkerFactory=r,r.LAST_WORKER_ID=0})),define(e[513],t([19]),{}),define(e[738],t([19]),{}), define(e[103],t([0,1,12,7,738]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.status=t.alert=t.setARIAContainer=void 0;const o=2e4;let s,r,a,l,c;function d(e){s&&(r.textContent!==e?(n.clearNode(a),h(r,e)):(n.clearNode(r),h(a,e)))}function h(e,t){n.clearNode(e),t.length>o&&(t=t.substr(0,o)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}t.setARIAContainer=function(e){(s=document.createElement("div")).className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};r=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};l=i(),c=i(),e.appendChild(s)},t.alert=d,t.status=function(e){s&&(i.isMacintosh?d(e):l.textContent!==e?(n.clearNode(c), h(l,e)):(n.clearNode(l),h(c,e)))}})),define(e[739],t([19]),{}),define(e[740],t([19]),{}),define(e[174],t([0,1,74,55,41,6,2,128,183,7,740]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonGroup=t.Button=void 0;const d={buttonBackground:n.Color.fromHex("#0E639C"),buttonHoverBackground:n.Color.fromHex("#006BB3"),buttonForeground:n.Color.white};class h extends r.Disposable{constructor(e,t){super(),this._onDidClick=this._register(new s.Emitter),this.options=t||Object.create(null),o.mixin(this.options,d,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder, this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(a.Gesture.addTarget(this._element)),[c.EventType.CLICK,a.EventType.Tap].forEach(e=>{this._register(c.addDisposableListener(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):c.EventHelper.stop(e)}))}),this._register(c.addDisposableListener(this._element,c.EventType.KEY_DOWN,e=>{const t=new i.StandardKeyboardEvent(e);let n=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),n=!0):t.equals(9)&&(this._element.blur(),n=!0),n&&c.EventHelper.stop(t,!0)})),this._register(c.addDisposableListener(this._element,c.EventType.MOUSE_OVER,e=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(c.addDisposableListener(this._element,c.EventType.MOUSE_OUT,e=>{this.applyStyles()})),this.focusTracker=this._register(c.trackFocus(this._element)), this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;(e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null)&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"", e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportCodicons?c.reset(this._element,...l.renderCodicons(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set icon(e){this._element.classList.add(e)}set enabled(e){e?(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)),c.removeTabIndexAndUpdateFocus(this._element))}get enabled(){return!this._element.classList.contains("disabled")}focus(){this._element.focus()}}t.Button=h;class u extends r.Disposable{constructor(e,t,i){super(),this._buttons=[],this.create(e,t,i)}get buttons(){return this._buttons}create(e,t,n){for(let o=0;o1&&this._register(c.addDisposableListener(s.element,c.EventType.KEY_DOWN,e=>{const t=new i.StandardKeyboardEvent(e);let n,s=!0;t.equals(15)?n=o>0?o-1:this._buttons.length-1:t.equals(17)?n=o===this._buttons.length-1?0:o+1:s=!1,s&&"number"==typeof n&&(this._buttons[n].focus(),c.EventHelper.stop(e,!0))}))}}}t.ButtonGroup=u})),define(e[741],t([19]),{}),define(e[742],t([19]),{}),define(e[743],t([19]),{}),define(e[744],t([19]),{}),define(e[342],t([0,1,44,742,744,743]),(function(e,t,i){"use strict";function n(e){let t=e.definition;for(;t instanceof i.Codicon;)t=t.definition ;return`.codicon-${e.id}:before { content: '${t.character}'; }`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatRule=t.CodiconStyles=void 0,t.CodiconStyles=new class{constructor(){this.onDidChange=i.iconRegistry.onDidRegister}getCSS(){const e=[];for(let t of i.iconRegistry.all)e.push(n(t));return e.join("\n")}},t.formatRule=n})),define(e[745],t([19]),{}),define(e[514],t([0,1,7,12,2,340,165,745]),(function(e,t,i,n,o,s,r){"use strict";function a(e,t,i){const n=i.offset+i.size;return 0===i.position?t<=e-n?n:t<=i.offset?i.offset-t:Math.max(e-t,0):t<=i.offset?i.offset-t:t<=e-n?n:0}Object.defineProperty(t,"__esModule",{value:!0}),t.ContextView=t.layout=t.LayoutAnchorPosition=t.AnchorPosition=t.AnchorAlignment=t.ContextViewDOMPosition=void 0,function(e){e[e.ABSOLUTE=1]="ABSOLUTE",e[e.FIXED=2]="FIXED",e[e.FIXED_SHADOW=3]="FIXED_SHADOW"}(t.ContextViewDOMPosition||(t.ContextViewDOMPosition={})),function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.AnchorAlignment||(t.AnchorAlignment={})),function(e){ e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(t.AnchorPosition||(t.AnchorPosition={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After"}(t.LayoutAnchorPosition||(t.LayoutAnchorPosition={})),t.layout=a;class l extends o.Disposable{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=o.Disposable.None,this.toDisposeOnSetContainer=o.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=i.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,i.hide(this.view),this.setContainer(e,t),this._register(o.toDisposable(()=>this.setContainer(null,1)))}setContainer(e,t){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(n=this.shadowRootHostElement)||void 0===n||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t, this.useShadowDOM?(this.shadowRootHostElement=i.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`\n\t\t\t\t\t\n\t\t\t\t`,this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(i.$("slot"))):this.container.appendChild(this.view);const n=new o.DisposableStore;l.BUBBLE_UP_EVENTS.forEach(e=>{n.add(i.addStandardDisposableListener(this.container,e,e=>{this.onDOMEvent(e,!1)}))}),l.BUBBLE_DOWN_EVENTS.forEach(e=>{n.add(i.addStandardDisposableListener(this.container,e,e=>{this.onDOMEvent(e,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),i.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",i.show(this.view), this.toDisposeOnClean=e.render(this.view)||o.Disposable.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||n.isIOS&&r.BrowserFeatures.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){let n=i.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const n=i.getTotalWidth(this.view),o=i.getTotalHeight(this.view),r=this.delegate.anchorPosition||0,l=this.delegate.anchorAlignment||0,c={offset:e.top-window.pageYOffset,size:e.height,position:0===r?0:1};let d;d=0===l?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};const h=a(window.innerHeight,o,c)+window.pageYOffset;s.Range.intersects({start:h,end:h+o},{start:c.offset,end:c.offset+c.size })&&(d.size=e.width,1===l&&(d.offset=e.left));const u=a(window.innerWidth,n,d);this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===r?"bottom":"top"),this.view.classList.add(0===l?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const g=i.getDomNodePagePosition(this.container);this.view.style.top=`${h-(this.useFixedPosition?i.getDomNodePagePosition(this.view).top:g.top)}px`,this.view.style.left=`${u-(this.useFixedPosition?i.getDomNodePagePosition(this.view).left:g.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),i.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!i.isAncestor(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}t.ContextView=l,l.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"], l.BUBBLE_DOWN_EVENTS=["click"] ;let c='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n' })),define(e[746],t([19]),{}),define(e[213],t([0,1,7,24,55,41,746]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CountBadge=void 0;const r={badgeBackground:o.Color.fromHex("#4D4D4D"),badgeForeground:o.Color.fromHex("#FFFFFF")};t.CountBadge=class{constructor(e,t){this.count=0,this.options=t||Object.create(null),s.mixin(this.options,r,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=i.append(e,i.$(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setCountFormat(e){this.countFormat=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=n.format(this.countFormat,this.count),this.element.title=n.format(this.titleFormat,this.count),this.applyStyles()}style(e){ this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}})),define(e[747],t([19]),{}),define(e[515],t([19]),{}),define(e[516],t([0,1,128,30,7,74,6,515]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownMenu=t.Dropdown=t.BaseDropdown=void 0;class a extends n.ActionRunner{constructor(e,t){super(),this._onDidChangeVisibility=new r.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=o.append(e,o.$(".monaco-dropdown")),this._label=o.append(this._element,o.$(".dropdown-label")) ;let n=t.labelRenderer;n||(n=e=>(e.textContent=t.label||"",null));for(const e of[o.EventType.CLICK,o.EventType.MOUSE_DOWN,i.EventType.Tap])this._register(o.addDisposableListener(this.element,e,e=>o.EventHelper.stop(e,!0)));for(const e of[o.EventType.MOUSE_DOWN,i.EventType.Tap])this._register(o.addDisposableListener(this._label,e,e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())}));this._register(o.addDisposableListener(this._label,o.EventType.KEY_UP,e=>{const t=new s.StandardKeyboardEvent(e);(t.equals(3)||t.equals(10))&&(o.EventHelper.stop(e,!0),this.visible?this.hide():this.show())}));const a=n(this._label);a&&this._register(a),this._register(i.Gesture.addTarget(this._label))}get element(){return this._element}get label(){return this._label}set tooltip(e){this._label&&(this._label.title=e)}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}isVisible(){return!!this.visible} onEvent(e,t){this.hide()}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)}}t.BaseDropdown=a;t.Dropdown=class extends a{constructor(e,t){super(e,t),this.contextViewProvider=t.contextViewProvider}show(){super.show(),this.element.classList.add("active"),this.contextViewProvider.showContextView({getAnchor:()=>this.getAnchor(),render:e=>this.renderContents(e),onDOMEvent:(e,t)=>{this.onEvent(e,t)},onHide:()=>this.onHide()})}getAnchor(){return this.element}onHide(){this.element.classList.remove("active")}hide(){super.hide(),this.contextViewProvider&&this.contextViewProvider.hideContextView()}renderContents(e){return null}};t.DropdownMenu=class extends a{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider, this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}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:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):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")}}})),define(e[517],t([19]),{}),define(e[518],t([19]),{}),define(e[748],t([19]),{}),define(e[749],t([19]),{}),define(e[185],t([0,1,7,173,2,340,41,749]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconLabel=void 0;class a{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set title(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class l extends o.Disposable{constructor(e,t){super(),this.domNode=this._register(new a(i.append(e,i.$(".monaco-icon-label")))) ;const o=i.append(this.domNode.element,i.$(".monaco-icon-label-container")),s=i.append(o,i.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new a(i.append(o,i.$("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)?this.nameNode=new d(s,!!t.supportCodicons):this.nameNode=new c(s),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new n.HighlightedLabel(i.append(this.descriptionContainer.element,i.$("span.label-description")),!!t.supportCodicons):this.descriptionNodeFactory=()=>this._register(new a(i.append(this.descriptionContainer.element,i.$("span.label-description"))))}get element(){return this.domNode.element}setLabel(e,t,i){const o=["monaco-icon-label"];i&&(i.extraClasses&&o.push(...i.extraClasses),i.italic&&o.push("italic"),i.strikethrough&&o.push("strikethrough")),this.domNode.className=o.join(" "),this.domNode.title=(null==i?void 0:i.title)||"",this.nameNode.setLabel(e,i), (t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof n.HighlightedLabel?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),(null==i?void 0:i.descriptionTitle)?this.descriptionNode.element.title=i.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=(null==i?void 0:i.descriptionTitle)||"",this.descriptionNode.empty=!t))}}t.IconLabel=l;class c{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!r.equals(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=i.append(this.container,i.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0 ;for(let n=0;n{const o={start:n,end:n+e.length},r=i.map(e=>s.Range.intersect(o,e)).filter(e=>!s.Range.isEmpty(e)).map(({start:e,end:t})=>({start:e-n,end:t-n}));return n=o.end+t.length,r})}(e,o,null==t?void 0:t.matches);for(let s=0;ss.show(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(c,d,h), this.workedVal=0,this.totalWork=void 0}done(){return this.doDone(!0)}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(l),this.element.classList.contains(d)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(h,l),this.element.classList.add(c,d),this}total(e){return this.workedVal=0,this.totalWork=e,this}hasTotal(){return a.isNumber(this.totalWork)}worked(e){return e=Math.max(1,Number(e)),this.doSetWorked(this.workedVal+e)}setWorked(e){return e=Math.max(1,Number(e)),this.doSetWorked(e)}doSetWorked(e){const t=this.totalWork||100;return this.workedVal=e,this.workedVal=Math.min(t,this.workedVal),this.element.classList.remove(d,l),this.element.classList.add(c,h),this.bit.style.width=this.workedVal/t*100+"%",this}getContainer(){return this.element}show(e){this.showDelayedScheduler.cancel(), "number"==typeof e?this.showDelayedScheduler.schedule(e):s.show(this.element)}hide(){s.hide(this.element),this.showDelayedScheduler.cancel()}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}t.ProgressBar=g})),define(e[755],t([19]),{}),define(e[234],t([0,1,2,12,13,128,101,6,7,99,755]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sash=t.setGlobalSashSize=t.SashState=t.Orientation=void 0;const d=!1;!function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(t.Orientation||(t.Orientation={})),function(e){e[e.Disabled=0]="Disabled",e[e.Minimum=1]="Minimum",e[e.Maximum=2]="Maximum",e[e.Enabled=3]="Enabled"}(t.SashState||(t.SashState={}));let h=4;const u=new a.Emitter;t.setGlobalSashSize=function(e){h=e,u.fire(e)};class g extends i.Disposable{constructor(e,t,o){super(),this._state=3, this._onDidEnablementChange=this._register(new a.Emitter),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new a.Emitter),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new a.Emitter),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new a.Emitter),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new a.Emitter),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new i.DisposableStore),this.orthogonalEndSashDisposables=this._register(new i.DisposableStore),this.el=l.append(e,l.$(".monaco-sash")),n.isMacintosh&&this.el.classList.add("mac"),this._register(c.domEvent(this.el,"mousedown")(this.onMouseDown,this)),this._register(c.domEvent(this.el,"dblclick")(this.onMouseDoubleClick,this)),this._register(s.Gesture.addTarget(this.el)),this._register(c.domEvent(this.el,s.EventType.Start)(this.onTouchStart,this)), "number"==typeof o.size?(this.size=o.size,0===o.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=h,this._register(u.event(e=>{this.size=e,this.layout()}))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=o.orthogonalStartSash,this.orthogonalEndSash=o.orthogonalEndSash,this.orientation=o.orientation||0,1===this.orientation?(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",d),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){this.orthogonalStartSashDisposables.clear(), e?(this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this)),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){this.orthogonalEndSashDisposables.clear(),e?(this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this)),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e}onMouseDown(e){l.EventHelper.stop(e,!1);let t=!1;if(!e.__orthogonalSashEvent){const i=this.getOrthogonalSash(e);i&&(t=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!this.state)return;const o=[...l.getElementsByTagName("iframe"),...l.getElementsByTagName("webview")];for(const e of o)e.style.pointerEvents="none" ;const s=new r.StandardMouseEvent(e),a=s.posx,d=s.posy,h=s.altKey,u={startX:a,currentX:a,startY:d,currentY:d,altKey:h};this.el.classList.add("active"),this._onDidStart.fire(u);const g=l.createStyleSheet(this.el),p=()=>{let e="";e=t?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":n.isMacintosh?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":n.isMacintosh?"col-resize":"ew-resize",g.textContent=`* { cursor: ${e} !important; }`},m=new i.DisposableStore;p(),t||this.onDidEnablementChange(p,null,m);c.domEvent(window,"mousemove")(e=>{l.EventHelper.stop(e,!1);const t=new r.StandardMouseEvent(e),i={startX:a,currentX:t.posx,startY:d,currentY:t.posy,altKey:h};this._onDidChange.fire(i)},null,m),c.domEvent(window,"mouseup")(e=>{l.EventHelper.stop(e,!1),this.el.removeChild(g),this.el.classList.remove("active"),this._onDidEnd.fire(),m.dispose();for(const e of o)e.style.pointerEvents="auto"},null,m)}onMouseDoubleClick(e){const t=this.getOrthogonalSash(e) ;t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}onTouchStart(e){l.EventHelper.stop(e);const t=[],n=e.pageX,r=e.pageY,a=e.altKey;this._onDidStart.fire({startX:n,currentX:n,startY:r,currentY:r,altKey:a}),t.push(l.addDisposableListener(this.el,s.EventType.Change,e=>{o.isNumber(e.pageX)&&o.isNumber(e.pageY)&&this._onDidChange.fire({startX:n,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a})})),t.push(l.addDisposableListener(this.el,s.EventType.End,e=>{this._onDidEnd.fire(),i.dispose(t)}))}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"), e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}show(){this.hidden=!1,this.el.style.removeProperty("display"),this.el.setAttribute("aria-hidden","false")}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}isHidden(){return this.hidden}onOrthogonalStartSashEnablementChange(e){this.el.classList.toggle("orthogonal-start",0!==e)}onOrthogonalEndSashEnablementChange(e){this.el.classList.toggle("orthogonal-end",0!==e)}getOrthogonalSash(e){if(0===this.orientation){if(e.offsetY<=this.size)return this.orthogonalStartSash;if(e.offsetY>=this.el.clientHeight-this.size)return this.orthogonalEndSash}else{if(e.offsetX<=this.size)return this.orthogonalStartSash;if(e.offsetX>=this.el.clientWidth-this.size)return this.orthogonalEndSash}}dispose(){super.dispose(),this.el.remove()}}t.Sash=g})),define(e[756],t([19]),{}),define(e[138],t([0,1,7,109,101,731,732,102,15,6,2,12,392,80,756]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.DomScrollableElement=t.SmoothScrollableElement=t.ScrollableElement=t.AbstractScrollableElement=t.MouseWheelClassifier=void 0;const p=500,m=50,v=!0;class f{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class S{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new f(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,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]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5 ;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}t.MouseWheelClassifier=S,S.INSTANCE=new S;class b extends a.Widget{constructor(e,t,i){super(),this._onScroll=this._register(new c.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new c.Emitter),this.onWillScroll=this._onWillScroll.event,e.style.overflow="hidden",this._options=function(e){let t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1, fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize, t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,h.isMacintosh&&(t.className+=" mac");return t}(t),this._scrollable=i,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let o={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new r.VerticalScrollbar(this._scrollable,this._options,o)),this._horizontalScrollbar=this._register(new s.HorizontalScrollbar(this._scrollable,this._options,o)),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(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode), this._options.useShadows?(this._leftShadowDomNode=n.createFastDomNode(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=n.createFastDomNode(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=n.createFastDomNode(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onnonbubblingmouseout(this._listenOnDomNode,e=>this._onMouseOut(e)), this._hideTimeout=this._register(new l.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=d.dispose(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,h.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)), void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontalScrollbarSize&&this._horizontalScrollbar.updateScrollbarSize(e.horizontalScrollbarSize),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}triggerScrollFromMouseWheelEvent(e){this._onMouseWheel(new o.StandardWheelEvent(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=d.dispose(this._mouseWheelToDispose),e)){let e=e=>{this._onMouseWheel(new o.StandardWheelEvent(e))};this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,i.EventType.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=S.INSTANCE;if(v){const i=window.devicePixelRatio/g.getZoomFactor() ;h.isWindows||h.isLinux?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}if(e.deltaY||e.deltaX){let i=e.deltaY*this._options.mouseWheelScrollSensitivity,n=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(i)>=Math.abs(n)?n=0:i=0),this._options.flipAxes&&([i,n]=[n,i]);const o=!h.isMacintosh&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||n||(n=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(n*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let r={};if(i){const e=s.scrollTop-m*i;this._verticalScrollbar.writeScrollPosition(r,e)}if(n){const e=s.scrollLeft-m*n;this._horizontalScrollbar.writeScrollPosition(r,e)}if(r=this._scrollable.validateScrollPosition(r),s.scrollLeft!==r.scrollLeft||s.scrollTop!==r.scrollTop){ v&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(r):this._scrollable.setScrollPositionNow(r),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}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 e=this._scrollable.getCurrentScrollPosition();let t=e.scrollTop>0,i=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(i?" left":"")), this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(i?" left":""))}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){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(),p)}}t.AbstractScrollableElement=b;class _ extends b{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const n=new u.Scrollable(0,e=>i.scheduleAtNextAnimationFrame(e));super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}} t.ScrollableElement=_;t.SmoothScrollableElement=class extends b{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};t.DomScrollableElement=class extends _{constructor(e,t){super(e,t),this._element=e,this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}})),define(e[757],t([0,1,7,138,14,6,2,44,739]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadcrumbsWidget=t.SimpleBreadcrumbsItem=t.BreadcrumbsItem=void 0;class l{dispose(){}}t.BreadcrumbsItem=l;class c extends l{ constructor(e,t=e){super(),this.text=e,this.title=t}equals(e){return e===this||e instanceof c&&e.text===this.text&&e.title===this.title}render(e){let t=document.createElement("div");t.title=this.title,t.innerText=this.text,e.appendChild(t)}}t.SimpleBreadcrumbsItem=c;const d=a.registerIcon("breadcrumb-separator",a.Codicon.chevronRight);t.BreadcrumbsWidget=class{constructor(e,t){this._disposables=new r.DisposableStore,this._onDidSelectItem=new s.Emitter,this._onDidFocusItem=new s.Emitter,this._onDidChangeFocus=new s.Emitter,this.onDidSelectItem=this._onDidSelectItem.event,this.onDidFocusItem=this._onDidFocusItem.event,this.onDidChangeFocus=this._onDidChangeFocus.event,this._items=new Array,this._nodes=new Array,this._freeNodes=new Array,this._focusedItemIdx=-1,this._selectedItemIdx=-1,this._domNode=document.createElement("div"),this._domNode.className="monaco-breadcrumbs",this._domNode.tabIndex=0,this._domNode.setAttribute("role","list"),this._scrollable=new n.DomScrollableElement(this._domNode,{vertical:2, horizontal:1,horizontalScrollbarSize:t,useShadows:!1,scrollYToX:!0}),this._disposables.add(this._scrollable),this._disposables.add(i.addStandardDisposableListener(this._domNode,"click",e=>this._onClick(e))),e.appendChild(this._scrollable.getDomNode()),this._styleElement=i.createStyleSheet(this._domNode);const o=i.trackFocus(this._domNode);this._disposables.add(o),this._disposables.add(o.onDidBlur(e=>this._onDidChangeFocus.fire(!1))),this._disposables.add(o.onDidFocus(e=>this._onDidChangeFocus.fire(!0)))}setHorizontalScrollbarSize(e){this._scrollable.updateOptions({horizontalScrollbarSize:e})}dispose(){var e;this._disposables.dispose(),null===(e=this._pendingLayout)||void 0===e||e.dispose(),this._onDidSelectItem.dispose(),this._onDidFocusItem.dispose(),this._onDidChangeFocus.dispose(),this._domNode.remove(),this._nodes.length=0,this._freeNodes.length=0}layout(e){var t;e&&i.Dimension.equals(e,this._dimension)||(null===(t=this._pendingLayout)||void 0===t||t.dispose(), this._pendingLayout=e?this._updateDimensions(e):this._updateScrollbar())}_updateDimensions(e){const t=new r.DisposableStore;return t.add(i.modify(()=>{this._dimension=e,this._domNode.style.width=`${e.width}px`,this._domNode.style.height=`${e.height}px`,t.add(this._updateScrollbar())})),t}_updateScrollbar(){return i.measure(()=>{i.measure(()=>{this._scrollable.setRevealOnScroll(!1),this._scrollable.scanDomNode(),this._scrollable.setRevealOnScroll(!0)})})}style(e){let t="";e.breadcrumbsBackground&&(t+=`.monaco-breadcrumbs { background-color: ${e.breadcrumbsBackground}}`),e.breadcrumbsForeground&&(t+=`.monaco-breadcrumbs .monaco-breadcrumb-item { color: ${e.breadcrumbsForeground}}\n`),e.breadcrumbsFocusForeground&&(t+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused { color: ${e.breadcrumbsFocusForeground}}\n`),e.breadcrumbsFocusAndSelectionForeground&&(t+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused.selected { color: ${e.breadcrumbsFocusAndSelectionForeground}}\n`), e.breadcrumbsHoverForeground&&(t+=`.monaco-breadcrumbs .monaco-breadcrumb-item:hover:not(.focused):not(.selected) { color: ${e.breadcrumbsHoverForeground}}\n`),this._styleElement.innerText!==t&&(this._styleElement.innerText=t)}domFocus(){let e=this._focusedItemIdx>=0?this._focusedItemIdx:this._items.length-1;e>=0&&e0&&this._focus(this._focusedItemIdx-1,e)}focusNext(e){this._focusedItemIdx+1=0&&this._reveal(t,!1)}_reveal(e,t){const i=this._nodes[e];if(i){const{width:e}=this._scrollable.getScrollDimensions(),{scrollLeft:n}=this._scrollable.getScrollPosition();(!t||i.offsetLeft>n+e||i.offsetLefte.equals(t)),i=this._items.splice(t,this._items.length-t,...e.slice(t)),this._render(t),r.dispose(i),this._focus(-1,void 0)}catch(n){let o=new Error(`BreadcrumbsItem#setItems: newItems: ${e.length}, prefix: ${t}, removed: ${i.length}`);throw o.name=n.name,o.stack=n.stack,o}}_render(e){for(;e0?this._freeNodes.pop():document.createElement("div");i&&(this._renderItem(t,i),this._domNode.appendChild(i),this._nodes.push(i))}this.layout(void 0)}_renderItem(e,t){i.clearNode(t),t.className="",e.render(t),t.tabIndex=-1,t.setAttribute("role","listitem"),t.classList.add("monaco-breadcrumb-item");const n=i.$(d.cssSelector);t.appendChild(n)}_onClick(e){for(let t=e.target;t;t=t.parentElement){ let i=this._nodes.indexOf(t);if(i>=0){this._focus(i,e),this._select(i,e);break}}}}})),define(e[520],t([0,1,7,2,138,748]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderHoverAction=t.HoverWidget=void 0;const s=i.$;class r extends n.Disposable{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new o.DomScrollableElement(this.contentsDomNode,{})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}t.HoverWidget=r,t.renderHoverAction=function(e,t,n){const o=i.append(e,s("div.action-container")),r=i.append(o,s("a.action"));return r.setAttribute("href","#"),r.setAttribute("role","button"), t.iconClass&&i.append(r,s(`span.icon.${t.iconClass}`)),i.append(r,s("span")).textContent=n?`${t.label} (${n})`:t.label,i.addDisposableListener(o,i.EventType.CLICK,e=>{e.stopPropagation(),e.preventDefault(),t.run(o)})}})),define(e[257],t([0,1,41,2,128,6,99,138,392,726,729,95,340,14,166,15,80,7]),(function(e,t,i,n,s,r,a,l,c,d,h,u,g,p,m,v,f,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListView=t.NativeDragAndDropData=t.ExternalElementsDragAndDropData=t.ElementsDragAndDropData=void 0;const b={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0};class _{constructor(e){this.elements=e}get context(){return this._context}set context(e){this._context=e}update(){}getData(){return this.elements}}t.ElementsDragAndDropData=_;class C{constructor(e){this.elements=e}update(){}getData(){return this.elements}} t.ExternalElementsDragAndDropData=C;class y{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>void 0}}class E{constructor(e,t,o,u=b){if(this.virtualDelegate=t,this.domId=`list_id_${++E.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null, this.scrollableElementWidthDelayer=new v.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 r.Emitter,this.onDidChangeContentHeight=r.Event.latch(this._onDidChangeContentHeight.event),this._horizontalScrolling=!1,u.horizontalScrolling&&u.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new d.RangeMap;for(const e of o)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new h.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","boolean"!=typeof u.mouseSupport||u.mouseSupport),this._horizontalScrolling=i.getOrDefault(u,e=>e.horizontalScrolling,b.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===u.additionalScrollHeight?0:u.additionalScrollHeight,this.accessibilityProvider=new w(u.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",i.getOrDefault(u,e=>e.transformOptimization,b.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(s.Gesture.addTarget(this.rowsContainer)),this.scrollable=new c.Scrollable(i.getOrDefault(u,e=>e.smoothScrolling,!1)?125:0,e=>S.scheduleAtNextAnimationFrame(e)),this.scrollableElement=this.disposables.add(new l.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:1, vertical:i.getOrDefault(u,e=>e.verticalScrollMode,b.verticalScrollMode),useShadows:i.getOrDefault(u,e=>e.useShadows,b.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),a.domEvent(this.rowsContainer,s.EventType.Change)(this.onTouchChange,this,this.disposables),a.domEvent(this.scrollableElement.getDomNode(),"scroll")(e=>e.target.scrollTop=0,null,this.disposables),r.Event.map(a.domEvent(this.domNode,"dragover"),e=>this.toDragEvent(e))(this.onDragOver,this,this.disposables),r.Event.map(a.domEvent(this.domNode,"drop"),e=>this.toDragEvent(e))(this.onDrop,this,this.disposables),a.domEvent(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),a.domEvent(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=i.getOrDefault(u,e=>e.setRowLineHeight,b.setRowLineHeight),this.setRowHeight=i.getOrDefault(u,e=>e.setRowHeight,b.setRowHeight), this.supportDynamicHeights=i.getOrDefault(u,e=>e.supportDynamicHeights,b.supportDynamicHeights),this.dnd=i.getOrDefault(u,e=>e.dnd,b.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get onWillScroll(){return this.scrollableElement.onWillScroll}get containerDomNode(){return this.rowsContainer}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:S.getContentWidth(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px` }else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}triggerScrollFromMouseWheelEvent(e){this.scrollableElement.triggerScrollFromMouseWheelEvent(e)}updateElementHeight(e,t,i){if(e<0||e>=this.items.length)return;if(this.items[e].size===t)return;const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);let o=0;o=ee&&i<=n.end?t-this.items[e].size:0,this.rangeMap.splice(e,1,[{size:t}]),this.items[e].size=t,this.render(n,Math.max(0,this.lastRenderTop+o),this.lastRenderHeight,void 0,void 0,!0),this.eventuallyUpdateScrollDimensions(), this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=g.Range.intersect(o,s);for(let e=r.start;e({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:n.Disposable.None}));let u;0===e&&t>=this.items.length?(this.rangeMap=new d.RangeMap, this.rangeMap.splice(0,0,h),this.items=h,u=[]):(this.rangeMap.splice(e,t,h),u=this.items.splice(e,t,...h));const p=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),v=d.shift(l,p),f=g.Range.intersect(m,v);for(let e=f.start;ed.shift(e,p)),_=[{start:e,end:e+i.length},...b].map(e=>g.Range.intersect(m,e)),C=this.getNextToLastElement(_);for(const e of _)for(let t=e.start;te.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=S.scheduleAtNextAnimationFrame(()=>{ this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth()):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}updateWidth(e){if(!this.horizontalScrolling||void 0===this.scrollWidth)return;const t=this.items[e];this.measureItemWidth(t),void 0!==t.width&&t.width>this.scrollWidth&&(this.scrollWidth=t.width,this.scrollableElement.setScrollDimensions({scrollWidth:this.scrollWidth+10}))}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.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 e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),i=this.rangeMap.positionAt(e.start+1);if(-1!==i){if((i-t)/2+tt.element===e)}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:S.getContentHeight(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight), this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:S.getContentWidth(this.domNode)}))}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=g.Range.relativeComplement(r,e),l=g.Range.relativeComplement(e,r),c=this.getNextToLastElement(a);if(s){const t=g.Range.intersect(e,r);for(let e=t.start;ethis.onDragStart(i.element,o,e))}this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=f.isFirefox?"-moz-fit-content":"fit-content", e.width=S.getContentWidth(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];t.dragStartDisposable.dispose();const i=this.renderers.get(t.templateId) ;t.row&&i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null,this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e})}getScrollLeft(){return this.scrollableElement.getScrollPosition().scrollLeft}setScrollLeft(e){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollWidth:this.scrollWidth})),this.scrollableElement.setScrollPosition({scrollLeft:e})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){ return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return r.Event.map(a.domEvent(this.domNode,"click"),e=>this.toMouseEvent(e))}get onMouseDblClick(){return r.Event.map(a.domEvent(this.domNode,"dblclick"),e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return r.Event.filter(r.Event.map(a.domEvent(this.domNode,"auxclick"),e=>this.toMouseEvent(e)),e=>1===e.browserEvent.button)}get onMouseUp(){return r.Event.map(a.domEvent(this.domNode,"mouseup"),e=>this.toMouseEvent(e))}get onMouseDown(){return r.Event.map(a.domEvent(this.domNode,"mousedown"),e=>this.toMouseEvent(e))}get onMouseOver(){return r.Event.map(a.domEvent(this.domNode,"mouseover"),e=>this.toMouseEvent(e))}get onMouseMove(){return r.Event.map(a.domEvent(this.domNode,"mousemove"),e=>this.toMouseEvent(e))}get onMouseOut(){return r.Event.map(a.domEvent(this.domNode,"mouseout"),e=>this.toMouseEvent(e))}get onContextMenu(){ return r.Event.map(a.domEvent(this.domNode,"contextmenu"),e=>this.toMouseEvent(e))}get onTouchStart(){return r.Event.map(a.domEvent(this.domNode,"touchstart"),e=>this.toTouchEvent(e))}get onTap(){return r.Event.map(a.domEvent(this.rowsContainer,s.EventType.Tap),e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight) ;this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,!1)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(m.DataTransfers.RESOURCES,JSON.stringify([t])),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=S.$(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout(()=>document.body.removeChild(t),0)}this.currentDragData=new _(n),m.StaticDND.CurrentDragAndDropData=new C(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(), m.StaticDND.CurrentDragAndDropData&&"vscode-ui"===m.StaticDND.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(m.StaticDND.CurrentDragAndDropData)this.currentDragData=m.StaticDND.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new y}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=-1===(i=p.distinct(i).filter(e=>e>=-1&&ee-t))[0]?[-1]:i,o=this.currentDragFeedback,s=i,Array.isArray(o)&&Array.isArray(s)?p.equals(o,s):o===s)return!0;var o,s;if(this.currentDragFeedback=i, this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=n.toDisposable(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=n.toDisposable(()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode&&t.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=v.disposableTimeout(()=>this.clearDragOverFeedback(),100)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,m.StaticDND.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(), t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,m.StaticDND.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=n.Disposable.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=S.getTopLeftOffset(this.domNode).top;this.dragOverAnimationDisposable=S.animate(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=v.disposableTimeout(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return ;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i=!0){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;ee.templateData===i);if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(t=>t.templateData===e);t<0||this.renderedElements.splice(t,1)}}class y{constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new d.Emitter,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new C(this)}splice(e,t,i){ const n=i.length-t,o=e+t,s=[...this.sortedIndexes.filter(t=>tt?i+e:-1).filter(e=>-1!==e),...this.sortedIndexes.filter(e=>e>=o).map(e=>e+n)];this.renderer.splice(e,t,i.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(V),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=B(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return s.binarySearch(this.sortedIndexes,e,V)>=0}dispose(){i.dispose(this._onChange)}}o([r.memoize],y.prototype,"renderer",null);class w extends y{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class E{constructor(e,t,i){this.trait=e,this.view=t, this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map(()=>!1));const n=this.trait.get().map(e=>this.identityProvider.getId(this.view.element(e)).toString()),o=i.map(e=>n.indexOf(this.identityProvider.getId(e).toString())>-1);this.trait.splice(e,t,o)}}function I(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function x(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&x(e.parentElement))}t.isInputElement=I,t.isMonacoEditor=x;class k{constructor(e,t,n){this.list=e,this.view=t,this.disposables=new i.DisposableStore;const o=!1!==n.multipleSelectionSupport,s=d.Event.chain(h.domEvent(t.domNode,"keydown")).filter(e=>!I(e.target)).map(e=>new c.StandardKeyboardEvent(e));s.filter(e=>3===e.keyCode).on(this.onEnter,this,this.disposables),s.filter(e=>16===e.keyCode).on(this.onUpArrow,this,this.disposables),s.filter(e=>18===e.keyCode).on(this.onDownArrow,this,this.disposables), s.filter(e=>11===e.keyCode).on(this.onPageUpArrow,this,this.disposables),s.filter(e=>12===e.keyCode).on(this.onPageDownArrow,this,this.disposables),s.filter(e=>9===e.keyCode).on(this.onEscape,this,this.disposables),o&&s.filter(e=>(a.isMacintosh?e.metaKey:e.ctrlKey)&&31===e.keyCode).on(this.onCtrlA,this,this.disposables)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(), this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(s.range(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()}dispose(){this.disposables.dispose()}}var D;!function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(D||(D={})),t.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class T{constructor(e,t,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=o,this.enabled=!1,this.state=D.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new i.DisposableStore, this.disposables=new i.DisposableStore,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}toggle(){this.triggered=!this.triggered}enable(){if(this.enabled)return;const e=d.Event.chain(h.domEvent(this.view.domNode,"keydown")).filter(e=>!I(e.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(e=>new c.StandardKeyboardEvent(e)).filter(e=>this.delegate.mightProducePrintableCharacter(e)).forEach(e=>{e.stopPropagation(),e.preventDefault()}).map(e=>e.browserEvent.key).event,t=d.Event.debounce(e,()=>null,800);d.Event.reduce(d.Event.any(e,t),(e,t)=>null===t?null:(e||"")+t)(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e ;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&b.alert(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=D.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===D.Idle?1:0;this.state=D.Typing;for(let t=0;t!I(e.target)).map(e=>new c.StandardKeyboardEvent(e)).filter(e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function A(e){return a.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function M(e){return e.browserEvent.shiftKey}t.isSelectionSingleChangeEvent=A,t.isSelectionRangeChangeEvent=M;const L={isSelectionSingleChangeEvent:A,isSelectionRangeChangeEvent:M};class O{constructor(e){this.list=e,this.disposables=new i.DisposableStore,this._onPointer=new d.Emitter, this.onPointer=this._onPointer.event,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||L),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(l.Gesture.addTarget(e.getHTMLElement()))),d.Event.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):a.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey}isSelectionRangeChangeEvent(e){ return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){x(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(x(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(I(e.browserEvent.target)||x(e.browserEvent.target))return;let t=this.list.getFocus()[0];const i=this.list.getSelection();t=void 0===t?i[0]:t;const n=e.index;return void 0===n?(this.list.setFocus([],e.browserEvent),void this.list.setSelection([],e.browserEvent)):this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e)?this.changeSelection(e,t):this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)?this.changeSelection(e,t):(this.list.setFocus([n],e.browserEvent), (o=e.browserEvent)instanceof MouseEvent&&2===o.button||this.list.setSelection([n],e.browserEvent),void this._onPointer.fire(e));var o}onDoubleClick(e){if(I(e.browserEvent.target)||x(e.browserEvent.target))return;if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e,t){const i=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){const n=Math.min(t,i),o=Math.max(t,i),r=s.range(n,o+1),a=this.list.getSelection(),l=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);n.reverse(),o=i;for(;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e!==i);this.list.setFocus([i]),t.length===n.length?this.list.setSelection([...n,i],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}t.MouseController=O;class N{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):a.isMacintosh||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)), e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`), e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`), e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`), e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),this.styleElement.textContent=i.join("\n")}}t.DefaultStyleController=N;const P={listFocusBackground:p.Color.fromHex("#7FB0D0"),listActiveSelectionBackground:p.Color.fromHex("#0E639C"),listActiveSelectionForeground:p.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:p.Color.fromHex("#094771"),listFocusAndSelectionForeground:p.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:p.Color.fromHex("#3F3F46"),listHoverBackground:p.Color.fromHex("#2A2D2E"),listDropBackground:p.Color.fromHex("#383B3D"), treeIndentGuidesStroke:p.Color.fromHex("#a9a9a9")},F={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function B(e,t){const i=[];let n=0,o=0;for(;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]e-t;class W{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const s of this.renderers)s.disposeElement&&s.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class z{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){ const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class U{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class K{constructor(e,n,o,s,r=F){var a;this.user=e,this._options=r,this.eventBufferer=new d.EventBufferer,this._ariaLabel="",this.disposables=new i.DisposableStore,this.didJustPressContextMenuKey=!1,this._onDidDispose=new d.Emitter, this.onDidDispose=this._onDidDispose.event;const l=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(a=this._options.accessibilityProvider)||void 0===a?void 0:a.getWidgetRole():"list";this.selection=new w("listbox"!==l),this.focus=new y("focused"),m.mixin(r,P,!1);const c=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(c.push(new z(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map(e=>new W(e.templateId,[...c,e]));const u=Object.assign(Object.assign({},r),{dnd:r.dnd&&new U(this,r.dnd)});if(this.view=new g.ListView(n,o,s,u),this.view.domNode.setAttribute("role",l),r.styleController)this.styleController=r.styleController(this.view.domId);else{const e=_.createStyleSheet(this.view.domNode);this.styleController=new N(e,this.view.domId)} if(this.spliceable=new v.CombinedSpliceable([new E(this.focus,this.view,r.identityProvider),new E(this.selection,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=d.Event.map(h.domEvent(this.view.domNode,"focus",!0),()=>null),this.onDidBlur=d.Event.map(h.domEvent(this.view.domNode,"blur",!0),()=>null),this.disposables.add(new R(this,this.view)),"boolean"!=typeof r.keyboardSupport||r.keyboardSupport){const e=new k(this,this.view,r);this.disposables.add(e)}if(r.keyboardNavigationLabelProvider){const e=r.keyboardNavigationDelegate||t.DefaultKeyboardNavigationDelegate;this.typeLabelController=new T(this,this.view,r.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(r),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()),r.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return d.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return d.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}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 onMouseUp(){return this.view.onMouseUp}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseMove(){return this.view.onMouseMove}get onMouseOut(){ return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){const e=d.Event.chain(h.domEvent(this.view.domNode,"keydown")).map(e=>new c.StandardKeyboardEvent(e)).filter(e=>this.didJustPressContextMenuKey=58===e.keyCode||e.shiftKey&&68===e.keyCode).filter(e=>(e.preventDefault(),e.stopPropagation(),!1)).event,t=d.Event.chain(h.domEvent(this.view.domNode,"keyup")).filter(()=>{const e=this.didJustPressContextMenuKey;return this.didJustPressContextMenuKey=!1,e}).filter(()=>this.getFocus().length>0&&!!this.view.domElement(this.getFocus()[0])).map(e=>{const t=this.getFocus()[0];return{index:t,element:this.view.element(t),anchor:this.view.domElement(t),browserEvent:e}}).event,i=d.Event.chain(this.view.onContextMenu).filter(()=>!this.didJustPressContextMenuKey).map(({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.clientX+1,y:i.clientY},browserEvent:i})).event;return d.Event.any(e,t,i)}get onKeyDown(){ return h.domEvent(this.view.domNode,"keydown")}get onKeyUp(){return h.domEvent(this.view.domNode,"keyup")}get onKeyPress(){return h.domEvent(this.view.domNode,"keypress")}createMouseController(e){return new O(this)}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new u.ListError(this.user,`Invalid start index: ${e}`);if(t<0)throw new u.ListError(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}updateWidth(e){this.view.updateWidth(e)}updateElementHeight(e,t){this.view.updateElementHeight(e,t,null)}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight} get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollLeft(){return this.view.getScrollLeft()}set scrollLeft(e){this.view.setScrollLeft(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get lastVisibleIndex(){return this.view.lastVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus()}layout(e,t){this.view.layout(e,t)}toggleKeyboardNavigation(){this.typeLabelController&&this.typeLabelController.toggle()}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new u.ListError(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setFocus(e,t){ for(const t of e)if(t<0||t>=this.length)throw new u.ListError(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&setTimeout(()=>this.focusNextPage(e,t),0)}}focusPreviousPage(e,t){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1) ;const o=this.view.element(i),s=this.getFocusedElements()[0];if(s!==o){const n=this.findNextIndex(i,!1,t);n>-1&&s!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&setTimeout(()=>this.focusPreviousPage(e,t),0)}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t){ if(e<0||e>=this.length)throw new u.ListError(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if(n.isNumber(t)){const e=s-this.view.renderHeight;this.view.setScrollTop(e*f.clamp(t,0,1)+o)}else{const e=o+s,t=i+this.view.renderHeight;o=t||(o=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new u.ListError(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}isDOMFocused(){return this.view.domNode===document.activeElement}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){const e=this.focus.get() ;this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}o([r.memoize],K.prototype,"onDidChangeFocus",null),o([r.memoize],K.prototype,"onDidChangeSelection",null),o([r.memoize],K.prototype,"onContextMenu",null),t.List=K})), define(e[521],t([0,1,2,14,175,6,31,519]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PagedList=void 0;class a{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:i.Disposable.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const s=new r.CancellationTokenSource,a=o.resolve(e,s.token);i.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(t=>this.renderer.renderElement(t,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class l{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()} getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}t.PagedList=class{constructor(e,t,i,n,s={}){const r=()=>this.model,c=n.map(e=>new a(e,r));this.list=new o.List(e,t,i,c,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new l(e,t.accessibilityProvider)})}(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}isDOMFocused(){return this.list.getHTMLElement()===document.activeElement}domFocus(){this.list.domFocus()}get onDidFocus(){return this.list.onDidFocus}get onDidBlur(){return this.list.onDidBlur}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseClick(){return s.Event.map(this.list.onMouseClick,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onMouseDblClick(){ return s.Event.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onTap(){return s.Event.map(this.list.onTap,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return s.Event.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeFocus(){return s.Event.map(this.list.onDidChangeFocus,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get onDidChangeSelection(){return s.Event.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get onContextMenu(){return s.Event.map(this.list.onContextMenu,({element:e,index:t,anchor:i,browserEvent:n})=>void 0===e?{element:e,index:t,anchor:i,browserEvent:n}:{ element:this._model.get(e),index:t,anchor:i,browserEvent:n})}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,n.range(e.length))}get length(){return this.list.length}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(e){this.list.scrollLeft=e}setFocus(e){this.list.setFocus(e)}focusNext(e,t){this.list.focusNext(e,t)}focusPrevious(e,t){this.list.focusPrevious(e,t)}focusNextPage(){this.list.focusNextPage()}focusPreviousPage(){this.list.focusPreviousPage()}getFocus(){return this.list.getFocus()}setSelection(e,t){this.list.setSelection(e,t)}getSelection(){return this.list.getSelection()}layout(e,t){this.list.layout(e,t)}toggleKeyboardNavigation(){this.list.toggleKeyboardNavigation()}reveal(e,t){this.list.reveal(e,t)}style(e){this.list.style(e)}dispose(){this.list.dispose()}}})),define(e[758],t([19]),{}),define(e[759],t([19]),{}),define(e[760],t([19]),{}),define(e[761],t([19]),{}), define(e[197],t([0,1,2,6,13,195,14,234,55,99,7,234,761]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitView=t.Sizing=t.LayoutPriority=t.Orientation=void 0,Object.defineProperty(t,"Orientation",{enumerable:!0,get:function(){return h.Orientation}});const u={separatorBorder:l.Color.transparent};var g,p;!function(e){e[e.Normal=0]="Normal",e[e.Low=1]="Low",e[e.High=2]="High"}(t.LayoutPriority||(t.LayoutPriority={}));class m{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=s.clamp(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize), this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class v extends m{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class f extends m{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(g||(g={})),function(e){e.Distribute={type:"distribute"}, e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(p=t.Sizing||(t.Sizing={}));class S extends i.Disposable{constructor(e,t={}){super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=g.Idle,this._onDidSashChange=this._register(new n.Emitter),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new n.Emitter),this.onDidSashReset=this._onDidSashReset.event,this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=o.isUndefined(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!o.isUndefined(t.proportionalLayout)||!!t.proportionalLayout,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=d.append(this.el,d.$(".sash-container")), this.viewContainer=d.append(this.el,d.$(".split-view-container")),this.style(t.styles||u),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((e,t)=>{const i=o.isUndefined(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)}),this.contentSize=this.viewItems.reduce((e,t)=>e+t.size,0),this.saveProportions())}get length(){return this.viewItems.length}get minimumSize(){return this.viewItems.reduce((e,t)=>e+t.minimumSize,0)}get maximumSize(){return 0===this.length?Number.POSITIVE_INFINITY:this.viewItems.reduce((e,t)=>e+t.maximumSize,0)}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get sashes(){return this.sashItems.map(e=>e.sash)}get startSnappingEnabled(){ return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.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",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}removeView(e,t){if(this.state!==g.Idle)throw new Error("Cant modify splitview");if(this.state=g.Busy,e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");const i=this.viewItems.splice(e,1)[0].dispose();if(this.viewItems.length>=1){const t=Math.max(e-1,0);this.sashItems.splice(t,1)[0].disposable.dispose()}return this.relayout(),this.state=g.Idle, t&&"distribute"===t.type&&this.distributeViewSizes(),i}moveView(e,t){if(this.state!==g.Idle)throw new Error("Cant modify splitview");const i=this.getViewCachedVisibleSize(e),n=void 0===i?this.getViewSize(e):p.Invisible(i),o=this.removeView(e);this.addView(o,n,t)}swapViews(e,t){if(this.state!==g.Idle)throw new Error("Cant modify splitview");if(e>t)return this.swapViews(t,e);const i=this.getViewSize(e),n=this.getViewSize(t),o=this.removeView(t),s=this.removeView(e);this.addView(o,i,e),this.addView(s,n,t)}isViewVisible(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].visible}setViewVisible(e,t){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[e].setVisible(t),this.distributeEmptySpace(e),this.layoutViews(),this.saveProportions()}getViewCachedVisibleSize(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].cachedVisibleSize}layout(e,t){const i=Math.max(this.size,this.contentSize) ;if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority),o=t.filter(e=>2===this.viewItems[e].priority);this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:n}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex(t=>t.sash===e),s=i.combinedDisposable(c.domEvent(document.body,"keydown")(e=>a(this.sashDragState.current,e.altKey)),c.domEvent(document.body,"keyup")(()=>a(this.sashDragState.current,!1))),a=(e,t)=>{const i=this.viewItems.map(e=>e.size);let n,a,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){ if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}}if(!t){const e=r.range(o,-1),t=r.range(o+1,this.viewItems.length),s=e.reduce((e,t)=>e+(this.viewItems[t].minimumSize-i[t]),0),l=e.reduce((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t]),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce((e,t)=>e+(i[t]-this.viewItems[t].minimumSize),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize),0),h=Math.max(s,d),u=Math.min(c,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);a={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l, maxDelta:c,alt:t,snapBefore:n,snapAfter:a,disposable:s}};a(t,n)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map(e=>e.size),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=s.clamp(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){ if(this.state!==g.Idle)throw new Error("Cant modify splitview");if(this.state=g.Busy,e<0||e>=this.viewItems.length)return;const i=r.range(this.viewItems.length).filter(t=>t!==e),n=[...i.filter(e=>1===this.viewItems[e].priority),e],o=i.filter(e=>2===this.viewItems[e].priority),a=this.viewItems[e];t=Math.round(t),t=s.clamp(t,a.minimumSize,Math.min(a.maximumSize,this.size)),a.size=t,this.relayout(n,o),this.state=g.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=s.clamp(i,t.minimumSize,t.maximumSize);const n=r.range(this.viewItems.length),o=n.filter(e=>1===this.viewItems[e].priority),a=n.filter(e=>2===this.viewItems[e].priority);this.relayout(o,a)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,o=this.viewItems.length,s){if(this.state!==g.Idle)throw new Error("Cant modify splitview");this.state=g.Busy;const l=d.$(".split-view-view") ;o===this.viewItems.length?this.viewContainer.appendChild(l):this.viewContainer.insertBefore(l,this.viewContainer.children.item(o));const c=e.onDidChange(e=>this.onViewChange(m,e)),h=i.toDisposable(()=>this.viewContainer.removeChild(l)),u=i.combinedDisposable(c,h);let p;p="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const m=0===this.orientation?new v(l,e,p,u):new f(l,e,p,u);if(this.viewItems.splice(o,0,m),this.viewItems.length>1){const e=0===this.orientation?new a.Sash(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e)},{orientation:1,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}):new a.Sash(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e)},{orientation:0,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),t=0===this.orientation?t=>({sash:e,start:t.startY,current:t.currentY,alt:t.altKey}):t=>({sash:e, start:t.startX,current:t.currentX,alt:t.altKey}),s=n.Event.map(e.onDidStart,t)(this.onSashStart,this),l=n.Event.map(e.onDidChange,t)(this.onSashChange,this),c=n.Event.map(e.onDidEnd,()=>this.sashItems.findIndex(t=>t.sash===e))(this.onSashEnd,this),d=e.onDidReset(()=>{const t=this.sashItems.findIndex(t=>t.sash===e),i=r.range(t,-1),n=r.range(t+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(t)}),h=i.combinedDisposable(s,l,c,d,e),u={sash:e,disposable:h};this.sashItems.splice(o-1,0,u)}let S;l.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(S=[t.index]),s||this.relayout([o],S),this.state=g.Idle,s||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce((e,t)=>e+t.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(), this.saveProportions()}resize(e,t,i=this.viewItems.map(e=>e.size),n,o,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c,d){if(e<0||e>=this.viewItems.length)return 0;const h=r.range(e,-1),u=r.range(e+1,this.viewItems.length);if(o)for(const e of o)r.pushToStart(h,e),r.pushToStart(u,e);if(n)for(const e of n)r.pushToEnd(h,e),r.pushToEnd(u,e);const g=h.map(e=>this.viewItems[e]),p=h.map(e=>i[e]),m=u.map(e=>this.viewItems[e]),v=u.map(e=>i[e]),f=h.reduce((e,t)=>e+(this.viewItems[t].minimumSize-i[t]),0),S=h.reduce((e,t)=>e+(this.viewItems[t].maximumSize-i[t]),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce((e,t)=>e+(i[t]-this.viewItems[t].minimumSize),0),_=0===u.length?Number.NEGATIVE_INFINITY:u.reduce((e,t)=>e+(i[t]-this.viewItems[t].maximumSize),0),C=Math.max(f,_,a),y=Math.min(b,S,l);let w=!1;if(c){const e=this.viewItems[c.index],i=t>=c.limitDelta;w=i!==e.visible,e.setVisible(i,c.size)}if(!w&&d){const e=this.viewItems[d.index],i=te+t.size,0);let i=this.size-t;const n=r.range(this.viewItems.length-1,-1),o=n.filter(e=>1===this.viewItems[e].priority),a=n.filter(e=>2===this.viewItems[e].priority);for(const e of a)r.pushToStart(n,e);for(const e of o)r.pushToEnd(n,e);"number"==typeof e&&r.pushToEnd(n,e);for(let e=0;0!==i&&ee+t.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(e=>e.sash.layout()),this.updateSashEnablement()}updateSashEnablement(){let e=!1 ;const t=this.viewItems.map(t=>e=t.size-t.minimumSize>0||e);e=!1;const i=this.viewItems.map(t=>e=t.maximumSize-t.size>0||e),n=[...this.viewItems].reverse();e=!1;const o=n.map(t=>e=t.size-t.minimumSize>0||e).reverse();e=!1;const s=n.map(t=>e=t.maximumSize-t.size>0||e).reverse();let a=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:h&&t[e]&&(a0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach(e=>e.dispose()),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}t.SplitView=S})),define(e[762],t([0,1,197,7,6,2]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CenteredViewLayout=void 0;const r={leftMarginRatio:.1909,rightMarginRatio:.1909};function a(e){const t=n.$(".centered-layout-margin");return t.style.height="100%",e&&(t.style.backgroundColor=e.toString()),{element:t,layout:()=>void 0,minimumSize:60,maximumSize:Number.POSITIVE_INFINITY,onDidChange:o.Event.None}}t.CenteredViewLayout=class{constructor(e,t,i={leftMarginRatio:r.leftMarginRatio,rightMarginRatio:r.rightMarginRatio}){this.container=e,this.view=t,this.state=i,this.width=0,this.height=0,this.didLayout=!1,this.splitViewDisposables=new s.DisposableStore, this._boundarySashes={},this.container.appendChild(this.view.element),this.container.style.overflow="hidden"}get minimumWidth(){return this.splitView?this.splitView.minimumSize:this.view.minimumWidth}get maximumWidth(){return this.splitView?this.splitView.maximumSize:this.view.maximumWidth}get minimumHeight(){return this.view.minimumHeight}get maximumHeight(){return this.view.maximumHeight}get onDidChange(){return this.view.onDidChange}get boundarySashes(){return this._boundarySashes}set boundarySashes(e){this._boundarySashes=e,this.splitView&&(this.splitView.orthogonalStartSash=e.top,this.splitView.orthogonalEndSash=e.bottom)}layout(e,t){this.width=e,this.height=t,this.splitView?(this.splitView.layout(e),this.didLayout||this.resizeMargins()):this.view.layout(e,t,0,0),this.didLayout=!0}resizeMargins(){this.splitView&&(this.splitView.resizeView(0,this.state.leftMarginRatio*this.width),this.splitView.resizeView(2,this.state.rightMarginRatio*this.width))}isActive(){return!!this.splitView}styles(e){this.style=e, this.splitView&&this.emptyViews&&(this.splitView.style(this.style),this.emptyViews[0].element.style.backgroundColor=this.style.background.toString(),this.emptyViews[1].element.style.backgroundColor=this.style.background.toString())}activate(e){var t,n;if(e!==this.isActive())if(e){this.container.removeChild(this.view.element),this.splitView=new i.SplitView(this.container,{inverseAltBehavior:!0,orientation:1,styles:this.style}),this.splitView.orthogonalStartSash=this.boundarySashes.top,this.splitView.orthogonalEndSash=this.boundarySashes.bottom,this.splitViewDisposables.add(this.splitView.onDidSashChange(()=>{this.splitView&&(this.state.leftMarginRatio=this.splitView.getViewSize(0)/this.width,this.state.rightMarginRatio=this.splitView.getViewSize(2)/this.width)})),this.splitViewDisposables.add(this.splitView.onDidSashReset(()=>{this.state.leftMarginRatio=r.leftMarginRatio,this.state.rightMarginRatio=r.rightMarginRatio,this.resizeMargins()})),this.splitView.layout(this.width),this.splitView.addView((t=this.view, n=()=>this.height,{element:t.element,get maximumSize(){return t.maximumWidth},get minimumSize(){return t.minimumWidth},onDidChange:o.Event.map(t.onDidChange,e=>e&&e.width),layout:(e,i)=>t.layout(e,n(),0,i)}),0);const e=this.style?this.style.background:void 0;this.emptyViews=[a(e),a(e)],this.splitView.addView(this.emptyViews[0],this.state.leftMarginRatio*this.width,0),this.splitView.addView(this.emptyViews[1],this.state.rightMarginRatio*this.width,2)}else this.splitView&&this.container.removeChild(this.splitView.el),this.splitViewDisposables.clear(),this.splitView&&this.splitView.dispose(),this.splitView=void 0,this.emptyViews=void 0,this.container.appendChild(this.view.element)}isDefault(e){return e.leftMarginRatio===r.leftMarginRatio&&e.rightMarginRatio===r.rightMarginRatio}dispose(){this.splitViewDisposables.dispose(),this.splitView&&(this.splitView.dispose(),this.splitView=void 0)}}})),define(e[522],t([0,1,6,197,2,7,14,55,195,197,234,518]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";function h(e){ return 0===e?1:0}Object.defineProperty(t,"__esModule",{value:!0}),t.GridView=t.MultiplexLayoutController=t.LayoutController=t.isGridBranchNode=t.orthogonal=t.Orientation=t.LayoutPriority=t.Sizing=void 0,Object.defineProperty(t,"Sizing",{enumerable:!0,get:function(){return c.Sizing}}),Object.defineProperty(t,"LayoutPriority",{enumerable:!0,get:function(){return c.LayoutPriority}}),Object.defineProperty(t,"Orientation",{enumerable:!0,get:function(){return d.Orientation}}),t.orthogonal=h,t.isGridBranchNode=function(e){return!!e.children};const u={separatorBorder:a.Color.transparent};class g{constructor(e){this.isLayoutEnabled=e}}t.LayoutController=g;class p{constructor(e){this.layoutControllers=e}get isLayoutEnabled(){return this.layoutControllers.every(e=>e.isLayoutEnabled)}}t.MultiplexLayoutController=p;class m{constructor(e,t,r,a,l=0,c=0,d){if(this.orientation=e,this.layoutController=t,this.proportionalLayout=a,this.children=[],this.absoluteOffset=0,this.absoluteOrthogonalOffset=0, this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event,this.childrenChangeDisposable=o.Disposable.None,this._onDidSashReset=new i.Emitter,this.onDidSashReset=this._onDidSashReset.event,this.splitviewSashResetDisposable=o.Disposable.None,this.childrenSashResetDisposable=o.Disposable.None,this._boundarySashes={},this._styles=r,this._size=l,this._orthogonalSize=c,this.element=s.$(".monaco-grid-branch-node"),d){const t={views:d.map(e=>({view:e.node,size:e.node.size,visible:!(e.node instanceof v&&void 0!==e.visible)||e.visible})),size:this.orthogonalSize},i={proportionalLayout:a,orientation:e,styles:r};this.children=d.map(e=>e.node),this.splitview=new n.SplitView(this.element,Object.assign(Object.assign({},i),{descriptor:t})),this.children.forEach((e,t)=>{const i=0===t,n=t===this.children.length;e.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:i?this.boundarySashes.start:this.splitview.sashes[t-1], orthogonalEnd:n?this.boundarySashes.end:this.splitview.sashes[t]}})}else this.splitview=new n.SplitView(this.element,{orientation:e,styles:r,proportionalLayout:a}),this.splitview.layout(l,{orthogonalSize:c,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:l,absoluteOrthogonalSize:c});const h=i.Event.map(this.splitview.onDidSashReset,e=>[e]);this.splitviewSashResetDisposable=h(this._onDidSashReset.fire,this._onDidSashReset);const u=i.Event.map(i.Event.any(...this.children.map(e=>e.onDidChange)),()=>void 0);this.childrenChangeDisposable=u(this._onDidChange.fire,this._onDidChange);const g=i.Event.any(...this.children.map((e,t)=>i.Event.map(e.onDidSashReset,e=>[t,...e])));this.childrenSashResetDisposable=g(this._onDidSashReset.fire,this._onDidSashReset)}get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get styles(){return this._styles}get width(){return 1===this.orientation?this.size:this.orthogonalSize}get height(){return 1===this.orientation?this.orthogonalSize:this.size} get top(){return 1===this.orientation?this.absoluteOffset:this.absoluteOrthogonalOffset}get left(){return 1===this.orientation?this.absoluteOrthogonalOffset:this.absoluteOffset}get minimumSize(){return 0===this.children.length?0:Math.max(...this.children.map(e=>e.minimumOrthogonalSize))}get maximumSize(){return Math.min(...this.children.map(e=>e.maximumOrthogonalSize))}get priority(){if(0===this.children.length)return 0;const e=this.children.map(e=>void 0===e.priority?0:e.priority);return e.some(e=>2===e)?2:e.some(e=>1===e)?1:0}get minimumOrthogonalSize(){return this.splitview.minimumSize}get maximumOrthogonalSize(){return this.splitview.maximumSize}get minimumWidth(){return 1===this.orientation?this.minimumOrthogonalSize:this.minimumSize}get minimumHeight(){return 1===this.orientation?this.minimumSize:this.minimumOrthogonalSize}get maximumWidth(){return 1===this.orientation?this.maximumOrthogonalSize:this.maximumSize}get maximumHeight(){return 1===this.orientation?this.maximumSize:this.maximumOrthogonalSize} get boundarySashes(){return this._boundarySashes}set boundarySashes(e){this._boundarySashes=e,this.splitview.orthogonalStartSash=e.orthogonalStart,this.splitview.orthogonalEndSash=e.orthogonalEnd;for(let t=0;t0,this.splitview.endSnappingEnabled=this.absoluteOrthogonalOffset+i.orthogonalSizethis.children.length)throw new Error("Invalid index");this.splitview.addView(e,t,i,n),this._addChild(e,i),this.onDidChildrenChange()}_addChild(e,t){const i=0===t,n=t===this.children.length;this.children.splice(t,0,e),e.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:i?this.boundarySashes.start:this.splitview.sashes[t-1],orthogonalEnd:n?this.boundarySashes.end:this.splitview.sashes[t]},i||(this.children[t-1].boundarySashes=Object.assign(Object.assign({},this.children[t-1].boundarySashes),{orthogonalEnd:this.splitview.sashes[t-1]})),n||(this.children[t+1].boundarySashes=Object.assign(Object.assign({},this.children[t+1].boundarySashes),{ orthogonalStart:this.splitview.sashes[t]}))}removeChild(e,t){if(e<0||e>=this.children.length)throw new Error("Invalid index");this.splitview.removeView(e,t),this._removeChild(e),this.onDidChildrenChange()}_removeChild(e){const t=0===e,i=e===this.children.length-1,[n]=this.children.splice(e,1);return t||(this.children[e-1].boundarySashes=Object.assign(Object.assign({},this.children[e-1].boundarySashes),{orthogonalEnd:this.splitview.sashes[e-1]})),i||(this.children[e].boundarySashes=Object.assign(Object.assign({},this.children[e].boundarySashes),{orthogonalStart:this.splitview.sashes[Math.max(e-1,0)]})),n}moveChild(e,t){if(e===t)return;if(e<0||e>=this.children.length)throw new Error("Invalid from index");e<(t=l.clamp(t,0,this.children.length))&&t--,this.splitview.moveView(e,t);const i=this._removeChild(e);this._addChild(i,t),this.onDidChildrenChange()}swapChildren(e,t){if(e!==t){if(e<0||e>=this.children.length)throw new Error("Invalid from index");t=l.clamp(t,0,this.children.length), this.splitview.swapViews(e,t),[this.children[e].boundarySashes,this.children[t].boundarySashes]=[this.children[e].boundarySashes,this.children[t].boundarySashes],[this.children[e],this.children[t]]=[this.children[t],this.children[e]],this.onDidChildrenChange()}}resizeChild(e,t){if(e<0||e>=this.children.length)throw new Error("Invalid index");this.splitview.resizeView(e,t)}distributeViewSizes(e=!1){if(this.splitview.distributeViewSizes(),e)for(const e of this.children)e instanceof m&&e.distributeViewSizes(!0)}getChildSize(e){if(e<0||e>=this.children.length)throw new Error("Invalid index");return this.splitview.getViewSize(e)}isChildVisible(e){if(e<0||e>=this.children.length)throw new Error("Invalid index");return this.splitview.isViewVisible(e)}setChildVisible(e,t){if(e<0||e>=this.children.length)throw new Error("Invalid index");this.splitview.isViewVisible(e)!==t&&this.splitview.setViewVisible(e,t)}getChildCachedVisibleSize(e){if(e<0||e>=this.children.length)throw new Error("Invalid index") ;return this.splitview.getViewCachedVisibleSize(e)}onDidChildrenChange(){const e=i.Event.map(i.Event.any(...this.children.map(e=>e.onDidChange)),()=>void 0);this.childrenChangeDisposable.dispose(),this.childrenChangeDisposable=e(this._onDidChange.fire,this._onDidChange);const t=i.Event.any(...this.children.map((e,t)=>i.Event.map(e.onDidSashReset,e=>[t,...e])));this.childrenSashResetDisposable.dispose(),this.childrenSashResetDisposable=t(this._onDidSashReset.fire,this._onDidSashReset),this._onDidChange.fire(void 0)}trySet2x2(e){if(2!==this.children.length||2!==e.children.length)return o.Disposable.None;if(this.getChildSize(0)!==e.getChildSize(0))return o.Disposable.None;const[t,i]=this.children,[n,s]=e.children;if(!(t instanceof v&&i instanceof v))return o.Disposable.None;if(!(n instanceof v&&s instanceof v))return o.Disposable.None;0===this.orientation?(i.linkedWidthNode=n.linkedHeightNode=t,t.linkedWidthNode=s.linkedHeightNode=i,s.linkedWidthNode=t.linkedHeightNode=n, n.linkedWidthNode=i.linkedHeightNode=s):(n.linkedWidthNode=i.linkedHeightNode=t,s.linkedWidthNode=t.linkedHeightNode=i,t.linkedWidthNode=s.linkedHeightNode=n,i.linkedWidthNode=n.linkedHeightNode=s);const r=this.splitview.sashes[0],a=e.splitview.sashes[0];return r.linkedSash=a,a.linkedSash=r,this._onDidChange.fire(void 0),e._onDidChange.fire(void 0),o.toDisposable(()=>{r.linkedSash=a.linkedSash=void 0,t.linkedHeightNode=t.linkedWidthNode=void 0,i.linkedHeightNode=i.linkedWidthNode=void 0,n.linkedHeightNode=n.linkedWidthNode=void 0,s.linkedHeightNode=s.linkedWidthNode=void 0})}dispose(){for(const e of this.children)e.dispose();this._onDidChange.dispose(),this._onDidSashReset.dispose(),this.splitviewSashResetDisposable.dispose(),this.childrenSashResetDisposable.dispose(),this.childrenChangeDisposable.dispose(),this.splitview.dispose()}}class v{constructor(e,t,n,o,s=0){this.view=e,this.orientation=t,this.layoutController=n,this._size=0,this.absoluteOffset=0,this.absoluteOrthogonalOffset=0, this.onDidSashReset=i.Event.None,this._onDidLinkedWidthNodeChange=new i.Relay,this._linkedWidthNode=void 0,this._onDidLinkedHeightNodeChange=new i.Relay,this._linkedHeightNode=void 0,this._onDidSetLinkedNode=new i.Emitter,this._boundarySashes={},this._orthogonalSize=o,this._size=s,this._onDidViewChange=i.Event.map(this.view.onDidChange,e=>e&&(0===this.orientation?e.width:e.height)),this.onDidChange=i.Event.any(this._onDidViewChange,this._onDidSetLinkedNode.event,this._onDidLinkedWidthNodeChange.event,this._onDidLinkedHeightNodeChange.event)}get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get linkedWidthNode(){return this._linkedWidthNode}set linkedWidthNode(e){this._onDidLinkedWidthNodeChange.input=e?e._onDidViewChange:i.Event.None,this._linkedWidthNode=e,this._onDidSetLinkedNode.fire(void 0)}get linkedHeightNode(){return this._linkedHeightNode}set linkedHeightNode(e){this._onDidLinkedHeightNodeChange.input=e?e._onDidViewChange:i.Event.None,this._linkedHeightNode=e, this._onDidSetLinkedNode.fire(void 0)}get width(){return 1===this.orientation?this.orthogonalSize:this.size}get height(){return 1===this.orientation?this.size:this.orthogonalSize}get top(){return 1===this.orientation?this.absoluteOffset:this.absoluteOrthogonalOffset}get left(){return 1===this.orientation?this.absoluteOrthogonalOffset:this.absoluteOffset}get element(){return this.view.element}get minimumWidth(){return this.linkedWidthNode?Math.max(this.linkedWidthNode.view.minimumWidth,this.view.minimumWidth):this.view.minimumWidth}get maximumWidth(){return this.linkedWidthNode?Math.min(this.linkedWidthNode.view.maximumWidth,this.view.maximumWidth):this.view.maximumWidth}get minimumHeight(){return this.linkedHeightNode?Math.max(this.linkedHeightNode.view.minimumHeight,this.view.minimumHeight):this.view.minimumHeight}get maximumHeight(){return this.linkedHeightNode?Math.min(this.linkedHeightNode.view.maximumHeight,this.view.maximumHeight):this.view.maximumHeight}get minimumSize(){ return 1===this.orientation?this.minimumHeight:this.minimumWidth}get maximumSize(){return 1===this.orientation?this.maximumHeight:this.maximumWidth}get priority(){return this.view.priority}get snap(){return this.view.snap}get minimumOrthogonalSize(){return 1===this.orientation?this.minimumWidth:this.minimumHeight}get maximumOrthogonalSize(){return 1===this.orientation?this.maximumWidth:this.maximumHeight}get boundarySashes(){return this._boundarySashes}set boundarySashes(e){var t;this._boundarySashes=e,this.view.setBoundarySashes&&this.view.setBoundarySashes((t=e,1===this.orientation?{left:t.start,right:t.end,top:t.orthogonalStart,bottom:t.orthogonalEnd}:{top:t.start,bottom:t.end,left:t.orthogonalStart,right:t.orthogonalEnd}))}layout(e,t,i){if(this.layoutController.isLayoutEnabled){if(void 0===i)throw new Error("Invalid state");this._size=e,this._orthogonalSize=i.orthogonalSize,this.absoluteOffset=i.absoluteOffset+t,this.absoluteOrthogonalOffset=i.absoluteOrthogonalOffset, this.view.layout(this.width,this.height,this.top,this.left)}}setVisible(e){this.view.setVisible&&this.view.setVisible(e)}dispose(){}}class f{constructor(e={}){this.onDidSashResetRelay=new i.Relay,this.onDidSashReset=this.onDidSashResetRelay.event,this.disposable2x2=o.Disposable.None,this._onDidChange=new i.Relay,this.onDidChange=this._onDidChange.event,this._boundarySashes={},this.element=s.$(".monaco-grid-view"),this.styles=e.styles||u,this.proportionalLayout=void 0===e.proportionalLayout||!!e.proportionalLayout,this.firstLayoutController=new g(!1),this.layoutController=new p([this.firstLayoutController,...e.layoutController?[e.layoutController]:[]]),this.root=new m(0,this.layoutController,this.styles,this.proportionalLayout)}get root(){return this._root}set root(e){const t=this._root;t&&(this.element.removeChild(t.element),t.dispose()),this._root=e,this.element.appendChild(e.element),this.onDidSashResetRelay.input=e.onDidSashReset,this._onDidChange.input=i.Event.map(e.onDidChange,()=>void 0)} get orientation(){return this._root.orientation}set orientation(e){if(this._root.orientation===e)return;const{size:t,orthogonalSize:i}=this._root;this.root=function e(t,i,n){if(t instanceof m){const o=new m(h(t.orientation),t.layoutController,t.styles,t.proportionalLayout,i,n);let s=0;for(let r=t.children.length-1;r>=0;r--){const a=t.children[r],l=a instanceof m?a.orthogonalSize:a.size;let c=0===t.size?0:Math.round(i*l/t.size);s+=c,0===r&&(c+=i-s),o.addChild(e(a,n,c),c,0,!0)}return o}return new v(t.view,h(t.orientation),t.layoutController,n)}(this._root,i,t),this.root.layout(t,0,{orthogonalSize:i,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:t,absoluteOrthogonalSize:i}),this.boundarySashes=this.boundarySashes}get width(){return this.root.width}get height(){return this.root.height}get minimumWidth(){return this.root.minimumWidth}get minimumHeight(){return this.root.minimumHeight}get maximumWidth(){return this.root.maximumHeight}get maximumHeight(){return this.root.maximumHeight}get boundarySashes(){ return this._boundarySashes}set boundarySashes(e){var t;this._boundarySashes=e,this.root.boundarySashes=(t=e,1===this.orientation?{start:t.left,end:t.right,orthogonalStart:t.top,orthogonalEnd:t.bottom}:{start:t.top,end:t.bottom,orthogonalStart:t.left,orthogonalEnd:t.right})}getViewMap(e,t){t||(t=this.root),t instanceof m?t.children.forEach(t=>this.getViewMap(e,t)):e.set(t.view,t.element)}style(e){this.styles=e,this.root.style(e)}layout(e,t){this.firstLayoutController.isLayoutEnabled=!0;const[i,n]=1===this.root.orientation?[t,e]:[e,t];this.root.layout(i,0,{orthogonalSize:n,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:i,absoluteOrthogonalSize:n})}addView(e,t,i){this.disposable2x2.dispose(),this.disposable2x2=o.Disposable.None;const[s,a]=r.tail2(i),[l,c]=this.getNode(s);if(c instanceof m){const i=new v(e,h(c.orientation),this.layoutController,c.orthogonalSize);c.addChild(i,t,a)}else{const[,i]=r.tail2(l),[,o]=r.tail2(s);let d=0;const h=i.getChildCachedVisibleSize(o) ;"number"==typeof h&&(d=n.Sizing.Invisible(h)),i.removeChild(o);const u=new m(c.orientation,c.layoutController,this.styles,this.proportionalLayout,c.size,c.orthogonalSize);i.addChild(u,c.size,o);const g=new v(c.view,i.orientation,this.layoutController,c.size);u.addChild(g,d,0),"number"!=typeof t&&"split"===t.type&&(t=n.Sizing.Split(0));const p=new v(e,i.orientation,this.layoutController,c.size);u.addChild(p,t,a)}}removeView(e,t){this.disposable2x2.dispose(),this.disposable2x2=o.Disposable.None;const[i,s]=r.tail2(e),[a,l]=this.getNode(i);if(!(l instanceof m))throw new Error("Invalid location");const c=l.children[s];if(!(c instanceof v))throw new Error("Invalid location");if(l.removeChild(s,t),0===l.children.length)throw new Error("Invalid grid state");if(l.children.length>1)return c.view;if(0===a.length){const e=l.children[0];return e instanceof v?c.view:(l.removeChild(0),this.root=e,this.boundarySashes=this.boundarySashes,c.view)}const[,d]=r.tail2(a),[,u]=r.tail2(i),g=l.children[0],p=l.isChildVisible(0) ;l.removeChild(0);const f=d.children.map((e,t)=>d.getChildSize(t));if(d.removeChild(u,t),g instanceof m){f.splice(u,1,...g.children.map(e=>e.size));for(let e=0;e0){const[,e]=r.tail2(s),[,t]=r.tail2(n);e.resizeChild(t,c)}"number"==typeof l&&a.resizeChild(o,l)}getViewSize(e){if(!e)return{width:this.root.width,height:this.root.height};const[,t]=this.getNode(e);return{width:t.width,height:t.height}}getViewCachedVisibleSize(e){const[t,i]=r.tail2(e),[,n]=this.getNode(t);if(!(n instanceof m))throw new Error("Invalid location");return n.getChildCachedVisibleSize(i)}maximizeViewSize(e){const[t,i]=this.getNode(e);if(!(i instanceof v))throw new Error("Invalid location");for(let i=0;i({node:this._deserializeNode(n,h(t),i,e.size),visible:n.visible}));o=new m(t,this.layoutController,this.styles,this.proportionalLayout,e.size,n,s)}else o=new v(i.fromJSON(e.data),t,this.layoutController,n,e.size);return o}_getViews(e,t,i){const n={top:e.top,left:e.left,width:e.width,height:e.height};if(e instanceof v)return{view:e.view,box:n,cachedVisibleSize:i};const o=[];for(let i=0;i=t.children.length)throw new Error("Invalid location");const s=t.children[n];return i.push(t),this.getNode(o,s,i)}trySet2x2(){if(this.disposable2x2.dispose(), this.disposable2x2=o.Disposable.None,2!==this.root.children.length)return;const[e,t]=this.root.children;e instanceof m&&t instanceof m&&(this.disposable2x2=e.trySet2x2(t))}dispose(){this.onDidSashResetRelay.dispose(),this.root.dispose(),this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}t.GridView=f})),define(e[523],t([0,1,2,14,522,522,518]),(function(e,t,i,n,o,s){"use strict";var r;function a(e){return!!e.children}function l(e,t){const i=d(t);return{offset:0===t?e.top:3===t?e.left+e.width:1===t?e.top+e.height:e.left,range:{start:1===i?e.top:e.left,end:1===i?e.top+e.height:e.left+e.width}}}function c(e,t){return t.length%2==0?o.orthogonal(e):e}function d(e){return 0===e||1===e?0:1}function h(e,t,i){if(c(e,t)===d(i)){let[e,o]=n.tail2(t);return 3!==i&&1!==i||(o+=1),[...e,o]}{const e=3===i||1===i?1:0;return[...t,e]}}function u(e){const t=e.parentElement;if(!t)throw new Error("Invalid grid element");if(/\bmonaco-grid-view\b/.test(t.className))return[] ;const i=function(e){const t=e.parentElement;if(!t)throw new Error("Invalid grid element");let i=t.firstElementChild,n=0;for(;i!==e&&i!==t.lastElementChild&&i;)i=i.nextElementSibling,n++;return n}(t);return[...u(t.parentElement.parentElement.parentElement),i]}Object.defineProperty(t,"__esModule",{value:!0}),t.createSerializedGrid=t.sanitizeGridNodeDescriptor=t.SerializableGrid=t.Grid=t.Sizing=t.getRelativeLocation=t.isGridBranchNode=t.Direction=t.LayoutPriority=t.orthogonal=t.Orientation=void 0,Object.defineProperty(t,"Orientation",{enumerable:!0,get:function(){return s.Orientation}}),Object.defineProperty(t,"orthogonal",{enumerable:!0,get:function(){return s.orthogonal}}),Object.defineProperty(t,"LayoutPriority",{enumerable:!0,get:function(){return s.LayoutPriority}}),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(t.Direction||(t.Direction={})),t.isGridBranchNode=a,t.getRelativeLocation=h,function(e){e.Distribute={type:"distribute"},e.Split={type:"split"}, e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(r=t.Sizing||(t.Sizing={}));class g extends i.Disposable{constructor(e,t={}){super(),this.views=new Map,this.didLayout=!1,e instanceof o.GridView?(this.gridview=e,this.gridview.getViewMap(this.views)):this.gridview=new o.GridView(t),this._register(this.gridview),this._register(this.gridview.onDidSashReset(this.onDidSashReset,this));const i="number"==typeof t.firstViewVisibleCachedSize?o.Sizing.Invisible(t.firstViewVisibleCachedSize):0;e instanceof o.GridView||this._addView(e,i,[0])}get orientation(){return this.gridview.orientation}set orientation(e){this.gridview.orientation=e}get width(){return this.gridview.width}get height(){return this.gridview.height}get minimumWidth(){return this.gridview.minimumWidth}get minimumHeight(){return this.gridview.minimumHeight}get maximumWidth(){return this.gridview.maximumWidth}get maximumHeight(){return this.gridview.maximumHeight}get onDidChange(){return this.gridview.onDidChange}get boundarySashes(){ return this.gridview.boundarySashes}set boundarySashes(e){this.gridview.boundarySashes=e}get element(){return this.gridview.element}style(e){this.gridview.style(e)}layout(e,t){this.gridview.layout(e,t),this.didLayout=!0}hasView(e){return this.views.has(e)}addView(e,t,i,s){if(this.views.has(e))throw new Error("Can't add same view twice");const r=d(s);1===this.views.size&&this.orientation!==r&&(this.orientation=r);const a=this.getViewLocation(i),l=h(this.gridview.orientation,a,s);let c;if("number"==typeof t)c=t;else if("split"===t.type){const[,e]=n.tail2(a);c=o.Sizing.Split(e)}else c="distribute"===t.type?o.Sizing.Distribute:t;this._addView(e,c,l)}addViewAt(e,t,i){if(this.views.has(e))throw new Error("Can't add same view twice");let n;n="number"==typeof t?t:"distribute"===t.type?o.Sizing.Distribute:t,this._addView(e,n,i)}_addView(e,t,i){this.views.set(e,e.element),this.gridview.addView(e,t,i)}removeView(e,t){if(1===this.views.size)throw new Error("Can't remove last view");const i=this.getViewLocation(e) ;this.gridview.removeView(i,t&&"distribute"===t.type?o.Sizing.Distribute:void 0),this.views.delete(e)}moveView(e,t,i,o){const s=this.getViewLocation(e),[r,a]=n.tail2(s),l=this.getViewLocation(i),c=h(this.gridview.orientation,l,o),[d,u]=n.tail2(c);n.equals(r,d)?this.gridview.moveView(r,a,u):(this.removeView(e,"number"==typeof t?void 0:t),this.addView(e,t,i,o))}moveViewTo(e,t){const i=this.getViewLocation(e),[o,s]=n.tail2(i),[a,l]=n.tail2(t);if(n.equals(o,a))this.gridview.moveView(o,s,l);else{const n=this.getViewSize(e),o=c(this.gridview.orientation,i),s=this.getViewCachedVisibleSize(e),a=void 0===s?1===o?n.width:n.height:r.Invisible(s);this.removeView(e),this.addViewAt(e,a,t)}}swapViews(e,t){const i=this.getViewLocation(e),n=this.getViewLocation(t);return this.gridview.swapViews(i,n)}resizeView(e,t){const i=this.getViewLocation(e);return this.gridview.resizeView(i,t)}getViewSize(e){if(!e)return this.gridview.getViewSize();const t=this.getViewLocation(e);return this.gridview.getViewSize(t)} getViewCachedVisibleSize(e){const t=this.getViewLocation(e);return this.gridview.getViewCachedVisibleSize(t)}maximizeViewSize(e){const t=this.getViewLocation(e);this.gridview.maximizeViewSize(t)}distributeViewSizes(){this.gridview.distributeViewSizes()}isViewVisible(e){const t=this.getViewLocation(e);return this.gridview.isViewVisible(t)}setViewVisible(e,t){const i=this.getViewLocation(e);this.gridview.setViewVisible(i,t)}getViews(){return this.gridview.getView()}getNeighborViews(e,t,i=!1){if(!this.didLayout)throw new Error("Can't call getNeighborViews before first layout");const n=this.getViewLocation(e),o=this.getViews(),s=function e(t,i){if(0===i.length)return t;if(!a(t))throw new Error("Invalid location");const[n,...o]=i;return e(t.children[n],o)}(o,n);let r=l(s.box,t);return i&&(0===t&&0===s.box.top?r={offset:o.box.top+o.box.height,range:r.range}:3===t&&s.box.left+s.box.width===o.box.width?r={offset:0,range:r.range}:1===t&&s.box.top+s.box.height===o.box.height?r={offset:0,range:r.range }:2===t&&0===s.box.left&&(r={offset:o.box.left+o.box.width,range:r.range})),function(e,t,i){const n=[];return function e(t,i,o){if(a(t))for(const n of t.children)e(n,i,o);else{const{offset:e,range:a}=l(t.box,i);e!==o.offset||(s=a,r=o.range,s.start>=r.end||r.start>=s.end)||n.push(t)}var s,r}(e,t,i),n}(o,function(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 3;case 3:return 2}}(t),r).map(e=>e.view)}getViewLocation(e){const t=this.views.get(e);if(!t)throw new Error("View not found");return u(t)}onDidSashReset(e){const t=e=>{const t=this.gridview.getView(e);if(a(t))return!1;const i=c(this.orientation,e),n=1===i?t.view.preferredWidth:t.view.preferredHeight;if("number"!=typeof n)return!1;const o=1===i?{width:Math.round(n)}:{height:Math.round(n)};return this.gridview.resizeView(e,o),!0};if(t(e))return;const[i,o]=n.tail2(e);t([...i,o+1])||this.gridview.distributeViewSizes(i)}}t.Grid=g;class p extends g{constructor(){super(...arguments),this.initialLayoutContext=!0}static serializeNode(e,t){ const i=0===t?e.box.width:e.box.height;return a(e)?{type:"branch",data:e.children.map(e=>p.serializeNode(e,o.orthogonal(t))),size:i}:"number"==typeof e.cachedVisibleSize?{type:"leaf",data:e.view.toJSON(),size:e.cachedVisibleSize,visible:!1}:{type:"leaf",data:e.view.toJSON(),size:i}}static deserializeNode(e,t,i,n){if(!e||"object"!=typeof e)throw new Error("Invalid JSON");if("branch"===e.type){if(!Array.isArray(e.data))throw new Error("Invalid JSON: 'data' property of branch must be an array.");const s=[];let r=0;for(const a of e.data){if("number"!=typeof a.size)throw new Error("Invalid JSON: 'size' property of node must be a number.");const e="leaf"===a.type&&!1===a.visible?0:a.size,l=1===t?{top:i.top,left:i.left+r,width:e,height:i.height}:{top:i.top+r,left:i.left,width:i.width,height:e};s.push(p.deserializeNode(a,o.orthogonal(t),l,n)),r+=e}return{children:s,box:i}}if("leaf"===e.type){return{view:n.fromJSON(e.data),box:i,cachedVisibleSize:!1===e.visible?e.size:void 0}} throw new Error("Invalid JSON: 'type' property must be either 'branch' or 'leaf'.")}static getFirstLeaf(e){return a(e)?p.getFirstLeaf(e.children[0]):e}static deserialize(e,t,i={}){if("number"!=typeof e.orientation)throw new Error("Invalid JSON: 'orientation' property must be a number.");if("number"!=typeof e.width)throw new Error("Invalid JSON: 'width' property must be a number.");if("number"!=typeof e.height)throw new Error("Invalid JSON: 'height' property must be a number.");const n=o.GridView.deserialize(e,t,i);return new p(n,i)}serialize(){return{root:p.serializeNode(this.getViews(),this.orientation),orientation:this.orientation,width:this.width,height:this.height}}layout(e,t){super.layout(e,t),this.initialLayoutContext&&(this.initialLayoutContext=!1,this.gridview.trySet2x2())}}function m(e,t){if(!t&&e.groups&&e.groups.length<=1&&(e.groups=void 0),!e.groups)return;let i=0,n=0;for(const t of e.groups)m(t,!1),t.size&&(i+=t.size,n++);const o=(n>0?i:1)/(e.groups.length-n) ;for(const t of e.groups)t.size||(t.size=o)}t.SerializableGrid=p,t.sanitizeGridNodeDescriptor=m,t.createSerializedGrid=function(e){m(e,!0);const t=function e(t){return t.groups?{type:"branch",data:t.groups.map(t=>e(t)),size:t.size}:{type:"leaf",data:null,size:t.size}}(e),{width:i,height:n}=function e(t,i){if("branch"===t.type){const n=t.data.map(t=>e(t,o.orthogonal(i)));if(0===i){return{width:t.size||(0===n.length?void 0:Math.max(...n.map(e=>e.width||0))),height:0===n.length?void 0:n.reduce((e,t)=>e+(t.height||0),0)}}return{width:0===n.length?void 0:n.reduce((e,t)=>e+(t.width||0),0),height:t.size||(0===n.length?void 0:Math.max(...n.map(e=>e.height||0)))}}return{width:0===i?t.size:void 0,height:0===i?void 0:t.size}}(t,e.orientation);return{root:t,orientation:e.orientation,width:i||1,height:n||1}}})),define(e[763],t([19]),{}),define(e[764],t([19]),{}),define(e[343],t([19]),{}),define(e[524],t([0,1,7,212,343]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconClass=void 0 ;const o={},s=new n.IdGenerator("quick-input-button-icon-");t.getIconClass=function(e){if(!e)return;let t;const n=e.dark.toString();return o[n]?t=o[n]:(t=s.nextId(),i.createCSSRule(`.${t}`,`background-image: ${i.asCSSUrl(e.light||e.dark)}`),i.createCSSRule(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${i.asCSSUrl(e.dark)}`),o[n]=t),t}})),define(e[765],t([19]),{}),define(e[766],t([19]),{}),define(e[767],t([19]),{}),define(e[768],t([19]),{}),define(e[769],t([19]),{}),define(e[770],t([19]),{}),define(e[771],t([19]),{}),define(e[772],t([19]),{}),define(e[773],t([19]),{}),define(e[774],t([19]),{}),define(e[775],t([19]),{}),define(e[776],t([19]),{}),define(e[777],t([19]),{}),define(e[778],t([19]),{}),define(e[779],t([19]),{}),define(e[780],t([19]),{}),define(e[781],t([19]),{}),define(e[782],t([19]),{}),define(e[783],t([19]),{}),define(e[784],t([19]),{}),define(e[785],t([19]),{}),define(e[786],t([19]),{}),define(e[787],t([19]),{}),define(e[788],t([19]),{}),define(e[789],t([19]),{}),define(e[790],t([19]),{}), define(e[791],t([19]),{}),define(e[792],t([19]),{}),define(e[793],t([19]),{}),define(e[794],t([19]),{}),define(e[795],t([19]),{}),define(e[796],t([19]),{}),define(e[797],t([19]),{}),define(e[798],t([19]),{}),define(e[799],t([19]),{}),define(e[800],t([19]),{}),define(e[801],t([19]),{}),define(e[802],t([19]),{}),define(e[803],t([19]),{}),define(e[804],t([19]),{}),define(e[805],t([19]),{}),define(e[806],t([19]),{}),define(e[807],t([19]),{}),define(e[808],t([19]),{}),define(e[809],t([19]),{}),define(e[810],t([19]),{}),define(e[811],t([19]),{}),define(e[812],t([19]),{}),define(e[525],t([19]),{}),define(e[813],t([19]),{}),define(e[814],t([19]),{}),define(e[815],t([19]),{}),define(e[816],t([19]),{}),define(e[817],t([19]),{}),define(e[818],t([19]),{}),define(e[819],t([19]),{}),define(e[820],t([19]),{}),define(e[526],t([19]),{}),define(e[821],t([19]),{}),define(e[822],t([19]),{}),define(e[823],t([19]),{}),define(e[527],t([19]),{}),define(e[824],t([19]),{}),define(e[825],t([19]),{}),define(e[826],t([19]),{}), define(e[827],t([19]),{}),define(e[828],t([19]),{}),define(e[829],t([19]),{}),define(e[830],t([19]),{}),define(e[831],t([19]),{}),define(e[832],t([19]),{}),define(e[833],t([19]),{}),define(e[834],t([19]),{}),define(e[835],t([19]),{}),define(e[836],t([19]),{}),define(e[837],t([19]),{}),define(e[838],t([19]),{}),define(e[839],t([19]),{}),define(e[840],t([19]),{}),define(e[841],t([19]),{}),define(e[842],t([19]),{}),define(e[843],t([19]),{}),define(e[844],t([19]),{}),define(e[845],t([19]),{}),define(e[846],t([19]),{}),define(e[847],t([19]),{}),define(e[848],t([19]),{}),define(e[849],t([19]),{}),define(e[850],t([19]),{}),define(e[851],t([19]),{}),define(e[852],t([19]),{}),define(e[853],t([19]),{}),define(e[854],t([19]),{}),define(e[528],t([19]),{}),define(e[855],t([19]),{}),define(e[856],t([19]),{}),define(e[857],t([19]),{}),define(e[858],t([19]),{}),define(e[859],t([19]),{}),define(e[860],t([19]),{}),define(e[861],t([19]),{}),define(e[862],t([19]),{}),define(e[863],t([19]),{}),define(e[864],t([19]),{}), define(e[294],t([19]),{}),define(e[865],t([19]),{}),define(e[866],t([19]),{}),define(e[344],t([19]),{}),define(e[867],t([19]),{}),define(e[868],t([19]),{}),define(e[869],t([19]),{}),define(e[870],t([19]),{}),define(e[871],t([19]),{}),define(e[872],t([19]),{}),define(e[873],t([19]),{}),define(e[874],t([19]),{}),define(e[875],t([19]),{}),define(e[876],t([19]),{}),define(e[877],t([19]),{}),define(e[878],t([19]),{}),define(e[879],t([19]),{}),define(e[880],t([19]),{}),define(e[881],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readCharWidths=t.CharWidthRequest=t.CharWidthRequestType=void 0,function(e){e[e.Regular=0]="Regular",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold"}(t.CharWidthRequestType||(t.CharWidthRequestType={}));t.CharWidthRequest=class{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}};class i{constructor(e,t){this._bareFontInfo=e,this._requests=t,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 e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px", n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(n);const o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",e.appendChild(o);const s=[];for(const e of this._requests){let r;0===e.type&&(r=t),2===e.type&&(r=n),1===e.type&&(r=o),r.appendChild(document.createElement("br"));const a=document.createElement("span");i._render(a,e),r.appendChild(a),s.push(a)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}), this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this.referenceDomElement&&(i=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this.width===i&&this.height===n||(this.width=i,this.height=n,e&&this.changeCallback())}}t.ElementSizeObserver=n})),define(e[401],t([0,1,7,255,101,2]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.GlobalEditorMouseMoveMonitor=t.EditorPointerEventFactory=t.EditorMouseEventFactory=t.EditorMouseEvent=t.createEditorPagePosition=t.EditorPagePosition=t.ClientCoordinates=t.PageCoordinates=void 0;class r{constructor(e,t){this.x=e,this.y=t}toClientCoordinates(){return new a(this.x-i.StandardWindow.scrollX,this.y-i.StandardWindow.scrollY)}}t.PageCoordinates=r;class a{constructor(e,t){this.clientX=e,this.clientY=t}toPageCoordinates(){return new r(this.clientX+i.StandardWindow.scrollX,this.clientY+i.StandardWindow.scrollY)}}t.ClientCoordinates=a;class l{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}}function c(e){const t=i.getDomNodePagePosition(e);return new l(t.left,t.top,t.width,t.height)}t.EditorPagePosition=l,t.createEditorPagePosition=c;class d extends o.StandardMouseEvent{constructor(e,t){super(e),this.pos=new r(this.posx,this.posy),this.editorPos=c(t)}}t.EditorMouseEvent=d;t.EditorMouseEventFactory=class{constructor(e){this._editorViewDomNode=e}_create(e){ return new d(e,this._editorViewDomNode)}onContextMenu(e,t){return i.addDisposableListener(e,"contextmenu",e=>{t(this._create(e))})}onMouseUp(e,t){return i.addDisposableListener(e,"mouseup",e=>{t(this._create(e))})}onMouseDown(e,t){return i.addDisposableListener(e,"mousedown",e=>{t(this._create(e))})}onMouseLeave(e,t){return i.addDisposableNonBubblingMouseOutListener(e,e=>{t(this._create(e))})}onMouseMoveThrottled(e,t,n,o){return i.addDisposableThrottledListener(e,"mousemove",t,(e,t)=>n(e,this._create(t)),o)}};t.EditorPointerEventFactory=class{constructor(e){this._editorViewDomNode=e}_create(e){return new d(e,this._editorViewDomNode)}onPointerUp(e,t){return i.addDisposableListener(e,"pointerup",e=>{t(this._create(e))})}onPointerDown(e,t){return i.addDisposableListener(e,"pointerdown",e=>{t(this._create(e))})}onPointerLeave(e,t){return i.addDisposableNonBubblingPointerOutListener(e,e=>{t(this._create(e))})}onPointerMoveThrottled(e,t,n,o){ return i.addDisposableThrottledListener(e,"pointermove",t,(e,t)=>n(e,this._create(t)),o)}};class h extends s.Disposable{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new n.GlobalMouseMoveMonitor),this._keydownListener=null}startMonitoring(e,t,n,o,s){this._keydownListener=i.addStandardDisposableListener(document,"keydown",e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0)},!0);this._globalMouseMoveMonitor.startMonitoring(e,t,(e,t)=>n(e,new d(t,this._editorViewDomNode)),o,()=>{this._keydownListener.dispose(),s()})}}t.GlobalEditorMouseMoveMonitor=h})),define(e[882],t([0,1,6,2]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelTransientSettingWatcher=t.AbstractCodeEditorService=void 0;class o extends n.Disposable{constructor(){super(),this._onCodeEditorAdd=this._register(new i.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new i.Emitter), this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new i.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new i.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._onDidChangeTransientModelProperty=this._register(new i.Emitter),this.onDidChangeTransientModelProperty=this._onDidChangeTransientModelProperty.event,this._transientWatchers={},this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){ return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){return this._modelProperties.get(i).get(t)}}setTransientModelProperty(e,t,i){const n=e.uri.toString();let o;this._transientWatchers.hasOwnProperty(n)?o=this._transientWatchers[n]:(o=new s(n,e,this),this._transientWatchers[n]=o),o.set(t,i),this._onDidChangeTransientModelProperty.fire(e)}getTransientModelProperty(e,t){const i=e.uri.toString();if(this._transientWatchers.hasOwnProperty(i))return this._transientWatchers[i].get(t)}getTransientModelProperties(e){const t=e.uri.toString() ;if(this._transientWatchers.hasOwnProperty(t))return this._transientWatchers[t].keys().map(e=>[e,this._transientWatchers[t].get(e)])}_removeWatcher(e){delete this._transientWatchers[e.uri]}}t.AbstractCodeEditorService=o;class s{constructor(e,t,i){this.uri=e,this._values={},t.onWillDispose(()=>i._removeWatcher(this))}set(e,t){this._values[e]=t}get(e){return this._values[e]}keys(){return Object.keys(this._values)}}t.ModelTransientSettingWatcher=s})),define(e[529],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCharIndex=t.allCharCodes=t.Constants=void 0,function(e){e[e.START_CH_CODE=32]="START_CH_CODE",e[e.END_CH_CODE=126]="END_CH_CODE",e[e.UNKNOWN_CODE=65533]="UNKNOWN_CODE",e[e.CHAR_COUNT=96]="CHAR_COUNT",e[e.SAMPLED_CHAR_HEIGHT=16]="SAMPLED_CHAR_HEIGHT",e[e.SAMPLED_CHAR_WIDTH=10]="SAMPLED_CHAR_WIDTH",e[e.BASE_CHAR_HEIGHT=2]="BASE_CHAR_HEIGHT",e[e.BASE_CHAR_WIDTH=1]="BASE_CHAR_WIDTH",e[e.RGBA_CHANNELS_CNT=4]="RGBA_CHANNELS_CNT", e[e.RGBA_SAMPLED_ROW_WIDTH=3840]="RGBA_SAMPLED_ROW_WIDTH"}(t.Constants||(t.Constants={})),t.allCharCodes=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();t.getCharIndex=(e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e})),define(e[883],t([0,1,529,341]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinimapCharRenderer=void 0;class o{constructor(e,t){this.scale=t,this.charDataNormal=o.soften(e,.8),this.charDataLight=o.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let o=0,s=e.length;oe.width||n+u>e.height)return void console.warn("bad render request outside image data");const g=l?this.charDataLight:this.charDataNormal,p=i.getCharIndex(o,a),m=4*e.width,v=r.r,f=r.g,S=r.b,b=s.r-v,_=s.g-f,C=s.b-S,y=e.data;let w=p*d*h,E=n*m+4*t;for(let e=0;ee.width||i+c>e.height)return void console.warn("bad render request outside image data");const d=4*e.width,h=o.r,u=o.g,g=o.b,p=h+.5*(n.r-h),m=u+.5*(n.g-u),v=g+.5*(n.b-g),f=e.data;let S=i*d+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=n[e[i]]<<4|15&n[e[i+1]];return t};t.prebakedMiniMaps={ 1:i.once(()=>o("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")), 2:i.once(()=>o("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")) }})),define(e[885],t([0,1,883,529,884,341]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinimapCharRendererFactory=void 0;class r{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return n=o.prebakedMiniMaps[e]?new i.MinimapCharRenderer(o.prebakedMiniMaps[e](),e):r.createFromSampleData(r.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let o=0;for(const e of n.allCharCodes)i.fillText(String.fromCharCode(e),o,8),o+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");let n=r._downsample(e,t);return new i.MinimapCharRenderer(n,t)} static _downsampleChar(e,t,i,n,o){const r=1*o,a=2*o;let l=n,c=0;for(let n=0;n0){const e=255/a;for(let t=0;t=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}var o;t.CharacterClassifier=n,function(e){e[e.False=0]="False",e[e.True=1]="True"}(o||(o={}));t.CharacterSet=class{constructor(){this._actual=new n(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}})),define(e[295],t([0,1,258]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.getMapForWordSeparators=t.WordCharacterClassifier=t.WordCharacterClass=void 0,function(e){e[e.Regular=0]="Regular",e[e.Whitespace=1]="Whitespace",e[e.WordSeparator=2]="WordSeparator"}(t.WordCharacterClass||(t.WordCharacterClass={}));class n extends i.CharacterClassifier{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}(e=>new n(e))})),define(e[47],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Position=void 0;class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){ return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumberi||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){ return n.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return n.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}containsRange(e){return n.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return n.strictContainsRange(this,e)}static strictContainsRange(e,t){ return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return n.plusRange(this,e)}static plusRange(e,t){let i,o,s,r;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new n(i,o,s,r)}intersectRanges(e){return n.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn ;return ic?(s=c,r=d):s===c&&(r=Math.min(r,d)),i>s?null:i===s&&o>r?null:new n(i,o,s,r)}equalsRange(e){return n.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return n.getEndPosition(this)}static getEndPosition(e){return new i.Position(e.endLineNumber,e.endColumn)}getStartPosition(){return n.getStartPosition(this)}static getStartPosition(e){return new i.Position(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new n(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new n(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return n.collapseToStart(this)}static collapseToStart(e){return new n(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)} static fromPositions(e,t=e){return new n(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new n(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}t.Range=n})),define(e[530],t([0,1,24,47,18]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PagedScreenReaderStrategy=t.TextAreaState=void 0;class s{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){ return new s(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new s(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]} static selectedText(e){return new s(e,0,e.length,null,null)}static deduceInput(e,t,n){if(!e)return{text:"",replaceCharCnt:0};let o=e.value,s=e.selectionStart,r=e.selectionEnd,a=t.value,l=t.selectionStart,c=t.selectionEnd;const d=o.substring(r),h=a.substring(c),u=i.commonSuffixLength(d,h);a=a.substring(0,a.length-u);const g=(o=o.substring(0,o.length-u)).substring(0,s),p=a.substring(0,l),m=i.commonPrefixLength(g,p);if(a=a.substring(m),o=o.substring(m),l-=m,s-=m,c-=m,r-=m,n&&l===c&&o.length>0){let e=null;if(l===a.length?a.startsWith(o)&&(e=a.substring(o.length)):a.endsWith(o)&&(e=a.substring(0,a.length-o.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||i.containsEmoji(e)))return{text:e,replaceCharCnt:0}}if(l===c){if(o===a&&0===s&&r===o.length&&l===a.length&&-1===a.indexOf("\n")&&i.containsFullWidthCharacter(a))return{text:"",replaceCharCnt:0};return{text:a,replaceCharCnt:g.length-m}}return{text:a,replaceCharCnt:r-s}}}t.TextAreaState=s,s.EMPTY=new s("",0,0,null,null);class r{static _getPageOfLine(e,t){ return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new o.Range(n,1,s+1,1)}static fromEditorSelection(e,t,i,a,l){const c=r._getPageOfLine(i.startLineNumber,a),d=r._getRangeForPage(c,a),h=r._getPageOfLine(i.endLineNumber,a),u=r._getRangeForPage(h,a),g=d.intersectRanges(new o.Range(1,1,i.startLineNumber,i.startColumn));let p=t.getValueInRange(g,1);const m=t.getLineCount(),v=t.getLineMaxColumn(m),f=u.intersectRanges(new o.Range(i.endLineNumber,i.endColumn,m,v));let S,b=t.getValueInRange(f,1);if(c===h||c+1===h)S=t.getValueInRange(i,1);else{const e=d.intersectRanges(i),n=u.intersectRanges(i);S=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(l){const e=500;p.length>e&&(p=p.substring(p.length-e,p.length)),b.length>e&&(b=b.substring(0,e)),S.length>2*e&&(S=S.substring(0,e)+String.fromCharCode(8230)+S.substring(S.length-e,S.length))} return new s(p+S+b,p.length,p.length+S.length,new n.Position(i.startLineNumber,i.startColumn),new n.Position(i.endLineNumber,i.endColumn))}}t.PagedScreenReaderStrategy=r})),define(e[531],t([0,1,389,6,2,41,18]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffNavigator=void 0;const a={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class l extends o.Disposable{constructor(e,t={}){super(),this._onDidUpdate=this._register(new n.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._editor=e,this._options=s.mixin(t,a,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})), this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(i){ for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=n.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}t.DiffNavigator=l})),define(e[115],t([0,1,18]),(function(e,t,i){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.EditOperation=void 0;t.EditOperation=class{static insert(e,t){return{range:new i.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}})),define(e[532],t([0,1,24,115,18]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trimTrailingWhitespace=t.TrimTrailingWhitespaceCommand=void 0;function s(e,t){t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber);for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let s=[],r=0,a=0,l=t.length;for(let c=1,d=e.getLineCount();c<=d;c++){let d=e.getLineContent(c),h=d.length+1,u=0;if(a255?255:0|e}}t.RGBA8=i,i.Empty=new i(0,0,0,0)})),define(e[60],t([0,1,47,18]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Selection=t.SelectionDirection=void 0,function(e){e[e.LTR=0]="LTR", e[e.RTL=1]="RTL"}(t.SelectionDirection||(t.SelectionDirection={}));class o extends n.Range{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return o.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new o(this.startLineNumber,this.startColumn,e,t):new o(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.Position(this.positionLineNumber,this.positionColumn)} setStartPosition(e,t){return 0===this.getDirection()?new o(e,t,this.endLineNumber,this.endColumn):new o(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new o(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;ithis._onCut.fire(),0)),this._textAreaState=c.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let r=null;this._register(n.addStandardDisposableListener(t.domNode,"keydown",e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(), e.equals(9)&&e.preventDefault(),r=e,this._onKeyDown.fire(e)})),this._register(n.addStandardDisposableListener(t.domNode,"keyup",e=>{this._onKeyUp.fire(e)})),this._register(n.addDisposableListener(t.domNode,"compositionstart",e=>{if(this._isDoingComposition)return;this._isDoingComposition=!0;let t=!1;a.isMacintosh&&r&&r.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"!==r.code&&"ArrowLeft"!==r.code||(t=!0)),t?this._textAreaState=new c.TextAreaState(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new d.Position(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition):i.isEdge||this._setAndWriteTextAreaState("compositionstart",c.TextAreaState.EMPTY), this._onCompositionStart.fire({moveOneCharacterLeft:t})}));const h=e=>{const t=this._textAreaState,i=c.TextAreaState.readFromTextArea(this._textArea);return[i,c.TextAreaState.deduceInput(t,i,e)]},u=e=>{const t=this._textAreaState,i=c.TextAreaState.selectedText(e);return[i,{text:i.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},g=e=>!(!i.isEdge||"ja"!==e);this._register(n.addDisposableListener(t.domNode,"compositionupdate",e=>{if(g(e.locale)){const[t,i]=h(!1);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const[t,i]=u(e.data||"");this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e)})),this._register(n.addDisposableListener(t.domNode,"compositionend",e=>{if(this._isDoingComposition){if(g(e.locale)){const[e,t]=h(!1);this._textAreaState=e,this._onType.fire(t)}else{const[t,i]=u(e.data||"");this._textAreaState=t,this._onType.fire(i)}(i.isEdge||i.isChrome)&&(this._textAreaState=c.TextAreaState.readFromTextArea(this._textArea)), this._isDoingComposition&&(this._isDoingComposition=!1,this._onCompositionEnd.fire())}})),this._register(n.addDisposableListener(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=h(a.isMacintosh);0===t.replaceCharCnt&&1===t.text.length&&l.isHighSurrogate(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""!==t.text&&this._onType.fire(t):(""===t.text&&0===t.replaceCharCnt||this._firePaste(t.text,null),this._nextCommand=0))})),this._register(n.addDisposableListener(t.domNode,"cut",e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(n.addDisposableListener(t.domNode,"copy",e=>{this._ensureClipboardGetsEditorSelection(e)})),this._register(n.addDisposableListener(t.domNode,"paste",e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),v.canUseTextData(e)){ const[t,i]=v.getTextData(e);""!==t&&this._firePaste(t,i)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",c.TextAreaState.EMPTY),this._nextCommand=1})),this._register(n.addDisposableListener(t.domNode,"focus",()=>{this._setHasFocus(!0)})),this._register(n.addDisposableListener(t.domNode,"blur",()=>{this._setHasFocus(!1)}))}_installSelectionChangeListener(){let e=0;return n.addDisposableListener(document,"selectionchange",t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!i.isChrome)return;const n=Date.now(),o=n-e;if(e=n,o<5)return;const s=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd() ;if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(l),g=this._host.deduceModelPosition(u[0],u[1],u[2]),p=new h.Selection(d.lineNumber,d.column,g.lineNumber,g.column);this._onSelectionChangeRequest.fire(p)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=n.getShadowRoot(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):n.isInDOM(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(), this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&(i.isEdge?this._setAndWriteTextAreaState("focusgain",c.TextAreaState.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(v.canUseTextData(e)&&u.BrowserFeatures.clipboard.richText),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};p.INSTANCE.set(i.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,n), v.canUseTextData(e)?v.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",c.TextAreaState.selectedText(t.text))}_firePaste(e,t){t||(t=p.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}t.TextAreaInput=m;class v{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData("text/plain");let i=null;const n=e.clipboardData.getData("vscode-editor-data");if("string"==typeof n)try{1!==(i=JSON.parse(n)).version&&(i=null)}catch(e){}return[t,i]}if(window.clipboardData){return e.preventDefault(),[window.clipboardData.getData("Text"),null]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"==typeof i&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),void e.preventDefault() ;if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class f extends r.Disposable{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionEnd}setSelectionRange(e,t,o){const s=this._actual.domNode;let r=null;const a=n.getShadowRoot(s),l=(r=a?a.activeElement:document.activeElement)===s,c=s.selectionStart,d=s.selectionEnd;if(l&&c===t&&d===o)i.isFirefox&&window.parent!==window&&s.focus();else{ if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),s.setSelectionRange(t,o),void(i.isFirefox&&window.parent!==window&&s.focus());try{const e=n.saveParentsScrollTop(s);this.setIgnoreSelectionChangeTime("setSelectionRange"),s.focus(),s.setSelectionRange(t,o),n.restoreParentsScrollTop(s,e)}catch(e){}}}}})),define(e[259],t([0,1,60]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceCommandThatPreservesSelection=t.ReplaceCommandWithOffsetCursorState=t.ReplaceCommandWithoutChangingPosition=t.ReplaceCommandThatSelectsText=t.ReplaceCommand=void 0;t.ReplaceCommand=class{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.Selection(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}};t.ReplaceCommandThatSelectsText=class{constructor(e,t){this._range=e,this._text=t} getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return new i.Selection(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}};t.ReplaceCommandWithoutChangingPosition=class{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.Selection(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}};t.ReplaceCommandWithOffsetCursorState=class{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range ;return new i.Selection(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}};t.ReplaceCommandThatPreservesSelection=class{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}})),define(e[886],t([0,1,18,60]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SurroundSelectionCommand=void 0;t.SurroundSelectionCommand=class{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){ t.addTrackedEditOperation(new i.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new i.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range,s=i[1].range;return new n.Selection(o.endLineNumber,o.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}})),define(e[260],t([0,1,24,12,66]),(function(e,t,i,n,o){"use strict";let s;function r(){return s||(s=new TextDecoder(n.isLittleEndian()?"UTF-16LE":"UTF-16BE")),s}Object.defineProperty(t,"__esModule",{value:!0}),t.decodeUTF16LE=t.createStringBuilder=t.hasTextDecoder=t.getPlatformTextDecoder=void 0,t.getPlatformTextDecoder=r,t.hasTextDecoder="undefined"!=typeof TextDecoder,t.hasTextDecoder?(t.createStringBuilder=e=>new a(e),t.decodeUTF16LE=function(e,t,i){ const n=new Uint16Array(e.buffer,t,i);return r().decode(n)}):(t.createStringBuilder=e=>new l,t.decodeUTF16LE=function(e,t,i){let n=[],s=0;for(let r=0;r=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e=i&&s<=n&&(this._lines[s-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){ if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o){return this._lines.splice(e-this._rendLineNumberStart,o-e+1)}const s=[];for(let e=0;ei)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}t.RenderedLinesCollection=o;t.VisibleLinesCollection=class{constructor(e){this._host=e,this.domNode=this._createDomNode(), this._linesCollection=new o(()=>this._host.createVisibleLine())}_createDomNode(){const e=i.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(117)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0 ;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");n.innerHTML=t;for(let t=0;t0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const a=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),c=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let h=s(a,c,r,!0).changes;d&&(h=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,s=e.length;n!0;const t=Date.now();return()=>Date.now()-t1&&s>1;){if(e.charCodeAt(i-2)!==t.charCodeAt(s-2))break;i--,s--}(i>1||s>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,r+1,1,s)}{let i=h(e,1),s=h(t,1);const a=e.length+1,l=t.length+1;for(;i0&&a>0)return;if(l>0&&c>0)return;let d=Math.abs(a-c),h=Math.abs(r-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?r++:v>1&&a++,n(l,c,d,m,u),u.looksLikeAlignment&&(!o||t!==u.spacesDiff))continue;let S=u.spacesDiff;S<=8&&h[S]++,l=d,c=m}let g=o;r!==a&&(g=r{let i=h[t];i>e&&(e=i,p=t)}),4===p&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(p=2)}return{insertSpaces:g,tabSize:p}}})),define(e[535],t([0,1]),(function(e,t){"use strict";var i,n;function o(e){return(1&e.metadata)>>>0}function s(e,t){e.metadata=254&e.metadata|t<<0}function r(e){return(2&e.metadata)>>>1==1}function a(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function l(e){return(4&e.metadata)>>>2==1}function c(e,t){ e.metadata=251&e.metadata|(t?1:0)<<2}function d(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function h(e,t){e.metadata=207&e.metadata|t<<4}function u(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}Object.defineProperty(t,"__esModule",{value:!0}),t.intervalCompare=t.recomputeMaxEnd=t.nodeAcceptEdit=t.IntervalTree=t.SENTINEL=t.IntervalNode=t.setNodeStickiness=t.getNodeIsInOverviewRuler=t.getNodeColor=t.NodeColor=t.ClassName=void 0,function(e){e.EditorHintDecoration="squiggly-hint",e.EditorInfoDecoration="squiggly-info",e.EditorWarningDecoration="squiggly-warning",e.EditorErrorDecoration="squiggly-error",e.EditorUnnecessaryDecoration="squiggly-unnecessary",e.EditorUnnecessaryInlineDecoration="squiggly-inline-unnecessary",e.EditorDeprecatedInlineDecoration="squiggly-inline-deprecated"}(t.ClassName||(t.ClassName={})),function(e){e[e.Black=0]="Black",e[e.Red=1]="Red"}(t.NodeColor||(t.NodeColor={})),function(e){e[e.ColorMask=1]="ColorMask",e[e.ColorMaskInverse=254]="ColorMaskInverse",e[e.ColorOffset=0]="ColorOffset", e[e.IsVisitedMask=2]="IsVisitedMask",e[e.IsVisitedMaskInverse=253]="IsVisitedMaskInverse",e[e.IsVisitedOffset=1]="IsVisitedOffset",e[e.IsForValidationMask=4]="IsForValidationMask",e[e.IsForValidationMaskInverse=251]="IsForValidationMaskInverse",e[e.IsForValidationOffset=2]="IsForValidationOffset",e[e.IsInOverviewRulerMask=8]="IsInOverviewRulerMask",e[e.IsInOverviewRulerMaskInverse=247]="IsInOverviewRulerMaskInverse",e[e.IsInOverviewRulerOffset=3]="IsInOverviewRulerOffset",e[e.StickinessMask=48]="StickinessMask",e[e.StickinessMaskInverse=207]="StickinessMaskInverse",e[e.StickinessOffset=4]="StickinessOffset",e[e.CollapseOnReplaceEditMask=64]="CollapseOnReplaceEditMask",e[e.CollapseOnReplaceEditMaskInverse=191]="CollapseOnReplaceEditMaskInverse",e[e.CollapseOnReplaceEditOffset=6]="CollapseOnReplaceEditOffset",e[e.MIN_SAFE_DELTA=-1073741824]="MIN_SAFE_DELTA",e[e.MAX_SAFE_DELTA=1073741824]="MAX_SAFE_DELTA"}(i||(i={})),t.getNodeColor=o,t.getNodeIsInOverviewRuler=function(e){return(8&e.metadata)>>>3==1}, t.setNodeStickiness=function(e,t){h(e,t)};class g{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,s(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,c(this,!1),h(this,1),d(this,!1),u(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,a(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;c(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),h(this,this.options.stickiness),d(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),u(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}t.IntervalNode=g, t.SENTINEL=new g(null,0,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,s(t.SENTINEL,0);function p(e,t,i,n){return ei)&&(1!==n&&(2===n||t))}function m(e,t,i,n,o){const s=function(e){return(48&e.metadata)>>>4}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,c=n,d=Math.min(l,c),h=e.start;let u=!1;const g=e.end;let m=!1;t<=h&&g<=i&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,u=!0,e.end=t,m=!0);{const e=o?1:l>0?2:0;!u&&p(h,r,t,e)&&(u=!0),!m&&p(g,a,t,e)&&(m=!0)}if(d>0&&!o){const e=l>c?2:0;!u&&p(h,r,t+d,e)&&(u=!0),!m&&p(g,a,t+d,e)&&(m=!0)}{const n=o?1:0;!u&&p(h,r,i,n)&&(e.start=t+c,u=!0),!m&&p(g,a,i,n)&&(e.end=t+c,m=!0)}const v=c-l;u||(e.start=Math.max(0,h+v)),m||(e.end=Math.max(0,g+v)),e.start>e.end&&(e.end=e.start)}function v(e,i,n,o){let s=e.root,c=0,d=0,h=0,u=[],g=0;for(;s!==t.SENTINEL;){if(r(s)){a(s.left,!1),a(s.right,!1),s===s.parent.right&&(c-=s.parent.delta),s=s.parent;continue}if(s.left!==t.SENTINEL&&!r(s.left)){s=s.left;continue}d=c+s.start,h=c+s.end, s.setCachedOffsets(d,h,o);let e=!0;i&&s.ownerId&&s.ownerId!==i&&(e=!1),n&&l(s)&&(e=!1),e&&(u[g++]=s),a(s,!0),s.right===t.SENTINEL||r(s.right)||(c+=s.delta,s=s.right)}return a(e.root,!1),u}function f(e,i){if(e.root===t.SENTINEL)return i.parent=t.SENTINEL,i.left=t.SENTINEL,i.right=t.SENTINEL,s(i,0),e.root=i,e.root;!function(e,i){let n=0,o=e.root;const r=i.start,a=i.end;for(;;){if(I(r,a,o.start+n,o.end+n)<0){if(o.left===t.SENTINEL){i.start-=n,i.end-=n,i.maxEnd-=n,o.left=i;break}o=o.left}else{if(o.right===t.SENTINEL){i.start-=n+o.delta,i.end-=n+o.delta,i.maxEnd-=n+o.delta,o.right=i;break}n+=o.delta,o=o.right}}i.parent=o,i.left=t.SENTINEL,i.right=t.SENTINEL,s(i,1)}(e,i),E(i.parent);let n=i;for(;n!==e.root&&1===o(n.parent);)if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===o(t)?(s(n.parent,0),s(t,0),s(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&_(e,n=n.parent),s(n.parent,0),s(n.parent.parent,1),C(e,n.parent.parent))}else{const t=n.parent.parent.left;1===o(t)?(s(n.parent,0),s(t,0), s(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&C(e,n=n.parent),s(n.parent,0),s(n.parent.parent,1),_(e,n.parent.parent))}return s(e.root,0),i}function S(e,i){let n,r;if(i.left===t.SENTINEL?(r=i,(n=i.right).delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=i.delta,n.end+=i.delta):i.right===t.SENTINEL?(n=i.left,r=i):((n=(r=function(e){for(;e.left!==t.SENTINEL;)e=e.left;return e}(i.right)).right).start+=r.delta,n.end+=r.delta,n.delta+=r.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=i.delta,r.end+=i.delta,r.delta=i.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0)),r===e.root)return e.root=n,s(n,0),i.detach(),b(),w(n),void(e.root.parent=t.SENTINEL);let a,l=1===o(r);if(r===r.parent.left?r.parent.left=n:r.parent.right=n,r===i?n.parent=r.parent:(r.parent===i?n.parent=r:n.parent=r.parent,r.left=i.left,r.right=i.right,r.parent=i.parent,s(r,o(i)), i===e.root?e.root=r:i===i.parent.left?i.parent.left=r:i.parent.right=r,r.left!==t.SENTINEL&&(r.left.parent=r),r.right!==t.SENTINEL&&(r.right.parent=r)),i.detach(),l)return E(n.parent),r!==i&&(E(r),E(r.parent)),void b();for(E(n),E(n.parent),r!==i&&(E(r),E(r.parent));n!==e.root&&0===o(n);)n===n.parent.left?(1===o(a=n.parent.right)&&(s(a,0),s(n.parent,1),_(e,n.parent),a=n.parent.right),0===o(a.left)&&0===o(a.right)?(s(a,1),n=n.parent):(0===o(a.right)&&(s(a.left,0),s(a,1),C(e,a),a=n.parent.right),s(a,o(n.parent)),s(n.parent,0),s(a.right,0),_(e,n.parent),n=e.root)):(1===o(a=n.parent.left)&&(s(a,0),s(n.parent,1),C(e,n.parent),a=n.parent.left),0===o(a.left)&&0===o(a.right)?(s(a,1),n=n.parent):(0===o(a.left)&&(s(a.right,0),s(a,1),_(e,a),a=n.parent.left),s(a,o(n.parent)),s(n.parent,0),s(a.left,0),C(e,n.parent),n=e.root));s(n,0),b()}function b(){t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.delta=0,t.SENTINEL.start=0,t.SENTINEL.end=0}function _(e,i){const n=i.right;n.delta+=i.delta, (n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=i.delta,n.end+=i.delta,i.right=n.left,n.left!==t.SENTINEL&&(n.left.parent=i),n.parent=i.parent,i.parent===t.SENTINEL?e.root=n:i===i.parent.left?i.parent.left=n:i.parent.right=n,n.left=i,i.parent=n,w(i),w(n)}function C(e,i){const n=i.left;i.delta-=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start-=n.delta,i.end-=n.delta,i.left=n.right,n.right!==t.SENTINEL&&(n.right.parent=i),n.parent=i.parent,i.parent===t.SENTINEL?e.root=n:i===i.parent.right?i.parent.right=n:i.parent.left=n,n.right=i,i.parent=n,w(i),w(n)}function y(e){let i=e.end;if(e.left!==t.SENTINEL){const t=e.left.maxEnd;t>i&&(i=t)}if(e.right!==t.SENTINEL){const t=e.right.maxEnd+e.delta;t>i&&(i=t)}return i}function w(e){e.maxEnd=y(e)}function E(e){for(;e!==t.SENTINEL;){const t=y(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function I(e,t,i,n){return e===i?t-n:e-i}t.IntervalTree=class{constructor(){this.root=t.SENTINEL, this.requestNormalizeDelta=!1}intervalSearch(e,i,n,o,s){return this.root===t.SENTINEL?[]:function(e,i,n,o,s,c){let d=e.root,h=0,u=0,g=0,p=0,m=[],v=0;for(;d!==t.SENTINEL;)if(r(d))a(d.left,!1),a(d.right,!1),d===d.parent.right&&(h-=d.parent.delta),d=d.parent;else{if(!r(d.left)){if((u=h+d.maxEnd)n)a(d,!0);else{if((p=h+d.end)>=i){d.setCachedOffsets(g,p,c);let e=!0;o&&d.ownerId&&d.ownerId!==o&&(e=!1),s&&l(d)&&(e=!1),e&&(m[v++]=d)}a(d,!0),d.right===t.SENTINEL||r(d.right)||(h+=d.delta,d=d.right)}}return a(e.root,!1),m}(this,e,i,n,o,s)}search(e,i,n){return this.root===t.SENTINEL?[]:v(this,e,i,n)}collectNodesFromOwner(e){return function(e,i){let n=e.root,o=[],s=0;for(;n!==t.SENTINEL;)r(n)?(a(n.left,!1),a(n.right,!1),n=n.parent):n.left===t.SENTINEL||r(n.left)?(n.ownerId===i&&(o[s++]=n),a(n,!0),n.right===t.SENTINEL||r(n.right)||(n=n.right)):n=n.left;return a(e.root,!1),o}(this,e)}collectNodesPostOrder(){return function(e){ let i=e.root,n=[],o=0;for(;i!==t.SENTINEL;)r(i)?(a(i.left,!1),a(i.right,!1),i=i.parent):i.left===t.SENTINEL||r(i.left)?i.right===t.SENTINEL||r(i.right)?(n[o++]=i,a(i,!0)):i=i.right:i=i.left;return a(e.root,!1),n}(this)}insert(e){f(this,e),this._normalizeDeltaIfNecessary()}delete(e){S(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,i,n,o){const s=function(e,i,n){let o=e.root,s=0,l=0,c=0,d=0,h=[],u=0;for(;o!==t.SENTINEL;)if(r(o))a(o.left,!1),a(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;else{if(!r(o.left)){if((l=s+o.maxEnd)n?a(o,!0):((d=s+o.end)>=i&&(o.setCachedOffsets(c,d,0),h[u++]=o),a(o,!0),o.right===t.SENTINEL||r(o.right)||(s+=o.delta,o=o.right))}return a(e.root,!1),h}(this,e,e+i);for(let e=0,t=s.length;en?(s.start+=h,s.end+=h,s.delta+=h,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0),a(s,!0)):(a(s,!0),s.right===t.SENTINEL||r(s.right)||(l+=s.delta,s=s.right))}a(e.root,!1)}(this,e,e+i,n),this._normalizeDeltaIfNecessary();for(let t=0,r=s.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n||119===n)return!0}}return!1}t.SearchParams=class{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?l(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=i.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){ return null}if(!t)return null;let o=!this.isRegex&&!e;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new c(t,this.wordSeparators?n.getMapForWordSeparators(this.wordSeparators):null,o?this.searchString:null)}},t.isMultilineRegexSource=l;class c{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function d(e,t,i){if(!i)return new r.FindMatch(e,null);let n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}function u(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){ const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}t.TextModelSearch=class{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new g(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let a,l,c=0;if(a=n?t+o+(c=n.findLineFeedCountBeforeOffset(o)):t+o,n){let e=n.findLineFeedCountBeforeOffset(o+r.length)-c;l=a+r.length+e}else l=a+r.length;const d=e.getPositionAt(a),h=e.getPositionAt(l);return new s.Range(d.lineNumber,d.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(r):null,l=[];let c,u=0 ;for(i.reset(0);c=i.next(r);)if(l[u++]=d(this._getMultilineMatchRange(e,s,r,a,c.index,c[0]),c,n),u>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a=c))return o;return o}const p=new g(e.wordSeparators,e.regex);let m;p.reset(0);do{if((m=p.next(t))&&(a[o++]=d(new s.Range(i,m.index+1+n,i,m.index+1+m[0].length+n),m,l),o>=c))return o}while(m);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const r=new o.Position(t.lineNumber,1),a=e.getOffsetAt(r),l=e.getLineCount(),c=e.getValueInRange(new s.Range(r.lineNumber,r.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new h(c):null;i.reset(t.column-1);let g=i.next(c);return g?d(this._getMultilineMatchRange(e,a,c,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.Position(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){ const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const r=e.next(t);return r?d(new s.Range(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const r=this._doFindMatchesMultiline(e,new s.Range(1,1,t.lineNumber,t.column),i,n,10*a);if(r.length>0)return r[r.length-1];const l=e.getLineCount();return t.lineNumber!==l||t.column!==e.getLineMaxColumn(l)?this._doFindPreviousMatchMultiline(e,new o.Position(l,e.getLineMaxColumn(l)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){ const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;for(e.reset(0);o=e.next(t);)r=d(new s.Range(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}},t.isValidMatch=u;class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(!(n=this._searchRegex.exec(e)))return null;const o=n.index,s=n[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){i.getNextCodePoint(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue} return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||u(this._wordSeparators,e,t,o,s))return n}while(n);return null}}t.Searcher=g})),define(e[537],t([0,1,47,18,129,890,296]),(function(e,t,i,n,o,s,r){"use strict";function a(e){let t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}Object.defineProperty(t,"__esModule",{value:!0}),t.PieceTreeBase=t.StringBuffer=t.Piece=t.createLineStarts=t.createLineStartsFast=t.LineStarts=t.createUintArray=t.AverageBufferSize=void 0,t.AverageBufferSize=65535,t.createUintArray=a;class l{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function c(e,t=!0){let i=[0],n=1;for(let t=0,o=e.length;t126)&&(r=!1)}const c=new l(a(e),n,o,s,r);return e.length=0,c};class d{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}t.Piece=d;class h{constructor(e,t){this.buffer=e,this.lineStarts=t}}t.StringBuffer=h;class u{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==s.SENTINEL&&e.iterate(e.root,e=>(e!==s.SENTINEL&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class g{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t] ;if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){let e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}t.PieceTreeBase=class{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new h("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=s.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=c(e[t].buffer));let i=new d(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1, column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new g(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let i=t.AverageBufferSize,n=i-Math.floor(i/3),o=2*n,s="",r=0,a=[];if(this.iterate(this.root,t=>{let i=this.getNodeContent(t),l=i.length;if(r<=n||r+l0){let t=s.replace(/\r\n|\r|\n/g,e);a.push(new h(t,c(t)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new u(this,e)}equal(e){if(this.getLength()!==e.getLength())return!1;if(this.getLineCount()!==e.getLineCount())return!1;return this.iterate(this.root,t=>{if(t===s.SENTINEL)return!0;let i=this.getNodeContent(t),n=i.length,o=e.nodeAt(0),r=e.nodeAt(0+n);return i===e.getValueInRange2(o,r)})} getOffsetAt(e,t){let i=0,n=this.root;for(;n!==s.SENTINEL;)if(n.left!==s.SENTINEL&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){return(i+=n.size_left)+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,o=e;for(;t!==s.SENTINEL;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let s=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+s.index,0===s.index){let e=o-this.getOffsetAt(n+1,1);return new i.Position(n+1,e+1)}return new i.Position(n+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===s.SENTINEL){let t=o-e-this.getOffsetAt(n+1,1);return new i.Position(n+1,t+1)}t=t.right}return new i.Position(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"" ;let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==s.SENTINEL;){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,o=>{if(o===s.SENTINEL)return!0;const r=o.piece;let a=r.length;if(0===a)return!0 ;const l=this._buffers[r.bufferIndex].buffer,c=this._buffers[r.bufferIndex].lineStarts,d=r.start.line,h=r.end.line;let u=c[d]+r.start.column;if(n&&(10===l.charCodeAt(u)&&(u++,a--),e[t++]=i,i="",n=!1,0===a))return!0;if(d===h)return this._EOLNormalized||13!==l.charCodeAt(u+a-1)?i+=l.substr(u,a):(n=!0,i+=l.substr(u,a-1)),!0;i+=this._EOLNormalized?l.substring(u,Math.max(u,c[d+1]-this._EOLLength)):l.substring(u,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=d+1;ne+S,t.reset(0)):(p=v.buffer,m=e=>e,t.reset(S));do{if(g=t.next(p)){if(m(g.index)>=b)return h;this.positionInBuffer(e,m(g.index)-f,_);let t=this.getLineFeedCnt(e.piece.bufferIndex,s,_),a=_.line===s.line?_.column-s.column+o:_.column+1,l=a+g[0].length;if(u[h++]=r.createFindMatch(new n.Range(i+t,a,i+t,l),g,c),m(g.index)+g[0].length>=b)return h;if(h>=d)return h}}while(g);return h}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const a=new r.Searcher(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===l)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===c)return[];let d=this.positionInBuffer(l.node,l.remainder),h=this.positionInBuffer(c.node,c.remainder) ;if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,h,t,i,n,s,o),o;let u=e.startLineNumber,g=l.node;for(;g!==c.node;){let r=this.getLineFeedCnt(g.piece.bufferIndex,d,g.piece.end);if(r>=1){let l=this._buffers[g.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),h=l[d.line+r],p=u===e.startLineNumber?e.startColumn:1;if((s=this.findMatchesInNode(g,a,u,p,d,this.positionInBuffer(g,h-c),t,i,n,s,o))>=n)return o;u+=r}let c=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const r=this.getLineContent(u).substring(c,e.endColumn-1);return s=this._findMatchesInLine(t,a,r,e.endLineNumber,c,s,o,i,n),o}if((s=this._findMatchesInLine(t,a,this.getLineContent(u).substr(c),u,c,s,o,i,n))>=n)return o;u++,g=(l=this.nodeAt2(u,1)).node,d=this.positionInBuffer(l.node,l.remainder)}if(u===e.endLineNumber){let r=u===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(u).substring(r,e.endColumn-1) ;return s=this._findMatchesInLine(t,a,l,e.endLineNumber,r,s,o,i,n),o}let p=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(c.node,a,u,p,d,h,t,i,n,s,o),o}_findMatchesInLine(e,t,i,s,a,l,c,d,h){const u=e.wordSeparators;if(!d&&e.simpleSearch){const t=e.simpleSearch,d=t.length,g=i.length;let p=-d;for(;-1!==(p=i.indexOf(t,p+d));)if((!u||r.isValidMatch(u,i,g,p,d))&&(c[l++]=new o.FindMatch(new n.Range(s,p+1+a,s,p+1+d+a),null),l>=h))return l;return l}let g;t.reset(0);do{if((g=t.next(i))&&(c[l++]=r.createFindMatch(new n.Range(s,g.index+1+a,s,g.index+1+g[0].length+a),g,d),l>=h))return l}while(g);return l}insert(e,i,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==s.SENTINEL){let{node:n,remainder:o,nodeStartOffset:s}=this.nodeAt(e),r=n.piece,a=r.bufferIndex,l=this.positionInBuffer(n,o) ;if(0===n.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&s+r.length===e&&i.lengthe){let e=[],t=new d(r.bufferIndex,l,r.end,this.getLineFeedCnt(r.bufferIndex,l,r.end),this.offsetInBuffer(a,r.end)-this.offsetInBuffer(a,l));if(this.shouldCheckCRLF()&&this.endWithCR(i)){if(10===this.nodeCharCodeAt(n,o)){let e={line:t.start.line+1,column:0};t=new d(t.bufferIndex,e,t.end,this.getLineFeedCnt(t.bufferIndex,e,t.end),t.length-1),i+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(i)){if(13===this.nodeCharCodeAt(n,o-1)){let t=this.positionInBuffer(n,o-1);this.deleteNodeTail(n,t),i="\r"+i,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,l)}else this.deleteNodeTail(n,l);let s=this.createNewPieces(i);t.length>0&&this.rbInsertRight(n,t);let c=n ;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n") ;let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let e=1;e=d))break;a=c+1}return i?(i.line=c,i.column=r-h,null):{line:c,column:r-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;let r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tt.AverageBufferSize){let i=[];for(;e.length>t.AverageBufferSize;){ const n=e.charCodeAt(t.AverageBufferSize-1);let o;13===n||n>=55296&&n<=56319?(o=e.substring(0,t.AverageBufferSize-1),e=e.substring(t.AverageBufferSize-1)):(o=e.substring(0,t.AverageBufferSize),e=e.substring(t.AverageBufferSize));let s=c(o);i.push(new d(this._buffers.length,{line:0,column:0},{line:s.length-1,column:o.length-s[s.length-1]},s.length-1,o.length)),this._buffers.push(new h(o,s))}let n=c(e);return i.push(new d(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new h(e,n)),i}let i=this._buffers[0].buffer.length;const n=c(e,!1);let o=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===i&&0!==i&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},o=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==s.SENTINEL;){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t)}{ let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==s.SENTINEL;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){ const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),c=l-n,h=a-o,u=i.length+h;e.piece=new d(i.bufferIndex,i.start,r,l,u),s.updateTreeMetadata(this,e,h,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=t,a=this.getLineFeedCnt(i.bufferIndex,r,i.end),l=a-n,c=o-this.offsetInBuffer(i.bufferIndex,r),h=i.length+c;e.piece=new d(i.bufferIndex,r,i.end,a,h),s.updateTreeMetadata(this,e,c,l)}shrinkNode(e,t,i){const n=e.piece,o=n.start,r=n.end,a=n.length,l=n.lineFeedCnt,c=t,h=this.getLineFeedCnt(n.bufferIndex,n.start,c),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new d(n.bufferIndex,n.start,c,h,u),s.updateTreeMetadata(this,e,u-a,h-l);let g=new d(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),p=this.rbInsertRight(e,g) ;this.validateCRLFWithPrevNode(p)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=c(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==s.SENTINEL;)if(i.left!==s.SENTINEL&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==s.SENTINEL;){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i, remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===s.SENTINEL||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))}endWithCR(e){ return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==s.SENTINEL&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i,n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new d(e.piece.bufferIndex,e.piece.start,i,a,r),s.updateTreeMetadata(this,e,-1,-1),0===e.piece.length&&n.push(e);let l={line:t.piece.start.line+1,column:0};const c=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new d(t.piece.bufferIndex,l,t.piece.end,h,c),s.updateTreeMetadata(this,t,-1,-1), 0===t.piece.length&&n.push(t);let u=this.createNewPieces("\r\n");this.rbInsertRight(e,u[0]);for(let e=0;e(t+=this.getNodeContent(e),!0)),t}}})),define(e[262],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWordAtText=t.ensureValidWordDefinition=t.DEFAULT_WORD_REGEXP=t.USUAL_WORD_SEPARATORS=void 0,t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", t.DEFAULT_WORD_REGEXP=function(e=""){let i="(-?\\d*\\.\\d\\w*)|([^";for(const n of t.USUAL_WORD_SEPARATORS)e.indexOf(n)>=0||(i+="\\"+n);return i+="\\s]+)",new RegExp(i,"g")}(),t.ensureValidWordDefinition=function(e){let i=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)i=e;else{let t="g";e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),i=new RegExp(e.source,t)}return i.lastIndex=0,i};const i={maxLen:1e3,windowSize:15,timeBudget:150};function n(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}t.getWordAtText=function e(t,o,s,r,a=i){if(s.length>a.maxLen){let i=t-a.maxLen/2;return i<0?(r+=t,i=0):r+=i,e(t,o,s=s.substring(i,t+a.maxLen/2),r,a)}Date.now();const l=t-1-r;let c=-1,d=null;for(let e=1;;e++){Date.now(),a.timeBudget;const t=l-a.windowSize*e;o.lastIndex=Math.max(0,t);const i=n(o,s,l,c);if(!i&&d)break;if(d=i,t<=0)break;c=t}if(d){let e={word:d[0],startColumn:r+1+d.index,endColumn:r+1+d.index+d[0].length} ;return o.lastIndex=0,e}return null}})),define(e[892],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FrankensteinMode=void 0;t.FrankensteinMode=class{constructor(e){this._languageIdentifier=e}getId(){return this._languageIdentifier.language}getLanguageIdentifier(){return this._languageIdentifier}}})),define(e[297],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoClosingPairs=t.StandardAutoClosingPairConditional=t.IndentAction=void 0,function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(t.IndentAction||(t.IndentAction={}));t.StandardAutoClosingPairConditional=class{constructor(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;ti&&(i=t)}return i}if("string"==typeof t)return r?"*"===t?5:t===s?10:0:0;if(t){const{language:e,pattern:a,scheme:l,hasAccessToAllModels:c}=t;if(!r&&!c)return 0;let d=0;if(l)if(l===o.scheme)d=10;else{if("*"!==l)return 0;d=5}if(e)if(e===s)d=10;else{if("*"!==e)return 0;d=Math.max(d,5)}if(a){let e;if((e="string"==typeof a?a:Object.assign(Object.assign({},a),{base:n.normalize(a.base)}))!==o.fsPath&&!i.match(e,o.fsPath))return 0;d=10} return d}return 0}})),define(e[538],t([0,1,258]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeLinks=t.LinkComputer=t.StateMachine=t.Uint8Matrix=t.State=void 0,function(e){e[e.Invalid=0]="Invalid",e[e.Start=1]="Start",e[e.H=2]="H",e[e.HT=3]="HT",e[e.HTT=4]="HTT",e[e.HTTP=5]="HTTP",e[e.F=6]="F",e[e.FI=7]="FI",e[e.FIL=8]="FIL",e[e.BeforeColon=9]="BeforeColon",e[e.AfterColon=10]="AfterColon",e[e.AlmostThere=11]="AlmostThere",e[e.End=12]="End",e[e.Accept=13]="Accept",e[e.LastKnownState=14]="LastKnownState"}(t.State||(t.State={}));class n{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;ot&&(t=s),o>i&&(i=o),r>i&&(i=r)}let o=new n(++i,++t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}t.StateMachine=o;let s=null;var r;!function(e){e[e.None=0]="None",e[e.ForceTermination=1]="ForceTermination",e[e.CannotEndIn=2]="CannotEndIn"}(r||(r={}));let a=null;class l{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=(null===s&&(s=new o([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),s)){const n=function(){if(null===a){a=new i.CharacterClassifier(0);const e=" \t<>'\"、。。、,.:;‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…";for(let t=0;t0&&e.getLanguageId(a-1)===s;)a--;return new i(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))};class i{constructor(e,t,i,n,o,s){this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){ return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}var n;t.ScopedLineTokens=i,function(e){e[e.value=7]="value"}(n||(n={})),t.ignoreBracketsInToken=function(e){return 0!=(7&e)}})),define(e[894],t([0,1,297]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterPairSupport=void 0;class n{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new i.StandardAutoClosingPairConditional(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new i.StandardAutoClosingPairConditional({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new i.StandardAutoClosingPairConditional({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:n.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs} getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(0===t.getTokenCount())return!0;const n=t.findTokenIndexAtOffset(i-2),o=t.getStandardTokenType(n);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}}t.CharacterPairSupport=n,n.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t",n.DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE=" \n\t"})),define(e[895],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentRulesSupport=t.IndentConsts=void 0,function(e){e[e.INCREASE_MASK=1]="INCREASE_MASK",e[e.DECREASE_MASK=2]="DECREASE_MASK",e[e.INDENT_NEXTLINE_MASK=4]="INDENT_NEXTLINE_MASK",e[e.UNINDENT_MASK=8]="UNINDENT_MASK"}(t.IndentConsts||(t.IndentConsts={}));t.IndentRulesSupport=class{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))} shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}})),define(e[896],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicInplaceReplace=void 0;class i{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,o){if(e&&t){let i=this.doNavigateValueSet(t,o) ;if(i)return{range:e,value:i}}if(i&&n){let e=this.doNavigateValueSet(n,o);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){let i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){let i=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),n=Number(e),o=parseFloat(e);return isNaN(n)||isNaN(o)||n!==o?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let o=0,s=e.length;null===n&&o=0?((n+=i?1:-1)<0?n=e.length-1:n%=e.length,e[n]):null}}t.BasicInplaceReplace=i,i.INSTANCE=new i})),define(e[897],t([0,1,21,24,297]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnEnterSupport=void 0;class s{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{ const t=s._createOpenBracketRegExp(e[0]),i=s._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||e.reg.test(e.text)))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function a(e,t){return e.length-t.length}function l(e){if(e.length<=1)return e ;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function c(e){const t=/^[\w ]+$/.test(e);return e=i.escapeRegExpCharacters(e),t?`\\b${e}\\b`:e}function d(e){let t=`(${e.map(c).join(")|(")})`;return i.createRegExp(t,!0)}t.RichEditBrackets=class{constructor(e,t){const i=function(e){const t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);const i=[];for(let e=0;e{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map((t,n)=>new s(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=(o=o.concat(e)).concat(t);for(let e=0,t=o.length;e=0;n--)t[i++]=e.charCodeAt(n);return n.getPlatformTextDecoder().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e=i)),t}}();t.BracketsUtils=class{static _findPrevBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let r=i.length-(s.index||0),a=s[0].length,l=n+r;return new o.Range(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=h(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let r=s.index||0,a=s[0].length;if(0===a)return null;let l=n+r;return new o.Range(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}})),define(e[898],t([0,1,404,405]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BracketElectricCharacterSupport=void 0;t.BracketElectricCharacterSupport=class{ constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return e=e.filter((e,t,i)=>i.indexOf(e)===t)}onElectricCharacter(e,t,o){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const s=t.findTokenIndexAtOffset(o-1);if(i.ignoreBracketsInToken(t.getStandardTokenType(s)))return null;const r=this._richEditBrackets.reversedRegex,a=t.getLineContent().substring(0,o-1)+e,l=n.BracketsUtils.findPrevBracketInRange(r,1,a,0,a.length);if(!l)return null;const c=a.substring(l.startColumn-1,l.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[c])return null;const d=t.getActualLineContentBefore(l.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:c}:null}}})),define(e[134],t([0,1,6,2,24,262,297,404,894,898,895,897,405]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.LanguageConfigurationRegistry=t.LanguageConfigurationRegistryImpl=t.LanguageConfigurationChangeEvent=t.RichEditSupport=void 0;class g{constructor(e,t,i){this._languageIdentifier=e,this._brackets=null,this._electricCharacter=null;let n=null;t&&(n=t._conf),this._conf=g._mergeConf(n,i),this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new h.OnEnterSupport(this._conf):null,this.comments=g._handleComments(this._conf),this.characterPair=new l.CharacterPairSupport(this._conf),this.wordDefinition=this._conf.wordPattern||s.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new d.IndentRulesSupport(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new u.RichEditBrackets(this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){ return this._electricCharacter||(this._electricCharacter=new c.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}static _mergeConf(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,autoCloseBefore:e?t.autoCloseBefore||e.autoCloseBefore:t.autoCloseBefore,folding:e?t.folding||e.folding:t.folding,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}}static _handleComments(e){let t=e.comments;if(!t)return null;let i={} ;if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}t.RichEditSupport=g;class p{constructor(e){this.languageIdentifier=e}}t.LanguageConfigurationChangeEvent=p;class m{constructor(){this._entries=new Map,this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event}register(e,t){let i=this._getRichEditSupport(e.id),o=new g(e,i,t);return this._entries.set(e.id,o),this._onDidChange.fire(new p(e)),n.toDisposable(()=>{this._entries.get(e.id)===o&&(this._entries.set(e.id,i),this._onDidChange.fire(new p(e)))})}_getRichEditSupport(e){return this._entries.get(e)}getIndentationRules(e){const t=this._entries.get(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){ let n=a.createScopedLineTokens(t,i-1),o=this._getElectricCharacterSupport(n.languageId);return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new r.AutoClosingPairs(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():l.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=a.createScopedLineTokens(t,i-1);return l.CharacterPairSupport.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return t?s.ensureValidWordDefinition(t.wordDefinition||null):s.ensureValidWordDefinition(null)}getWordDefinitions(){ let e=[];return this._entries.forEach((t,i)=>{t&&e.push([i,t.wordDefinition])}),e}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return s;let t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const s=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!s)return null;if(i<=1)return{indentation:"",action:null};const a=this.getPrecedingValidLine(t,i,s);if(a<0)return null;if(a<1)return{indentation:"",action:null};const l=t.getLineContent(a);if(s.shouldIncrease(l)||s.shouldIndentNextLine(l))return{indentation:o.getLeadingWhitespace(l),action:r.IndentAction.Indent,line:a};if(s.shouldDecrease(l))return{indentation:o.getLeadingWhitespace(l), action:null,line:a};{if(1===a)return{indentation:o.getLeadingWhitespace(t.getLineContent(a)),action:null,line:a};const e=a-1,i=s.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!s.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:o.getLeadingWhitespace(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:o.getLeadingWhitespace(t.getLineContent(a)),action:null,line:a};for(let e=a;e>0;e--){const i=t.getLineContent(e);if(s.shouldIncrease(i))return{indentation:o.getLeadingWhitespace(i),action:r.IndentAction.Indent,line:e};if(s.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!s.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:o.getLeadingWhitespace(t.getLineContent(i+1)),action:null,line:i+1}}if(s.shouldDecrease(i))return{indentation:o.getLeadingWhitespace(i),action:null,line:e}}return{indentation:o.getLeadingWhitespace(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,s){ if(e<4)return null;const a=this._getRichEditSupport(i);if(!a)return null;const l=this.getIndentRulesSupport(i);if(!l)return null;const c=this.getInheritIndentForLine(e,t,n),d=t.getLineContent(n);if(c){const i=c.line;if(void 0!==i){const n=a.onEnter(e,"",t.getLineContent(i),"");if(n){let e=o.getLeadingWhitespace(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===r.IndentAction.Indent||n.indentAction===r.IndentAction.IndentOutdent?e=s.shiftIndent(e):n.indentAction===r.IndentAction.Outdent&&(e=s.unshiftIndent(e)),l.shouldDecrease(d)&&(e=s.unshiftIndent(e)),n.appendText&&(e+=n.appendText),o.getLeadingWhitespace(e)}}return l.shouldDecrease(d)?c.action===r.IndentAction.Indent?c.indentation:s.unshiftIndent(c.indentation):c.action===r.IndentAction.Indent?s.shiftIndent(c.indentation):c.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber) ;const s=t.getLineTokens(i.startLineNumber),l=a.createScopedLineTokens(s,i.startColumn-1),c=l.getLineContent();let d,h,u=!1;if(l.firstCharOffset>0&&s.getLanguageId(0)!==l.languageId?(u=!0,d=c.substr(0,i.startColumn-1-l.firstCharOffset)):d=s.getLineContent().substring(0,i.startColumn-1),i.isEmpty())h=c.substr(i.startColumn-1-l.firstCharOffset);else{h=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-l.firstCharOffset)}const g=this.getIndentRulesSupport(l.languageId);if(!g)return null;const p=d,m=o.getLeadingWhitespace(d),v={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?p:t.getLineContent(e)},f=o.getLeadingWhitespace(s.getLineContent()),S=this.getInheritIndentForLine(e,v,i.startLineNumber+1);if(!S){const e=u?f:m;return{beforeEnter:e,afterEnter:e}}let b=u?f:S.indentation ;return S.action===r.IndentAction.Indent&&(b=n.shiftIndent(b)),g.shouldDecrease(h)&&(b=n.unshiftIndent(b)),{beforeEnter:u?f:m,afterEnter:b}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const s=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),a=this.getIndentRulesSupport(s.languageId);if(!a)return null;const l=s.getLineContent(),c=l.substr(0,i.startColumn-1-s.firstCharOffset);let d;if(i.isEmpty())d=l.substr(i.startColumn-1-s.firstCharOffset);else{d=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset)}if(!a.shouldDecrease(c+d)&&a.shouldDecrease(c+n+d)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let s=n.indentation;return n.action!==r.IndentAction.Indent&&(s=o.unshiftIndent(s)),s}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){ const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this._getRichEditSupport(n.languageId);if(!o)return null;const s=n.getLineContent(),a=s.substr(0,i.startColumn-1-n.firstCharOffset);let l;if(i.isEmpty())l=s.substr(i.startColumn-1-n.firstCharOffset);else{l=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset)}let c="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(c=e.getLineContent())}const d=o.onEnter(e,c,a,l);if(!d)return null;const h=d.indentAction;let u=d.appendText;const g=d.removeText||0;u||(u=h===r.IndentAction.Indent||h===r.IndentAction.IndentOutdent?"\t":"");let p=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:h,appendText:u,removeText:g,indentation:p}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let s=o.getLeadingWhitespace(n) ;return s.length>i-1&&(s=s.substring(0,i-1)),s}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return a.createScopedLineTokens(n,o)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}t.LanguageConfigurationRegistryImpl=m,t.LanguageConfigurationRegistry=new m})),define(e[406],t([0,1,55]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateTokensCSSForColorMap=t.ThemeTrieElement=t.ExternalThemeTrieElement=t.ThemeTrieElementRule=t.strcmp=t.toStandardTokenType=t.TokenTheme=t.ColorMap=t.parseTokenTheme=t.ParsedTokenThemeRule=void 0;class n{constructor(e,t,i,n,o){this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}function o(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let o=0,s=e.length;o{let i=d(e.token,t.token);return 0!==i?i:e.index-t.index}) ;let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}let s=new r;for(let e of t)s.getId(e);let l=s.getId(n),c=s.getId(o),u=new h(i,l,c),p=new g(u);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}t.TokenTheme=a;const l=/\b(comment|string|regex|regexp)\b/;function c(e){let t=e.match(l);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function d(e,t){return et?1:0} t.toStandardTokenType=c,t.strcmp=d;class h{constructor(e,t,i){this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new h(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}t.ThemeTrieElementRule=h;class u{constructor(e,t){this.mainRule=e,this.children=t||Object.create(null)}}t.ExternalThemeTrieElement=u;class g{constructor(e){this._mainRule=e,this._children=new Map}toExternalThemeTrieElement(){let e=Object.create(null);return this._children.forEach((t,i)=>{e[i]=t.toExternalThemeTrieElement()}),new u(this._mainRule,e)}match(e){if(""===e)return this._mainRule;let t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let o=this._children.get(t);return void 0!==o?o.match(i):this._mainRule} insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let o,s,r=e.indexOf(".");-1===r?(o=e,s=""):(o=e.substring(0,r),s=e.substring(r+1));let a=this._children.get(o);void 0===a&&(a=new g(this._mainRule.clone()),this._children.set(o,a)),a.insert(s,t,i,n)}}t.ThemeTrieElement=g,t.generateTokensCSSForColorMap=function(e){let t=[];for(let i=1,n=e.length;i{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let i=null,o=!1;return this._promises.set(e,t.then(t=>{this._promises.delete(e),!o&&t&&(i=this.register(e,t))})),n.toDisposable(()=>{o=!0,i&&i.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then(t=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}})),define(e[900],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.WrappingIndent=t.TrackedRangeStickiness=t.TextEditorCursorStyle=t.TextEditorCursorBlinkingStyle=t.SymbolTag=t.SymbolKind=t.SignatureHelpTriggerKind=t.SelectionDirection=t.ScrollbarVisibility=t.ScrollType=t.RenderMinimap=t.RenderLineNumbersType=t.OverviewRulerLane=t.OverlayWidgetPositionPreference=t.MouseTargetType=t.MinimapPosition=t.MarkerTag=t.MarkerSeverity=t.KeyCode=t.IndentAction=t.EndOfLineSequence=t.EndOfLinePreference=t.EditorOption=t.EditorAutoIndentStrategy=t.DocumentHighlightKind=t.DefaultEndOfLine=t.CursorChangeReason=t.ContentWidgetPositionPreference=t.CompletionTriggerKind=t.CompletionItemTag=t.CompletionItemKind=t.CompletionItemInsertTextRule=t.AccessibilitySupport=void 0,function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(t.CompletionItemInsertTextRule||(t.CompletionItemInsertTextRule={})),function(e){ e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(t.CompletionItemKind||(t.CompletionItemKind={})),function(e){e[e.Deprecated=1]="Deprecated"}(t.CompletionItemTag||(t.CompletionItemTag={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions" }(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(t.ContentWidgetPositionPreference||(t.ContentWidgetPositionPreference={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(t.CursorChangeReason||(t.CursorChangeReason={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.DefaultEndOfLine||(t.DefaultEndOfLine={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(t.DocumentHighlightKind||(t.DocumentHighlightKind={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(t.EditorAutoIndentStrategy||(t.EditorAutoIndentStrategy={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter", e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingOvertype=6]="autoClosingOvertype",e[e.autoClosingQuotes=7]="autoClosingQuotes",e[e.autoIndent=8]="autoIndent",e[e.automaticLayout=9]="automaticLayout",e[e.autoSurround=10]="autoSurround",e[e.codeLens=11]="codeLens",e[e.colorDecorators=12]="colorDecorators",e[e.columnSelection=13]="columnSelection",e[e.comments=14]="comments",e[e.contextmenu=15]="contextmenu",e[e.copyWithSyntaxHighlighting=16]="copyWithSyntaxHighlighting",e[e.cursorBlinking=17]="cursorBlinking",e[e.cursorSmoothCaretAnimation=18]="cursorSmoothCaretAnimation",e[e.cursorStyle=19]="cursorStyle",e[e.cursorSurroundingLines=20]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=21]="cursorSurroundingLinesStyle",e[e.cursorWidth=22]="cursorWidth",e[e.disableLayerHinting=23]="disableLayerHinting", e[e.disableMonospaceOptimizations=24]="disableMonospaceOptimizations",e[e.dragAndDrop=25]="dragAndDrop",e[e.emptySelectionClipboard=26]="emptySelectionClipboard",e[e.extraEditorClassName=27]="extraEditorClassName",e[e.fastScrollSensitivity=28]="fastScrollSensitivity",e[e.find=29]="find",e[e.fixedOverflowWidgets=30]="fixedOverflowWidgets",e[e.folding=31]="folding",e[e.foldingStrategy=32]="foldingStrategy",e[e.foldingHighlight=33]="foldingHighlight",e[e.unfoldOnClickAfterEndOfLine=34]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=35]="fontFamily",e[e.fontInfo=36]="fontInfo",e[e.fontLigatures=37]="fontLigatures",e[e.fontSize=38]="fontSize",e[e.fontWeight=39]="fontWeight",e[e.formatOnPaste=40]="formatOnPaste",e[e.formatOnType=41]="formatOnType",e[e.glyphMargin=42]="glyphMargin",e[e.gotoLocation=43]="gotoLocation",e[e.hideCursorInOverviewRuler=44]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=45]="highlightActiveIndentGuide",e[e.hover=46]="hover",e[e.inDiffEditor=47]="inDiffEditor", e[e.letterSpacing=48]="letterSpacing",e[e.lightbulb=49]="lightbulb",e[e.lineDecorationsWidth=50]="lineDecorationsWidth",e[e.lineHeight=51]="lineHeight",e[e.lineNumbers=52]="lineNumbers",e[e.lineNumbersMinChars=53]="lineNumbersMinChars",e[e.links=54]="links",e[e.matchBrackets=55]="matchBrackets",e[e.minimap=56]="minimap",e[e.mouseStyle=57]="mouseStyle",e[e.mouseWheelScrollSensitivity=58]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=59]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=60]="multiCursorMergeOverlapping",e[e.multiCursorModifier=61]="multiCursorModifier",e[e.multiCursorPaste=62]="multiCursorPaste",e[e.occurrencesHighlight=63]="occurrencesHighlight",e[e.overviewRulerBorder=64]="overviewRulerBorder",e[e.overviewRulerLanes=65]="overviewRulerLanes",e[e.padding=66]="padding",e[e.parameterHints=67]="parameterHints",e[e.peekWidgetDefaultFocus=68]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=69]="definitionLinkOpensInPeek",e[e.quickSuggestions=70]="quickSuggestions", e[e.quickSuggestionsDelay=71]="quickSuggestionsDelay",e[e.readOnly=72]="readOnly",e[e.renameOnType=73]="renameOnType",e[e.renderControlCharacters=74]="renderControlCharacters",e[e.renderIndentGuides=75]="renderIndentGuides",e[e.renderFinalNewline=76]="renderFinalNewline",e[e.renderLineHighlight=77]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=78]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=79]="renderValidationDecorations",e[e.renderWhitespace=80]="renderWhitespace",e[e.revealHorizontalRightPadding=81]="revealHorizontalRightPadding",e[e.roundedSelection=82]="roundedSelection",e[e.rulers=83]="rulers",e[e.scrollbar=84]="scrollbar",e[e.scrollBeyondLastColumn=85]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=86]="scrollBeyondLastLine",e[e.scrollPredominantAxis=87]="scrollPredominantAxis",e[e.selectionClipboard=88]="selectionClipboard",e[e.selectionHighlight=89]="selectionHighlight",e[e.selectOnLineNumbers=90]="selectOnLineNumbers", e[e.showFoldingControls=91]="showFoldingControls",e[e.showUnused=92]="showUnused",e[e.snippetSuggestions=93]="snippetSuggestions",e[e.smoothScrolling=94]="smoothScrolling",e[e.stopRenderingLineAfter=95]="stopRenderingLineAfter",e[e.suggest=96]="suggest",e[e.suggestFontSize=97]="suggestFontSize",e[e.suggestLineHeight=98]="suggestLineHeight",e[e.suggestOnTriggerCharacters=99]="suggestOnTriggerCharacters",e[e.suggestSelection=100]="suggestSelection",e[e.tabCompletion=101]="tabCompletion",e[e.tabIndex=102]="tabIndex",e[e.unusualLineTerminators=103]="unusualLineTerminators",e[e.useTabStops=104]="useTabStops",e[e.wordSeparators=105]="wordSeparators",e[e.wordWrap=106]="wordWrap",e[e.wordWrapBreakAfterCharacters=107]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=108]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=109]="wordWrapColumn",e[e.wordWrapMinified=110]="wordWrapMinified",e[e.wrappingIndent=111]="wrappingIndent",e[e.wrappingStrategy=112]="wrappingStrategy", e[e.showDeprecated=113]="showDeprecated",e[e.editorClassName=114]="editorClassName",e[e.pixelRatio=115]="pixelRatio",e[e.tabFocusMode=116]="tabFocusMode",e[e.layoutInfo=117]="layoutInfo",e[e.wrappingInfo=118]="wrappingInfo"}(t.EditorOption||(t.EditorOption={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.EndOfLinePreference||(t.EndOfLinePreference={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(t.EndOfLineSequence||(t.EndOfLineSequence={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(t.IndentAction||(t.IndentAction={})),function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home", e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu", e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6", e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(t.KeyCode||(t.KeyCode={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(t.MarkerSeverity||(t.MarkerSeverity={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(t.MarkerTag||(t.MarkerTag={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(t.MinimapPosition||(t.MinimapPosition={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS", e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(t.MouseTargetType||(t.MouseTargetType={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(t.OverlayWidgetPositionPreference||(t.OverlayWidgetPositionPreference={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(t.OverviewRulerLane||(t.OverviewRulerLane={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(t.RenderLineNumbersType||(t.RenderLineNumbersType={})),function(e){e[e.None=0]="None", e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(t.RenderMinimap||(t.RenderMinimap={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(t.ScrollType||(t.ScrollType={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(t.ScrollbarVisibility||(t.ScrollbarVisibility={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(t.SelectionDirection||(t.SelectionDirection={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean", e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(t.SymbolKind||(t.SymbolKind={})),function(e){e[e.Deprecated=1]="Deprecated"}(t.SymbolTag||(t.SymbolTag={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(t.TextEditorCursorBlinkingStyle||(t.TextEditorCursorBlinkingStyle={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(t.TextEditorCursorStyle||(t.TextEditorCursorStyle={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore", e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(t.TrackedRangeStickiness||(t.TrackedRangeStickiness={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(t.WrappingIndent||(t.WrappingIndent={}))})),define(e[901],t([0,1,31,6,79,10,47,18,60,403,900]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMonacoBaseAPI=t.KeyMod=void 0;class h{static chord(e,t){return o.KeyChord(e,t)}}t.KeyMod=h,h.CtrlCmd=2048,h.Shift=1024,h.Alt=512,h.WinCtrl=256,t.createMonacoBaseAPI=function(){return{editor:void 0,languages:void 0,CancellationTokenSource:i.CancellationTokenSource,Emitter:n.Emitter,KeyCode:d.KeyCode,KeyMod:h,Position:r.Position,Range:a.Range,Selection:l.Selection,SelectionDirection:d.SelectionDirection,MarkerSeverity:d.MarkerSeverity,MarkerTag:d.MarkerTag,Uri:s.URI,Token:c.Token}}})),define(e[539],t([0,1]),(function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}), t.OverviewZoneManager=t.OverviewRulerZone=t.ColorZone=void 0,function(e){e[e.MINIMUM_HEIGHT=4]="MINIMUM_HEIGHT"}(i||(i={}));class n{constructor(e,t,i){this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}t.ColorZone=n;class o{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colori&&(h=i-u);const g=l.color;let p=this._color2Id[g];p||(p=++this._lastAssignedId,this._color2Id[g]=p,this._id2Color[p]=g);const m=new n(h-u,h+u,p);l.setColorZone(m),r.push(m)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}})),define(e[298],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VisibleRanges=t.HorizontalPosition=t.HorizontalRange=t.LineVisibleRanges=t.RenderingContext=t.RestrictedRenderingContext=void 0;class i{constructor(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport() ;this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}t.RestrictedRenderingContext=i;t.RenderingContext=class extends i{constructor(e,t,i){super(e,t),this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}};t.LineVisibleRanges=class{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}};t.HorizontalRange=class{constructor(e,t){this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}};t.HorizontalPosition=class{constructor(e,t){this.outsideRenderedLine=e,this.left=Math.round(t)}};t.VisibleRanges=class{constructor(e,t){this.outsideRenderedLine=e, this.ranges=t}}})),define(e[902],t([0,1,298]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RangeUtil=void 0;class n{constructor(e,t){this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}t.RangeUtil=class{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(e){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return[new i.HorizontalRange(e[0].left,e[0].width)];e.sort(n.compare);let t=[],o=0,s=e[0].left,r=e[0].width;for(let n=1,a=e.length;n=l?r=Math.max(r,l+c-s):(t[o++]=new i.HorizontalRange(s,r),s=l,r=c)}return t[o++]=new i.HorizontalRange(s,r),t} static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const i=[];for(let o=0,s=e.length;oa)return null;if((t=Math.min(a,Math.max(0,t)))===(n=Math.min(a,Math.max(0,n)))&&i===o&&0===i){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,s)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let l=e.children[t].firstChild,c=e.children[n].firstChild;if(l&&c||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!c&&0===o&&n>0&&(c=e.children[n-1].firstChild,o=1073741824)),!l||!c)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(c.textContent.length,Math.max(0,o));const d=this._readClientRects(l,i,c,o,r);return this._createHorizontalRangesFromClientRects(d,s)}}})),define(e[903],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.ViewContext=t.EditorTheme=void 0;class i{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}t.EditorTheme=i;t.ViewContext=class{constructor(e,t,n){this.configuration=e,this.theme=new i(t),this.model=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}})),define(e[407],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewZonesChangedEvent=t.ViewTokensColorsChangedEvent=t.ViewTokensChangedEvent=t.ViewThemeChangedEvent=t.ViewScrollChangedEvent=t.ViewRevealRangeRequestEvent=t.VerticalRevealType=t.ViewLinesInsertedEvent=t.ViewLinesDeletedEvent=t.ViewLinesChangedEvent=t.ViewLineMappingChangedEvent=t.ViewLanguageConfigurationEvent=t.ViewFocusChangedEvent=t.ViewFlushedEvent=t.ViewDecorationsChangedEvent=t.ViewCursorStateChangedEvent=t.ViewConfigurationChangedEvent=t.ViewEventType=void 0,function(e){ e[e.ViewConfigurationChanged=0]="ViewConfigurationChanged",e[e.ViewCursorStateChanged=1]="ViewCursorStateChanged",e[e.ViewDecorationsChanged=2]="ViewDecorationsChanged",e[e.ViewFlushed=3]="ViewFlushed",e[e.ViewFocusChanged=4]="ViewFocusChanged",e[e.ViewLanguageConfigurationChanged=5]="ViewLanguageConfigurationChanged",e[e.ViewLineMappingChanged=6]="ViewLineMappingChanged",e[e.ViewLinesChanged=7]="ViewLinesChanged",e[e.ViewLinesDeleted=8]="ViewLinesDeleted",e[e.ViewLinesInserted=9]="ViewLinesInserted",e[e.ViewRevealRangeRequest=10]="ViewRevealRangeRequest",e[e.ViewScrollChanged=11]="ViewScrollChanged",e[e.ViewThemeChanged=12]="ViewThemeChanged",e[e.ViewTokensChanged=13]="ViewTokensChanged",e[e.ViewTokensColorsChanged=14]="ViewTokensColorsChanged",e[e.ViewZonesChanged=15]="ViewZonesChanged"}(t.ViewEventType||(t.ViewEventType={}));t.ViewConfigurationChangedEvent=class{constructor(e){this.type=0,this._source=e}hasChanged(e){return this._source.hasChanged(e)}};t.ViewCursorStateChangedEvent=class{constructor(e,t){ this.type=1,this.selections=e,this.modelSelections=t}};t.ViewDecorationsChangedEvent=class{constructor(e){this.type=2,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}};t.ViewFlushedEvent=class{constructor(){this.type=3}};t.ViewFocusChangedEvent=class{constructor(e){this.type=4,this.isFocused=e}};t.ViewLanguageConfigurationEvent=class{constructor(){this.type=5}};t.ViewLineMappingChangedEvent=class{constructor(){this.type=6}};t.ViewLinesChangedEvent=class{constructor(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t}};t.ViewLinesDeletedEvent=class{constructor(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t}};t.ViewLinesInsertedEvent=class{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}},function(e){e[e.Simple=0]="Simple",e[e.Center=1]="Center",e[e.CenterIfOutsideViewport=2]="CenterIfOutsideViewport",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom",e[e.NearTop=5]="NearTop", e[e.NearTopIfOutsideViewport=6]="NearTopIfOutsideViewport"}(t.VerticalRevealType||(t.VerticalRevealType={}));t.ViewRevealRangeRequestEvent=class{constructor(e,t,i,n,o,s){this.type=10,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=o,this.scrollType=s}};t.ViewScrollChangedEvent=class{constructor(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}};t.ViewThemeChangedEvent=class{constructor(){this.type=12}};t.ViewTokensChangedEvent=class{constructor(e){this.type=13,this.ranges=e}};t.ViewTokensColorsChangedEvent=class{constructor(){this.type=14}};t.ViewZonesChangedEvent=class{constructor(){this.type=15}}})),define(e[408],t([0,1,24]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.LineDecorationsNormalizer=t.DecorationSegment=t.LineDecoration=void 0;class n{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let o=0;ot)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const d=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:o;s[r++]=new n(d,h,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn===t.startColumn){if(e.endColumn===t.endColumn){const i=n._typeCompare(e.type,t.type);return 0===i?e.classNamet.className?1:0:i} return e.endColumn-t.endColumn}return e.startColumn-t.startColumn}}t.LineDecoration=n;class o{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}t.DecorationSegment=o;class s{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}t.LineDecorationsNormalizer=class{static normalize(e,t){if(0===t.length)return[];let n=[];const o=new s;let r=0;for(let s=0,a=t.length;s1){const t=e.charCodeAt(l-2);i.isHighSurrogate(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);i.isHighSurrogate(t)&&c--}const u=l-1,g=c-2;r=o.consumeLowerThan(u,r,n),0===o.count&&(r=u),o.insert(g,d,h)}return o.consumeLowerThan(1073741824,r,n),n}}})),define(e[904],t([0,1,24]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinesLayout=t.EditorWhitespace=void 0;class n{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e) }remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class o{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}t.EditorWhitespace=o;class s{constructor(e,t,o,r){this._instanceId=i.singleLetterHash(++s.INSTANCE_COUNT),this._pendingChanges=new n,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=o,this._paddingBottom=r}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n>>1;t===e[s].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,s|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new o(r,e,i,n,s)),r},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{let t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id) ;i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=s.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}hasWhitespace(){ return this._checkPendingChanges(),this.getWhitespacesCount()>0}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=s+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r), l=0|this.getHeightForWhitespaceIndex(r));let d=o,h=d;let u=0;o>=5e5&&(u=5e5*Math.floor(o/5e5),h-=u=Math.floor(u/i)*i);const g=[],p=e+(t-e)/2;let m=-1;for(let e=n;e<=s;e++){if(-1===m){const t=d,n=d+i;(t<=p&&pp)&&(m=e)}for(d+=i,g[e-n]=h,h+=i;c===e;)h+=l,d+=l,++r>=a?c=s+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){s=e;break}}-1===m&&(m=s);const v=0|this.getVerticalOffsetForLineNumber(s);let f=n,S=s;return ft&&S--,{bigNumbersDelta:u,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:g,centeredLineNumber:m,completelyVisibleStartLineNumber:f,completelyVisibleEndLineNumber:S}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return(i=t>=1?this._lineHeight*t:0)+(n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0)+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1 ;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e) ;if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}t.LinesLayout=s,s.INSTANCE_COUNT=0})),define(e[409],t([0,1,24,260,408]),(function(e,t,i,n,o){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),t.renderViewLine2=t.RenderLineOutput2=t.renderViewLine=t.RenderLineOutput=t.ForeignElementType=t.CharacterMapping=t.CharacterMappingConstants=t.RenderLineInput=t.LineRange=t.LinePartMetadata=t.RenderWhitespace=void 0,function(e){e[e.None=0]="None",e[e.Boundary=1]="Boundary", e[e.Selection=2]="Selection",e[e.Trailing=3]="Trailing",e[e.All=4]="All"}(t.RenderWhitespace||(t.RenderWhitespace={})),function(e){e[e.IS_WHITESPACE=1]="IS_WHITESPACE",e[e.PSEUDO_BEFORE=2]="PSEUDO_BEFORE",e[e.PSEUDO_AFTER=4]="PSEUDO_AFTER",e[e.IS_WHITESPACE_MASK=1]="IS_WHITESPACE_MASK",e[e.PSEUDO_BEFORE_MASK=2]="PSEUDO_BEFORE_MASK",e[e.PSEUDO_AFTER_MASK=4]="PSEUDO_AFTER_MASK"}(t.LinePartMetadata||(t.LinePartMetadata={}));class r{constructor(e,t,i){this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}}t.LineRange=class{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}};t.RenderLineInput=class{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l,this.tabSize=c, this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=v,this.fontLigatures=f,this.selectionsOnLine=S&&S.sort((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setPartData(e,t,i,n){let o=(t<<16|i<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=n+i}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,s=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;let r=this._data[o],l=this._data[s];if(r===n)return o;if(l===n)return s;let c,d=a.getPartIndex(r);return i-a.getCharIndex(r)<=(c=d!==a.getPartIndex(l)?t:a.getCharIndex(l))-i?o:s}} t.CharacterMapping=a,function(e){e[e.None=0]="None",e[e.Before=1]="Before",e[e.After=2]="After"}(t.ForeignElementType||(t.ForeignElementType={}));class l{constructor(e,t,i){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function c(e,t){if(0===e.lineContent.length){let i=0,n="";if(e.lineDecorations.length>0){const t=[],o=[];for(let n=0,s=e.lineDecorations.length;n${t.length>0?``:""}${o.length>0?``:""}`}}return t.appendASCIIString(n),new l(new a(0,0),!1,i)}return function(e,t){ const n=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,s=e.containsForeignElements,r=e.lineContent,c=e.len,d=e.isOverflowing,h=e.parts,u=e.fauxIndentLength,g=e.tabSize,p=e.startVisibleColumn,m=e.containsRTL,v=e.spaceWidth,f=e.renderSpaceCharCode,S=e.renderWhitespace,b=e.renderControlCharacters,_=new a(c+1,h.length);let C=0,y=p,w=0,E=0,I=0,x=0;m?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,a=h.length;e=u&&(t+=n)}}for(p&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(v*i)),t.appendASCIIString('px"')),t.appendASCII(62);C1?t.write1(8594):t.write1(65515) ;for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(f);w+=i,C>=u&&(y+=i)}I=i}else{let n=0;for(t.appendASCII(62);C=u&&(y+=a)}I=n}m?E++:E=0,t.appendASCIIString("")}_.setPartData(c,h.length-1,w,x),d&&t.appendASCIIString("");return t.appendASCIIString(""),new l(_,m,s)}(function(e){const t=e.lineContent;let n,s;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new r(t,"",0)) ;for(let s=0,a=e.getCount();s=i){n[o++]=new r(i,l,0);break}n[o++]=new r(a,l,0)}return n}(e.lineTokens,e.fauxIndentLength,s);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,n,o){const s=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,d=e.useMonospaceOptimizations,h=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth;let m=[],v=0,f=0,S=o[f].type,b=o[f].endIndex;const _=o.length;let C,y=!1,w=i.firstNonWhitespaceIndex(t);-1===w?(y=!0,w=n,C=n):C=i.lastNonWhitespaceIndex(t);let E=!1,I=0,x=h&&h[I],k=c%l;for(let e=a;e=x.endOffset&&(I++,x=h&&h[I]),eC)c=!0;else if(9===s)c=!0;else if(32===s)if(u)if(E)c=!0;else{const i=e+1e),c&&g&&(c=y||e>C),E){if(!c||!d&&k>=l){if(p){for(let t=(v>0?m[v-1].endIndex:a)+1;t<=e;t++)m[v++]=new r(t,"mtkw",1)}else m[v++]=new r(e,"mtkw",1);k%=l}}else(e===b||c&&e>a)&&(m[v++]=new r(e,S,0),k%=l);for(9===s?k=l:i.isFullWidthCharacter(s)?k+=2:k++,E=c;e===b;)++f<_&&(S=o[f].type,b=o[f].endIndex)}let D=!1;if(E)if(s&&u){let e=n>0?t.charCodeAt(n-1):0,i=n>1?t.charCodeAt(n-2):0;32===e&&32!==i&&9!==i||(D=!0)}else D=!0;if(D)if(p){for(let e=(v>0?m[v-1].endIndex:a)+1;e<=n;e++)m[v++]=new r(e,"mtkw",1)}else m[v++]=new r(n,"mtkw",1);else m[v++]=new r(n,S,0);return m}(e,t,s,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,c[d++]=new r(h,o,u)),!(e.endOffset+1<=n)){h=n,c[d++]=new r(h,o+" "+e.className,u|e.metadata);break}h=e.endOffset+1,c[d++]=new r(h,o+" "+e.className,u|e.metadata),l++}n>h&&(h=n,c[d++]=new r(h,o,u))}const u=i[i.length-1].endIndex;if(l=50&&(o[s++]=new r(c+1,t,i),d=c+1,c=-1);d!==l&&(o[s++]=new r(l,t,i))}else o[s++]=a;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=Math.ceil(l/50);for(let i=1;i=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=i.toUint32(e),t=i.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;let s=n.length-e;return t>=s&&(t=s), 0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=i.toUint32(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,i=this.values.length-1,o=0,s=0,r=0;for(;t<=i;)if(o=t+(i-t)/2|0, e<(r=(s=this.prefixSum[o])-this.values[o]))i=o-1;else{if(!(e>=s))break;t=o+1}return new n(o,e-r)}}})),define(e[906],t([0,1,47,299]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MirrorTextModel=void 0;t.MirrorTextModel=class{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new i.Position(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t) ;for(let n=0;nthis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class v{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new m(s.URI.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)} acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeDiff(e,t,i,n){const o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;const r=o.getLinesContent(),a=s.getLinesContent(),c=new l.DiffComputer(r,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),d=!(c.changes.length>0)&&this._modelsAreIdentical(o,s);return{quitEarly:c.quitEarly,identical:d,changes:c.changes}}_modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++){if(e.getLineContent(n)!==t.getLineContent(n))return!1}return!0}async computeDirtyDiff(e,t,i){let n=this._getModel(e),o=this._getModel(t);if(!n||!o)return null;let s=n.getLinesContent(),r=o.getLinesContent();return new l.DiffComputer(s,r,{shouldComputeCharChanges:!1,shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:1e3}).computeDiff().changes} async computeMoreMinimalEdits(e,t){const o=this._getModel(e);if(!o)return t;const s=[];let r=void 0;t=i.mergeSort(t,(e,t)=>{if(e.range&&t.range)return a.Range.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)});for(let{range:e,text:i,eol:l}of t){if("number"==typeof l&&(r=l),a.Range.isEmpty(e)&&!i)continue;const t=o.getValueInRange(e);if(t===(i=i.replace(/\r\n|\n|\r/g,o.eol)))continue;if(Math.max(i.length,t.length)>v._diffLimit){s.push({range:e,text:i});continue}const c=n.stringDiff(t,i,!1),d=o.offsetAt(a.Range.lift(e).getStartPosition());for(const e of c){const t=o.positionAt(d+e.originalStart),n=o.positionAt(d+e.originalStart+e.originalLength),r={text:i.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};o.getValueInRange(r.range)!==r.text&&s.push(r)}}return"number"==typeof r&&s.push({eol:r,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s} async computeLinks(e){let t=this._getModel(e);return t?h.computeLinks(t):null}async textualSuggest(e,t,i,n){const o=this._getModel(e);if(!o)return null;const s=[],r=new Set,a=new RegExp(i,n),l=o.getWordAtPosition(t,a);l&&r.add(o.getValueInRange(l));for(let e of o.words(a))if(!r.has(e)&&(r.add(e),isNaN(Number(e))&&(s.push(e),r.size>v._suggestionsLimit)))break;return s}async computeWordRanges(e,t,i,n){let o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,i),Promise.resolve(p.getAllMethodNames(this._foreignModule))):new Promise((n,s)=>{e([t],e=>{this._foreignModule=e.create(o,i),n(p.getAllMethodNames(this._foreignModule))},s)})}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}t.EditorSimpleWorker=v,v._diffLimit=1e5,v._suggestionsLimit=1e4,t.create=function(e){return new v(e,null)}, "function"==typeof importScripts&&(o.globals.monaco=g.createMonacoBaseAPI())})),define(e[300],t([0,1,2]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewEventHandler=void 0;class n extends i.Disposable{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!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 t=!1;for(let i=0,n=e.length;i=n,d=a,h=o.viewportHeight-a>=n;let u=e.left,g=t.left;return u+i>o.scrollLeft+o.viewportWidth&&(u=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),ur){const e=a-(r-o);a-=e,n-=e}if(a=22,f=d+o<=h.height-22;return this._fixedOverflowWidgets?{fitsAbove:v,aboveTop:Math.max(c,22),aboveLeft:g,fitsBelow:f,belowTop:d,belowLeft:m}:{fitsAbove:v,aboveTop:r,aboveLeft:u,fitsBelow:f,belowTop:a,belowLeft:p}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new s(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumbern.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))}}})),define(e[909],t([0,1,263,18,298,767]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsOverlay=void 0 ;class s extends i.DynamicViewOverlay{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!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||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],o=0;for(let e=0,n=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,o=t.options.className;return io?1:n.Range.compareRangesUsingStarts(e.range,t.range)});const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let e=s;e<=r;e++){a[e-s]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,r=t.length;e',l=Math.max(r.range.startLineNumber,o),c=Math.min(r.range.endLineNumber,s);for(let e=l;e<=c;e++){i[e-o]+=a}}}_renderNormalDecorations(e,t,i){const o=String(this._lineHeight),s=e.visibleRange.startLineNumber;let r=null,a=!1,l=null;for(let c=0,d=t.length;c';a[c]+=o}}}render(e,t){ if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}t.DecorationsOverlay=s})),define(e[410],t([0,1,263,768]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlyphMarginOverlay=t.DedupOverlay=t.DecorationToRender=void 0;class n{constructor(e,t,i){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}t.DecorationToRender=n;class o extends i.DynamicViewOverlay{_render(e,t,i){const n=[];for(let i=e;i<=t;i++){n[i-e]=[]}if(0===i.length)return n;i.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',r=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?r[i]="":r[i]='
    =this._renderResult.length?"":this._renderResult[i]}}})),define(e[910],t([0,1,410,772]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinesDecorationsOverlay=void 0;class n extends i.DedupOverlay{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(117);this._decorationsLeft=t.decorationsLeft, this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(117);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.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 t=e.getDecorationsInViewport();let n=[],o=0;for(let e=0,s=t.length;e
    ',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];let a="";for(let e=0,t=r.length;e';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}t.MarginViewLineDecorationsOverlay=n})),define(e[912],t([0,1,109,142,775]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewOverlayWidgets=void 0;class o extends n.ViewPart{constructor(e){super(e);const t=this._context.configuration.options.get(117);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width, this._domNode=i.createFastDomNode(document.createElement("div")),n.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(117);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=i.createFastDomNode(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t], e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;ethis._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(o.get(51)),this._zoneManager.setPixelRatio(o.get(115)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(51)&&(this._zoneManager.setLineHeight(t.get(51)),this._render()),e.hasChanged(115)&&(this._zoneManager.setPixelRatio(t.get(115)),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(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(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(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1 ;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,s,n,r-s),s=l,r=c)}e.fillRect(0,s,n,r-s)}}t.OverviewRuler=s})),define(e[914],t([0,1,109,21,142,47]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewZones=void 0;const r=()=>{throw new Error("Invalid change accessor")};class a extends o.ViewPart{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(117);this._lineHeight=t.get(51),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=i.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=i.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 e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.model.changeWhitespace(e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o{const o={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{e(t)}catch(e){n.onUnexpectedError(e)}}(e,o),o.addZone=r,o.removeZone=r,o.layoutZone=r}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),o={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t, isVisible:!1,domNode:i.createFastDomNode(t.domNode),marginDomNode:t.marginDomNode?i.createFastDomNode(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,n.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode), i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){ n.onUnexpectedError(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){n.onUnexpectedError(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let e=0,o=t.length;e0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}t.ViewModelEventDispatcher=o;class s{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){ this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}t.ViewModelEventsCollector=s,function(e){e[e.ContentSizeChanged=0]="ContentSizeChanged",e[e.FocusChanged=1]="FocusChanged",e[e.ScrollChanged=2]="ScrollChanged",e[e.ViewZonesChanged=3]="ViewZonesChanged",e[e.ReadOnlyEditAttempt=4]="ReadOnlyEditAttempt",e[e.CursorStateChanged=5]="CursorStateChanged"}(t.OutgoingViewModelEventKind||(t.OutgoingViewModelEventKind={}));class r{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new r(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}t.ContentSizeChangedEvent=r;class a{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){ return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new a(this.oldHasFocus,e.hasFocus)}}t.FocusChangedEvent=a;class l{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new l(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}t.ScrollChangedEvent=l;t.ViewZonesChangedEvent=class{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}};class c{ constructor(e,t,i,n,o,s,r){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(86)?o+=t-n.get(51):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new c(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new r.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new r.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(118),n=t.get(36);if(i.isViewportWrapping){const i=t.get(117),o=t.get(56) ;return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(85)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new c(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}getLineNumberAtVerticalOffset(e){ return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.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(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}t.ViewLayout=h})),define(e[916],t([0,1,18,60]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoveCaretCommand=void 0;t.MoveCaretCommand=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,o=this._selection.startColumn,s=this._selection.endColumn ;if((!this._isMovingLeft||1!==o)&&(this._isMovingLeft||s!==e.getLineMaxColumn(n)))if(this._isMovingLeft){const r=new i.Range(n,o-1,n,o),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new i.Range(n,s,n,s),a)}else{const r=new i.Range(n,s,n,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new i.Range(n,o,n,o),a)}}computeCursorState(e,t){return this._isMovingLeft?new n.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new n.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}})),define(e[215],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionCommandArgs=t.filtersAction=t.mayIncludeActionsOfKind=t.CodeActionAutoApply=t.CodeActionKind=void 0;class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){ return this.equals(e)||""===this.value||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}}function n(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}t.CodeActionKind=i,i.sep=".",i.None=new i("@@none@@"),i.Empty=new i(""),i.QuickFix=new i("quickfix"),i.Refactor=new i("refactor"),i.Source=new i("source"),i.SourceOrganizeImports=i.Source.append("organizeImports"),i.SourceFixAll=i.Source.append("fixAll"),function(e){e.IfSingle="ifSingle",e.First="first",e.Never="never"}(t.CodeActionAutoApply||(t.CodeActionAutoApply={})),t.mayIncludeActionsOfKind=function(e,t){return!(e.include&&!e.include.intersects(t))&&((!e.excludes||!e.excludes.some(i=>n(t,i,e.include)))&&!(!e.includeSourceActions&&i.Source.contains(t)))},t.filtersAction=function(e,t){const o=t.kind?new i(t.kind):void 0 ;return!!(!e.include||o&&e.include.contains(o))&&(!(e.excludes&&o&&e.excludes.some(t=>n(o,t,e.include)))&&(!(!e.includeSourceActions&&o&&i.Source.contains(o))&&!(e.onlyIncludePreferredActions&&!t.isPreferred)))};class o{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new o(o.getKindFromUser(e,t.kind),o.getApplyFromUser(e,t.apply),o.getPreferredUser(e)):new o(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new i(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}t.CodeActionCommandArgs=o})),define(e[917],t([0,1,6]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPickerModel=void 0;t.ColorPickerModel=class{constructor(e,t,n){this.presentationIndex=n, this._onColorFlushed=new i.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new i.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new i.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){ for(let e=0;ee.length)return!1;for(let o=0;o=65&&n<=90&&n+32===s||s>=65&&s<=90&&s+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const l=e.startLineNumber,c=e.startColumn,d=e.endLineNumber,h=e.endColumn,u=s.getLineContent(l),g=s.getLineContent(d);let p,m=u.lastIndexOf(t,c-1+t.length),v=g.indexOf(i,h-1-i.length);if(-1!==m&&-1!==v)if(l===d){ u.substring(m+t.length,v).indexOf(i)>=0&&(m=-1,v=-1)}else{const e=u.substring(m+t.length),n=g.substring(0,v);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(m=-1,v=-1)}-1!==m&&-1!==v?(n&&m+t.length0&&32===g.charCodeAt(v-1)&&(i=" "+i,v-=1),p=a._createRemoveBlockCommentOperations(new o.Range(l,m+t.length+1,d,v+1),t,i)):(p=a._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,n){let s=[];return o.Range.isEmpty(e)?s.push(i.EditOperation.delete(new o.Range(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(s.push(i.EditOperation.delete(new o.Range(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),s.push(i.EditOperation.delete(new o.Range(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),s}static _createAddBlockCommentOperations(e,t,s,r){let a=[] ;return o.Range.isEmpty(e)?a.push(i.EditOperation.replace(new o.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+s)):(a.push(i.EditOperation.insert(new n.Position(e.startLineNumber,e.startColumn),t+(r?" ":""))),a.push(i.EditOperation.insert(new n.Position(e.endLineNumber,e.endColumn),(r?" ":"")+s))),a}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=r.LanguageConfigurationRegistry.getComments(o);s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new s.Selection(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0 ;return new s.Selection(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}t.BlockCommentCommand=a})),define(e[918],t([0,1,24,115,47,18,60,134,541]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineCommentCommand=t.Type=void 0,function(e){e[e.Toggle=0]="Toggle",e[e.ForceAdd=1]="ForceAdd",e[e.ForceRemove=2]="ForceRemove"}(t.Type||(t.Type={}));class c{constructor(e,t,i,n,o){this._selection=e,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o}static _gatherPreflightCommentStrings(e,t,i){e.tokenizeIfCheap(t);const n=e.getLanguageIdAtPosition(t,1),o=a.LanguageConfigurationRegistry.getComments(n),s=o?o.lineCommentToken:null;if(!s)return null;let r=[];for(let e=0,n=i-t+1;er?o-1:o}}}t.LineCommentCommand=c})),define(e[919],t([0,1,60,18]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropCommand=void 0;t.DragAndDropCommand=class{constructor(e,t,i){this.selection=e, this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let o=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new n.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),o), !this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new i.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new i.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber0){let e=[];for(let t=0;ti.Range.compareRangesUsingStarts(e.range,t.range));let n=[],o=e[0];for(let t=1;t0){let e=[],t=i.caseOps.length,n=0;for(let s=0,r=o.length;s=t){e.push(o.slice(s));break}switch(i.caseOps[n]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),n++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),n++;break;default:e.push(o[s])}}o=e.join("")}n+=o}return n}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="" ;for(;e>0;){if(e=o)break;let s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1=o)break;let s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76: i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s))}}}return i.finalize()}})),define(e[346],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRegion=t.FoldingRegions=t.MAX_LINE_NUMBER=t.MAX_FOLDING_REGIONS=void 0,t.MAX_FOLDING_REGIONS=65535,t.MAX_LINE_NUMBER=16777215;const i=4278190080;t.FoldingRegions=class{constructor(e,i,n){if(e.length!==i.length||e.length>t.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=i,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],i=(t,i)=>{let n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let n=0,o=this._startIndexes.length;nt.MAX_LINE_NUMBER||s>t.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+t.MAX_LINE_NUMBER);for(;e.length>0&&!i(o,s);)e.pop();let r=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((255&r)<<24),this._endIndexes[n]=s+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&t.MAX_LINE_NUMBER}getEndLineNumber(e){return this._endIndexes[e]&t.MAX_LINE_NUMBER}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&i)>>>16);return n===t.MAX_FOLDING_REGIONS?-1:n}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){ let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}hidesLine(e){return this.startLineNumbere.regionIndex-t.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let n=0,o=-1,s=-1;const r=e=>{for(;ns&&(s=e),n++}};for(let i of e){let e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);let i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=-1,o=(o,s)=>{const r=e.getStartLineNumber(o),a=e.getEndLineNumber(o);s&&((e,i)=>{for(let n of t)if(en&&(n=a)},s=0,r=()=>{for(;s=t))break;o(a,i===t),a++}}l=r()}for(;a0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let e=this.getRegionAtLine(i.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){let e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e1){let s=e.getRegionsInside(i,(e,i)=>e.isCollapsed!==o&&i0)for(let s of n){let n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){let s=e.getRegionsInside(n,(e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i);o.push(...n)}e.toggleCollapseState(o)}, t.setCollapseStateUp=function(e,t,i){let n=[];for(let o of i){let i=e.getAllRegionsAtLine(o,e=>e.isCollapsed!==t);i.length>0&&n.push(i[0])}e.toggleCollapseState(n)},t.setCollapseStateAtLevel=function(e,t,i,n){let o=e.getRegionsInside(null,(e,o)=>o===t&&e.isCollapsed!==i&&!n.some(t=>e.containsLine(t)));e.toggleCollapseState(o)},t.setCollapseStateForMatchingLines=function(e,t,i){let n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){let i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)},t.setCollapseStateForType=function(e,t,i){let n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}})),define(e[923],t([0,1,6,18,14]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HiddenRangeModel=void 0;function s(e,t){let i=o.findFirstInSorted(e,e=>t=0&&e[i].endLineNumber>=t?e[i]:null} t.HiddenRangeModel=class{constructor(e){this._updateEventEmitter=new i.Emitter,this._foldingModel=e,this._foldingModelListener=e.onDidChange(e=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],i=0,o=0,s=Number.MAX_VALUE,r=-1,a=this._foldingModel.regions;for(;i({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber}))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==s(this._hiddenRanges,e)}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=s(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}})),define(e[412],t([0,1,21,346]),(function(e,t,i,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeRanges=t.RangesCollector=t.SyntaxRangeProvider=t.ID_SYNTAX_PROVIDER=void 0;const o=5e3,s={};t.ID_SYNTAX_PROVIDER="syntax";t.SyntaxRangeProvider=class{constructor(e,i,n=o){this.editorModel=e,this.providers=i,this.limit=n,this.id=t.ID_SYNTAX_PROVIDER}compute(e){return function(e,t,n){let o=null,r=e.map((e,r)=>Promise.resolve(e.provideFoldingRanges(t,s,n)).then(e=>{if(!n.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);let i=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=i&&o.push({start:t.start,end:t.end,rank:r,kind:t.kind})}},i.onUnexpectedExternalError));return Promise.all(r).then(e=>o)}(this.providers,this.editorModel,e).then(e=>{if(e){return a(e,this.limit)}return null})}dispose(){}};class r{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,o){ if(e>n.MAX_LINE_NUMBER||t>n.MAX_LINE_NUMBER)return;let s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=o,this._types[s]=i,this._length++,o<30&&(this._nestingLevelCounts[o]=(this._nestingLevelCounts[o]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ithis._foldingRangesLimit){t=i;break}e+=n}}let i=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit),s=[];for(let n=0,r=0;n{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i}),n=new r(t),o=void 0,s=[];for(let e of i)if(o){if(e.start>o.start)if(e.end<=o.end)s.push(o),o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>o.end){do{o=s.pop()}while(o&&e.start>o.end);o&&s.push(o),o=e}n.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);return n.toIndentRanges()}t.RangesCollector=r,t.sanitizeRanges=a})),define(e[924],t([0,1,412]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitializingRangeProvider=t.ID_INIT_PROVIDER=void 0,t.ID_INIT_PROVIDER="init";t.InitializingRangeProvider=class{constructor(e,i,n,o){if(this.editorModel=e,this.id=t.ID_INIT_PROVIDER,i.length){let t=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:1}});this.decorationIds=e.deltaDecorations([],i.map(t)), this.timeout=setTimeout(n,o)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let i=this.editorModel.getDecorationRange(e);i&&t.push({start:i.startLineNumber,end:i.endLineNumber,rank:1})}return Promise.resolve(i.sanitizeRanges(t,Number.MAX_VALUE))}}})),define(e[542],t([0,1,115,18]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormattingEdit=void 0;class o{static _handleEolEdits(e,t){let i=void 0,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,s){s&&e.pushUndoStop() ;const r=o._handleEolEdits(e,t);1===r.length&&o._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(e=>i.EditOperation.replace(n.Range.lift(e.range),e.text))):e.executeEdits("formatEditsCommand",r.map(e=>i.EditOperation.replaceMove(n.Range.lift(e.range),e.text))),s&&e.pushUndoStop()}}t.FormattingEdit=o})),define(e[543],t([0,1,2,6,12]),(function(e,t,i,n,o){"use strict";function s(e,t){return!!e[t]}Object.defineProperty(t,"__esModule",{value:!0}),t.ClickLinkGesture=t.ClickLinkOptions=t.ClickLinkKeyboardEvent=t.ClickLinkMouseEvent=void 0;class r{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}t.ClickLinkMouseEvent=r;class a{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}t.ClickLinkKeyboardEvent=a;class l{ constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function c(e){return"altKey"===e?o.isMacintosh?new l(57,"metaKey",6,"altKey"):new l(5,"ctrlKey",6,"altKey"):o.isMacintosh?new l(6,"altKey",57,"metaKey"):new l(6,"altKey",5,"ctrlKey")}t.ClickLinkOptions=l;class d extends i.Disposable{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.Emitter),this.onCancel=this._onCancel.event,this._editor=e,this._opts=c(this._editor.getOption(61)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1, this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(e=>{if(e.hasChanged(61)){const e=c(this._editor.getOption(61));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(e=>this._onEditorMouseMove(new r(e,this._opts)))),this._register(this._editor.onMouseDown(e=>this._onEditorMouseDown(new r(e,this._opts)))),this._register(this._editor.onMouseUp(e=>this._onEditorMouseUp(new r(e,this._opts)))),this._register(this._editor.onKeyDown(e=>this._onEditorKeyDown(new a(e,this._opts)))),this._register(this._editor.onKeyUp(e=>this._onEditorKeyUp(new a(e,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(e=>this._onDidChangeCursorSelection(e))),this._register(this._editor.onDidChangeModel(e=>this._resetHandler())), this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){ e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}t.ClickLinkGesture=d})),define(e[544],t([0,1,15,21]),(function(e,t,i,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.HoverOperation=t.HoverStartMode=void 0,function(e){e[e.IDLE=0]="IDLE",e[e.FIRST_WAIT=1]="FIRST_WAIT",e[e.SECOND_WAIT=2]="SECOND_WAIT",e[e.WAITING_FOR_ASYNC_COMPUTATION=3]="WAITING_FOR_ASYNC_COMPUTATION"}(o||(o={})),function(e){e[e.Delayed=0]="Delayed",e[e.Immediate=1]="Immediate"}(t.HoverStartMode||(t.HoverStartMode={}));t.HoverOperation=class{constructor(e,t,n,o,s){this._computer=e,this._state=0,this._hoverTime=s,this._firstWaitScheduler=new i.RunOnceScheduler(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new i.RunOnceScheduler(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new i.RunOnceScheduler(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null, this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=n,this._progressCallback=o}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=i.createCancelablePromise(e=>this._computer.computeAsync(e)),this._asyncComputationPromise.then(e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)},e=>this._onError(e))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){ 3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):n.onUnexpectedError(e)}_onProgress(e){this._progressCallback(e)}start(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)), 3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}})),define(e[545],t([0,1,102,520]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlyphHoverWidget=t.ContentHoverWidget=void 0;class o extends i.Widget{constructor(e,t,i,o){super(),this._hoverVisibleKey=i,this._keybindingService=o,this.allowEditorOverflow=!0,this._hover=this._register(new n.HoverWidget),this._id=e,this._editor=t,this._isVisible=!1,this._stoleFocus=!1,this.onkeydown(this._hover.containerDomNode,e=>{e.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this.updateFont()})),this._editor.onDidLayoutChange(e=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e, this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._hover.containerDomNode}showAt(e,t,i){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=i,i&&this._hover.containerDomNode.focus()}hide(){this.isVisible&&(setTimeout(()=>{this.isVisible||this._hoverVisibleKey.set(!1)},0),this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())}getPosition(){return this.isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}dispose(){this._editor.removeContentWidget(this),super.dispose()}updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(e=>this._editor.applyFontInfo(e))}updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this.updateFont(), this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_renderAction(e,t){const i=this._keybindingService.lookupKeybinding(t.commandId),o=i?i.getLabel():null;return n.renderHoverAction(e,t,o)}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(36);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}}t.ContentHoverWidget=o;class s extends i.Widget{constructor(e,t){super(),this._id=e,this._editor=t,this._isVisible=!1,this._domNode=document.createElement("div"),this._domNode.className="monaco-hover hidden",this._domNode.setAttribute("aria-hidden","true"),this._domNode.setAttribute("role","tooltip"),this._showAtLineNumber=-1,this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this.updateFont()})), this._editor.addOverlayWidget(this)}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e,this._domNode.classList.toggle("hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._domNode}showAt(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(this._showAtLineNumber),n=this._editor.getScrollTop(),o=this._editor.getOption(51),s=i-n-(this._domNode.clientHeight-o)/2;this._domNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._domNode.style.top=`${Math.max(Math.round(s),0)}px`}hide(){this.isVisible&&(this.isVisible=!1)}getPosition(){return null}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}updateFont(){[...Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),...Array.prototype.slice.call(this._domNode.getElementsByClassName("code"))].forEach(e=>this._editor.applyFontInfo(e))}updateContents(e){this._domNode.textContent="", this._domNode.appendChild(e),this.updateFont()}}t.GlyphHoverWidget=s})),define(e[925],t([0,1,60]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InPlaceReplaceCommand=void 0;t.InPlaceReplaceCommand=class{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new i.Selection(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new i.Selection(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}})),define(e[546],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateIndent=t.getSpaceCnt=void 0,t.getSpaceCnt=function(e,t){let i=0;for(let n=0;n=s)return null;let r=[];for(let t=n;t<=s;t++)r.push(e.getLineContent(t));let a=r.slice(0);return a.sort(o.getCollator().compare),!0===i&&(a=a.reverse()),{startLineNumber:n,endLineNumber:s,before:r,after:a}}t.SortLinesCommand=o,o._COLLATOR=null})),define(e[547],t([0,1,47,18,194]),(function(e,t,i,n,o){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BracketSelectionRangeProvider=void 0;class s{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;await new Promise(t=>s._bracketsRightYield(t,0,e,n,o)),await new Promise(i=>s._bracketsLeftYield(i,0,e,n,o,t))}return i}static _bracketsRightYield(e,t,i,n,r){const a=new Map,l=Date.now();for(;;){if(t>=s._maxRounds){e();break}if(!n){e();break}let c=i.findNextBracket(n);if(!c){e();break}if(Date.now()-l>s._maxDuration){setTimeout(()=>s._bracketsRightYield(e,t+1,i,n,r));break}const d=c.close[0];if(c.isOpen){let e=a.has(d)?a.get(d):0;a.set(d,e+1)}else{let e=a.has(d)?a.get(d):0;if(e-=1,a.set(d,Math.max(0,e)),e<0){let e=r.get(d);e||(e=new o.LinkedList,r.set(d,e)),e.push(c.range)}}n=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,o,r,a){const l=new Map,c=Date.now();for(;;){if(t>=s._maxRounds&&0===r.size){e();break}if(!o){e();break}let d=i.findPrevBracket(o);if(!d){e();break} if(Date.now()-c>s._maxDuration){setTimeout(()=>s._bracketsLeftYield(e,t+1,i,o,r,a));break}const h=d.close[0];if(d.isOpen){let e=l.has(h)?l.get(h):0;if(e-=1,l.set(h,Math.max(0,e)),e<0){let e=r.get(h);if(e){let t=e.shift();0===e.size&&r.delete(h);const o=n.Range.fromPositions(d.range.getEndPosition(),t.getStartPosition()),l=n.Range.fromPositions(d.range.getStartPosition(),t.getEndPosition());a.push({range:o}),a.push({range:l}),s._addBracketLeading(i,l,a)}}}else{let e=l.has(h)?l.get(h):0;l.set(h,e+1)}o=d.range.getStartPosition()}}static _addBracketLeading(e,t,o){if(t.startLineNumber===t.endLineNumber)return;const s=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(s);0!==r&&r!==t.startColumn&&(o.push({range:n.Range.fromPositions(new i.Position(s,r),t.getEndPosition())}),o.push({range:n.Range.fromPositions(new i.Position(s,1),t.getEndPosition())}));const a=s-1;if(a>0){const s=e.getLineFirstNonWhitespaceColumn(a);s===t.startColumn&&s!==e.getLineLastNonWhitespaceColumn(a)&&(o.push({ range:n.Range.fromPositions(new i.Position(a,s),t.getEndPosition())}),o.push({range:n.Range.fromPositions(new i.Position(a,1),t.getEndPosition())}))}}}t.BracketSelectionRangeProvider=s,s._maxDuration=30,s._maxRounds=2})),define(e[928],t([0,1,18,24]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordSelectionRangeProvider=void 0;t.WordSelectionRangeProvider=class{provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,o){const s=t.getWordAtPosition(o);if(!s)return;let{word:r,startColumn:a}=s,l=o.column-a,c=l,d=l,h=0;for(;c>=0;c--){let e=r.charCodeAt(c);if(c!==l&&(95===e||45===e))break;if(n.isLowerAsciiLetter(e)&&n.isUpperAsciiLetter(h))break;h=e}for(c+=1;d0&&0===t.getLineFirstNonWhitespaceColumn(n.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(n.lineNumber)&&e.push({range:new i.Range(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}})),define(e[236],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetParser=t.TextmateSnippet=t.Variable=t.FormatString=t.Transform=t.Choice=t.Placeholder=t.TransformableMarker=t.Text=t.Marker=t.Scanner=t.TokenType=void 0,function(e){e[e.Dollar=0]="Dollar",e[e.Colon=1]="Colon",e[e.Comma=2]="Comma",e[e.CurlyOpen=3]="CurlyOpen",e[e.CurlyClose=4]="CurlyClose",e[e.Backslash=5]="Backslash",e[e.Forwardslash=6]="Forwardslash",e[e.Pipe=7]="Pipe",e[e.Int=8]="Int",e[e.VariableName=9]="VariableName",e[e.Format=10]="Format", e[e.Plus=11]="Plus",e[e.Dash=12]="Dash",e[e.QuestionMark=13]="QuestionMark",e[e.EOF=14]="EOF"}(t.TokenType||(t.TokenType={}));class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e,t=this.pos,n=0,o=this.value.charCodeAt(t);if("number"==typeof(e=i._table[o]))return this.pos+=1,{type:e,pos:t,len:1};if(i.isDigitCharacter(o)){e=8;do{n+=1,o=this.value.charCodeAt(t+n)}while(i.isDigitCharacter(o));return this.pos+=n,{type:e,pos:t,len:n}}if(i.isVariableCharacter(o)){e=9;do{o=this.value.charCodeAt(t+ ++n)}while(i.isVariableCharacter(o)||i.isDigitCharacter(o));return this.pos+=n,{type:e,pos:t,len:n}}e=10;do{n+=1,o=this.value.charCodeAt(t+n)}while(!isNaN(o)&&void 0===i._table[o]&&!i.isDigitCharacter(o)&&!i.isVariableCharacter(o));return this.pos+=n,{ type:e,pos:t,len:n}}}t.Scanner=i,i._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class n{constructor(){this._children=[]}appendChild(e){return e instanceof o&&this._children[this._children.length-1]instanceof o?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof u)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}t.Marker=n;class o extends n{constructor(e){super(),this.value=e}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}toString(){return this.value}toTextmateString(){return o.escape(this.value)}len(){return this.value.length}clone(){return new o(this.value)}}t.Text=o;class s extends n{}t.TransformableMarker=s ;class r extends s{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof a?this._children[0]:void 0}toTextmateString(){let e="";return this.transform&&(e=this.transform.toTextmateString()),0!==this.children.length||this.transform?0===this.children.length?`\${${this.index}${e}}`:this.choice?`\${${this.index}|${this.choice.toTextmateString()}|${e}}`:`\${${this.index}:${this.children.map(e=>e.toTextmateString()).join("")}${e}}`:`$${this.index}`}clone(){let e=new r(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(e=>e.clone()),e}}t.Placeholder=r;class a extends n{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof o&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value} toTextmateString(){return this.options.map(e=>e.value.replace(/\||,/g,"\\$&")).join(",")}len(){return this.options[0].len()}clone(){let e=new a;return this.options.forEach(e.appendChild,e),e}}t.Choice=a;class l extends n{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some(e=>e instanceof c&&Boolean(e.elseValue))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof c){let n=e[i.index]||"";t+=n=i.resolve(n)}else t+=i.toString();return t}toString(){return""}toTextmateString(){return`/${this.regexp.source}/${this.children.map(e=>e.toTextmateString())}/${(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")}`}clone(){let e=new l;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(e=>e.clone()),e}}t.Transform=l ;class c extends n{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z]+/gi);return t?t.map((function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})).join(""):e}toTextmateString(){let e="${";return e+=this.index,this.shorthandName?e+=`:/${this.shorthandName}`:this.ifValue&&this.elseValue?e+=`:?${this.ifValue}:${this.elseValue}`:this.ifValue?e+=`:+${this.ifValue}`:this.elseValue&&(e+=`:-${this.elseValue}`),e+="}"}clone(){return new c(this.index,this.shorthandName,this.ifValue,this.elseValue)}}t.FormatString=c;class d extends s{ constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new o(t)],!0)}toTextmateString(){let e="";return this.transform&&(e=this.transform.toTextmateString()),0===this.children.length?`\${${this.name}${e}}`:`\${${this.name}:${this.children.map(e=>e.toTextmateString()).join("")}${e}}`}clone(){const e=new d(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(e=>e.clone()),e}}function h(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}t.Variable=d;class u extends n{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof r&&(t.push(i),e=!e||e.indexn===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1} fullLen(e){let t=0;return h([e],e=>(t+=e.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof r&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof d&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}toTextmateString(){return this.children.reduce((e,t)=>e+t.toTextmateString(),"")}clone(){let e=new u;return this._children=this.children.map(e=>e.clone()),e}walk(e){h(this.children,e)}}t.TextmateSnippet=u;t.SnippetParser=class{constructor(){this._scanner=new i,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}text(e){return this.parse(e).toString()}parse(e,t,i){this._scanner.text(e),this._token=this._scanner.next();const n=new u;for(;this._parse(n););const o=new Map,s=[];let a=0;n.walk(e=>(e instanceof r&&(a+=1, e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):s.push(e)),!0));for(const e of s){const t=o.get(e.index);if(t){const i=new r(e.index);i.transform=e.transform;for(const e of t)i.appendChild(e.clone());n.replace(e,[i])}}return i||(i=a>0&&t),!o.has(0)&&i&&n.appendChild(new r(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){ return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new o(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new r(Number(t)):new d(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new r(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new o("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{ const t=new a;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(!(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0)))return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new o(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new d(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new o("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){ let t=new l,i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))i+=e=this._accept(6,!0)||e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new o(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new c(Number(n))),!0;if(this._accept(4))return e.appendChild(new c(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new c(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4) ;if(t)return e.appendChild(new c(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new c(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new c(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new c(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new o(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}})),define(e[929],t([0,1,87,24]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionModel=t.LineContext=void 0;var o;t.LineContext=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},function(e){e[e.Nothing=0]="Nothing",e[e.All=1]="All",e[e.Incr=2]="Incr"}(o||(o={}));class s{constructor(e,t,i,n,o,r,a){this.clipboardText=a,this._snippetCompareFn=s._compareCompletionItems,this._items=e, this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,"top"===r?this._snippetCompareFn=s._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=s._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta2e3?i.fuzzyScore:i.fuzzyScoreGracefulAggressive;for(let c=0;c=u)d.score=i.FuzzyScore.Default;else if("string"==typeof d.completion.filterText){let r=l(o,s,e,d.completion.filterText,d.filterTextLow,0,!1);if(!r)continue;0===n.compareIgnoreCase(d.completion.filterText,t)?d.score=r:(d.score=i.anyScore(o,s,e,t,d.labelLow,0),d.score[0]=r[0])}else{let i=l(o,s,e,t,d.labelLow,0,!1);if(!i)continue;d.score=i}}switch(d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),this._stats.suggestionCount++,d.completion.kind){case 27:this._stats.snippetCount++;break;case 18:this._stats.textCount++}}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return s._compareCompletionItems(e,t)} static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return s._compareCompletionItems(e,t)}}t.CompletionModel=s})),define(e[930],t([0,1,14,2,258]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommitCharacterController=void 0;t.CommitCharacterController=class{constructor(e,t,i){this._disposables=new n.DisposableStore,this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(n=>{if(this._active&&!t.isFrozen()){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!i.isNonEmptyArray(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new o.CharacterSet ;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}})),define(e[931],t([0,1,2]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OvertypingCapturer=void 0;class n{constructor(e,t){this._disposables=new i.DisposableStore,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),i=t.length;let o=!1;for(let e=0;en._maxSelectionLength)return;this._lastOvertyped[e]={value:s.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(e=>{this._empty||(this._empty=!0)}))}getLastOvertypedInfo(e){ if(!this._empty&&e>=0&&e=0?r[d]:r[Math.max(0,~d-1)],u=l.length;for(const e of l){if(!n.Range.containsRange(e.range,h))break;u-=1}return u}}}}t.WordDistance=s,s.None=new class extends s{distance(){return 0}}})),define(e[933],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/actionbar/actionViewItems",t)})),define(e[934],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/dialog/dialog",t)})),define(e[935],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/findinput/findInput",t)})),define(e[936],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/findinput/findInputCheckboxes",t)})),define(e[937],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/findinput/replaceInput",t)})),define(e[938],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/inputbox/inputBox",t)})),define(e[939],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",t)})), define(e[940],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/menu/menu",t)})),define(e[941],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/menu/menubar",t)})),define(e[942],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/selectBox/selectBoxCustom",t)})),define(e[943],t([0,1,2,6,79,74,7,14,175,99,12,256,942,759]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectBoxList=void 0;const g=r.$,p="selectOption.entry.template";class m{get templateId(){return p}renderTemplate(e){const t=Object.create(null);return t.disposables=[],t.root=e,t.text=r.append(e,g(".option-text")),t.decoratorRight=r.append(e,g(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.decoratorRight,r=e.isDisabled;n.text.textContent=o,n.decoratorRight.innerText=s||"",r?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){e.disposables=i.dispose(e.disposables)}} class v extends i.Disposable{constructor(e,t,i,o,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=v.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","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),this._onDidSelect=new n.Emitter,this._register(this._onDidSelect),this.styles=o,this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t)}getHeight(){return 18}getTemplateId(){return p}constructSelectDropDown(e){this.contextViewProvider=e, this.selectDropDownContainer=r.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=r.append(this.selectDropDownContainer,g(".select-box-details-pane"));let t=r.append(this.selectDropDownContainer,g(".select-box-dropdown-container-width-control")),i=r.append(t,g(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",r.append(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=r.createStyleSheet(this.selectDropDownContainer)}registerListeners(){this._register(r.addStandardDisposableListener(this.selectElement,"change",e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})), this._register(r.addDisposableListener(this.selectElement,r.EventType.CLICK,e=>{r.EventHelper.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(r.addDisposableListener(this.selectElement,r.EventType.MOUSE_DOWN,e=>{r.EventHelper.stop(e)})),this._register(r.addDisposableListener(this.selectElement,r.EventType.KEY_DOWN,e=>{const t=new s.StandardKeyboardEvent(e);let i=!1;d.isMacintosh?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),r.EventHelper.stop(e,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){a.equals(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this.options.forEach((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)})),void 0!==t&&(this.select(t), this._currentSelection=this.selected)}setOptionsList(){this.selectList&&this.selectList.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.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)}setAriaLabel(e){this.selectBoxOptions.ariaLabel=e,this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel)}focus(){this.selectElement&&this.selectElement.focus()}blur(){this.selectElement&&this.selectElement.blur()}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.applyStyles()}style(e){const t=[];this.styles=e, this.styles.listFocusBackground&&t.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&&t.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused:not(:hover) { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&t.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row .option-decorator-right { color: ${this.styles.decoratorRightForeground} !important; }`),this.styles.selectBackground&&this.styles.selectBorder&&!this.styles.selectBorder.equals(this.styles.selectBackground)?(t.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `), t.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),t.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(t.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),t.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&(t.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:hover { color: ${this.styles.listHoverForeground} !important; }`), t.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: ${this.styles.listActiveSelectionForeground} !important; }`)),this.styles.listHoverBackground&&(t.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; }`),t.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: ${this.styles.selectBackground} !important; }`)),this.styles.listFocusOutline&&t.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&&(t.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:hover:not(.focused) { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { outline: none !important; }")),this.styleElement.textContent=t.join("\n"),this.applyStyles()}applyStyles(){if(this.selectElement){const e=this.styles.selectBackground?this.styles.selectBackground.toString():"",t=this.styles.selectForeground?this.styles.selectForeground.toString():"",i=this.styles.selectBorder?this.styles.selectBorder.toString():"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}this.selectList&&this.styleList()}styleList(){if(this.selectList){const e=this.styles.selectBackground?this.styles.selectBackground.toString():"" ;this.selectList.style({});const t=this.styles.selectListBackground?this.styles.selectListBackground.toString():e;this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const i=this.styles.focusBorder?this.styles.focusBorder.toString():"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px"}}createOption(e,t,i){let n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!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:e=>this.renderSelectDropDown(e),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(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(e){}}}} measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=r.getDomNodePagePosition(this.selectElement),i=getComputedStyle(this.selectElement),n=parseFloat(i.getPropertyValue("--dropdown-padding-top"))+parseFloat(i.getPropertyValue("--dropdown-padding-bottom")),o=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),s=t.top-v.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,a=this.selectElement.offsetWidth,l=this.setWidthControlElement(this.widthControlElement),c=Math.max(l,Math.round(a)).toString()+"px";this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight ;const h=this._hasDetails?this.measureMaxDetailsHeight():0,u=d+n+h,g=Math.floor((o-n-h)/this.getHeight()),p=Math.floor((s-n-h)/this.getHeight());if(e)return!(t.top+t.height>window.innerHeight-22||t.topg&&this.options.length>g?(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(t.top+t.height>window.innerHeight-22||t.topo&&(d=g*this.getHeight())}else u>s&&(d=p*this.getHeight());return this.selectList.layout(d),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=d+n+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=d+n+"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}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((e,t)=>{const o=e.text.length+(e.decoratorRight?e.decoratorRight.length:0);o>n&&(i=t,n=o)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=r.getTotalWidth(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=r.append(e,g(".select-box-dropdown-list-container")),this.listRenderer=new m,this.selectList=new l.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>u.localize(0,null), getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=n.Event.chain(c.domEvent(this.selectDropDownListContainer,"keydown")).filter(()=>this.selectList.length>0).map(e=>new s.StandardKeyboardEvent(e));this._register(t.filter(e=>3===e.keyCode).on(e=>this.onEnter(e),this)),this._register(t.filter(e=>9===e.keyCode).on(e=>this.onEscape(e),this)),this._register(t.filter(e=>16===e.keyCode).on(this.onUpArrow,this)),this._register(t.filter(e=>18===e.keyCode).on(this.onDownArrow,this)),this._register(t.filter(e=>12===e.keyCode).on(this.onPageDown,this)),this._register(t.filter(e=>11===e.keyCode).on(this.onPageUp,this)),this._register(t.filter(e=>14===e.keyCode).on(this.onHome,this)),this._register(t.filter(e=>13===e.keyCode).on(this.onEnd,this)),this._register(t.filter(e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=80&&e.keyCode<=108).on(this.onCharacter,this)), this._register(n.Event.chain(c.domEvent(this.selectList.getHTMLElement(),"mouseup")).filter(()=>this.selectList.length>0).on(e=>this.onMouseUp(e),this)),this._register(this.selectList.onMouseOver(e=>void 0!==e.index&&this.selectList.setFocus([e.index]))),this._register(this.selectList.onDidChangeFocus(e=>this.onListFocus(e))),this._register(r.addDisposableListener(this.selectDropDownContainer,r.EventType.FOCUS_OUT,e=>{this._isVisible&&!r.isAncestor(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onMouseUp(e){r.EventHelper.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(e)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(){if(this.selected>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(e){r.EventHelper.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{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(e){r.EventHelper.stop(e),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(e){r.EventHelper.stop(e),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(e){const t=o.KeyCodeUtils.toString(e.keyCode);let i=-1;for(let n=0;n{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new r.ActionRunner)), this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(l.Gesture.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,d.isFirefox&&this._register(h.addDisposableListener(e,h.EventType.DRAG_START,e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(c.DataTransfers.TEXT,this._action.label)}))),this._register(h.addDisposableListener(t,l.EventType.Tap,e=>this.onClick(e))),this._register(h.addDisposableListener(t,h.EventType.MOUSE_DOWN,e=>{n||h.EventHelper.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")})),i.isMacintosh&&this._register(h.addDisposableListener(t,h.EventType.CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register(h.addDisposableListener(t,h.EventType.CLICK,e=>{h.EventHelper.stop(e,!0), this.options&&this.options.isMenu||i.setImmediate(()=>this.onClick(e))})),this._register(h.addDisposableListener(t,h.EventType.DBLCLICK,e=>{h.EventHelper.stop(e,!0)})),[h.EventType.MOUSE_UP,h.EventType.MOUSE_OUT].forEach(e=>{this._register(h.addDisposableListener(t,e,e=>{h.EventHelper.stop(e),t.classList.remove("active")}))})}onClick(e){var t;h.EventHelper.stop(e,!0);const i=a.isUndefinedOrNull(this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.classList.remove("focused"))}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}t.BaseActionViewItem=u;t.ActionViewItem=class extends u{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon, this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=h.append(this.element,h.$("a.action-label"))),this.label&&(this._action.id===r.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&&(h.append(this.element,h.$("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){super.focus(),this.label&&this.label.focus()}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=n.localize(0,null,e,this.options.keybinding))), e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled"),this.label.tabIndex=0),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled"),h.removeTabIndexAndUpdateFocus(this.label)),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}};t.SelectActionViewItem=class extends u{constructor(e,t,i,n,o,r){super(e,t), this.selectBox=new s.SelectBox(i,n,o,void 0,r),this._register(this.selectBox),this.registerListeners()}setOptions(e,t){this.selectBox.setOptions(e,t)}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>{this.actionRunner.run(this._action,this.getActionContext(e.selected,e.index))}))}getActionContext(e,t){return e}focus(){this.selectBox&&this.selectBox.focus()}blur(){this.selectBox&&this.selectBox.blur()}render(e){this.selectBox.render(e)}}})),define(e[78],t([0,1,2,30,7,13,74,6,100,513]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareActions=t.ActionBar=t.ActionsOrientation=void 0,function(e){e[e.HORIZONTAL=0]="HORIZONTAL",e[e.HORIZONTAL_REVERSE=1]="HORIZONTAL_REVERSE",e[e.VERTICAL=2]="VERTICAL",e[e.VERTICAL_REVERSE=3]="VERTICAL_REVERSE"}(t.ActionsOrientation||(t.ActionsOrientation={}));class c extends i.Disposable{constructor(e,t={}){var i,s,l;let c,d;switch(super(), this._onDidBlur=this._register(new a.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new a.Emitter({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new a.Emitter),this.onDidRun=this._onDidRun.event,this._onDidBeforeRun=this._register(new a.Emitter),this.onDidBeforeRun=this._onDidBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(s=this.options.orientation)&&void 0!==s?s:0,this._triggerKeys=null!==(l=this.options.triggerKeys)&&void 0!==l?l:{keys:[3,10],keyDown:!1},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new n.ActionRunner,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._register(this._actionRunner.onDidBeforeRun(e=>this._onDidBeforeRun.fire(e))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0, this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:c=this.options.ignoreOrientationForPreviousAndNextKey?[15,16]:[15],d=this.options.ignoreOrientationForPreviousAndNextKey?[17,18]:[17];break;case 1:c=this.options.ignoreOrientationForPreviousAndNextKey?[17,18]:[17],d=this.options.ignoreOrientationForPreviousAndNextKey?[15,16]:[15],this.domNode.className+=" reverse";break;case 2:c=this.options.ignoreOrientationForPreviousAndNextKey?[15,16]:[16],d=this.options.ignoreOrientationForPreviousAndNextKey?[17,18]:[18],this.domNode.className+=" vertical";break;case 3:c=this.options.ignoreOrientationForPreviousAndNextKey?[17,18]:[18],d=this.options.ignoreOrientationForPreviousAndNextKey?[15,16]:[16],this.domNode.className+=" vertical reverse"}this._register(o.addDisposableListener(this.domNode,o.EventType.KEY_DOWN,e=>{const t=new r.StandardKeyboardEvent(e);let i=!0 ;c&&(t.equals(c[0])||t.equals(c[1]))?i=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown&&this.doTrigger(t):i=!1,i&&(t.preventDefault(),t.stopPropagation())})),this._register(o.addDisposableListener(this.domNode,o.EventType.KEY_UP,e=>{const t=new r.StandardKeyboardEvent(e);this.isTriggerKeyEvent(t)?(this._triggerKeys.keyDown||this.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(o.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{o.getActiveElement()!==this.domNode&&o.isAncestor(o.getActiveElement(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container", this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}setAriaLabel(e){e?this.actionsList.setAttribute("aria-label",e):this.actionsList.removeAttribute("aria-label")}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}hasAction(e){return this._actionIds.includes(e.id)}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=s.isNumber(t.index)?t.index:null;i.forEach(e=>{ const i=document.createElement("li");let s;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(o.addDisposableListener(i,o.EventType.CONTEXT_MENU,e=>{o.EventHelper.stop(e,!0)})),this.options.actionViewItemProvider&&(s=this.options.actionViewItemProvider(e)),s||(s=new l.ActionViewItem(this.context,e,t)),s.actionRunner=this._actionRunner,s.setActionContext(this.context),s.render(i),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(s),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,s),this._actionIds.splice(n,0,e.id),n++)}),this.focusedItem&&this.focus(this.focusedItem)}getWidth(e){if(e>=0&&e=0&&e=0&&e=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled());return this.focusedItem!==e||t.isEnabled()||(this.focusedItem=void 0),this.updateFocus(),!0} focusPrevious(){void 0===this.focusedItem&&(this.focusedItem=0);const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled());return this.focusedItem!==e||t.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0),!0}updateFocus(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let i=0;i=0;i--){if(!(e[i].id===n.Separator.ID))break;e.splice(i,1)}let i=!1;for(let t=e.length-1;t>=0;t--){const o=e[t].id===n.Separator.ID;o&&!i?e.splice(t,1):o?o&&(i=!1):i=!0}return e}})),define(e[216],t([0,1,7,102,55,6,2,44,100,741]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleCheckbox=t.Checkbox=t.CheckboxActionViewItem=void 0;const c={inputActiveOptionBorder:o.Color.fromHex("#007ACC00"),inputActiveOptionForeground:o.Color.fromHex("#FFFFFF"),inputActiveOptionBackground:o.Color.fromHex("#0E639C50")};class d extends l.BaseActionViewItem{constructor(){super(...arguments),this.disposables=new r.DisposableStore}render(e){this.element=e, this.disposables.clear(),this.checkbox=new h({actionClassName:this._action.class,isChecked:this._action.checked,title:this._action.label}),this.disposables.add(this.checkbox),this.disposables.add(this.checkbox.onChange(()=>this._action.checked=!!this.checkbox&&this.checkbox.checked,this)),this.element.appendChild(this.checkbox.domNode)}updateEnabled(){this.checkbox&&(this.isEnabled()?this.checkbox.enable():this.checkbox.disable())}updateChecked(){this.checkbox&&(this.checkbox.checked=this._action.checked)}dispose(){this.disposables.dispose(),super.dispose()}}t.CheckboxActionViewItem=d;class h extends n.Widget{constructor(e){super(),this._onChange=this._register(new s.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},c),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon?t.push(this._opts.icon.classNames):t.push("codicon"), this._opts.actionClassName&&t.push(this._opts.actionClassName),t.push(this._checked?"checked":"unchecked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.className=t.join(" "),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,e=>{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)})}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)), this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))}disable(){ i.removeTabIndexAndUpdateFocus(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))}}t.Checkbox=h;class u extends n.Widget{constructor(e,t){super(),this.title=e,this.isChecked=t,this.checkbox=new h({title:this.title,isChecked:this.isChecked,icon:a.Codicon.check,actionClassName:"monaco-simple-checkbox"}),this.domNode=this.checkbox.domNode,this.styles={},this.checkbox.onChange(()=>{this.applyStyles()})}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}style(e){this.styles=e,this.applyStyles()}applyStyles(){this.domNode.style.color=this.styles.checkboxForeground?this.styles.checkboxForeground.toString():"",this.domNode.style.backgroundColor=this.styles.checkboxBackground?this.styles.checkboxBackground.toString():"",this.domNode.style.borderColor=this.styles.checkboxBorder?this.styles.checkboxBorder.toString():""}}t.SimpleCheckbox=u})),define(e[548],t([0,1,934,2,7,99,74,174,78,30,110,12,216,44,747]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=void 0;const p=g.registerIcon("dialog-error",g.Codicon.error),m=g.registerIcon("dialog-warning",g.Codicon.warning),v=g.registerIcon("dialog-info",g.Codicon.info),f=g.registerIcon("dialog-close",g.Codicon.close);class S extends n.Disposable{constructor(e,t,n,s){super(),this.container=e,this.message=t,this.options=s,this.checkboxHasFocus=!1,this.modal=this.container.appendChild(o.$(`.monaco-dialog-modal-block${"pending"===s.type?".dimmed":""}`)),this.shadowElement=this.modal.appendChild(o.$(".dialog-shadow")),this.element=this.shadowElement.appendChild(o.$(".monaco-dialog-box")),this.element.setAttribute("role","dialog"),o.hide(this.element),this.buttons=n.length?n:[i.localize(0,null)];const r=this.element.appendChild(o.$(".dialog-buttons-row"));this.buttonsContainer=r.appendChild(o.$(".dialog-buttons"));const a=this.element.appendChild(o.$(".dialog-message-row"));this.iconElement=a.appendChild(o.$(".dialog-icon")) ;const l=a.appendChild(o.$(".dialog-message-container"));if(this.options.detail){l.appendChild(o.$(".dialog-message")).appendChild(o.$(".dialog-message-text")).innerText=this.message}if(this.messageDetailElement=l.appendChild(o.$(".dialog-message-detail")),this.messageDetailElement.innerText=this.options.detail?this.options.detail:t,this.options.checkboxLabel){const e=l.appendChild(o.$(".dialog-checkbox-row")),t=this.checkbox=this._register(new u.SimpleCheckbox(this.options.checkboxLabel,!!this.options.checkboxChecked));e.appendChild(t.domNode);const i=e.appendChild(o.$(".dialog-checkbox-message"));i.innerText=this.options.checkboxLabel,this._register(o.addDisposableListener(i,o.EventType.CLICK,()=>t.checked=!t.checked))}const c=this.element.appendChild(o.$(".dialog-toolbar-row"));this.toolbarContainer=c.appendChild(o.$(".dialog-toolbar"))}getAriaLabel(){let e=i.localize(1,null);switch(this.options.type){case"error":i.localize(2,null);break;case"warning":i.localize(3,null);break;case"pending": i.localize(4,null)}return`${e}: ${this.message} ${this.options.detail||""}`}updateMessage(e){this.messageDetailElement&&(this.messageDetailElement.innerText=e)}async show(){return this.focusToReturn=document.activeElement,new Promise(e=>{if(!(this.element&&this.buttonsContainer&&this.iconElement&&this.toolbarContainer))return void e({button:0});o.clearNode(this.buttonsContainer);let t=0;const n=this.buttonGroup=new a.ButtonGroup(this.buttonsContainer,this.buttons.length,{title:!0}),h=this.rearrangeButtons(this.buttons,this.options.cancelId);switch(h.forEach((e,i)=>{0===e.index&&(t=i)}),n.buttons.forEach((t,i)=>{t.label=d.mnemonicButtonLabel(h[i].label,!0),this._register(t.onDidClick(t=>{o.EventHelper.stop(t),e({button:h[i].index,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})}))}),this._register(s.domEvent(window,"keydown",!0)(e=>{const i=new r.StandardKeyboardEvent(e);if(i.equals(3)||i.equals(10))return;let s=!1 ;i.equals(1026)||i.equals(15)?(this.checkboxHasFocus||0!==t?(t=(this.checkboxHasFocus?0:t)+n.buttons.length-1,t%=n.buttons.length,n.buttons[t].focus(),this.checkboxHasFocus=!1):(this.checkbox&&this.checkbox.domNode.focus(),this.checkboxHasFocus=!0),s=!0):(i.equals(2)||i.equals(17))&&(this.checkboxHasFocus||t!==n.buttons.length-1?(t=this.checkboxHasFocus?0:t+1,t%=n.buttons.length,n.buttons[t].focus(),this.checkboxHasFocus=!1):(this.checkbox&&this.checkbox.domNode.focus(),this.checkboxHasFocus=!0),s=!0),s?o.EventHelper.stop(e,!0):this.options.keyEventProcessor&&this.options.keyEventProcessor(i)})),this._register(s.domEvent(window,"keyup",!0)(t=>{o.EventHelper.stop(t,!0),new r.StandardKeyboardEvent(t).equals(9)&&e({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})})),this._register(s.domEvent(this.element,"focusout",!1)(e=>{e.relatedTarget&&this.element&&(o.isAncestor(e.relatedTarget,this.element)||(this.focusToReturn=e.relatedTarget,e.target&&(e.target.focus(), o.EventHelper.stop(e,!0))))})),this.iconElement.classList.remove(...p.classNamesArray,...m.classNamesArray,...v.classNamesArray,...g.Codicon.loading.classNamesArray),this.options.type){case"error":this.iconElement.classList.add(...p.classNamesArray);break;case"warning":this.iconElement.classList.add(...m.classNamesArray);break;case"pending":this.iconElement.classList.add(...g.Codicon.loading.classNamesArray,"codicon-animation-spin");break;case"none":case"info":case"question":default:this.iconElement.classList.add(...v.classNamesArray)}const u=new l.ActionBar(this.toolbarContainer,{}),S=new c.Action("dialog.close",i.localize(5,null),f.classNames,!0,()=>(e({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0}),Promise.resolve()));u.push(S,{icon:!0,label:!1}),this.applyStyles(),this.element.setAttribute("aria-label",this.getAriaLabel()),o.show(this.element),n.buttons[t].focus()})}applyStyles(){var e,t;if(this.styles){ const i=this.styles,n=i.dialogForeground,o=i.dialogBackground,s=i.dialogShadow?`0 0px 8px ${i.dialogShadow}`:"",r=i.dialogBorder?`1px solid ${i.dialogBorder}`:"";if(this.shadowElement&&(this.shadowElement.style.boxShadow=s),this.element){if(this.element.style.color=null!==(e=null==n?void 0:n.toString())&&void 0!==e?e:"",this.element.style.backgroundColor=null!==(t=null==o?void 0:o.toString())&&void 0!==t?t:"",this.element.style.border=r,this.buttonGroup&&this.buttonGroup.buttons.forEach(e=>e.style(i)),this.checkbox&&this.checkbox.style(i),this.messageDetailElement&&n&&o){const e=n.transparent(.9);this.messageDetailElement.style.color=e.makeOpaque(o).toString()}if(this.iconElement){let e;switch(this.options.type){case"error":e=i.errorIconForeground;break;case"warning":e=i.warningIconForeground;break;default:e=i.infoIconForeground}e&&(this.iconElement.style.color=e.toString())}}}}style(e){this.styles=e,this.applyStyles()}dispose(){super.dispose(),this.modal&&(this.modal.remove(),this.modal=void 0), this.focusToReturn&&o.isAncestor(this.focusToReturn,document.body)&&(this.focusToReturn.focus(),this.focusToReturn=void 0)}rearrangeButtons(e,t){const i=[];if(e.forEach((e,t)=>{i.push({label:e,index:t})}),(h.isMacintosh||h.isLinux)&&void 0!==t){const e=i.splice(t,1)[0];i.reverse(),i.splice(i.length-1,0,e)}return i}}t.Dialog=S})),define(e[302],t([0,1,7,6,100,516,515]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownMenuActionViewItem=void 0;class r extends o.BaseActionViewItem{constructor(e,t,i,o={}){super(null,e,o),this.options=o,this._onDidChangeVisibility=this._register(new n.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){const t=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=i.append(e,i.$("a.action-label"));let t=[] ;return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter(e=>!!e):this.options.classNames&&(t=this.options.classNames),t.find(e=>"icon"===e)||t.push("codicon"),this.element.classList.add(...t),this.element.tabIndex=0,this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new s.DropdownMenu(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context}, this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu&&this.dropdownMenu.show()}}t.DropdownMenuActionViewItem=r})),define(e[549],t([0,1,216,936,44]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegexCheckbox=t.WholeWordsCheckbox=t.CaseSensitiveCheckbox=void 0;const s=n.localize(0,null),r=n.localize(1,null),a=n.localize(2,null);class l extends i.Checkbox{constructor(e){super({icon:o.Codicon.caseSensitive,title:s+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}} t.CaseSensitiveCheckbox=l;class c extends i.Checkbox{constructor(e){super({icon:o.Codicon.wholeWord,title:r+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}t.WholeWordsCheckbox=c;class d extends i.Checkbox{constructor(e){super({icon:o.Codicon.regex,title:a+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}t.RegexCheckbox=d})),define(e[154],t([0,1,938,7,395,103,78,6,102,55,41,502,138,99,750]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=t.InputBox=t.MessageType=void 0;const p=n.$;!function(e){e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR"}(t.MessageType||(t.MessageType={}));const m={ inputBackground:c.Color.fromHex("#3C3C3C"),inputForeground:c.Color.fromHex("#CCCCCC"),inputValidationInfoBorder:c.Color.fromHex("#55AAFF"),inputValidationInfoBackground:c.Color.fromHex("#063B49"),inputValidationWarningBorder:c.Color.fromHex("#B89500"),inputValidationWarningBackground:c.Color.fromHex("#352A05"),inputValidationErrorBorder:c.Color.fromHex("#BE1100"),inputValidationErrorBackground:c.Color.fromHex("#5A1D1D")};class v extends l.Widget{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new a.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new a.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),d.mixin(this.options,m,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground, this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.append(e,p(".monaco-inputbox.idle")) ;let o=this.options.flexibleHeight?"textarea":"input",s=n.append(this.element,p(".wrapper"));if(this.input=n.append(s,p(o+".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="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.append(s,p("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new u.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.append(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement), this._register(this.scrollableElement.onScroll(e=>this.input.scrollTop=e.scrollTop));const t=a.Event.filter(g.domEvent(document,"selectionchange"),()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===s});this._register(t(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new r.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(e){ this.placeholder=e,this.input.setAttribute("placeholder",e),this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get mirrorElement(){return this.mirror}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)}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()}setEnabled(e){e?this.enable():this.disable()}get width(){ return n.getTotalWidth(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,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(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&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()}isInputValid(){return!!this.validation&&!this.validation(this.value)}validate(){let e=null;return this.validation&&((e=this.validation(this.value))?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),!e}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground, foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,r=()=>e.style.width=n.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=n.append(t,p(".monaco-inputbox-container")),r();const i={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?o.renderFormattedText(this.message.content,i):o.renderText(this.message.content,i);s.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type) ;return s.style.backgroundColor=a.background?a.background.toString():"",s.style.color=a.foreground?a.foreground.toString():"",s.style.border=a.border?`1px solid ${a.border}`:"",n.append(e,s),null},onHide:()=>{this.state="closed"},layout:r}),t=3===this.message.type?i.localize(0,null,this.message.content):2===this.message.type?i.localize(1,null,this.message.content):i.localize(2,null,this.message.content),s.alert(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";e+t?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground, this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t, this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.getTotalHeight(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}t.InputBox=v;t.HistoryInputBox=class extends v{constructor(e,t,i){super(e,t,i),this.history=new h.HistoryNavigator(i.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}getHistory(){return this.history.getHistory()} showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,s.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,s.status(this.value))}clearHistory(){this.history.clear()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}})),define(e[944],t([0,1,935,7,154,102,6,549,517]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindInput=void 0;const l=i.localize(0,null);class c extends s.Widget{constructor(e,t,i,s){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this._onDidOptionChange=this._register(new r.Emitter), this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new r.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new r.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new r.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new r.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCaseSensitiveKeyDown=this._register(new r.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new r.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||l,this.inputActiveOptionBorder=s.inputActiveOptionBorder,this.inputActiveOptionForeground=s.inputActiveOptionForeground,this.inputActiveOptionBackground=s.inputActiveOptionBackground,this.inputBackground=s.inputBackground,this.inputForeground=s.inputForeground, this.inputBorder=s.inputBorder,this.inputValidationInfoBorder=s.inputValidationInfoBorder,this.inputValidationInfoBackground=s.inputValidationInfoBackground,this.inputValidationInfoForeground=s.inputValidationInfoForeground,this.inputValidationWarningBorder=s.inputValidationWarningBorder,this.inputValidationWarningBackground=s.inputValidationWarningBackground,this.inputValidationWarningForeground=s.inputValidationWarningForeground,this.inputValidationErrorBorder=s.inputValidationErrorBorder,this.inputValidationErrorBackground=s.inputValidationErrorBackground,this.inputValidationErrorForeground=s.inputValidationErrorForeground;const c=s.appendCaseSensitiveLabel||"",d=s.appendWholeWordsLabel||"",h=s.appendRegexLabel||"",u=s.history||[],g=!!s.flexibleHeight,p=!!s.flexibleWidth,m=s.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new o.HistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"", ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:u,flexibleHeight:g,flexibleWidth:p,flexibleMaxHeight:m})),this.regex=this._register(new a.RegexCheckbox({appendTitle:h,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground, inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(e=>{this._onRegexKeyDown.fire(e)})),this.wholeWords=this._register(new a.WholeWordsCheckbox({appendTitle:d,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new a.CaseSensitiveCheckbox({appendTitle:c,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(e=>{ this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(e=>{this._onCaseSensitiveKeyDown.fire(e)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let v=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=v.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%v.length:e.equals(15)&&(i=0===t?v.length-1:t-1),e.equals(9)?v[t].blur():i>=0&&v[i].focus(),n.EventHelper.stop(e,!0)}}});let f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.caseSensitive.domNode),f.appendChild(this.wholeWords.domNode),f.appendChild(this.regex.domNode),this.domNode.appendChild(f),e&&e.appendChild(this.domNode), this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}onSearchSubmit(){this.inputBox.addToHistory()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground, this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground} ;this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){ this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}focusOnRegex(){this.regex.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(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}clearValidation(){this.inputBox.hideMessage()}}t.FindInput=c,c.OPTION_CHANGE="optionChange"})),define(e[945],t([0,1,937,7,154,102,6,216,44,517]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceInput=t.PreserveCaseCheckbox=void 0;const c=i.localize(0,null),d=i.localize(1,null);class h extends a.Checkbox{constructor(e){super({icon:l.Codicon.preserveCase,title:d+e.appendTitle,isChecked:e.isChecked, inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}t.PreserveCaseCheckbox=h;class u extends s.Widget{constructor(e,t,i,s){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new r.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new r.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new r.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new r.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new r.Emitter),this.onKeyUp=this._onKeyUp.event,this._onPreserveCaseKeyDown=this._register(new r.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=s.placeholder||"",this.validation=s.validation, this.label=s.label||c,this.inputActiveOptionBorder=s.inputActiveOptionBorder,this.inputActiveOptionForeground=s.inputActiveOptionForeground,this.inputActiveOptionBackground=s.inputActiveOptionBackground,this.inputBackground=s.inputBackground,this.inputForeground=s.inputForeground,this.inputBorder=s.inputBorder,this.inputValidationInfoBorder=s.inputValidationInfoBorder,this.inputValidationInfoBackground=s.inputValidationInfoBackground,this.inputValidationInfoForeground=s.inputValidationInfoForeground,this.inputValidationWarningBorder=s.inputValidationWarningBorder,this.inputValidationWarningBackground=s.inputValidationWarningBackground,this.inputValidationWarningForeground=s.inputValidationWarningForeground,this.inputValidationErrorBorder=s.inputValidationErrorBorder,this.inputValidationErrorBackground=s.inputValidationErrorBackground,this.inputValidationErrorForeground=s.inputValidationErrorForeground;const a=s.history||[],l=!!s.flexibleHeight,d=!!s.flexibleWidth,u=s.flexibleMaxHeight ;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new o.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,flexibleHeight:l,flexibleWidth:d, flexibleMaxHeight:u})),this.preserveCase=this._register(new h({appendTitle:"",isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(e=>{this._onPreserveCaseKeyDown.fire(e)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let g=[this.preserveCase.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=g.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%g.length:e.equals(15)&&(i=0===t?g.length-1:t-1),e.equals(9)?g[t].blur():i>=0&&g[i].focus(),n.EventHelper.stop(e,!0)}}});let p=document.createElement("div");p.className="controls", p.style.display=this._showOptionButtons?"block":"none",p.appendChild(this.preserveCase.domNode),this.domNode.appendChild(p),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}onSearchSubmit(){this.inputBox.addToHistory()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder, this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground, inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()} highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox&&this.inputBox.validate()}showMessage(e){this.inputBox&&this.inputBox.showMessage(e)}clearMessage(){this.inputBox&&this.inputBox.hideMessage()}clearValidation(){this.inputBox&&this.inputBox.hideMessage()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}t.ReplaceInput=u,u.OPTION_CHANGE="optionChange"})),define(e[413],t([0,1,940,24,30,78,7,74,15,2,138,514,12,44,100,342,80,101]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanMnemonic=t.Menu=t.Direction=t.MENU_ESCAPED_MNEMONIC_REGEX=t.MENU_MNEMONIC_REGEX=void 0,t.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/, t.MENU_ESCAPED_MNEMONIC_REGEX=/(&)?(&)([^\s&])/g;const S=g.registerIcon("menu-selection",g.Codicon.check),b=g.registerIcon("menu-submenu",g.Codicon.chevronRight);var _;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(_=t.Direction||(t.Direction={}));class C extends s.ActionBar{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:2,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,triggerKeys:{keys:[3,...u.isMacintosh||u.isLinux?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new c.DisposableStore),this.initializeStyleSheet(e),r.addDisposableListener(n,r.EventType.KEY_DOWN,e=>{new a.StandardKeyboardEvent(e).equals(2)&&e.preventDefault()}), i.enableMnemonics&&this.menuDisposables.add(r.addDisposableListener(n,r.EventType.KEY_DOWN,e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){r.EventHelper.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof w&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}})),u.isLinux&&this._register(r.addDisposableListener(n,r.EventType.KEY_DOWN,e=>{const t=new a.StandardKeyboardEvent(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),r.EventHelper.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),r.EventHelper.stop(e,!0))})),this._register(r.addDisposableListener(this.domNode,r.EventType.MOUSE_OUT,e=>{let t=e.relatedTarget;r.isAncestor(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())})), this._register(r.addDisposableListener(this.actionsList,r.EventType.MOUSE_OVER,e=>{let t=e.target;if(t&&r.isAncestor(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new d.DomScrollableElement(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const s=this.scrollableElement.getDomNode();s.style.position="",this._register(r.addDisposableListener(s,r.EventType.MOUSE_UP,e=>{e.preventDefault()})),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(e=>{var t;return null===(t=i.submenuIds)||void 0===t||!t.has(e.id)||(console.warn(`Found submenu cycle: ${e.id}`),!1)}),this.push(t,{icon:!0,label:!0,isMenu:!0}), e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(e=>!(e instanceof E)).forEach((e,t,i)=>{e.updatePositionInSet(t+1,i.length)})}initializeStyleSheet(e){r.isInShadowDOM(e)?(this.styleSheet=r.createStyleSheet(e),this.styleSheet.textContent=x):(C.globalStyleSheet||(C.globalStyleSheet=r.createStyleSheet(),C.globalStyleSheet.textContent=x),this.styleSheet=C.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",s=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=s,this.viewItems&&this.viewItems.forEach(t=>{(t instanceof y||t instanceof E)&&t.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}get scrollOffset(){return this.menuElement.scrollTop} trigger(e){if(e<=this.viewItems.length&&e>=0){const t=this.viewItems[e];if(t instanceof w)super.focus(e),t.open(!0);else{if(!(t instanceof y))return;super.run(t._action,t._context)}}}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(r.addDisposableListener(this.element,r.EventType.MOUSE_UP,e=>{if(r.EventHelper.stop(e,!0),v.isFirefox){if(new f.StandardMouseEvent(e).rightButton)return;this.onClick(e)}setTimeout(()=>{ this.onClick(e)},0)})),this._register(r.addDisposableListener(this.element,r.EventType.CONTEXT_MENU,e=>{r.EventHelper.stop(e,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=r.append(this.element,r.$("a.action-menu-item")),this._action.id===o.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=r.append(this.item,r.$("span.menu-item-check"+S.cssSelector)),this.check.setAttribute("role","none"),this.label=r.append(this.item,r.$("span.action-label")),this.options.label&&this.options.keybinding&&(r.append(this.item,r.$("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(), this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){r.clearNode(this.label);let e=g.stripCodicons(this.getAction().label);if(e){const i=I(e);this.options.enableMnemonics||(e=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const o=t.MENU_MNEMONIC_REGEX.exec(e);if(o){e=n.escape(e),t.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let i=t.MENU_ESCAPED_MNEMONIC_REGEX.exec(e);for(;i&&i[1];)i=t.MENU_ESCAPED_MNEMONIC_REGEX.exec(e);const s=e=>e.replace(/&&/g,"&");i?this.label.append(n.ltrim(s(e.substr(0,i.index))," "),r.$("u",{"aria-hidden":"true"},i[3]),n.rtrim(s(e.substr(i.index+i[0].length))," ")):this.label.innerText=s(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(o[1]?o[1]:o[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null ;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=i.localize(0,null,e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&this.element.classList.remove("disabled"),this.item&&(this.item.classList.remove("disabled"),this.item.tabIndex=0)):(this.element&&this.element.classList.add("disabled"),this.item&&(this.item.classList.add("disabled"),r.removeTabIndexAndUpdateFocus(this.item)))}updateChecked(){this.item&&(this.getAction().checked?(this.item.classList.add("checked"), this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class w extends y{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i, this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new c.DisposableStore),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:_.Right,this.showScheduler=new l.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new l.RunOnceScheduler(()=>{this.element&&!r.isAncestor(r.getActiveElement(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=r.append(this.item,r.$("span.submenu-indicator"+b.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(r.addDisposableListener(this.element,r.EventType.KEY_UP,e=>{let t=new a.StandardKeyboardEvent(e) ;(t.equals(17)||t.equals(3))&&(r.EventHelper.stop(e,!0),this.createSubmenu(!0))})),this._register(r.addDisposableListener(this.element,r.EventType.KEY_DOWN,e=>{let t=new a.StandardKeyboardEvent(e);r.getActiveElement()===this.item&&(t.equals(17)||t.equals(3))&&r.EventHelper.stop(e,!0)})),this._register(r.addDisposableListener(this.element,r.EventType.MOUSE_OVER,e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(r.addDisposableListener(this.element,r.EventType.MOUSE_LEAVE,e=>{this.mouseOver=!1})),this._register(r.addDisposableListener(this.element,r.EventType.FOCUS_OUT,e=>{this.element&&!r.isAncestor(r.getActiveElement(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}open(e){this.cleanupExistingSubmenu(!1),this.createSubmenu(e)}onClick(e){r.EventHelper.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){ if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=h.layout(e.width,t.width,{position:n===_.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new a.StandardKeyboardEvent(e).equals(15)&&(r.EventHelper.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})), this.submenuDisposables.add(r.addDisposableListener(this.submenuContainer,r.EventType.KEY_DOWN,e=>{new a.StandardKeyboardEvent(e).equals(15)&&r.EventHelper.stop(e,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null), this.submenuContainer&&(this.submenuContainer=void 0)}}class E extends p.ActionViewItem{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function I(e){const i=t.MENU_MNEMONIC_REGEX,n=i.exec(e);if(!n)return e;const o=!n[1];return e.replace(i,o?"$2$3":"").trim()}t.cleanMnemonic=I ;let x=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${m.formatRule(S)}\n${m.formatRule(b)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n` })),define(e[946],t([0,1,80,7,24,941,99,74,128,413,30,15,6,2,13,14,231,12,101,44,752]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuBar=void 0;const _=n.$,C=b.registerIcon("menubar-more",b.Codicon.more);var y;!function(e){e[e.HIDDEN=0]="HIDDEN",e[e.VISIBLE=1]="VISIBLE",e[e.FOCUSED=2]="FOCUSED",e[e.OPEN=3]="OPEN"}(y||(y={}));class w extends g.Disposable{constructor(e,t={}){super(),this.container=e,this.options=t,this._mnemonicsInUse=!1,this.openedViaKeyboard=!1,this.awaitingAltRelease=!1,this.ignoreNextMouseUp=!1,this.updatePending=!1,this.numMenusShown=0,this.overflowLayoutScheduled=void 0,this.container.setAttribute("role","menubar"),void 0!==this.options.compactMode&&this.container.classList.add("compact"),this.menuCache=[],this.mnemonics=new Map,this._focusState=y.VISIBLE,this._onVisibilityChange=this._register(new u.Emitter),this._onFocusStateChange=this._register(new u.Emitter),this.createOverflowMenu(), this.menuUpdater=this._register(new h.RunOnceScheduler(()=>this.update(),200)),this.actionRunner=this._register(new d.ActionRunner),this._register(this.actionRunner.onDidBeforeRun(()=>{this.setUnfocusedState()})),this._register(E.getInstance().event(this.onModifierKeyToggled,this)),this._register(n.addDisposableListener(this.container,n.EventType.KEY_DOWN,e=>{let t=new a.StandardKeyboardEvent(e),i=!0;const n=e.key?e.key.toLocaleLowerCase():"";if(t.equals(15)||f.isMacintosh&&t.equals(1026))this.focusPrevious();else if(t.equals(17)||f.isMacintosh&&t.equals(2))this.focusNext();else if(t.equals(9)&&this.isFocused&&!this.isOpen)this.setUnfocusedState();else if(!this.isOpen&&!t.ctrlKey&&this.options.enableMnemonics&&this.mnemonicsInUse&&this.mnemonics.has(n)){const e=this.mnemonics.get(n);this.onMenuTriggered(e,!1)}else i=!1;void 0===this.options.compactMode&&(t.equals(1026)||t.equals(2))&&t.preventDefault(),i&&(t.preventDefault(),t.stopPropagation())})), this._register(n.addDisposableListener(window,n.EventType.MOUSE_DOWN,()=>{this.isFocused&&this.setUnfocusedState()})),this._register(n.addDisposableListener(this.container,n.EventType.FOCUS_IN,e=>{let t=e;t.relatedTarget&&(this.container.contains(t.relatedTarget)||(this.focusToReturn=t.relatedTarget))})),this._register(n.addDisposableListener(this.container,n.EventType.FOCUS_OUT,e=>{let t=e;t.relatedTarget?t.relatedTarget&&!this.container.contains(t.relatedTarget)&&(this.focusToReturn=void 0,this.setUnfocusedState()):this.setUnfocusedState()})),this._register(n.addDisposableListener(window,n.EventType.KEY_DOWN,e=>{if(!this.options.enableMnemonics||!e.altKey||e.ctrlKey||e.defaultPrevented)return;const t=e.key.toLocaleLowerCase();if(!this.mnemonics.has(t))return;this.mnemonicsInUse=!0,this.updateMnemonicVisibility(!0);const i=this.mnemonics.get(t);this.onMenuTriggered(i,!1)})),this.setUnfocusedState()}push(e){m.asArray(e).forEach(e=>{ const t=this.menuCache.length,i=c.cleanMnemonic(e.label),o=_("div.menubar-menu-button",{role:"menuitem",tabindex:-1,"aria-label":i,"aria-haspopup":!0}),s=_("div.menubar-menu-title",{role:"none","aria-hidden":!0});o.appendChild(s),this.container.insertBefore(o,this.overflowMenu.buttonElement);let r=c.MENU_MNEMONIC_REGEX.exec(e.label);if(r){let e=r[1]?r[1]:r[3];this.registerMnemonic(this.menuCache.length,e)}this.updateLabels(s,o,e.label),this._register(n.addDisposableListener(o,n.EventType.KEY_UP,e=>{let i=new a.StandardKeyboardEvent(e),n=!0;!i.equals(18)&&!i.equals(3)||this.isOpen?n=!1:(this.focusedMenu={index:t},this.openedViaKeyboard=!0,this.focusState=y.OPEN),n&&(i.preventDefault(),i.stopPropagation())})),this._register(l.Gesture.addTarget(o)),this._register(n.addDisposableListener(o,l.EventType.Tap,e=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&n.isAncestor(e.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(t,!0),e.preventDefault(),e.stopPropagation()) })),this._register(n.addDisposableListener(o,n.EventType.MOUSE_DOWN,e=>{new S.StandardMouseEvent(e).leftButton?(this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(t,!0)),e.preventDefault(),e.stopPropagation()):e.preventDefault()})),this._register(n.addDisposableListener(o,n.EventType.MOUSE_UP,e=>{e.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(t,!0))})),this._register(n.addDisposableListener(o,n.EventType.MOUSE_ENTER,()=>{this.isOpen&&!this.isCurrentMenu(t)?(this.menuCache[t].buttonElement.focus(),this.cleanupCustomMenu(),this.showCustomMenu(t,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:t},o.focus())})),this.menuCache.push({label:e.label,actions:e.actions,buttonElement:o,titleElement:s})})}createOverflowMenu(){const e=void 0!==this.options.compactMode?s.localize(0,null):s.localize(1,null),t=void 0!==this.options.compactMode?e:void 0,i=_("div.menubar-menu-button",{role:"menuitem", tabindex:void 0!==this.options.compactMode?0:-1,"aria-label":e,title:t,"aria-haspopup":!0}),o=_("div.menubar-menu-title.toolbar-toggle-more"+C.cssSelector,{role:"none","aria-hidden":!0});i.appendChild(o),this.container.appendChild(i),i.style.visibility="hidden",this._register(n.addDisposableListener(i,n.EventType.KEY_UP,e=>{let t=new a.StandardKeyboardEvent(e),i=!0;const n=[3];void 0===this.options.compactMode?n.push(18):(n.push(10),n.push(this.options.compactMode===c.Direction.Right?17:15)),n.some(e=>t.equals(e))&&!this.isOpen?(this.focusedMenu={index:w.OVERFLOW_INDEX},this.openedViaKeyboard=!0,this.focusState=y.OPEN):i=!1,i&&(t.preventDefault(),t.stopPropagation())})),this._register(l.Gesture.addTarget(i)),this._register(n.addDisposableListener(i,l.EventType.Tap,e=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&n.isAncestor(e.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(w.OVERFLOW_INDEX,!0),e.preventDefault(),e.stopPropagation())})), this._register(n.addDisposableListener(i,n.EventType.MOUSE_DOWN,e=>{new S.StandardMouseEvent(e).leftButton?(this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(w.OVERFLOW_INDEX,!0)),e.preventDefault(),e.stopPropagation()):e.preventDefault()})),this._register(n.addDisposableListener(i,n.EventType.MOUSE_UP,e=>{e.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(w.OVERFLOW_INDEX,!0))})),this._register(n.addDisposableListener(i,n.EventType.MOUSE_ENTER,()=>{this.isOpen&&!this.isCurrentMenu(w.OVERFLOW_INDEX)?(this.overflowMenu.buttonElement.focus(),this.cleanupCustomMenu(),this.showCustomMenu(w.OVERFLOW_INDEX,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:w.OVERFLOW_INDEX},i.focus())})),this.overflowMenu={buttonElement:i,titleElement:o,label:"More"}}updateMenu(e){const t=this.menuCache.filter(t=>t.label===e.label);t&&t.length&&(t[0].actions=e.actions)}dispose(){super.dispose(),this.menuCache.forEach(e=>{ e.titleElement.remove(),e.buttonElement.remove()}),this.overflowMenu.titleElement.remove(),this.overflowMenu.buttonElement.remove(),g.dispose(this.overflowLayoutScheduled),this.overflowLayoutScheduled=void 0}blur(){this.setUnfocusedState()}getWidth(){if(this.menuCache){const e=this.menuCache[0].buttonElement.getBoundingClientRect().left;return(this.hasOverflow?this.overflowMenu.buttonElement.getBoundingClientRect().right:this.menuCache[this.menuCache.length-1].buttonElement.getBoundingClientRect().right)-e}return 0}getHeight(){return this.container.clientHeight}toggleFocus(){this.isFocused||"hidden"===this.options.visibility?this.isOpen||this.setUnfocusedState():(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:w.OVERFLOW_INDEX},this.focusState=y.FOCUSED)}updateOverflowAction(){var e,t;if(!this.menuCache||!this.menuCache.length)return;const i=this.container.offsetWidth;let n=0,o=void 0!==this.options.compactMode;const s=this.numMenusShown;this.numMenusShown=0;for(let e of this.menuCache){ if(!o){const t=e.buttonElement.offsetWidth;n+t>i?o=!0:(n+=t,this.numMenusShown++,this.numMenusShown>s&&(e.buttonElement.style.visibility="visible"))}o&&(e.buttonElement.style.visibility="hidden")}if(o){for(;n+this.overflowMenu.buttonElement.offsetWidth>i&&this.numMenusShown>0;){this.numMenusShown--;const e=this.menuCache[this.numMenusShown].buttonElement.offsetWidth;this.menuCache[this.numMenusShown].buttonElement.style.visibility="hidden",n-=e}this.overflowMenu.actions=[];for(let e=this.numMenusShown;ee.replace(/&&/g,"&");n?(e.innerText="",e.append(o.ltrim(s(t.substr(0,n.index))," "),_("mnemonic",{"aria-hidden":"true"},n[3]),o.rtrim(s(t.substr(n.index+n[0].length))," "))):e.innerText=s(t).trim()}else e.innerText=n.replace(/&&/g,"&");let s=c.MENU_MNEMONIC_REGEX.exec(i);if(s){let e=s[1]?s[1]:s[3] ;this.options.enableMnemonics?t.setAttribute("aria-keyshortcuts","Alt+"+e.toLocaleLowerCase()):t.removeAttribute("aria-keyshortcuts")}}style(e){this.menuStyle=e}update(e){e&&(this.options=e),this.isFocused?this.updatePending=!0:(this.menuCache.forEach(e=>{this.updateLabels(e.titleElement,e.buttonElement,e.label)}),this.overflowLayoutScheduled||(this.overflowLayoutScheduled=n.scheduleAtNextAnimationFrame(()=>{this.updateOverflowAction(),this.overflowLayoutScheduled=void 0})),this.setUnfocusedState())}registerMnemonic(e,t){this.mnemonics.set(t.toLocaleLowerCase(),e)}hideMenubar(){"none"!==this.container.style.display&&(this.container.style.display="none",this._onVisibilityChange.fire(!1))}showMenubar(){"flex"!==this.container.style.display&&(this.container.style.display="flex",this._onVisibilityChange.fire(!0),this.updateOverflowAction())}get focusState(){return this._focusState}set focusState(e){if(this._focusState>=y.FOCUSED&&e=y.FOCUSED)}get isVisible(){return this.focusState>=y.VISIBLE}get isFocused(){return this.focusState>=y.FOCUSED}get isOpen(){return this.focusState>=y.OPEN}get hasOverflow(){return this.numMenusShown{if(t.titleElement.children.length){let i=t.titleElement.children.item(0);i&&(i.style.textDecoration=this.options.alwaysOnMnemonics||e?"underline":"")}})}get mnemonicsInUse(){return this._mnemonicsInUse}set mnemonicsInUse(e){this._mnemonicsInUse=e}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event} onMenuTriggered(e,t){this.isOpen?this.isCurrentMenu(e)?this.setUnfocusedState():(this.cleanupCustomMenu(),this.showCustomMenu(e,this.openedViaKeyboard)):(this.focusedMenu={index:e},this.openedViaKeyboard=!t,this.focusState=y.OPEN)}onModifierKeyToggled(e){const t=!e.altKey&&!e.ctrlKey&&!e.shiftKey;"hidden"!==this.options.visibility&&(e.event&&!this.options.disableAltFocus&&159===v.ScanCodeUtils.toEnum(e.event.code)&&e.event.preventDefault(),this.isFocused&&"alt"===e.lastKeyPressed&&e.altKey&&(this.setUnfocusedState(),this.mnemonicsInUse=!1,this.awaitingAltRelease=!0),t&&"alt"===e.lastKeyPressed&&"alt"===e.lastKeyReleased&&(this.awaitingAltRelease||(this.isFocused||this.options.disableAltFocus&&"toggle"!==this.options.visibility?this.isOpen||this.setUnfocusedState():(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:w.OVERFLOW_INDEX},this.focusState=y.FOCUSED))),e.altKey||"alt"!==e.lastKeyReleased||(this.awaitingAltRelease=!1), this.options.enableMnemonics&&this.menuCache&&!this.isOpen&&this.updateMnemonicVisibility(!this.awaitingAltRelease&&e.altKey||this.mnemonicsInUse))}isCurrentMenu(e){return!!this.focusedMenu&&this.focusedMenu.index===e}cleanupCustomMenu(){this.focusedMenu&&(this.focusedMenu.index===w.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menuCache[this.focusedMenu.index].buttonElement.focus(),this.focusedMenu.holder&&(this.focusedMenu.holder.parentElement&&this.focusedMenu.holder.parentElement.classList.remove("open"),this.focusedMenu.holder.remove()),this.focusedMenu.widget&&this.focusedMenu.widget.dispose(),this.focusedMenu={index:this.focusedMenu.index})}showCustomMenu(e,t=!0){const i=e>=this.numMenusShown?w.OVERFLOW_INDEX:e,n=i===w.OVERFLOW_INDEX?this.overflowMenu:this.menuCache[i];if(!n.actions)return;const o=_("div.menubar-menu-items-holder",{title:""});n.buttonElement.classList.add("open"),this.options.compactMode===c.Direction.Right?(o.style.top="0px", o.style.left=`${n.buttonElement.getBoundingClientRect().left+this.container.clientWidth}px`):this.options.compactMode===c.Direction.Left?(o.style.top="0px",o.style.right=`${this.container.clientWidth}px`,o.style.left="auto"):(o.style.top=`${this.container.clientHeight}px`,o.style.left=`${n.buttonElement.getBoundingClientRect().left}px`),n.buttonElement.appendChild(o);let s={getKeyBinding:this.options.getKeybinding,actionRunner:this.actionRunner,enableMnemonics:this.options.alwaysOnMnemonics||this.mnemonicsInUse&&this.options.enableMnemonics,ariaLabel:p.withNullAsUndefined(n.buttonElement.getAttribute("aria-label")),expandDirection:void 0!==this.options.compactMode?this.options.compactMode:c.Direction.Right,useEventAsContext:!0},r=this._register(new c.Menu(o,n.actions,s));this.menuStyle&&r.style(this.menuStyle),this._register(r.onDidCancel(()=>{this.focusState=y.FOCUSED})),i!==e?r.trigger(e-this.numMenusShown):r.focus(t),this.focusedMenu={index:i,holder:o,widget:r}}}t.MenuBar=w,w.OVERFLOW_INDEX=-1 ;class E extends u.Emitter{constructor(){super(),this._subscriptions=new g.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1},this._subscriptions.add(r.domEvent(document.body,"keydown",!0)(e=>{const t=new a.StandardKeyboardEvent(e);if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))})),this._subscriptions.add(r.domEvent(document.body,"keyup",!0)(e=>{ !e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!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.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus))})),this._subscriptions.add(r.domEvent(document.body,"mousedown",!0)(e=>{this._keyStatus.lastKeyPressed=void 0})),this._subscriptions.add(r.domEvent(document.body,"mouseup",!0)(e=>{this._keyStatus.lastKeyPressed=void 0})),this._subscriptions.add(r.domEvent(document.body,"mousemove",!0)(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)})),this._subscriptions.add(r.domEvent(window,"blur")(e=>{this._keyStatus.lastKeyPressed=void 0, this._keyStatus.lastKeyReleased=void 0,this._keyStatus.altKey=!1,this._keyStatus.shiftKey=!1,this._keyStatus.shiftKey=!1,this.fire(this._keyStatus)}))}static getInstance(){return E.instance||(E.instance=new E),E.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}})),define(e[947],t([0,1,7,154,2,74,97,101,343]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickInputBox=void 0;const l=i.$;class c extends o.Disposable{constructor(e){super(),this.parent=e,this.onKeyDown=e=>i.addDisposableListener(this.inputBox.inputElement,i.EventType.KEY_DOWN,t=>{e(new s.StandardKeyboardEvent(t))}),this.onMouseDown=e=>i.addDisposableListener(this.inputBox.inputElement,i.EventType.MOUSE_DOWN,t=>{e(new a.StandardMouseEvent(t))}),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=i.append(this.parent,l(".quick-input-box")),this.inputBox=this._register(new n.InputBox(this.container,void 0))}get value(){return this.inputBox.value}set value(e){ this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}setPlaceholder(e){this.inputBox.setPlaceHolder(e)}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.inputBox.setEnabled(e)}hasFocus(){return this.inputBox.hasFocus()}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===r.default.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===r.default.Info?1:e===r.default.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===r.default.Info?1:e===r.default.Warning?2:3)}setFocus(){ this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}t.QuickInputBox=c})),define(e[948],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/splitview/paneview",t)})),define(e[949],t([0,1,2,6,99,74,7,55,197,80,166,948,760]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaneView=t.DefaultPaneDndController=t.Pane=void 0;class u extends i.Disposable{constructor(e){super(),this.expandedSize=void 0,this._headerVisible=!0,this.styles={},this.animationTimer=void 0,this._onDidChange=this._register(new n.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeExpansionState=this._register(new n.Emitter),this.onDidChangeExpansionState=this._onDidChangeExpansionState.event,this.orthogonalSize=0,this._expanded=void 0===e.expanded||!!e.expanded,this._orientation=void 0===e.orientation?0:e.orientation,this.ariaHeaderLabel=h.localize(0,null,e.title), this._minimumBodySize="number"==typeof e.minimumBodySize?e.minimumBodySize:1===this._orientation?200:120,this._maximumBodySize="number"==typeof e.maximumBodySize?e.maximumBodySize:Number.POSITIVE_INFINITY,this.element=r.$(".pane")}get draggableElement(){return this.header}get dropTargetElement(){return this.element}get dropBackground(){return this._dropBackground}get minimumBodySize(){return this._minimumBodySize}set minimumBodySize(e){this._minimumBodySize=e,this._onDidChange.fire(void 0)}get maximumBodySize(){return this._maximumBodySize}set maximumBodySize(e){this._maximumBodySize=e,this._onDidChange.fire(void 0)}get headerSize(){return this.headerVisible?u.HEADER_SIZE:0}get minimumSize(){return this.headerSize+(!this.headerVisible||this.isExpanded()?this.minimumBodySize:0)}get maximumSize(){return this.headerSize+(!this.headerVisible||this.isExpanded()?this.maximumBodySize:0)}isExpanded(){return this._expanded}setExpanded(e){ return this._expanded!==!!e&&(this.element&&this.element.classList.toggle("expanded",e),this._expanded=!!e,this.updateHeader(),e?("number"==typeof this.animationTimer&&clearTimeout(this.animationTimer),r.append(this.element,this.body)):this.animationTimer=window.setTimeout(()=>{this.body.remove()},200),this._onDidChangeExpansionState.fire(e),this._onDidChange.fire(e?this.expandedSize:void 0),!0)}get headerVisible(){return this._headerVisible}set headerVisible(e){this._headerVisible!==!!e&&(this._headerVisible=!!e,this.updateHeader(),this._onDidChange.fire(void 0))}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.element&&(this.element.classList.toggle("horizontal",1===this.orientation),this.element.classList.toggle("vertical",0===this.orientation)),this.header&&this.updateHeader())}render(){this.element.classList.toggle("expanded",this.isExpanded()),this.element.classList.toggle("horizontal",1===this.orientation), this.element.classList.toggle("vertical",0===this.orientation),this.header=r.$(".pane-header"),r.append(this.element,this.header),this.header.setAttribute("tabindex","0"),this.header.setAttribute("role","button"),this.header.setAttribute("aria-label",this.ariaHeaderLabel),this.renderHeader(this.header);const e=r.trackFocus(this.header);this._register(e),this._register(e.onDidFocus(()=>this.header.classList.add("focused"),null)),this._register(e.onDidBlur(()=>this.header.classList.remove("focused"),null)),this.updateHeader();const t=n.Event.chain(o.domEvent(this.header,"keydown")).map(e=>new s.StandardKeyboardEvent(e));this._register(t.filter(e=>3===e.keyCode||10===e.keyCode).event(()=>this.setExpanded(!this.isExpanded()),null)),this._register(t.filter(e=>15===e.keyCode).event(()=>this.setExpanded(!1),null)),this._register(t.filter(e=>17===e.keyCode).event(()=>this.setExpanded(!0),null)),this._register(o.domEvent(this.header,"click")(e=>{e.defaultPrevented||this.setExpanded(!this.isExpanded())},null)), this.body=r.append(this.element,r.$(".pane-body")),this.renderBody(this.body),this.isExpanded()||this.body.remove()}layout(e){const t=this.headerVisible?u.HEADER_SIZE:0,i=0===this._orientation?this.orthogonalSize:e,n=0===this._orientation?e-t:this.orthogonalSize-t;this.isExpanded()&&(this.body.classList.toggle("wide",i>=600),this.layoutBody(n,i),this.expandedSize=e)}style(e){this.styles=e,this.header&&this.updateHeader()}updateHeader(){const e=!this.headerVisible||this.isExpanded();this.header.style.lineHeight=`${this.headerSize}px`,this.header.classList.toggle("hidden",!this.headerVisible),this.header.classList.toggle("expanded",e),this.header.setAttribute("aria-expanded",String(e)),this.header.style.color=this.styles.headerForeground?this.styles.headerForeground.toString():"",this.header.style.backgroundColor=this.styles.headerBackground?this.styles.headerBackground.toString():"",this.header.style.borderTop=this.styles.headerBorder&&0===this.orientation?`1px solid ${this.styles.headerBorder}`:"", this._dropBackground=this.styles.dropBackground,this.element.style.borderLeft=this.styles.leftBorder&&1===this.orientation?`1px solid ${this.styles.leftBorder}`:""}}t.Pane=u,u.HEADER_SIZE=22;class g extends i.Disposable{constructor(e,t,i){super(),this.pane=e,this.dnd=t,this.context=i,this.dragOverCounter=0,this._onDidDrop=this._register(new n.Emitter),this.onDidDrop=this._onDidDrop.event,e.draggableElement.draggable=!0,this._register(o.domEvent(e.draggableElement,"dragstart")(this.onDragStart,this)),this._register(o.domEvent(e.dropTargetElement,"dragenter")(this.onDragEnter,this)),this._register(o.domEvent(e.dropTargetElement,"dragleave")(this.onDragLeave,this)),this._register(o.domEvent(e.dropTargetElement,"dragend")(this.onDragEnd,this)),this._register(o.domEvent(e.dropTargetElement,"drop")(this.onDrop,this))}onDragStart(e){var t;if(!this.dnd.canDrag(this.pane)||!e.dataTransfer)return e.preventDefault(),void e.stopPropagation();e.dataTransfer.effectAllowed="move", c.isFirefox&&(null===(t=e.dataTransfer)||void 0===t||t.setData(d.DataTransfers.TEXT,this.pane.draggableElement.textContent||""));const i=r.append(document.body,r.$(".monaco-drag-image",{},this.pane.draggableElement.textContent||""));e.dataTransfer.setDragImage(i,-10,-10),setTimeout(()=>document.body.removeChild(i),0),this.context.draggable=this}onDragEnter(e){this.context.draggable&&this.context.draggable!==this&&this.dnd.canDrop(this.context.draggable.pane,this.pane)&&(this.dragOverCounter++,this.render())}onDragLeave(e){this.context.draggable&&this.context.draggable!==this&&this.dnd.canDrop(this.context.draggable.pane,this.pane)&&(this.dragOverCounter--,0===this.dragOverCounter&&this.render())}onDragEnd(e){this.context.draggable&&(this.dragOverCounter=0,this.render(),this.context.draggable=null)}onDrop(e){this.context.draggable&&(r.EventHelper.stop(e),this.dragOverCounter=0,this.render(),this.dnd.canDrop(this.context.draggable.pane,this.pane)&&this.context.draggable!==this&&this._onDidDrop.fire({ from:this.context.draggable.pane,to:this.pane}),this.context.draggable=null)}render(){let e=null;this.dragOverCounter>0&&(e=(this.pane.dropBackground||g.DefaultDragOverBackgroundColor).toString()),this.pane.dropTargetElement.style.backgroundColor=e||""}}g.DefaultDragOverBackgroundColor=new a.Color(new a.RGBA(128,128,128,.5));t.DefaultPaneDndController=class{canDrag(e){return!0}canDrop(e,t){return!0}};class p extends i.Disposable{constructor(e,t={}){var i;super(),this.dndContext={draggable:null},this.paneItems=[],this.orthogonalSize=0,this.size=0,this.animationTimer=void 0,this._onDidDrop=this._register(new n.Emitter),this.onDidDrop=this._onDidDrop.event,this.dnd=t.dnd,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.el=r.append(e,r.$(".monaco-pane-view")),this.splitview=this._register(new l.SplitView(this.el,{orientation:this.orientation})),this.onDidSashChange=this.splitview.onDidSashChange}addPane(e,t,n=this.splitview.length){const o=new i.DisposableStore ;e.onDidChangeExpansionState(this.setupAnimation,this,o);const s={pane:e,disposable:o};if(this.paneItems.splice(n,0,s),e.orientation=this.orientation,e.orthogonalSize=this.orthogonalSize,this.splitview.addView(e,t,n),this.dnd){const t=new g(e,this.dnd,this.dndContext);o.add(t),o.add(t.onDidDrop(this._onDidDrop.fire,this._onDidDrop))}}removePane(e){const t=this.paneItems.findIndex(t=>t.pane===e);-1!==t&&(this.splitview.removeView(t),this.paneItems.splice(t,1)[0].disposable.dispose())}movePane(e,t){const i=this.paneItems.findIndex(t=>t.pane===e),n=this.paneItems.findIndex(e=>e.pane===t);if(-1===i||-1===n)return;const[o]=this.paneItems.splice(i,1);this.paneItems.splice(n,0,o),this.splitview.moveView(i,n)}resizePane(e,t){const i=this.paneItems.findIndex(t=>t.pane===e);-1!==i&&this.splitview.resizeView(i,t)}getPaneSize(e){const t=this.paneItems.findIndex(t=>t.pane===e);return-1===t?-1:this.splitview.getViewSize(t)}layout(e,t){this.orthogonalSize=0===this.orientation?t:e,this.size=1===this.orientation?t:e ;for(const e of this.paneItems)e.pane.orthogonalSize=this.orthogonalSize;this.splitview.layout(this.size)}flipOrientation(e,t){this.orientation=0===this.orientation?1:0;const i=this.paneItems.map(e=>this.getPaneSize(e.pane));this.splitview.dispose(),r.clearNode(this.el),this.splitview=this._register(new l.SplitView(this.el,{orientation:this.orientation}));const n=0===this.orientation?t:e,o=1===this.orientation?t:e;this.paneItems.forEach((e,t)=>{e.pane.orthogonalSize=n,e.pane.orientation=this.orientation;const s=0===this.size?0:o*i[t]/this.size;this.splitview.addView(e.pane,s,t)}),this.size=o,this.orthogonalSize=n,this.splitview.layout(this.size)}setupAnimation(){"number"==typeof this.animationTimer&&window.clearTimeout(this.animationTimer),this.el.classList.add("animated"),this.animationTimer=window.setTimeout(()=>{this.animationTimer=void 0,this.el.classList.remove("animated")},200)}dispose(){super.dispose(),this.paneItems.forEach(e=>e.disposable.dispose())}}t.PaneView=p})), define(e[950],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/toolbar/toolbar",t)})),define(e[217],t([0,1,950,30,78,2,13,44,6,302,763]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolBar=void 0;const d=a.registerIcon("toolbar-more",a.Codicon.more);class h extends s.Disposable{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new l.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new s.DisposableStore,this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new u(()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element), this.actionBar=this._register(new o.ActionBar(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,actionViewItemProvider:e=>{if(e.id===u.ID)return this.toggleMenuActionViewItem=new c.DropdownMenuActionViewItem(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:d.classNamesArray,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(i.actionViewItemProvider){const t=i.actionViewItemProvider(e);if(t)return t}if(e instanceof n.SubmenuAction){const i=new c.DropdownMenuActionViewItem(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider, actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!0});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){this.actionBar.context=e,this.toggleMenuActionViewItem&&this.toggleMenuActionViewItem.setActionContext(e);for(const t of this.submenuActionViewItems)t.setActionContext(e)}getElement(){return this.element}getItemsWidth(){let e=0;for(let t=0;t0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0), i.push(this.toggleMenuAction)),i.forEach(e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})})}getKeybindingLabel(e){var t,i;const n=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return r.withNullAsUndefined(null==n?void 0:n.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}t.ToolBar=h;class u extends n.Action{constructor(e,t){t=t||i.localize(0,null),super(u.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}u.ID="toolbar.toggle.more"})),define(e[951],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/tree/abstractTree",t)})),define(e[414],t([0,1,2,175,7,6,74,229,166,14,257,99,87,390,951,15,12,195,141,509,764]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTree=t.RenderIndentGuides=t.ComposedTreeDelegate=void 0;class _ extends d.ElementsDragAndDropData{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}set context(e){this.data.context=e}get context(){return this.data.context}}function C(e){return e instanceof d.ElementsDragAndDropData?new _(e):e}class y{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=i.Disposable.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(C(e),t)}onDragOver(e,t,i,n,o=!0){const s=this.dnd.onDragOver(C(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(r&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=m.disposableTimeout(()=>{const e=this.modelProvider(),i=e.getNodeLocation(t) ;e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback){if(!o){return{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[i]}}return s}if(1===s.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),d=a.getListIndex(l),h=a.getListRenderCount(l);return Object.assign(Object.assign({},s),{feedback:c.range(d,d+h)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(C(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class w{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)} setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var E;t.ComposedTreeDelegate=w,function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(E=t.RenderIndentGuides||(t.RenderIndentGuides={}));class I{constructor(e,t=[]){this._elements=t,this.onDidChange=s.Event.forEach(e,e=>this._elements=e)}get elements(){return this._elements}}class x{constructor(e,t,n,o,r={}){this.renderer=e,this.modelProvider=t,this.activeNodes=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=x.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new S.SetMap,this.activeIndentNodes=new Set,this.indentGuidesDisposable=i.Disposable.None,this.disposables=new i.DisposableStore,this.templateId=e.templateId,this.updateOptions(r),s.Event.map(n,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables) }updateOptions(e={}){if(void 0!==e.indent&&(this.indent=f.clamp(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==E.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new i.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=o.append(e,o.$(".monaco-tl-row")),n=o.append(t,o.$(".monaco-tl-indent")),s=o.append(t,o.$(".monaco-tl-twistie")),r=o.append(t,o.$(".monaco-tl-contents")),a=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:s,indentGuidesDisposable:i.Disposable.None,templateData:a}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e)) ;const o=x.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=`${o+this.indent-16}px`,this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e.element,t.twistie), e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(t.twistie.classList.add(...b.treeItemExpandedIcon.classNamesArray,"collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove(...b.treeItemExpandedIcon.classNamesArray,"collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(o.clearNode(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new i.DisposableStore,s=this.modelProvider();let r=e;for(;;){const e=s.getNodeLocation(r),a=s.getParentNodeLocation(e);if(!a)break;const l=s.getNode(a),c=o.$(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c), n.add(i.toDisposable(()=>this.renderedIndentGuides.delete(l,c))),r=l}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),i.dispose(this.disposables)}}x.DefaultIndent=8;class k{constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new i.DisposableStore, e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(0===(n="boolean"==typeof i?i?1:0:g.isFilterResult(i)?g.getVisibleState(i.visibility):i))return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:u.FuzzyScore.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=i&&i.toString();if(void 0===n)return{data:u.FuzzyScore.Default,visibility:!0};const o=u.fuzzyScore(this._pattern,this._lowercasePattern,0,n,n.toLowerCase(),0,!0);return o?(this._matchCount++,{data:o,visibility:!0}):this.tree.options.filterOnType?2:{data:u.FuzzyScore.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){ i.dispose(this.disposables)}}class D{constructor(e,t,n,r,a){this.tree=e,this.view=n,this.filter=r,this.keyboardNavigationDelegate=a,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new s.Emitter,this.onDidChangeEmptyState=s.Event.latch(this._onDidChangeEmptyState.event),this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new s.Emitter,this.onDidChangePattern=this._onDidChangePattern.event,this.enabledDisposables=new i.DisposableStore,this.disposables=new i.DisposableStore,this.domNode=o.$(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,h.domEvent(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=o.append(n.getHTMLElement(),o.$(".monaco-list-type-filter-message")),this.labelDomNode=o.append(this.domNode,o.$("span.label"));const l=o.append(this.domNode,o.$(".controls"));this._filterOnType=!!e.options.filterOnType, this.filterOnTypeDomNode=o.append(l,o.$("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),h.domEvent(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=o.append(l,o.$("button.clear"+b.treeFilterClearIcon.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=p.localize(0,null),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}get empty(){return this._empty}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType), void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}toggle(){this.triggered=!this.triggered,this.triggered||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=s.Event.chain(h.domEvent(this.view.getHTMLElement(),"keydown")).filter(e=>!n.isInputElement(e.target)||e.target===this.filterOnTypeDomNode).filter(e=>"Dead"!==e.key&&!/^Media/.test(e.key)).map(e=>new r.StandardKeyboardEvent(e)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(v.isMacintosh?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey).forEach(e=>{e.stopPropagation(), e.preventDefault()}).event,t=h.domEvent(this.clearDomNode,"click");s.Event.chain(s.Event.any(e,t)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(v.isMacintosh?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(), e&&this.tree.focusNext(0,!0,void 0,e=>!u.FuzzyScore.isDefault(e.filterData));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=o.getDomNodePagePosition(e),n=e.clientWidth,s=n/2,r=this.domNode.clientWidth,a=new i.DisposableStore;let c=this.positionClassName;const d=()=>{switch(c){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${n-r-6}px`}};d(),this.domNode.classList.remove(c),this.domNode.classList.add("dragging"),a.add(i.toDisposable(()=>this.domNode.classList.remove("dragging"))),h.domEvent(document,"dragover")(e=>{e.preventDefault();const i=e.screenX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),c=i{this.positionClassName=c, this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",i.dispose(a)},null,a),l.StaticDND.CurrentDragAndDropData=new l.DragAndDropData("vscode-ui"),a.add(i.toDisposable(()=>l.StaticDND.CurrentDragAndDropData=void 0))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...b.treeFilterOnTypeOffIcon.classNamesArray),this.filterOnTypeDomNode.classList.add(...b.treeFilterOnTypeOnIcon.classNamesArray),this.filterOnTypeDomNode.title=p.localize(1,null)):(this.filterOnTypeDomNode.classList.remove(...b.treeFilterOnTypeOnIcon.classNamesArray), this.filterOnTypeDomNode.classList.add(...b.treeFilterOnTypeOffIcon.classNamesArray),this.filterOnTypeDomNode.title=p.localize(2,null))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=p.localize(3,null),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=p.localize(4,null,this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!u.FuzzyScore.isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),i.dispose(this.disposables)}} function T(e){let t=a.TreeMouseEventTarget.Unknown;return o.hasParentWithClass(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=a.TreeMouseEventTarget.Twistie:o.hasParentWithClass(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=a.TreeMouseEventTarget.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function R(e){return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor}}function A(e,t){t(e),e.children.forEach(e=>A(e,t))}class M{constructor(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new s.Emitter,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){c.equals(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){ return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach(e=>A(e,i)),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>A(e,n));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>A(e,s));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&r.push(e)}else r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class L extends n.MouseController{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(n.isInputElement(e.browserEvent.target)||n.isMonacoEditor(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e) ;if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,o=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if((s="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick)&&!o)return super.onViewPointer(e);if(this.tree.expandOnlyOnDoubleClick&&2!==e.browserEvent.detail&&!o)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,n=i.getNodeLocation(t),r=e.browserEvent.altKey;if(i.setCollapsed(n,void 0,r),s&&o)return}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||super.onDoubleClick(e)}}class O extends n.List{constructor(e,t,i,n,o,s,r){super(e,t,i,n,r),this.focusTrait=o,this.selectionTrait=s}createMouseController(e){return new L(this,e.tree)}splice(e,t,i=[]){ if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i)}),n.length>0&&super.setFocus(c.distinctES6([...super.getFocus(),...n])),o.length>0&&super.setSelection(c.distinctES6([...super.getSelection(),...o]))}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}}t.AbstractTree=class{constructor(e,t,a,l,c={}){this._options=c,this.eventBufferer=new s.EventBufferer,this.disposables=new i.DisposableStore,this._onWillRefilter=new s.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new s.Emitter,this.onDidUpdateOptions=this._onDidUpdateOptions.event;const d=new w(a),h=new s.Relay,u=new s.Relay,g=new I(u.event);this.renderers=l.map(e=>new x(e,()=>this.model,h.event,g,c));for(let e of this.renderers)this.disposables.add(e);let p;var m,v ;c.keyboardNavigationLabelProvider&&(p=new k(this,c.keyboardNavigationLabelProvider,c.filter),c=Object.assign(Object.assign({},c),{filter:p}),this.disposables.add(p)),this.focus=new M(c.identityProvider),this.selection=new M(c.identityProvider),this.view=new O(e,t,d,this.renderers,this.focus,this.selection,Object.assign(Object.assign({},(m=()=>this.model,(v=c)&&Object.assign(Object.assign({},v),{identityProvider:v.identityProvider&&{getId:e=>v.identityProvider.getId(e.element)},dnd:v.dnd&&new y(m,v.dnd),multipleSelectionController:v.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>v.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>v.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:v.accessibilityProvider&&Object.assign(Object.assign({},v.accessibilityProvider),{getSetSize(e){ const t=m(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:v.accessibilityProvider&&v.accessibilityProvider.isChecked?e=>v.accessibilityProvider.isChecked(e.element):void 0,getRole:v.accessibilityProvider&&v.accessibilityProvider.getRole?e=>v.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>v.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>v.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:v.accessibilityProvider&&v.accessibilityProvider.getWidgetRole?()=>v.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:v.accessibilityProvider&&v.accessibilityProvider.getAriaLevel?e=>v.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:v.accessibilityProvider.getActiveDescendantId&&(e=>v.accessibilityProvider.getActiveDescendantId(e.element))}), keyboardNavigationLabelProvider:v.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},v.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>v.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:v.simpleKeyboardNavigation}))),{tree:this})),this.model=this.createModel(e,this.view,c),h.input=this.model.onDidChangeCollapseState;const f=s.Event.forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})});if(f(()=>null,null,this.disposables),u.input=s.Event.chain(s.Event.any(f,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==c.keyboardSupport){const e=s.Event.chain(this.view.onKeyDown).filter(e=>!n.isInputElement(e.target)).map(e=>new r.StandardKeyboardEvent(e)) ;e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}if(c.keyboardNavigationLabelProvider){const e=c.keyboardNavigationDelegate||n.DefaultKeyboardNavigationDelegate;this.typeFilterController=new D(this,this.model,this.view,p,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=o.createStyleSheet(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===E.Always)}get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseClick(){return s.Event.map(this.view.onMouseClick,T)}get onMouseDblClick(){return s.Event.map(this.view.onMouseDblClick,T)} get onContextMenu(){return s.Event.map(this.view.onContextMenu,R)}get onTap(){return s.Event.map(this.view.onTap,T)}get onPointer(){return s.Event.map(this.view.onPointer,T)}get onKeyDown(){return this.view.onKeyDown}get onKeyUp(){return this.view.onKeyUp}get onKeyPress(){return this.view.onKeyPress}get onDidFocus(){return this.view.onDidFocus}get onDidBlur(){return this.view.onDidBlur}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get filterOnType(){return!!this._options.filterOnType}get onDidChangeTypeFilterPattern(){return this.typeFilterController?this.typeFilterController.onDidChangePattern:s.Event.None}get expandOnlyOnDoubleClick(){var e;return null!==(e=this._options.expandOnlyOnDoubleClick)&&void 0!==e&&e}get expandOnlyOnTwistieClick(){return void 0!==this._options.expandOnlyOnTwistieClick&&this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){ this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===E.Always)}get options(){return this._options}updateWidth(e){const t=this.model.getListIndex(e);-1!==t&&this.view.updateWidth(t)}getHTMLElement(){return this.view.getHTMLElement()}get contentHeight(){return this.typeFilterController&&this.typeFilterController.filterOnType&&this.typeFilterController.empty?100:this.view.contentHeight}get onDidChangeContentHeight(){let e=this.view.onDidChangeContentHeight ;return this.typeFilterController&&(e=s.Event.any(e,s.Event.map(this.typeFilterController.onDidChangeEmptyState,()=>this.contentHeight))),e}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollLeft(){return this.view.scrollLeft}set scrollLeft(e){this.view.scrollLeft=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleElement(){const e=this.view.firstVisibleIndex;if(!(e<0||e>=this.view.length))return this.view.element(e).element}get lastVisibleElement(){const e=this.view.lastVisibleIndex;return this.view.element(e).element}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.view.domFocus()}isDOMFocused(){return this.getHTMLElement()===document.activeElement}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[] ;e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}expandAll(){this.model.setCollapsed(this.model.rootRef,!1,!0)}collapseAll(){this.model.setCollapsed(this.model.rootRef,!0,!0)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)} isCollapsed(e){return this.model.isCollapsed(e)}toggleKeyboardNavigation(){this.view.toggleKeyboardNavigation(),this.typeFilterController&&this.typeFilterController.toggle()}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);const n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);const n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=this.focusNavigationFilter){this.view.focusNextPage(e,t)}focusPreviousPage(e,t=this.focusNavigationFilter){this.view.focusPreviousPage(e,t)}focusLast(e,t=this.focusNavigationFilter){this.view.focusLast(e,t)} focusFirst(e,t=this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(e=>e.visible))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation() ;const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}navigate(e){return new N(this.view,this.model,e)}dispose(){i.dispose(this.disposables),this.view.dispose()}};class N{constructor(e,t,i){this.view=e,this.model=t,this.index=i?this.model.getListIndex(i):-1}current(){return this.index<0||this.index>=this.view.length?null:this.view.element(this.index).element}previous(){return this.index--,this.current()}next(){return this.index++,this.current()}first(){return this.index=0,this.current()}last(){return this.index=this.view.length-1,this.current()}}})),define(e[550],t([0,1,414,229,339,96]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataTree=void 0;class r extends i.AbstractTree{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.nodesByIdentity=new Map,this.identityProvider=s.identityProvider}getInput(){return this.input} setInput(e,t){if(t&&!this.identityProvider)throw new n.TreeError(this.user,"Can't restore tree view state without an identity provider");if(this.input=e,!t)return void this._refresh(e);const i=[],o=[];this._refresh(e,e=>{const i=this.identityProvider.getId(e).toString();return-1===t.expanded.indexOf(i)},e=>{const n=this.identityProvider.getId(e.element).toString();t.focus.indexOf(n)>-1&&i.push(e.element),t.selection.indexOf(n)>-1&&o.push(e.element)}),this.setFocus(i),this.setSelection(o),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}updateChildren(e=this.input){if(void 0===this.input)throw new n.TreeError(this.user,"Tree input not set");let t;this.identityProvider&&(t=e=>{const t=this.identityProvider.getId(e).toString(),i=this.nodesByIdentity.get(t);if(i)return i.collapsed}),this._refresh(e,t)}resort(e=this.input,t=!0){this.model.resort(e===this.input?null:e,t)}refresh(e){void 0!==e?this.model.rerender(e):this.view.rerender()}_refresh(e,t,i){let n;if(this.identityProvider){const e=new Set,t=i ;i=i=>{const n=this.identityProvider.getId(i.element).toString();e.add(n),this.nodesByIdentity.set(n,i),t&&t(i)},n=t=>{const i=this.identityProvider.getId(t.element).toString();e.has(i)||this.nodesByIdentity.delete(i)}}this.model.setChildren(e===this.input?null:e,this.iterate(e,t).elements,i,n)}iterate(e,t){const i=[...this.dataSource.getChildren(e)];return{elements:s.Iterable.map(i,e=>{const{elements:i,size:n}=this.iterate(e,t);return{element:e,children:i,collapsible:this.dataSource.hasChildren?this.dataSource.hasChildren(e):void 0,collapsed:0===n?void 0:t&&t(e)}}),size:i.length}}createModel(e,t,i){return new o.ObjectTreeModel(e,t,i)}getViewState(){if(!this.identityProvider)throw new n.TreeError(this.user,"Can't get tree view state without an identity provider");const e=e=>this.identityProvider.getId(e).toString(),t=this.getFocus().map(e),i=this.getSelection().map(e),o=[],s=this.model.getNode(),r=[s];for(;r.length>0;){const t=r.shift();t!==s&&t.collapsible&&!t.collapsed&&o.push(e(t.element)), r.push(...t.children)}return{focus:t,selection:i,expanded:o,scrollTop:this.scrollTop}}}t.DataTree=r})),define(e[415],t([0,1,96,414,339,722,95]),(function(e,t,i,n,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompressibleObjectTree=t.ObjectTree=void 0;class l extends n.AbstractTree{constructor(e,t,i,n,o={}){super(e,t,i,n,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=i.Iterable.empty()){this.model.setChildren(e,t)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}updateElementHeight(e,t){this.model.updateElementHeight(e,t)}resort(e,t=!0){this.model.resort(e,t)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new s.ObjectTreeModel(e,t,i)}}t.ObjectTree=l;class c{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){ return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}o([a.memoize],c.prototype,"compressedTreeNodeProvider",null);t.CompressibleObjectTree=class extends l{constructor(e,t,i,n,o={}){const s=()=>this;super(e,t,i,n.map(e=>new c(s,e)),function(e,t){return t&&Object.assign(Object.assign({},t),{ keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=i.Iterable.empty()){this.model.setChildren(e,t)}createModel(e,t,i){return new r.CompressibleObjectTreeModel(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}})),define(e[416],t([0,1,414,415,229,2,6,15,96,257,21,390,509]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";function g(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})} function p(e,t){return!!t.parent&&(t.parent===e||p(e,t.parent))}Object.defineProperty(t,"__esModule",{value:!0}),t.CompressibleAsyncDataTree=t.AsyncDataTree=void 0;class m{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new m(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class v{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){ return e.slow?t.classList.add(...u.treeItemLoadingIcon.classNamesArray):t.classList.remove(...u.treeItemLoadingIcon.classNamesArray),!1}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function f(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function S(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}function b(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,anchor:e.anchor}}class _ extends c.ElementsDragAndDropData{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}set context(e){this.data.context=e}get context(){return this.data.context}}function C(e){return e instanceof c.ElementsDragAndDropData?new _(e):e}class y{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){ if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(C(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(C(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(C(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function w(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new y(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0, getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element) }),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function E(e,t){t(e),e.children.forEach(e=>E(e,t))}class I{constructor(e,t,i,n,a,l={}){this.user=e,this.dataSource=a,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.Emitter,this._onDidChangeNodeSlowState=new r.Emitter,this.nodeMapper=new o.WeakMapper(e=>new m(e)),this.disposables=new s.DisposableStore,this.identityProvider=l.identityProvider,this.autoExpandSingleChildren=void 0!==l.autoExpandSingleChildren&&l.autoExpandSingleChildren,this.sorter=l.sorter,this.collapseByDefault=l.collapseByDefault,this.tree=this.createTree(e,t,i,n,l),this.root=g({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root), this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.Event.map(this.tree.onDidChangeFocus,f)}get onDidChangeSelection(){return r.Event.map(this.tree.onDidChangeSelection,f)}get onKeyDown(){return this.tree.onKeyDown}get onMouseClick(){return r.Event.map(this.tree.onMouseClick,S)}get onMouseDblClick(){return r.Event.map(this.tree.onMouseDblClick,S)}get onContextMenu(){return r.Event.map(this.tree.onContextMenu,b)}get onTap(){return r.Event.map(this.tree.onTap,S)}get onPointer(){return r.Event.map(this.tree.onPointer,S)}get onDidFocus(){return this.tree.onDidFocus}get onDidBlur(){return this.tree.onDidBlur}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidUpdateOptions(){return this.tree.onDidUpdateOptions}get filterOnType(){return this.tree.filterOnType}get expandOnlyOnTwistieClick(){ if("boolean"==typeof this.tree.expandOnlyOnTwistieClick)return this.tree.expandOnlyOnTwistieClick;const e=this.tree.expandOnlyOnTwistieClick;return t=>e(this.nodes.get(t===this.root.element?null:t)||null)}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,o,s,r){const a=new i.ComposedTreeDelegate(o),l=s.map(e=>new v(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),c=w(r)||{};return new n.ObjectTree(e,t,a,l,c)}updateOptions(e={}){this.tree.updateOptions(e)}get options(){return this.tree.options}getHTMLElement(){return this.tree.getHTMLElement()}get contentHeight(){return this.tree.contentHeight}get onDidChangeContentHeight(){return this.tree.onDidChangeContentHeight}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollLeft(){return this.tree.scrollLeft}set scrollLeft(e){this.tree.scrollLeft=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}get lastVisibleElement(){ return this.tree.lastVisibleElement.element}get ariaLabel(){return this.tree.ariaLabel}set ariaLabel(e){this.tree.ariaLabel=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async updateChildren(e=this.root.element,t=!0,i=!1){await this._updateChildren(e,t,i)}async _updateChildren(e=this.root.element,t=!0,i=!1,n){if(void 0===this.root.element)throw new o.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Event.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,n),i)try{this.tree.rerender(s) }catch(e){}}resort(e=this.root.element,t=!0){this.tree.resort(this.getDataNode(e),t)}hasNode(e){return e===this.root.element||this.nodes.has(e)}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}updateWidth(e){const t=this.getDataNode(e);this.tree.updateWidth(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(void 0===this.root.element)throw new o.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Event.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await r.Event.toPromise(this._onDidRender.event)), i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await r.Event.toPromise(this._onDidRender.event)),n}toggleCollapsed(e,t=!1){return this.tree.toggleCollapsed(this.getDataNode(e),t)}expandAll(){this.tree.expandAll()}collapseAll(){this.tree.collapseAll()}isCollapsible(e){return this.tree.isCollapsible(this.getDataNode(e))}isCollapsed(e){return this.tree.isCollapsed(this.getDataNode(e))}toggleKeyboardNavigation(){this.tree.toggleKeyboardNavigation()}refilter(){this.tree.refilter()}setSelection(e,t){const i=e.map(e=>this.getDataNode(e));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(e=>e.element)}setFocus(e,t){const i=e.map(e=>this.getDataNode(e));this.tree.setFocus(i,t)}focusNext(e=1,t=!1,i){this.tree.focusNext(e,t,i)}focusPrevious(e=1,t=!1,i){this.tree.focusPrevious(e,t,i)}focusNextPage(e){this.tree.focusNextPage(e)}focusPreviousPage(e){ this.tree.focusPreviousPage(e)}focusLast(e){this.tree.focusLast(e)}focusFirst(e){this.tree.focusFirst(e)}getFocus(){return this.tree.getFocus().map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getRelativeTop(e){return this.tree.getRelativeTop(this.getDataNode(e))}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new o.TreeError(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i){await this.refreshNode(e,t,i),this.render(e,i)}async refreshNode(e,t,i){let n;return this.subTreeRefreshPromises.forEach((o,s)=>{!n&&function(e,t){return e===t||p(e,t)||p(t,e)}(s,e)&&(n=o.then(()=>this.refreshNode(e,t,i)))}),n||this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){let n ;e.refreshPromise=new Promise(e=>n=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const o=await this.doRefreshNode(e,t,i);e.stale=!1,await Promise.all(o.map(e=>this.doRefreshSubTree(e,t,i)))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=a.timeout(800);t.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),n=this.doGetChildren(e).finally(()=>t.cancel())}else n=Promise.resolve(l.Iterable.empty());try{const o=await n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.collapse(e===this.root?null:e),d.isPromiseCanceledError(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=a.createCancelablePromise(async()=>{const t=await this.dataSource.getChildren(e.element);return this.processChildren(t)}), this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(d.onUnexpectedError))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)if(s.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);r.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map(t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=g({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach(e=>E(e,e=>this.nodes.delete(e.element))), e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const d=g({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d});for(const e of s.values())E(e,e=>this.nodes.delete(e.element));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t){const i=e.children.map(e=>this.asTreeElement(e,t));this.tree.setChildren(e===this.root?null:e,i),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){ if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?l.Iterable.map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}getViewState(){if(!this.identityProvider)throw new o.TreeError(this.user,"Can't get tree view state without an identity provider");const e=e=>this.identityProvider.getId(e).toString(),t=this.getFocus().map(e),i=this.getSelection().map(e),n=[],s=this.tree.getNode(),r=[s];for(;r.length>0;){const t=r.shift();t!==s&&t.collapsible&&!t.collapsed&&n.push(e(t.element.element)),r.push(...t.children)}return{focus:t,selection:i,expanded:n,scrollTop:this.scrollTop}}dispose(){this.disposables.dispose()}}t.AsyncDataTree=I;class x{constructor(e){this.node=e}get element(){return{ elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new x(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class k{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)} renderTwistie(e,t){return e.slow?t.classList.add(...u.treeItemLoadingIcon.classNamesArray):t.classList.remove(...u.treeItemLoadingIcon.classNamesArray),!1}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=s.dispose(this.disposables)}}t.CompressibleAsyncDataTree=class extends I{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new o.WeakMapper(e=>new x(e)),this.filter=a.filter}createTree(e,t,o,s,r){const a=new i.ComposedTreeDelegate(o),l=s.map(e=>new k(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),c=function(e){const t=e&&w(e) ;return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))})})}(r)||{};return new n.CompressibleObjectTree(e,t,a,l,c)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}getViewState(){if(!this.identityProvider)throw new o.TreeError(this.user,"Can't get tree view state without an identity provider");const e=e=>this.identityProvider.getId(e).toString(),t=this.getFocus().map(e),i=this.getSelection().map(e),n=[],s=this.tree.getCompressedTreeNode(),r=[s];for(;r.length>0;){const t=r.shift();if(t!==s&&t.collapsible&&!t.collapsed)for(const i of t.element.elements)n.push(e(i.element));r.push(...t.children)}return{focus:t, selection:i,expanded:n,scrollTop:this.scrollTop}}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const d=e=>{const t=e.element;if(t)for(let e=0;e{const t=function(e){ return"boolean"==typeof e?e?1:0:h.isFilterResult(e)?h.getVisibleState(e.visibility):h.getVisibleState(e)}(this.filter.filter(e,1));if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t})),super.processChildren(e)}}})),define(e[952],t([3,4]),(function(e,t){return e.create("vs/base/browser/ui/tree/treeDefaults",t)})),define(e[551],t([0,1,952,30]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollapseAllAction=void 0;class o extends n.Action{constructor(e,t){super("vs.tree.collapse",i.localize(0,null),"collapse-all",t),this.viewer=e}async run(){this.viewer.collapseAll(),this.viewer.setSelection([]),this.viewer.setFocus([]),this.viewer.domFocus(),this.viewer.focusFirst()}}t.CollapseAllAction=o})),define(e[953],t([3,4]),(function(e,t){return e.create("vs/base/common/date",t)})),define(e[198],t([0,1,24,953]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.toLocalISOString=t.fromNow=void 0;const o=60,s=60*o,r=24*s,a=7*r,l=30*r,c=365*r;t.fromNow=function e(t,i){"number"!=typeof t&&(t=t.getTime());const d=Math.round(((new Date).getTime()-t)/1e3);if(d<-30)return n.localize(0,null,e((new Date).getTime()+1e3*d,!1));if(d<30)return n.localize(1,null);let h;return d1?i.localize(4,null,s,n.length):s}if(n.isString(t))return t;if(t.detail){const e=t.detail;if(e.error)return s(e.error,r);if(e.exception)return s(e.exception,r)}return t.stack?s(t,r):t.message?t.message:i.localize(5,null)}})),define(e[955],t([3,4]),(function(e,t){return e.create("vs/base/common/jsonErrorMessages",t)})),define(e[347],t([0,1,955]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParseErrorMessage=void 0,t.getParseErrorMessage=function(e){switch(e){case 1:return i.localize(0,null);case 2:return i.localize(1,null);case 3:return i.localize(2,null);case 4:return i.localize(3,null);case 5:return i.localize(4,null);case 6:return i.localize(5,null);case 7:return i.localize(6,null);case 8:return i.localize(7,null);case 9:return i.localize(8,null);default:return""}}})),define(e[956],t([3,4]),(function(e,t){ return e.create("vs/base/common/keybindingLabels",t)})),define(e[303],t([0,1,956]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserSettingsLabelProvider=t.ElectronAcceleratorLabelProvider=t.AriaLabelProvider=t.UILabelProvider=t.ModifierLabelProvider=void 0;class n{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let s=0,r=t.length;s{t.checkbox.offsetParent||e.preventDefault()})),t.checkbox=i.append(n,_("input.quick-input-list-checkbox")), t.checkbox.type="checkbox",t.toDisposeTemplate.push(i.addStandardDisposableListener(t.checkbox,i.EventType.CHANGE,e=>{t.element.checked=t.checkbox.checked}));const o=i.append(n,_(".quick-input-list-rows")),s=i.append(o,_(".quick-input-list-row")),r=i.append(o,_(".quick-input-list-row"));t.label=new c.IconLabel(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportCodicons:!0});const a=i.append(s,_(".quick-input-list-entry-keybinding"));t.keybinding=new S.KeybindingLabel(a,g.OS);const l=i.append(r,_(".quick-input-list-label-meta"));return t.detail=new d.HighlightedLabel(l,!0),t.separator=i.append(t.entry,_(".quick-input-list-separator")),t.actionBar=new p.ActionBar(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=n.dispose(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(e=>i.checkbox.checked=e)) ;const{labelHighlights:o,descriptionHighlights:s,detailHighlights:r}=e,a=Object.create(null);a.matches=o||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((t,i)=>{let n=t.iconClass||(t.iconPath?v.getIconClass(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new m.Action(`id-${i}`,"",n,!0,()=>(e.fireButtonTriggered({button:t,item:e.item}),Promise.resolve()));return o.tooltip=t.tooltip||"",o}),{icon:!0,label:!1}), i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=n.dispose(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=n.dispose(e.toDisposeElement),e.toDisposeTemplate=n.dispose(e.toDisposeTemplate)}}y.ID="listelement";class w{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return y.ID}}var E;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(E=t.QuickInputListFocus||(t.QuickInputListFocus={}));class I{constructor(e,t,n){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new a.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new a.Emitter, this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new a.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new a.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new a.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new a.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new a.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=i.append(this.parent,_(".quick-input-list"));const o=new w,s=new x;this.list=n.createList("QuickInput",this.container,o,[new y],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(e=>{const t=new l.StandardKeyboardEvent(e) ;switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(g.isMacintosh?e.metaKey:e.ctrlKey)&&this.list.setFocus(u.range(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const i=this.list.getFocus();1===i.length&&i[0]===this.list.length-1&&this._onLeave.fire()}this._onKeyDown.fire(t)})),this.disposables.push(this.list.onMouseDown(e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()})),this.disposables.push(i.addDisposableListener(this.container,i.EventType.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(e=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)} get onDidChangeFocus(){return a.Event.map(this.list.onDidChangeFocus,e=>e.elements.map(e=>e.item))}get onDidChangeSelection(){return a.Event.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(e=>e.item),event:e.browserEvent}))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=n.dispose(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce((i,n,o)=>{var r,a,l;if("separator"!==n.type){ const c=o&&e[o-1],d=n.label&&n.label.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),u=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[d,h,u].map(e=>e&&s.parseCodicons(e).text).filter(e=>!!e).join(", ");i.push(new C({index:o,item:n,saneLabel:d,saneAriaLabel:g,saneDescription:h,saneDetail:u,labelHighlights:null===(r=n.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(a=n.highlights)||void 0===a?void 0:a.description,detailHighlights:null===(l=n.highlights)||void 0===l?void 0:l.detail,checked:!1,separator:c&&"separator"===c.type?c:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(e=>e.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((e,t,i)=>(e.set(t.item,i),e),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getElementsCount(){ return this.inputElements.length}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}getSelectedElements(){return this.list.getSelectedElements().map(e=>e.item)}setSelectedElements(e){this.list.setSelection(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return ;switch(e===E.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=E.First),e===E.Previous&&0===this.list.getFocus()[0]&&(e=E.Last),e===E.Second&&this.list.length<2&&(e=E.First),e){case E.First:this.list.focusFirst();break;case E.Second:this.list.focusNth(1);break;case E.Last:this.list.focusLast();break;case E.Next:this.list.focusNext();break;case E.Previous:this.list.focusPrevious();break;case E.NextPage:this.list.focusNextPage();break;case E.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;(e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)?this.elements.forEach(t=>{ const i=this.matchOnLabel?f.withNullAsUndefined(s.matchesFuzzyCodiconAware(e,s.parseCodicons(t.saneLabel))):void 0,n=this.matchOnDescription?f.withNullAsUndefined(s.matchesFuzzyCodiconAware(e,s.parseCodicons(t.saneDescription||""))):void 0,o=this.matchOnDetail?f.withNullAsUndefined(s.matchesFuzzyCodiconAware(e,s.parseCodicons(t.saneDetail||""))):void 0;i||n||o?(t.labelHighlights=i,t.descriptionHighlights=n,t.detailHighlights=o,t.hidden=!1):(t.labelHighlights=void 0,t.descriptionHighlights=void 0,t.detailHighlights=void 0,t.hidden=!t.item.alwaysShow),t.separator=void 0}):this.elements.forEach(e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0});const t=this.elements.filter(e=>!e.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((e,t)=>(function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];if(n.length&&!o.length)return-1 ;if(!n.length&&o.length)return 1;if(0===n.length&&0===o.length)return 0;return r.compareAnything(e.saneLabel,t.saneLabel,i)})(e,t,i))}return this.elementsToIndexes=t.reduce((e,t,i)=>(e.set(t.item,i),e),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=n.dispose(this.elementDisposables),this.disposables=n.dispose(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()), this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}o([h.memoize],I.prototype,"onDidChangeFocus",null),o([h.memoize],I.prototype,"onDidChangeSelection",null),t.QuickInputList=I;class x{getWidgetAriaLabel(){return b.localize(0,null)}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}})),define(e[960],t([0,1,512,7,31,959,947,74,957,213,214,6,174,2,97,78,30,14,15,524,44,343]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickInputController=void 0;const C=n.$,y={iconClass:_.registerIcon("quick-input-back",_.Codicon.arrowLeft).classNames,tooltip:l.localize(0,null),handle:-1};class w extends g.Disposable{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1, this.onDidTriggerButtonEmitter=this._register(new h.Emitter),this.onDidHideEmitter=this._register(new h.Emitter),this.onDisposeEmitter=this._register(new h.Emitter),this.visibleDisposables=this._register(new g.DisposableStore),this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDispose=this.onDisposeEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){ this._ignoreFocusOut=e,this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire()}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new S.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)), !this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter(e=>e===y);this.ui.leftActionBar.push(e.map((e,t)=>{const i=new v.Action(`id-${t}`,"",e.iconClass||b.getIconClass(e.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(e)});return i.tooltip=e.tooltip||"",i}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter(e=>e!==y);this.ui.rightActionBar.push(t.map((e,t)=>{const i=new v.Action(`id-${t}`,"",e.iconClass||b.getIconClass(e.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(e)});return i.tooltip=e.tooltip||"",i}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey)}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""} getSteps(){return this.step&&this.totalSteps?l.localize(1,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e===p.default.Error){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class E extends w{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new h.Emitter),this.onDidAcceptEmitter=this._register(new h.Emitter),this.onDidCustomEmitter=this._register(new h.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1, this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?i.ItemActivation.NONE:i.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new h.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new h.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new h.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidCustom=this.onDidCustomEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event, this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value=e||"",this.update()}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel }set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?i.NO_KEY_MODS:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){ return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}inputHasFocus(){return!!this.visible&&this.ui.inputBox.hasFocus()}focusOnInput(){this.ui.inputBox.setFocus()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}get hideCheckAll(){return!!this._hideCheckAll}set hideCheckAll(e){this._hideCheckAll=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(s.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus() })),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(s.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),n.EventHelper.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(s.QuickInputListFocus.Previous):this.ui.list.focus(s.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),n.EventHelper.stop(e,!0);break;case 12:this.ui.list.focus(s.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),n.EventHelper.stop(e,!0);break;case 11:this.ui.list.focus(s.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),n.EventHelper.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!0}));break;case 14: !e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(s.QuickInputListFocus.First),n.EventHelper.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(s.QuickInputListFocus.Last),n.EventHelper.stop(e,!0))}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.onDidAcceptEmitter.fire({inBackground:!1})})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&f.equals(e,this._activeItems,(e,t)=>e===t)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{ this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&f.equals(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.onDidAcceptEmitter.fire({inBackground:t instanceof MouseEvent&&1===t.button}))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&f.equals(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}registerQuickNavigation(){return n.addDisposableListener(this.ui.container,n.EventType.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new a.StandardKeyboardEvent(e),i=t.keyCode ;this._quickNavigate.keybindings.some(e=>{const[n,o]=e.getParts();return!o&&(n.shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n.altKey||6!==i)||(!(!n.ctrlKey||5!==i)||!(!n.metaKey||57!==i)))})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!1})),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=!1,t=!1;this._hideInput&&this._items.length>0&&(this.ui.isScreenReaderOptimized()?t=!0:e=!0),this.ui.container.classList.toggle("hidden-input",e&&!this.description);const n={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};if(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||""),t)this.ui.inputBox.ariaLabel="";else{const e=this.ariaLabel||this.placeholder||E.DEFAULT_ARIA_LABEL;this.ui.inputBox.ariaLabel!==e&&(this.ui.inputBox.ariaLabel=e)}if(this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()), this._itemActivation){case i.ItemActivation.NONE:this._itemActivation=i.ItemActivation.FIRST;break;case i.ItemActivation.SECOND:this.ui.list.focus(s.QuickInputListFocus.Second),this._itemActivation=i.ItemActivation.FIRST;break;case i.ItemActivation.LAST:this.ui.list.focus(s.QuickInputListFocus.Last),this._itemActivation=i.ItemActivation.FIRST;break;default:this.trySelectFirst()}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.validationMessage?(this.ui.message.textContent=this.validationMessage,this.showMessageDecoration(p.default.Error)):(this.ui.message.textContent=null,this.showMessageDecoration(p.default.Ignore)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(s.QuickInputListFocus.First))}}E.DEFAULT_ARIA_LABEL=l.localize(2,null);class I extends w{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.noValidationMessage=I.noPromptMessage,this.onDidValueChangeEmitter=this._register(new h.Emitter),this.onDidAcceptEmitter=this._register(new h.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"", this.update()}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}get prompt(){return this._prompt}set prompt(e){this._prompt=e,this.noValidationMessage=e?l.localize(4,null,e):I.noPromptMessage,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0};this.ui.setVisibilities(e), 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),this.validationMessage||this.ui.message.textContent===this.noValidationMessage||(this.ui.message.textContent=this.noValidationMessage,this.showMessageDecoration(p.default.Ignore)),this.validationMessage&&this.ui.message.textContent!==this.validationMessage&&(this.ui.message.textContent=this.validationMessage,this.showMessageDecoration(p.default.Error))}}I.noPromptMessage=l.localize(3,null);class x extends g.Disposable{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new h.Emitter), this.onDidCustomEmitter=this._register(new h.Emitter),this.onDidTriggerButtonEmitter=this._register(new h.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new h.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new h.Emitter),this.onHide=this.onHideEmitter.event,this.backButton=y,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(n.addDisposableListener(window,n.EventType.KEY_DOWN,e,!0)),this._register(n.addDisposableListener(window,n.EventType.KEY_UP,e,!0)),this._register(n.addDisposableListener(window,n.EventType.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=n.append(this.parentElement,C(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none" ;const t=n.createStyleSheet(e),i=n.append(e,C(".quick-input-titlebar")),o=this._register(new m.ActionBar(i));o.domNode.classList.add("quick-input-left-action-bar");const h=n.append(i,C(".quick-input-title")),g=this._register(new m.ActionBar(i));g.domNode.classList.add("quick-input-right-action-bar");const p=n.append(e,C(".quick-input-description")),v=n.append(e,C(".quick-input-header")),f=n.append(v,C("input.quick-input-check-all"));f.type="checkbox",this._register(n.addStandardDisposableListener(f,n.EventType.CHANGE,e=>{const t=f.checked;O.setAllVisibleChecked(t)})),this._register(n.addDisposableListener(f,n.EventType.CLICK,e=>{(e.x||e.y)&&y.setFocus()}));const S=n.append(v,C(".quick-input-description")),b=n.append(v,C(".quick-input-and-message")),_=n.append(b,C(".quick-input-filter")),y=this._register(new r.QuickInputBox(_));y.setAttribute("aria-describedby",`${this.idPrefix}message`);const w=n.append(_,C(".quick-input-visible-count"));w.setAttribute("aria-live","polite"), w.setAttribute("aria-atomic","true");const I=new c.CountBadge(w,{countFormat:l.localize(5,null)}),x=n.append(_,C(".quick-input-count"));x.setAttribute("aria-live","polite");const k=new c.CountBadge(x,{countFormat:l.localize(6,null)}),D=n.append(v,C(".quick-input-action")),T=new u.Button(D);T.label=l.localize(7,null),this._register(T.onDidClick(e=>{this.onDidAcceptEmitter.fire()}));const R=n.append(v,C(".quick-input-action")),A=new u.Button(R);A.label=l.localize(8,null),this._register(A.onDidClick(e=>{this.onDidCustomEmitter.fire()}));const M=n.append(b,C(`#${this.idPrefix}message.quick-input-message`)),L=new d.ProgressBar(e);L.getContainer().classList.add("quick-input-progress");const O=this._register(new s.QuickInputList(e,this.idPrefix+"list",this.options));this._register(O.onChangedAllVisibleChecked(e=>{f.checked=e})),this._register(O.onChangedVisibleCount(e=>{I.setCount(e)})),this._register(O.onChangedCheckedCount(e=>{k.setCount(e)})),this._register(O.onLeave(()=>{setTimeout(()=>{y.setFocus(), this.controller instanceof E&&this.controller.canSelectMany&&O.clearFocus()},0)})),this._register(O.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const N=n.trackFocus(e);return this._register(N),this._register(n.addDisposableListener(e,n.EventType.FOCUS,e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0},!0)),this._register(N.onDidBlur(()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(),this.previousFocusElement=void 0})),this._register(n.addDisposableListener(e,n.EventType.FOCUS,e=>{y.setFocus()})),this._register(n.addDisposableListener(e,n.EventType.KEY_DOWN,t=>{const i=new a.StandardKeyboardEvent(t);switch(i.keyCode){case 3:n.EventHelper.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:n.EventHelper.stop(t,!0),this.hide();break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const o=[".action-label.codicon"] ;e.classList.contains("show-checkboxes")?o.push("input"):o.push("input[type=text]"),this.getUI().list.isDisplayed()&&o.push(".monaco-list");const s=e.querySelectorAll(o.join(", "));i.shiftKey&&i.target===s[0]?(n.EventHelper.stop(t,!0),s[s.length-1].focus()):i.shiftKey||i.target!==s[s.length-1]||(n.EventHelper.stop(t,!0),s[0].focus())}}})),this.ui={container:e,styleSheet:t,leftActionBar:o,titleBar:i,title:h,description1:p,description2:S,rightActionBar:g,checkAll:f,filterContainer:_,inputBox:y,visibleCountContainer:w,visibleCount:I,countContainer:x,count:k,okContainer:D,ok:T,message:M,customButtonContainer:R,customButton:A,progressBar:L,list:O,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e), setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=o.CancellationToken.None){return new Promise((n,o)=>{let s=e=>{s=n,t.onKeyMods&&t.onKeyMods(r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept(()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}}),r.onDidChangeActive(e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)}),r.onDidChangeSelection(e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}}),r.onDidTriggerItemButton(e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice();e.splice(t,1),r.items=e}}}))),r.onDidChangeValue(e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a]) }),i.onCancellationRequested(()=>{r.hide()}),r.onDidHide(()=>{g.dispose(l),s(void 0)})];r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then(([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter(e=>"separator"!==e.type&&e.picked)),a&&(r.activeItems=[a])}),r.show(),Promise.resolve(e).then(void 0,e=>{o(e),r.hide()})})}input(e={},t=o.CancellationToken.None){return new Promise(i=>{if(t.isCancellationRequested)return void i(void 0);const n=this.createInputBox(),o=e.validateInput||(()=>Promise.resolve(void 0)),s=h.Event.debounce(n.onDidChangeValue,(e,t)=>t,100);let r=e.value||"",a=Promise.resolve(o(r));const l=[n,s(e=>{e!==r&&(a=Promise.resolve(o(e)), r=e),a.then(t=>{e===r&&(n.validationMessage=t||void 0)})}),n.onDidAccept(()=>{const e=n.value;e!==r&&(a=Promise.resolve(o(e)),r=e),a.then(t=>{t?e===r&&(n.validationMessage=t):(i(e),n.hide())})}),t.onCancellationRequested(()=>{n.hide()}),n.onDidHide(()=>{g.dispose(l),i(void 0)})];n.value=e.value||"",n.valueSelection=e.valueSelection,n.prompt=e.prompt,n.placeholder=e.placeHolder,n.password=!!e.password,n.ignoreFocusOut=!!e.ignoreFocusLost,n.show()})}createQuickPick(){const e=this.getUI();return new E(e)}createInputBox(){const e=this.getUI();return new I(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(p.default.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),t.message.textContent="", t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();y.tooltip=n?l.localize(9,null,n):l.localize(10,null),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none", t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}} hide(){var e;const t=this.controller;if(t){const i=!(null===(e=this.ui)||void 0===e?void 0:e.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",i||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),t.didHide()}}focus(){this.isDisplayed()&&this.getUI().inputBox.setFocus()}toggle(){this.isDisplayed()&&this.controller instanceof E&&this.controller.canSelectMany&&this.getUI().list.toggleCheckbox()}navigate(e,t){this.isDisplayed()&&this.getUI().list.isDisplayed()&&(this.getUI().list.focus(e?s.QuickInputListFocus.Next:s.QuickInputListFocus.Previous),t&&this.controller instanceof E&&(this.controller.quickNavigate=t))}async accept(e={alt:!1,ctrlCmd:!1}){this.keyMods.alt=e.alt,this.keyMods.ctrlCmd=e.ctrlCmd,this.onDidAcceptEmitter.fire()}async back(){this.onDidTriggerButtonEmitter.fire(this.backButton)}async cancel(){ this.hide()}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,x.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 5px 8px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button), this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const s=[];this.styles.list.listInactiveFocusForeground&&(s.push(`.monaco-list .monaco-list-row.focused { color: ${this.styles.list.listInactiveFocusForeground}; }`),s.push(`.monaco-list .monaco-list-row.focused:hover { color: ${this.styles.list.listInactiveFocusForeground}; }`)),this.styles.list.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`);const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}isDisplayed(){return this.ui&&"none"!==this.ui.container.style.display}}t.QuickInputController=x,x.MAX_WIDTH=600})),define(e[961],t([3,4]),(function(e,t){ return e.create("vs/editor/browser/controller/coreCommands",t)})),define(e[962],t([3,4]),(function(e,t){return e.create("vs/editor/browser/controller/textAreaHandler",t)})),define(e[963],t([3,4]),(function(e,t){return e.create("vs/editor/browser/editorExtensions",t)})),define(e[964],t([3,4]),(function(e,t){return e.create("vs/editor/browser/widget/codeEditorWidget",t)})),define(e[965],t([3,4]),(function(e,t){return e.create("vs/editor/browser/widget/diffEditorWidget",t)})),define(e[966],t([3,4]),(function(e,t){return e.create("vs/editor/browser/widget/diffReview",t)})),define(e[967],t([3,4]),(function(e,t){return e.create("vs/editor/browser/widget/inlineDiffMargin",t)})),define(e[968],t([0,1,967,7,30,2,18,44]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineDiffMargin=void 0;class l extends s.Disposable{constructor(e,t,s,l,c,d){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=s,this.diff=l,this._contextMenuService=c,this._clipboardService=d, this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=a.Codicon.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const h=s.getOption(51),u=s.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 g=[];g.push(new o.Action("diff.clipboard.copyDeletedContent",l.originalEndLineNumber>l.modifiedStartLineNumber?i.localize(0,null):i.localize(1,null),void 0,!0,async()=>{await this._clipboardService.writeText(l.originalContent.join(u)+u)}));let p=0,m=void 0;l.originalEndLineNumber>l.modifiedStartLineNumber&&(m=new o.Action("diff.clipboard.copyDeletedLineContent",i.localize(2,null,l.originalStartLineNumber),void 0,!0,async()=>{await this._clipboardService.writeText(l.originalContent[p])}),g.push(m)), s.getOption(72)||g.push(new o.Action("diff.inline.revertChange",i.localize(3,null),void 0,!0,async()=>{if(0===l.modifiedEndLineNumber){const e=s.getModel().getLineMaxColumn(l.modifiedStartLineNumber);s.executeEdits("diffEditor",[{range:new r.Range(l.modifiedStartLineNumber,e,l.modifiedStartLineNumber,e),text:u+l.originalContent.join(u)}])}else{const e=s.getModel().getLineMaxColumn(l.modifiedEndLineNumber);s.executeEdits("diffEditor",[{range:new r.Range(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,e),text:l.originalContent.join(u)}])}}));const v=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(m&&(m.label=i.localize(4,null,l.originalStartLineNumber+p)),g),autoSelectFirstItem:!0})};this._register(n.addStandardDisposableListener(this._diffActions,"mousedown",e=>{const{top:t,height:i}=n.getDomNodePagePosition(this._diffActions);let o=Math.floor(h/3);e.preventDefault(),v(e.posx,t+i+o)})),this._register(s.onMouseMove(e=>{if(8===e.target.type||5===e.target.type){ e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,p=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,h)):this.visibility=!1}else this.visibility=!1})),this._register(s.onMouseDown(e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),p=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,h),v(e.event.posx,e.event.posy+h))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:o}=n.getDomNodePagePosition(e),s=t-o,r=Math.floor(s/i),a=r*i;return this._diffActions.style.top=`${a}px`,r}}t.InlineDiffMargin=l})),define(e[969],t([3,4]),(function(e,t){return e.create("vs/editor/common/config/commonEditorConfig",t)})),define(e[970],t([3,4]),(function(e,t){return e.create("vs/editor/common/config/editorOptions",t)})), define(e[111],t([0,1,970,12,262]),(function(e,t,i,n,o){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),t.EditorOptions=t.EditorOption=t.editorOptionsRegistry=t.EDITOR_MODEL_DEFAULTS=t.EDITOR_FONT_DEFAULTS=t.WrappingIndent=t.filterValidationDecorations=t.RenderLineNumbersType=t.EditorLayoutInfoComputer=t.RenderMinimap=t.EditorFontLigatures=t.cursorStyleToString=t.TextEditorCursorStyle=t.TextEditorCursorBlinkingStyle=t.ComputeOptionsMemory=t.ValidatedEditorOptions=t.ConfigurationChangedEvent=t.MINIMAP_GUTTER_WIDTH=t.EditorAutoIndentStrategy=void 0,function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(t.EditorAutoIndentStrategy||(t.EditorAutoIndentStrategy={})),t.MINIMAP_GUTTER_WIDTH=8;t.ConfigurationChangedEvent=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}};t.ValidatedEditorOptions=class{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){ this._values[e]=t}};class r{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}t.ComputeOptionsMemory=r;class a{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class l{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class c{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}class d extends c{static boolean(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return d.boolean(e,this.defaultValue)}}class h extends c{constructor(e,t,i,n,o,s){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){if(void 0===e)return t ;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),0|(o=Math.min(n,o)))}validate(e){return h.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class u extends c{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(u.float(e,this.defaultValue))}}class g extends c{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return g.string(e,this.defaultValue)}}class p extends c{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}static stringSet(e,t,i){return"string"!=typeof e?t:-1===i.indexOf(e)?t:e}validate(e){return p.stringSet(e,this.defaultValue,this._allowedValues)}}class m extends a{constructor(e,t,i,n,o,s,r){ void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e?this.defaultValue:-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}!function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(t.TextEditorCursorBlinkingStyle||(t.TextEditorCursorBlinkingStyle={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(s=t.TextEditorCursorStyle||(t.TextEditorCursorStyle={})),t.cursorStyleToString=function(e){switch(e){case s.Line:return"line";case s.Block:return"block";case s.Underline:return"underline";case s.LineThin:return"line-thin";case s.BlockOutline:return"block-outline";case s.UnderlineThin:return"underline-thin"}};class v extends a{constructor(){super(37,"fontLigatures",v.OFF,{anyOf:[{ type:"boolean",description:i.localize(16,null)},{type:"string",description:i.localize(17,null)}],description:i.localize(18,null),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?v.OFF:"true"===e?v.ON:e:Boolean(e)?v.ON:v.OFF}}t.EditorFontLigatures=v,v.OFF='"liga" off, "calt" off',v.ON='"liga" on, "calt" on';class f extends a{constructor(){super(39,"fontWeight",t.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:f.MINIMUM_VALUE,maximum:f.MAXIMUM_VALUE,errorMessage:i.localize(20,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:f.SUGGESTION_VALUES}],default:t.EDITOR_FONT_DEFAULTS.fontWeight,description:i.localize(21,null)})}validate(e){return"normal"===e||"bold"===e?e:String(h.clampedInt(e,t.EDITOR_FONT_DEFAULTS.fontWeight,f.MINIMUM_VALUE,f.MAXIMUM_VALUE))}}f.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],f.MINIMUM_VALUE=1,f.MAXIMUM_VALUE=1e3;!function(e){e[e.None=0]="None", e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(t.RenderMinimap||(t.RenderMinimap={}));class S extends l{constructor(){super(117,[42,50,31,56,84,52,53,86,106,109,110,2])}compute(e,t,i){return S.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}static _computeMinimapLayout(e,i){const n=e.outerWidth,o=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0, minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*o),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:o};const r=i.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(2*e.minimap.scale):e.minimap.scale ;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,v=e.verticalScrollbarWidth,f=e.viewLineCount,b=e.remainingWidth,_=e.isViewportWrapping,C=h?2:3;let y=Math.floor(s*o);const w=y/s;let E=!1,I=!1,x=C*u,k=u/s,D=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:t,extraLinesBeyondLastLine:n,desiredRatio:r,minimapLineCount:c}=S.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:d,height:o,lineHeight:l,pixelRatio:s});if(f/c>1)E=!0,I=!0,x=1,k=(u=1)/s;else{let o=!1,c=u+1;if("fit"===p){const t=Math.ceil((f+n)*x);_&&a&&b<=i.stableFitRemainingWidth?(o=!0,c=i.stableFitMaxMinimapScale):(o=t>y,_&&o?(i.stableMinimapLayoutInput=e,i.stableFitRemainingWidth=b):(i.stableMinimapLayoutInput=null,i.stableFitRemainingWidth=0))}if("fill"===p||o){E=!0;const e=u;x=Math.min(l*s,Math.max(1,Math.floor(1/r))),(u=Math.min(c,Math.max(1,Math.floor(x/C))))>e&&(D=Math.min(2,u/e)),k=u/s/D,y=Math.ceil(Math.max(t,f+n)*x),_&&o&&(i.stableFitMaxMinimapScale=u)}}} const T=Math.floor(g*k),R=Math.min(T,Math.max(0,Math.floor((b-v-2)*k/(c+k)))+t.MINIMAP_GUTTER_WIDTH);let A=Math.floor(s*R);const M=A/s;return{renderMinimap:h?1:2,minimapLeft:"left"===m?0:n-R-v,minimapWidth:R,minimapHeightIsEditorHeight:E,minimapIsSampling:I,minimapScale:u,minimapLineHeight:x,minimapCanvasInnerWidth:A=Math.floor(A*D),minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:w}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,u=e.get(106),g=e.get(109),p=e.get(110),m=e.get(2),v=t.isDominatedByLongLines,f=e.get(42),b=0!==e.get(52).renderType,_=e.get(53),C=e.get(86),y=e.get(56),w=e.get(84),E=w.verticalScrollbarSize,I=w.verticalHasArrows,x=w.arrowSize,k=w.horizontalScrollbarSize,D=e.get(50),T=e.get(31);let R;if("string"==typeof D&&/^\d+(\.\d+)?ch$/.test(D)){const e=parseFloat(D.substr(0,D.length-2));R=h.clampedInt(e*a,0,0,1e3) }else R=h.clampedInt(D,0,0,1e3);T&&(R+=16);let A=0;if(b){const e=Math.max(s,_);A=Math.round(e*l)}let M=0;f&&(M=o);let L=0,O=L+M,N=O+A,P=N+R;const F=i-M-A-R;let B=!1,V=!1,W=-1;2!==m&&(p&&v?(B=!0,V=!0):"on"===u||"bounded"===u?V=!0:"wordWrapColumn"===u&&(W=g));const z=S._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:C,minimap:y,verticalScrollbarWidth:E,viewLineCount:d,remainingWidth:F,isViewportWrapping:V},t.memory||new r);0!==z.renderMinimap&&0===z.minimapLeft&&(L+=z.minimapWidth,O+=z.minimapWidth,N+=z.minimapWidth,P+=z.minimapWidth);const U=F-z.minimapWidth,K=Math.max(1,Math.floor((U-E-2)/a)),H=I?x:0;return V&&(W=Math.max(1,K),"bounded"===u&&(W=Math.min(W,g))),{width:i,height:n,glyphMarginLeft:L,glyphMarginWidth:M,lineNumbersLeft:O,lineNumbersWidth:A,decorationsLeft:N,decorationsWidth:R,contentLeft:P,contentWidth:U,minimap:z,viewportColumn:K,isWordWrapMinified:B,isViewportWrapping:V,wrappingColumn:W,verticalScrollbarWidth:E, horizontalScrollbarHeight:k,overviewRuler:{top:H,width:E,height:n-2*H,right:0}}}}t.EditorLayoutInfoComputer=S;!function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(t.RenderLineNumbersType||(t.RenderLineNumbersType={}));t.filterValidationDecorations=function(e){const t=e.get(79);return"editable"===t?e.get(72):"on"!==t};function b(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}!function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(t.WrappingIndent||(t.WrappingIndent={}));function _(e){return t.editorOptionsRegistry[e.id]=e,e}t.EDITOR_FONT_DEFAULTS={fontFamily:n.isMacintosh?"Menlo, Monaco, 'Courier New', monospace":n.isLinux?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:n.isMacintosh?12:14,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={ tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.editorOptionsRegistry=[],function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingOvertype=6]="autoClosingOvertype",e[e.autoClosingQuotes=7]="autoClosingQuotes",e[e.autoIndent=8]="autoIndent",e[e.automaticLayout=9]="automaticLayout",e[e.autoSurround=10]="autoSurround",e[e.codeLens=11]="codeLens",e[e.colorDecorators=12]="colorDecorators",e[e.columnSelection=13]="columnSelection",e[e.comments=14]="comments",e[e.contextmenu=15]="contextmenu",e[e.copyWithSyntaxHighlighting=16]="copyWithSyntaxHighlighting",e[e.cursorBlinking=17]="cursorBlinking",e[e.cursorSmoothCaretAnimation=18]="cursorSmoothCaretAnimation", e[e.cursorStyle=19]="cursorStyle",e[e.cursorSurroundingLines=20]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=21]="cursorSurroundingLinesStyle",e[e.cursorWidth=22]="cursorWidth",e[e.disableLayerHinting=23]="disableLayerHinting",e[e.disableMonospaceOptimizations=24]="disableMonospaceOptimizations",e[e.dragAndDrop=25]="dragAndDrop",e[e.emptySelectionClipboard=26]="emptySelectionClipboard",e[e.extraEditorClassName=27]="extraEditorClassName",e[e.fastScrollSensitivity=28]="fastScrollSensitivity",e[e.find=29]="find",e[e.fixedOverflowWidgets=30]="fixedOverflowWidgets",e[e.folding=31]="folding",e[e.foldingStrategy=32]="foldingStrategy",e[e.foldingHighlight=33]="foldingHighlight",e[e.unfoldOnClickAfterEndOfLine=34]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=35]="fontFamily",e[e.fontInfo=36]="fontInfo",e[e.fontLigatures=37]="fontLigatures",e[e.fontSize=38]="fontSize",e[e.fontWeight=39]="fontWeight",e[e.formatOnPaste=40]="formatOnPaste",e[e.formatOnType=41]="formatOnType",e[e.glyphMargin=42]="glyphMargin", e[e.gotoLocation=43]="gotoLocation",e[e.hideCursorInOverviewRuler=44]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=45]="highlightActiveIndentGuide",e[e.hover=46]="hover",e[e.inDiffEditor=47]="inDiffEditor",e[e.letterSpacing=48]="letterSpacing",e[e.lightbulb=49]="lightbulb",e[e.lineDecorationsWidth=50]="lineDecorationsWidth",e[e.lineHeight=51]="lineHeight",e[e.lineNumbers=52]="lineNumbers",e[e.lineNumbersMinChars=53]="lineNumbersMinChars",e[e.links=54]="links",e[e.matchBrackets=55]="matchBrackets",e[e.minimap=56]="minimap",e[e.mouseStyle=57]="mouseStyle",e[e.mouseWheelScrollSensitivity=58]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=59]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=60]="multiCursorMergeOverlapping",e[e.multiCursorModifier=61]="multiCursorModifier",e[e.multiCursorPaste=62]="multiCursorPaste",e[e.occurrencesHighlight=63]="occurrencesHighlight",e[e.overviewRulerBorder=64]="overviewRulerBorder",e[e.overviewRulerLanes=65]="overviewRulerLanes",e[e.padding=66]="padding", e[e.parameterHints=67]="parameterHints",e[e.peekWidgetDefaultFocus=68]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=69]="definitionLinkOpensInPeek",e[e.quickSuggestions=70]="quickSuggestions",e[e.quickSuggestionsDelay=71]="quickSuggestionsDelay",e[e.readOnly=72]="readOnly",e[e.renameOnType=73]="renameOnType",e[e.renderControlCharacters=74]="renderControlCharacters",e[e.renderIndentGuides=75]="renderIndentGuides",e[e.renderFinalNewline=76]="renderFinalNewline",e[e.renderLineHighlight=77]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=78]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=79]="renderValidationDecorations",e[e.renderWhitespace=80]="renderWhitespace",e[e.revealHorizontalRightPadding=81]="revealHorizontalRightPadding",e[e.roundedSelection=82]="roundedSelection",e[e.rulers=83]="rulers",e[e.scrollbar=84]="scrollbar",e[e.scrollBeyondLastColumn=85]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=86]="scrollBeyondLastLine", e[e.scrollPredominantAxis=87]="scrollPredominantAxis",e[e.selectionClipboard=88]="selectionClipboard",e[e.selectionHighlight=89]="selectionHighlight",e[e.selectOnLineNumbers=90]="selectOnLineNumbers",e[e.showFoldingControls=91]="showFoldingControls",e[e.showUnused=92]="showUnused",e[e.snippetSuggestions=93]="snippetSuggestions",e[e.smoothScrolling=94]="smoothScrolling",e[e.stopRenderingLineAfter=95]="stopRenderingLineAfter",e[e.suggest=96]="suggest",e[e.suggestFontSize=97]="suggestFontSize",e[e.suggestLineHeight=98]="suggestLineHeight",e[e.suggestOnTriggerCharacters=99]="suggestOnTriggerCharacters",e[e.suggestSelection=100]="suggestSelection",e[e.tabCompletion=101]="tabCompletion",e[e.tabIndex=102]="tabIndex",e[e.unusualLineTerminators=103]="unusualLineTerminators",e[e.useTabStops=104]="useTabStops",e[e.wordSeparators=105]="wordSeparators",e[e.wordWrap=106]="wordWrap",e[e.wordWrapBreakAfterCharacters=107]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=108]="wordWrapBreakBeforeCharacters", e[e.wordWrapColumn=109]="wordWrapColumn",e[e.wordWrapMinified=110]="wordWrapMinified",e[e.wrappingIndent=111]="wrappingIndent",e[e.wrappingStrategy=112]="wrappingStrategy",e[e.showDeprecated=113]="showDeprecated",e[e.editorClassName=114]="editorClassName",e[e.pixelRatio=115]="pixelRatio",e[e.tabFocusMode=116]="tabFocusMode",e[e.layoutInfo=117]="layoutInfo",e[e.wrappingInfo=118]="wrappingInfo"}(t.EditorOption||(t.EditorOption={})),t.EditorOptions={acceptSuggestionOnCommitCharacter:_(new d(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:i.localize(106,null)})),acceptSuggestionOnEnter:_(new p(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",i.localize(107,null),""],markdownDescription:i.localize(108,null)})),accessibilitySupport:_(new class extends a{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[i.localize(0,null),i.localize(1,null),i.localize(2,null)],default:"auto",description:i.localize(3,null)})} validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:_(new h(3,"accessibilityPageSize",10,1,1073741824,{description:i.localize(109,null)})),ariaLabel:_(new g(4,"ariaLabel",i.localize(110,null))),autoClosingBrackets:_(new p(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.localize(111,null),i.localize(112,null),""],description:i.localize(113,null)})),autoClosingOvertype:_(new p(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",i.localize(114,null),""],description:i.localize(115,null)})),autoClosingQuotes:_(new p(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.localize(116,null),i.localize(117,null),""],description:i.localize(118,null)})), autoIndent:_(new m(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[i.localize(119,null),i.localize(120,null),i.localize(121,null),i.localize(122,null),i.localize(123,null)],description:i.localize(124,null)})),automaticLayout:_(new d(9,"automaticLayout",!1)),autoSurround:_(new p(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[i.localize(125,null),i.localize(126,null),i.localize(127,null),""],description:i.localize(128,null)})),codeLens:_(new d(11,"codeLens",!0,{description:i.localize(129,null)})),colorDecorators:_(new d(12,"colorDecorators",!0,{description:i.localize(130,null)})),columnSelection:_(new d(13,"columnSelection",!1,{description:i.localize(131,null)})),comments:_(new class extends a{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(14,"comments",e,{ "editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:i.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:i.localize(5,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:d.boolean(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:d.boolean(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:_(new d(15,"contextmenu",!0)),copyWithSyntaxHighlighting:_(new d(16,"copyWithSyntaxHighlighting",!0,{description:i.localize(132,null)})),cursorBlinking:_(new m(17,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:i.localize(133,null)})),cursorSmoothCaretAnimation:_(new d(18,"cursorSmoothCaretAnimation",!1,{description:i.localize(134,null)})), cursorStyle:_(new m(19,"cursorStyle",s.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return s.Line;case"block":return s.Block;case"underline":return s.Underline;case"line-thin":return s.LineThin;case"block-outline":return s.BlockOutline;case"underline-thin":return s.UnderlineThin}}),{description:i.localize(135,null)})),cursorSurroundingLines:_(new h(20,"cursorSurroundingLines",0,0,1073741824,{description:i.localize(136,null)})),cursorSurroundingLinesStyle:_(new p(21,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[i.localize(137,null),i.localize(138,null)],description:i.localize(139,null)})),cursorWidth:_(new h(22,"cursorWidth",0,0,1073741824,{markdownDescription:i.localize(140,null)})),disableLayerHinting:_(new d(23,"disableLayerHinting",!1)),disableMonospaceOptimizations:_(new d(24,"disableMonospaceOptimizations",!1)),dragAndDrop:_(new d(25,"dragAndDrop",!0,{description:i.localize(141,null)})), emptySelectionClipboard:_(new class extends d{constructor(){super(26,"emptySelectionClipboard",!0,{description:i.localize(6,null)})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:_(new g(27,"extraEditorClassName","")),fastScrollSensitivity:_(new u(28,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:i.localize(142,null)})),find:_(new class extends a{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(29,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:i.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:i.localize(8,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[i.localize(9,null),i.localize(10,null),i.localize(11,null)], description:i.localize(12,null)},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:i.localize(13,null),included:n.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:i.localize(14,null)},"editor.find.loop":{type:"boolean",default:e.loop,description:i.localize(15,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:d.boolean(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:d.boolean(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":p.stringSet(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:d.boolean(t.globalFindClipboard,this.defaultValue.globalFindClipboard), addExtraSpaceOnTop:d.boolean(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:d.boolean(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:_(new d(30,"fixedOverflowWidgets",!1)),folding:_(new d(31,"folding",!0,{description:i.localize(143,null)})),foldingStrategy:_(new p(32,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[i.localize(144,null),i.localize(145,null)],description:i.localize(146,null)})),foldingHighlight:_(new d(33,"foldingHighlight",!0,{description:i.localize(147,null)})),unfoldOnClickAfterEndOfLine:_(new d(34,"unfoldOnClickAfterEndOfLine",!1,{description:i.localize(148,null)})),fontFamily:_(new g(35,"fontFamily",t.EDITOR_FONT_DEFAULTS.fontFamily,{description:i.localize(149,null)})),fontInfo:_(new class extends l{constructor(){super(36)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:_(new v),fontSize:_(new class extends c{constructor(){super(38,"fontSize",t.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100, default:t.EDITOR_FONT_DEFAULTS.fontSize,description:i.localize(19,null)})}validate(e){let i=u.float(e,this.defaultValue);return 0===i?t.EDITOR_FONT_DEFAULTS.fontSize:u.clamp(i,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:_(new f),formatOnPaste:_(new d(40,"formatOnPaste",!1,{description:i.localize(150,null)})),formatOnType:_(new d(41,"formatOnType",!1,{description:i.localize(151,null)})),glyphMargin:_(new d(42,"glyphMargin",!0,{description:i.localize(152,null)})),gotoLocation:_(new class extends a{constructor(){const e={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:""},t={type:"string",enum:["peek","gotoAndPeek","goto"], default:e.multiple,enumDescriptions:[i.localize(22,null),i.localize(23,null),i.localize(24,null)]};super(43,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:i.localize(25,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:i.localize(26,null)},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:i.localize(27,null)},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:i.localize(28,null)},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:i.localize(29,null)},t),"editor.gotoLocation.multipleReferences":Object.assign({description:i.localize(30,null)},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,description:i.localize(31,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,description:i.localize(32,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string", default:e.alternativeDeclarationCommand,description:i.localize(33,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,description:i.localize(34,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,description:i.localize(35,null)}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:p.stringSet(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:p.stringSet(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:p.stringSet(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:p.stringSet(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]), multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:p.stringSet(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:p.stringSet(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:g.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:g.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:g.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:g.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:g.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:_(new d(44,"hideCursorInOverviewRuler",!1,{description:i.localize(153,null)})), highlightActiveIndentGuide:_(new d(45,"highlightActiveIndentGuide",!0,{description:i.localize(154,null)})),hover:_(new class extends a{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(46,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:i.localize(36,null)},"editor.hover.delay":{type:"number",default:e.delay,description:i.localize(37,null)},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:i.localize(38,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:d.boolean(t.enabled,this.defaultValue.enabled),delay:h.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:d.boolean(t.sticky,this.defaultValue.sticky)}}}),inDiffEditor:_(new d(47,"inDiffEditor",!1)),letterSpacing:_(new u(48,"letterSpacing",t.EDITOR_FONT_DEFAULTS.letterSpacing,e=>u.clamp(e,-5,20),{description:i.localize(155,null)})),lightbulb:_(new class extends a{constructor(){const e={enabled:!0};super(49,"lightbulb",e,{"editor.lightbulb.enabled":{ type:"boolean",default:e.enabled,description:i.localize(39,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:d.boolean(t.enabled,this.defaultValue.enabled)}}}),lineDecorationsWidth:_(new c(50,"lineDecorationsWidth",10)),lineHeight:_(new class extends h{constructor(){super(51,"lineHeight",t.EDITOR_FONT_DEFAULTS.lineHeight,0,150,{description:i.localize(40,null)})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:_(new class extends a{constructor(){super(52,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[i.localize(59,null),i.localize(60,null),i.localize(61,null),i.localize(62,null)],default:"on",description:i.localize(63,null)})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}), lineNumbersMinChars:_(new h(53,"lineNumbersMinChars",5,1,300)),links:_(new d(54,"links",!0,{description:i.localize(156,null)})),matchBrackets:_(new p(55,"matchBrackets","always",["always","near","never"],{description:i.localize(157,null)})),minimap:_(new class extends a{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(56,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:i.localize(41,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[i.localize(42,null),i.localize(43,null),i.localize(44,null)],default:e.size,description:i.localize(45,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:i.localize(46,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:i.localize(47,null)},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3, enum:[1,2,3],description:i.localize(48,null)},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:i.localize(49,null)},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:i.localize(50,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:d.boolean(t.enabled,this.defaultValue.enabled),size:p.stringSet(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:p.stringSet(t.side,this.defaultValue.side,["right","left"]),showSlider:p.stringSet(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:d.boolean(t.renderCharacters,this.defaultValue.renderCharacters),scale:h.clampedInt(t.scale,1,1,3),maxColumn:h.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:_(new p(57,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:_(new u(58,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:i.localize(158,null)})), mouseWheelZoom:_(new d(59,"mouseWheelZoom",!1,{markdownDescription:i.localize(159,null)})),multiCursorMergeOverlapping:_(new d(60,"multiCursorMergeOverlapping",!0,{description:i.localize(160,null)})),multiCursorModifier:_(new m(61,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?n.isMacintosh?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[i.localize(161,null),i.localize(162,null)],markdownDescription:i.localize(163,null)})),multiCursorPaste:_(new p(62,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[i.localize(164,null),i.localize(165,null)],markdownDescription:i.localize(166,null)})),occurrencesHighlight:_(new d(63,"occurrencesHighlight",!0,{description:i.localize(167,null)})),overviewRulerBorder:_(new d(64,"overviewRulerBorder",!0,{description:i.localize(168,null)})),overviewRulerLanes:_(new h(65,"overviewRulerLanes",3,0,3)),padding:_(new class extends a{constructor(){super(66,"padding",{top:0,bottom:0},{"editor.padding.top":{ type:"number",default:0,minimum:0,maximum:1e3,description:i.localize(51,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:i.localize(52,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:h.clampedInt(t.top,0,0,1e3),bottom:h.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:_(new class extends a{constructor(){const e={enabled:!0,cycle:!1};super(67,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:i.localize(53,null)},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:i.localize(54,null)}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:d.boolean(t.enabled,this.defaultValue.enabled),cycle:d.boolean(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:_(new p(68,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[i.localize(169,null),i.localize(170,null)],description:i.localize(171,null)})), definitionLinkOpensInPeek:_(new d(69,"definitionLinkOpensInPeek",!1,{description:i.localize(172,null)})),quickSuggestions:_(new class extends a{constructor(){const e={other:!0,comments:!1,strings:!1};super(70,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:i.localize(55,null)},comments:{type:"boolean",default:e.comments,description:i.localize(56,null)},other:{type:"boolean",default:e.other,description:i.localize(57,null)}}}],default:e,description:i.localize(58,null)}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:d.boolean(t.other,this.defaultValue.other),comments:d.boolean(t.comments,this.defaultValue.comments),strings:d.boolean(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:_(new h(71,"quickSuggestionsDelay",10,0,1073741824,{ description:i.localize(173,null)})),readOnly:_(new d(72,"readOnly",!1)),renameOnType:_(new d(73,"renameOnType",!1,{description:i.localize(174,null)})),renderControlCharacters:_(new d(74,"renderControlCharacters",!1,{description:i.localize(175,null)})),renderIndentGuides:_(new d(75,"renderIndentGuides",!0,{description:i.localize(176,null)})),renderFinalNewline:_(new d(76,"renderFinalNewline",!0,{description:i.localize(177,null)})),renderLineHighlight:_(new p(77,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",i.localize(178,null)],description:i.localize(179,null)})),renderLineHighlightOnlyWhenFocus:_(new d(78,"renderLineHighlightOnlyWhenFocus",!1,{description:i.localize(180,null)})),renderValidationDecorations:_(new p(79,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:_(new p(80,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{ enumDescriptions:["",i.localize(181,null),i.localize(182,null),i.localize(183,null),""],description:i.localize(184,null)})),revealHorizontalRightPadding:_(new h(81,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:_(new d(82,"roundedSelection",!0,{description:i.localize(185,null)})),rulers:_(new class extends a{constructor(){const e=[],t={type:"number",description:i.localize(64,null)};super(83,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:i.localize(65,null),format:"color-hex"}}}]},default:e,description:i.localize(66,null)})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if("number"==typeof i)t.push({column:h.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:h.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}),scrollbar:_(new class extends a{constructor(){super(84,"scrollbar",{vertical:1,horizontal:1,arrowSize:11, useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=h.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=h.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:h.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:b(t.vertical,this.defaultValue.vertical),horizontal:b(t.horizontal,this.defaultValue.horizontal),useShadows:d.boolean(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:d.boolean(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:d.boolean(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:d.boolean(t.handleMouseWheel,this.defaultValue.handleMouseWheel), alwaysConsumeMouseWheel:d.boolean(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:h.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:h.clampedInt(t.verticalSliderSize,n,0,1e3)}}}),scrollBeyondLastColumn:_(new h(85,"scrollBeyondLastColumn",5,0,1073741824,{description:i.localize(186,null)})),scrollBeyondLastLine:_(new d(86,"scrollBeyondLastLine",!0,{description:i.localize(187,null)})),scrollPredominantAxis:_(new d(87,"scrollPredominantAxis",!0,{description:i.localize(188,null)})),selectionClipboard:_(new d(88,"selectionClipboard",!0,{description:i.localize(189,null),included:n.isLinux})),selectionHighlight:_(new d(89,"selectionHighlight",!0,{description:i.localize(190,null)})),selectOnLineNumbers:_(new d(90,"selectOnLineNumbers",!0)),showFoldingControls:_(new p(91,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[i.localize(191,null),i.localize(192,null)], description:i.localize(193,null)})),showUnused:_(new d(92,"showUnused",!0,{description:i.localize(194,null)})),showDeprecated:_(new d(113,"showDeprecated",!0,{description:i.localize(195,null)})),snippetSuggestions:_(new p(93,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[i.localize(196,null),i.localize(197,null),i.localize(198,null),i.localize(199,null)],description:i.localize(200,null)})),smoothScrolling:_(new d(94,"smoothScrolling",!1,{description:i.localize(201,null)})),stopRenderingLineAfter:_(new h(95,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:_(new class extends a{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0, showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,statusBar:{visible:!1}};super(96,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[i.localize(67,null),i.localize(68,null)],default:e.insertMode,description:i.localize(69,null)},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:i.localize(70,null)},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:i.localize(71,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:i.localize(72,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:i.localize(73,null)},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:i.localize(74,null)}, "editor.suggest.maxVisibleSuggestions":{type:"number",default:e.maxVisibleSuggestions,minimum:1,maximum:15,description:i.localize(75,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:i.localize(76,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:i.localize(77,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:i.localize(78,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:i.localize(79,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:i.localize(80,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:i.localize(81,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:i.localize(82,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:i.localize(83,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:i.localize(84,null)}, "editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:i.localize(85,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:i.localize(86,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:i.localize(87,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:i.localize(88,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:i.localize(89,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:i.localize(90,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:i.localize(91,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:i.localize(92,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:i.localize(93,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:i.localize(94,null)},"editor.suggest.showWords":{type:"boolean", default:!0,markdownDescription:i.localize(95,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:i.localize(96,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:i.localize(97,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:i.localize(98,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:i.localize(99,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:i.localize(100,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:i.localize(101,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:i.localize(102,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:i.localize(103,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:i.localize(104,null)},"editor.suggest.statusBar.visible":{type:"boolean",default:!1, markdownDescription:i.localize(105,null)}})}validate(e){var t;if(!e||"object"!=typeof e)return this.defaultValue;const i=e;return{insertMode:p.stringSet(i.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:d.boolean(i.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:d.boolean(i.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:d.boolean(i.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:d.boolean(i.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:d.boolean(i.showIcons,this.defaultValue.showIcons),maxVisibleSuggestions:h.clampedInt(i.maxVisibleSuggestions,this.defaultValue.maxVisibleSuggestions,1,15),showMethods:d.boolean(i.showMethods,this.defaultValue.showMethods),showFunctions:d.boolean(i.showFunctions,this.defaultValue.showFunctions),showConstructors:d.boolean(i.showConstructors,this.defaultValue.showConstructors), showFields:d.boolean(i.showFields,this.defaultValue.showFields),showVariables:d.boolean(i.showVariables,this.defaultValue.showVariables),showClasses:d.boolean(i.showClasses,this.defaultValue.showClasses),showStructs:d.boolean(i.showStructs,this.defaultValue.showStructs),showInterfaces:d.boolean(i.showInterfaces,this.defaultValue.showInterfaces),showModules:d.boolean(i.showModules,this.defaultValue.showModules),showProperties:d.boolean(i.showProperties,this.defaultValue.showProperties),showEvents:d.boolean(i.showEvents,this.defaultValue.showEvents),showOperators:d.boolean(i.showOperators,this.defaultValue.showOperators),showUnits:d.boolean(i.showUnits,this.defaultValue.showUnits),showValues:d.boolean(i.showValues,this.defaultValue.showValues),showConstants:d.boolean(i.showConstants,this.defaultValue.showConstants),showEnums:d.boolean(i.showEnums,this.defaultValue.showEnums),showEnumMembers:d.boolean(i.showEnumMembers,this.defaultValue.showEnumMembers), showKeywords:d.boolean(i.showKeywords,this.defaultValue.showKeywords),showWords:d.boolean(i.showWords,this.defaultValue.showWords),showColors:d.boolean(i.showColors,this.defaultValue.showColors),showFiles:d.boolean(i.showFiles,this.defaultValue.showFiles),showReferences:d.boolean(i.showReferences,this.defaultValue.showReferences),showFolders:d.boolean(i.showFolders,this.defaultValue.showFolders),showTypeParameters:d.boolean(i.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:d.boolean(i.showSnippets,this.defaultValue.showSnippets),showUsers:d.boolean(i.showUsers,this.defaultValue.showUsers),showIssues:d.boolean(i.showIssues,this.defaultValue.showIssues),statusBar:{visible:d.boolean(null===(t=i.statusBar)||void 0===t?void 0:t.visible,!!this.defaultValue.statusBar.visible)}}}}),suggestFontSize:_(new h(97,"suggestFontSize",0,0,1e3,{markdownDescription:i.localize(202,null)})),suggestLineHeight:_(new h(98,"suggestLineHeight",0,0,1e3,{markdownDescription:i.localize(203,null)})), suggestOnTriggerCharacters:_(new d(99,"suggestOnTriggerCharacters",!0,{description:i.localize(204,null)})),suggestSelection:_(new p(100,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[i.localize(205,null),i.localize(206,null),i.localize(207,null)],description:i.localize(208,null)})),tabCompletion:_(new p(101,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[i.localize(209,null),i.localize(210,null),i.localize(211,null)],description:i.localize(212,null)})),tabIndex:_(new h(102,"tabIndex",0,-1,1073741824)),unusualLineTerminators:_(new p(103,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[i.localize(213,null),i.localize(214,null),i.localize(215,null)],description:i.localize(216,null)})),useTabStops:_(new d(104,"useTabStops",!0,{description:i.localize(217,null)})),wordSeparators:_(new g(105,"wordSeparators",o.USUAL_WORD_SEPARATORS,{description:i.localize(218,null)})), wordWrap:_(new p(106,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[i.localize(219,null),i.localize(220,null),i.localize(221,null),i.localize(222,null)],description:i.localize(223,null)})),wordWrapBreakAfterCharacters:_(new g(107,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:_(new g(108,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:_(new h(109,"wordWrapColumn",80,1,1073741824,{markdownDescription:i.localize(224,null)})),wordWrapMinified:_(new d(110,"wordWrapMinified",!0)),wrappingIndent:_(new m(111,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[i.localize(225,null),i.localize(226,null),i.localize(227,null),i.localize(228,null)],description:i.localize(229,null)})), wrappingStrategy:_(new p(112,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[i.localize(230,null),i.localize(231,null)],description:i.localize(232,null)})),editorClassName:_(new class extends l{constructor(){super(114,[57,27])}compute(e,t,i){const n=["monaco-editor"];return t.get(27)&&n.push(t.get(27)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(57)?n.push("mouse-default"):"copy"===t.get(57)&&n.push("mouse-copy"),t.get(92)&&n.push("showUnused"),t.get(113)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:_(new class extends l{constructor(){super(115)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:_(new class extends l{constructor(){super(116,[72])}compute(e,t,i){return!!t.get(72)||e.tabFocusMode}}),layoutInfo:_(new S),wrappingInfo:_(new class extends l{constructor(){super(118,[117])}compute(e,t,i){const n=t.get(117);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping, wrappingColumn:n.wrappingColumn}}})}})),define(e[264],t([0,1,12,111,345]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontInfo=t.BareFontInfo=void 0;const s=i.isMacintosh?1.5:1.35,r=8;class a{constructor(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i){const n=e.get(35),o=e.get(39),s=e.get(38),r=e.get(37),l=e.get(51),c=e.get(48);return a._create(n,o,s,r,l,c,t,i)}static createFromRawSettings(e,t,i=!1){const o=n.EditorOptions.fontFamily.validate(e.fontFamily),s=n.EditorOptions.fontWeight.validate(e.fontWeight),r=n.EditorOptions.fontSize.validate(e.fontSize),l=n.EditorOptions.fontLigatures2.validate(e.fontLigatures),c=n.EditorOptions.lineHeight.validate(e.lineHeight),d=n.EditorOptions.letterSpacing.validate(e.letterSpacing) ;return a._create(o,s,r,l,c,d,t,i)}static _create(e,t,i,n,l,c,d,h){0===l?l=Math.round(s*i):l0&&(this.changes=r.compressConsecutiveTextChanges(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(a.writeUInt32BE(e,t?t.length:0,i),i+=4,t)for(const n of t)a.writeUInt32BE(e,n.selectionStartLineNumber,i),i+=4,a.writeUInt32BE(e,n.selectionStartColumn,i),i+=4,a.writeUInt32BE(e,n.positionLineNumber,i),i+=4,a.writeUInt32BE(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=a.readUInt32BE(e,t);t+=4;for(let s=0;se.toString()).join(", ")}matchesResource(e){return(s.URI.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof d}append(e,t,i,n,o){this._data instanceof d&&this._data.append(e,t,i,n,o)}close(){this._data instanceof d&&(this._data=this._data.serialize())}undo(){if(s.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){ if(s.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof d&&(this._data=this._data.serialize()),this._data.byteLength+168}}t.SingleModelEditStackElement=h;class u{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=c(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}setDelegate(e){this._delegate=e}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}getMissingModels(){const e=[];for(const t of this._editStackElementsArr)s.URI.isUri(t.model)&&e.push(t.model);return e}matchesResource(e){const t=c(e) ;return this._editStackElementsMap.has(t)}setModel(e){const t=c(s.URI.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=c(e.uri);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).canAppend(e)}return!1}append(e,t,i,n,o){const s=c(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}close(){this._isOpen=!1}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=c(e);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${l.basename(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function g(e){return"\n"===e.getEOL()?0:1}function p(e){return!!e&&(e instanceof h||e instanceof u)}t.MultiModelEditStackElement=u,t.isEditStackElement=p ;class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);p(e)&&e.close()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(p(t)&&t.canAppend(this._model))return t;const i=new h(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],g(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),s=m._computeCursorState(i,o),r=o.map((e,t)=>({index:t,textChange:e.textChange}));return r.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),n.append(this._model,r.map(e=>e.textChange),g(this._model),this._model.getAlternativeVersionId(),s),s} static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return n.onUnexpectedError(e),null}}}t.EditStack=m})),define(e[973],t([3,4]),(function(e,t){return e.create("vs/editor/common/modes/modesRegistry",t)})),define(e[974],t([3,4]),(function(e,t){return e.create("vs/editor/common/standaloneStrings",t)})),define(e[975],t([0,1,974]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleServicesNLS=t.ToggleHighContrastNLS=t.StandaloneCodeEditorNLS=t.QuickOutlineNLS=t.QuickCommandNLS=t.QuickHelpNLS=t.GoToLineNLS=t.InspectTokensNLS=t.AccessibilityHelpNLS=void 0,function(e){e.noSelection=i.localize(0,null),e.singleSelectionRange=i.localize(1,null),e.singleSelection=i.localize(2,null),e.multiSelectionRange=i.localize(3,null),e.multiSelection=i.localize(4,null),e.emergencyConfOn=i.localize(5,null),e.openingDocs=i.localize(6,null),e.readonlyDiffEditor=i.localize(7,null),e.editableDiffEditor=i.localize(8,null),e.readonlyEditor=i.localize(9,null), e.editableEditor=i.localize(10,null),e.changeConfigToOnMac=i.localize(11,null),e.changeConfigToOnWinLinux=i.localize(12,null),e.auto_on=i.localize(13,null),e.auto_off=i.localize(14,null),e.tabFocusModeOnMsg=i.localize(15,null),e.tabFocusModeOnMsgNoKb=i.localize(16,null),e.tabFocusModeOffMsg=i.localize(17,null),e.tabFocusModeOffMsgNoKb=i.localize(18,null),e.openDocMac=i.localize(19,null),e.openDocWinLinux=i.localize(20,null),e.outroMsg=i.localize(21,null),e.showAccessibilityHelpAction=i.localize(22,null)}(t.AccessibilityHelpNLS||(t.AccessibilityHelpNLS={})),function(e){e.inspectTokensAction=i.localize(23,null)}(t.InspectTokensNLS||(t.InspectTokensNLS={})),function(e){e.gotoLineActionLabel=i.localize(24,null)}(t.GoToLineNLS||(t.GoToLineNLS={})),function(e){e.helpQuickAccessActionLabel=i.localize(25,null)}(t.QuickHelpNLS||(t.QuickHelpNLS={})),function(e){e.quickCommandActionLabel=i.localize(26,null),e.quickCommandHelp=i.localize(27,null)}(t.QuickCommandNLS||(t.QuickCommandNLS={})),function(e){ e.quickOutlineActionLabel=i.localize(28,null),e.quickOutlineByCategoryActionLabel=i.localize(29,null)}(t.QuickOutlineNLS||(t.QuickOutlineNLS={})),function(e){e.editorViewAccessibleLabel=i.localize(30,null),e.accessibilityHelpMessage=i.localize(31,null)}(t.StandaloneCodeEditorNLS||(t.StandaloneCodeEditorNLS={})),function(e){e.toggleHighContrast=i.localize(32,null)}(t.ToggleHighContrastNLS||(t.ToggleHighContrastNLS={})),function(e){e.bulkEditServiceSummary=i.localize(33,null)}(t.SimpleServicesNLS||(t.SimpleServicesNLS={}))})),define(e[976],t([3,4]),(function(e,t){return e.create("vs/editor/common/view/editorColorRegistry",t)})),define(e[977],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/anchorSelect/anchorSelect",t)})),define(e[978],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/bracketMatching/bracketMatching",t)})),define(e[979],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/caretOperations/caretOperations",t)})),define(e[980],t([3,4]),(function(e,t){ return e.create("vs/editor/contrib/caretOperations/transpose",t)})),define(e[981],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/clipboard/clipboard",t)})),define(e[982],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/codeAction/codeActionCommands",t)})),define(e[983],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/codeAction/lightBulbWidget",t)})),define(e[984],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/codelens/codelensController",t)})),define(e[985],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/comment/comment",t)})),define(e[986],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/contextmenu/contextmenu",t)})),define(e[987],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/cursorUndo/cursorUndo",t)})),define(e[988],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/documentSymbols/outlineTree",t)})),define(e[989],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/find/findController",t)})), define(e[990],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/find/findWidget",t)})),define(e[991],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/folding/folding",t)})),define(e[992],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/fontZoom/fontZoom",t)})),define(e[993],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/format/format",t)})),define(e[994],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/format/formatActions",t)})),define(e[995],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoError/gotoError",t)})),define(e[996],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoError/gotoErrorWidget",t)})),define(e[997],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoSymbol/goToCommands",t)})),define(e[998],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition",t)})),define(e[999],t([3,4]),(function(e,t){ return e.create("vs/editor/contrib/gotoSymbol/peek/referencesController",t)})),define(e[1e3],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoSymbol/peek/referencesTree",t)})),define(e[1001],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoSymbol/peek/referencesWidget",t)})),define(e[1002],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoSymbol/referencesModel",t)})),define(e[348],t([0,1,1002,6,17,2,24,212,18,67,21]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesModel=t.FileReferences=t.FilePreview=t.OneReference=void 0;class h{constructor(e,t,i,n,o){this.isProviderFirst=e,this.parent=t,this.uri=i,this._range=n,this._rangeCallback=o,this.id=a.defaultGenerator.nextId()}get range(){return this._range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){return i.localize(0,null,o.basename(this.uri),this.range.startLineNumber,this.range.startColumn)}}t.OneReference=h;class u{constructor(e){ this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),c=new l.Range(n,a.startColumn,n,o),d=new l.Range(s,r,s,1073741824),h=i.getValueInRange(c).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:h+u+i.getValueInRange(d).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+u.length}}}}t.FilePreview=u;class g{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new c.ResourceMap}dispose(){s.dispose(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?i.localize(1,null,o.basename(this.uri),this.uri.fsPath):i.localize(2,null,e,o.basename(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)return this ;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new u(i))}catch(e){d.onUnexpectedError(e)}return this}}t.FileReferences=g;class p{constructor(e,t){this._disposables=new s.DisposableStore,this.groups=[],this.references=[],this._onDidChangeReferenceRange=new n.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let r;e.sort(p._compareReferences);for(let t of e)if(r&&o.extUri.isEqual(r.uri,t.uri,!0)||(r=new g(this,t.uri),this.groups.push(r)),0===r.children.length||0!==p._compareReferences(t,r.children[r.children.length-1])){const e=new h(i===t,r,t.uri,t.targetSelectionRange||t.range,e=>this._onDidChangeReferenceRange.fire(e));this.references.push(e),r.children.push(e)}}dispose(){s.dispose(this.groups),this._disposables.dispose(),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new p(this._links,this._title)}get title(){return this._title} get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?i.localize(3,null):1===this.references.length?i.localize(4,null,this.references[0].uri.fsPath):1===this.groups.length?i.localize(5,null,this.references.length,this.groups[0].uri.fsPath):i.localize(6,null,this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((i,n)=>({idx:n,prefixLen:r.commonPrefixLength(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column) })).sort((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&l.Range.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return o.extUri.compare(e.uri,t.uri)||l.Range.compareRangesUsingStarts(e.range,t.range)}}t.ReferencesModel=p})),define(e[1003],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/gotoSymbol/symbolNavigation",t)})),define(e[1004],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/hover/hover",t)})),define(e[1005],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/hover/modesContentHover",t)})),define(e[1006],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace",t)})),define(e[1007],t([3,4]),(function(e,t){ return e.create("vs/editor/contrib/indentation/indentation",t)})),define(e[1008],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/linesOperations/linesOperations",t)})),define(e[1009],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/links/links",t)})),define(e[1010],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/message/messageController",t)})),define(e[1011],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/multicursor/multicursor",t)})),define(e[1012],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/parameterHints/parameterHints",t)})),define(e[1013],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/parameterHints/parameterHintsWidget",t)})),define(e[1014],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/peekView/peekView",t)})),define(e[1015],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/quickAccess/gotoLineQuickAccess",t)})),define(e[1016],t([3,4]),(function(e,t){ return e.create("vs/editor/contrib/quickAccess/gotoSymbolQuickAccess",t)})),define(e[1017],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/rename/onTypeRename",t)})),define(e[1018],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/rename/rename",t)})),define(e[1019],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/rename/renameInputField",t)})),define(e[1020],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/smartSelect/smartSelect",t)})),define(e[1021],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/snippet/snippetVariables",t)})),define(e[1022],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/suggest/suggestController",t)})),define(e[1023],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/suggest/suggestWidget",t)})),define(e[1024],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode",t)})),define(e[1025],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/tokenization/tokenization",t)})), define(e[1026],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/unusualLineTerminators/unusualLineTerminators",t)})),define(e[1027],t([3,4]),(function(e,t){return e.create("vs/editor/contrib/wordHighlighter/wordHighlighter",t)})),define(e[1028],t([3,4]),(function(e,t){return e.create("vs/platform/actions/browser/menuEntryActionViewItem",t)})),define(e[1029],t([3,4]),(function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)})),define(e[1030],t([3,4]),(function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)})),define(e[1031],t([3,4]),(function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)})),define(e[1032],t([3,4]),(function(e,t){return e.create("vs/platform/extensions/common/extensionValidator",t)})),define(e[1033],t([3,4]),(function(e,t){return e.create("vs/platform/files/browser/indexedDBFileSystemProvider",t)})),define(e[1034],t([3,4]),(function(e,t){return e.create("vs/platform/files/common/fileService",t)})), define(e[1035],t([3,4]),(function(e,t){return e.create("vs/platform/files/common/files",t)})),define(e[1036],t([3,4]),(function(e,t){return e.create("vs/platform/files/common/io",t)})),define(e[1037],t([3,4]),(function(e,t){return e.create("vs/platform/keybinding/common/abstractKeybindingService",t)})),define(e[1038],t([3,4]),(function(e,t){return e.create("vs/platform/list/browser/listService",t)})),define(e[1039],t([3,4]),(function(e,t){return e.create("vs/platform/markers/common/markers",t)})),define(e[1040],t([3,4]),(function(e,t){return e.create("vs/platform/quickinput/browser/commandsQuickAccess",t)})),define(e[1041],t([3,4]),(function(e,t){return e.create("vs/platform/quickinput/browser/helpQuickAccess",t)})),define(e[1042],t([3,4]),(function(e,t){return e.create("vs/platform/request/common/request",t)})),define(e[1043],t([3,4]),(function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)})),define(e[1044],t([3,4]),(function(e,t){ return e.create("vs/platform/theme/common/colorRegistry",t)})),define(e[1045],t([3,4]),(function(e,t){return e.create("vs/platform/theme/common/iconRegistry",t)})),define(e[1046],t([3,4]),(function(e,t){return e.create("vs/platform/theme/common/tokenClassificationRegistry",t)})),define(e[1047],t([3,4]),(function(e,t){return e.create("vs/platform/undoRedo/common/undoRedoService",t)})),define(e[1048],t([3,4]),(function(e,t){return e.create("vs/platform/update/common/update.config.contribution",t)})),define(e[1049],t([3,4]),(function(e,t){return e.create("vs/platform/userDataSync/common/abstractSynchronizer",t)})),define(e[1050],t([3,4]),(function(e,t){return e.create("vs/platform/userDataSync/common/keybindingsSync",t)})),define(e[1051],t([3,4]),(function(e,t){return e.create("vs/platform/userDataSync/common/settingsSync",t)})),define(e[1052],t([3,4]),(function(e,t){return e.create("vs/platform/userDataSync/common/userDataAutoSyncService",t)})),define(e[1053],t([3,4]),(function(e,t){ return e.create("vs/platform/userDataSync/common/userDataSync",t)})),define(e[1054],t([3,4]),(function(e,t){return e.create("vs/platform/userDataSync/common/userDataSyncMachines",t)})),define(e[1055],t([3,4]),(function(e,t){return e.create("vs/platform/workspaces/common/workspaces",t)})),define(e[1056],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadAuthentication",t)})),define(e[1057],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadCustomEditors",t)})),define(e[1058],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadExtensionService",t)})),define(e[1059],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadFileSystemEventService",t)})),define(e[1060],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadMessageService",t)})),define(e[1061],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadProgress",t)})),define(e[1062],t([3,4]),(function(e,t){ return e.create("vs/workbench/api/browser/mainThreadSaveParticipant",t)})),define(e[1063],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadTask",t)})),define(e[1064],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadWebviews",t)})),define(e[1065],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/mainThreadWorkspace",t)})),define(e[1066],t([3,4]),(function(e,t){return e.create("vs/workbench/api/browser/viewsExtensionPoint",t)})),define(e[1067],t([3,4]),(function(e,t){return e.create("vs/workbench/api/common/configurationExtensionPoint",t)})),define(e[1068],t([3,4]),(function(e,t){return e.create("vs/workbench/api/common/jsonValidationExtensionPoint",t)})),define(e[1069],t([3,4]),(function(e,t){return e.create("vs/workbench/api/common/menusExtensionPoint",t)})),define(e[1070],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/developerActions",t)})),define(e[1071],t([3,4]),(function(e,t){ return e.create("vs/workbench/browser/actions/helpActions",t)})),define(e[1072],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/layoutActions",t)})),define(e[1073],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/navigationActions",t)})),define(e[1074],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/quickAccessActions",t)})),define(e[1075],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/textInputActions",t)})),define(e[1076],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/windowActions",t)})),define(e[1077],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/workspaceActions",t)})),define(e[1078],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/actions/workspaceCommands",t)})),define(e[1079],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/activitybar/activitybarActions",t)})),define(e[1080],t([3,4]),(function(e,t){ return e.create("vs/workbench/browser/parts/activitybar/activitybarPart",t)})),define(e[1081],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/compositeBar",t)})),define(e[1082],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/compositeBarActions",t)})),define(e[1083],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/compositePart",t)})),define(e[1084],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/binaryDiffEditor",t)})),define(e[1085],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/binaryEditor",t)})),define(e[1086],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/breadcrumbs",t)})),define(e[1087],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/breadcrumbsControl",t)})),define(e[1088],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/breadcrumbsPicker",t)})),define(e[1089],t([3,4]),(function(e,t){ return e.create("vs/workbench/browser/parts/editor/editor.contribution",t)})),define(e[1090],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorActions",t)})),define(e[1091],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorCommands",t)})),define(e[1092],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorDropTarget",t)})),define(e[1093],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorGroupView",t)})),define(e[1094],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorQuickAccess",t)})),define(e[1095],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorStatus",t)})),define(e[1096],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/editorWidgets",t)})),define(e[1097],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/tabsTitleControl",t)})),define(e[1098],t([3,4]),(function(e,t){ return e.create("vs/workbench/browser/parts/editor/textDiffEditor",t)})),define(e[1099],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/textEditor",t)})),define(e[1100],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/textResourceEditor",t)})),define(e[1101],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/editor/titleControl",t)})),define(e[1102],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsActions",t)})),define(e[1103],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsAlerts",t)})),define(e[1104],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsCenter",t)})),define(e[1105],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsCommands",t)})),define(e[1106],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsList",t) })),define(e[1107],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsStatus",t)})),define(e[1108],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsViewer",t)})),define(e[1109],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/panel/panelActions",t)})),define(e[1110],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/panel/panelPart",t)})),define(e[1111],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/sidebar/sidebarPart",t)})),define(e[1112],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/statusbar/statusbarPart",t)})),define(e[1113],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/titlebar/menubarControl",t)})),define(e[1114],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/titlebar/titlebarPart",t)})),define(e[1115],t([3,4]),(function(e,t){ return e.create("vs/workbench/browser/parts/views/viewPaneContainer",t)})),define(e[1116],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/parts/views/viewsService",t)})),define(e[1117],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/viewlet",t)})),define(e[1118],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/workbench",t)})),define(e[1119],t([3,4]),(function(e,t){return e.create("vs/workbench/browser/workbench.contribution",t)})),define(e[1120],t([3,4]),(function(e,t){return e.create("vs/workbench/common/actions",t)})),define(e[1121],t([3,4]),(function(e,t){return e.create("vs/workbench/common/configuration",t)})),define(e[1122],t([3,4]),(function(e,t){return e.create("vs/workbench/common/editor",t)})),define(e[1123],t([3,4]),(function(e,t){return e.create("vs/workbench/common/editor/diffEditorInput",t)})),define(e[1124],t([3,4]),(function(e,t){return e.create("vs/workbench/common/theme",t)})),define(e[1125],t([3,4]),(function(e,t){ return e.create("vs/workbench/common/views",t)})),define(e[1126],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/bulkEdit/browser/bulkEditService",t)})),define(e[1127],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution",t)})),define(e[1128],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane",t)})),define(e[1129],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview",t)})),define(e[1130],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree",t)})),define(e[1131],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution",t)})),define(e[1132],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek",t)})),define(e[1133],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyTree",t)})),define(e[1134],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeActions/common/codeActionsContribution",t)})),define(e[1135],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint",t)})),define(e[1136],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeActions/common/documentationExtensionPoint",t)})),define(e[1137],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/accessibility/accessibility",t)})),define(e[1138],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/diffEditorHelper",t)})),define(e[1139],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget",t)})),define(e[1140],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget",t)})),define(e[1141],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens",t)})),define(e[1142],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/inspectKeybindings",t)})),define(e[1143],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint",t)})),define(e[1144],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/largeFileOptimizations",t)})),define(e[1145],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess",t)})),define(e[1146],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess",t)})),define(e[1147],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/saveParticipants",t)})),define(e[1148],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/toggleColumnSelection",t)})), define(e[1149],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/toggleMinimap",t)})),define(e[1150],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier",t)})),define(e[1151],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter",t)})),define(e[1152],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace",t)})),define(e[1153],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/codeEditor/browser/toggleWordWrap",t)})),define(e[1154],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/commentGlyphWidget",t)})),define(e[1155],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/commentNode",t)})),define(e[1156],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/commentThreadWidget",t)})),define(e[1157],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/comments/browser/comments.contribution",t)})),define(e[1158],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/commentsEditorContribution",t)})),define(e[1159],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/commentsTreeViewer",t)})),define(e[1160],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/commentsView",t)})),define(e[1161],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/browser/reactionsAction",t)})),define(e[1162],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/comments/common/commentModel",t)})),define(e[1163],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/customEditor/browser/customEditors",t)})),define(e[1164],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/customEditor/common/contributedCustomEditors",t)})),define(e[1165],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/customEditor/common/extensionPoint",t)})),define(e[1166],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/breakpointEditorContribution",t)})),define(e[1167],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/breakpointWidget",t)})),define(e[1168],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/breakpointsView",t)})),define(e[1169],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/callStackEditorContribution",t)})),define(e[1170],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/callStackView",t)})),define(e[1171],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debug.contribution",t)})),define(e[1172],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugActionViewItems",t)})),define(e[1173],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugActions",t)})), define(e[1174],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugCommands",t)})),define(e[1175],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugConfigurationManager",t)})),define(e[1176],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugEditorActions",t)})),define(e[1177],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugEditorContribution",t)})),define(e[1178],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugHover",t)})),define(e[1179],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugQuickAccess",t)})),define(e[1180],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugService",t)})),define(e[1181],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugSession",t)})),define(e[1182],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/debug/browser/debugStatus",t)})),define(e[1183],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugTaskRunner",t)})),define(e[1184],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugToolBar",t)})),define(e[1185],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/debugViewlet",t)})),define(e[1186],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/exceptionWidget",t)})),define(e[1187],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/linkDetector",t)})),define(e[1188],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/loadedScriptsView",t)})),define(e[1189],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/rawDebugSession",t)})),define(e[1190],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/repl",t)})),define(e[1191],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/debug/browser/replFilter",t)})),define(e[1192],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/replViewer",t)})),define(e[1193],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/statusbarColorProvider",t)})),define(e[1194],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/variablesView",t)})),define(e[1195],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/watchExpressionsView",t)})),define(e[1196],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/browser/welcomeView",t)})),define(e[1197],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/abstractDebugAdapter",t)})),define(e[1198],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/debug",t)})),define(e[1199],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/debugContentProvider",t)})),define(e[1200],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/debug/common/debugModel",t)})),define(e[1201],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/debugSchemas",t)})),define(e[1202],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/debugSource",t)})),define(e[1203],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/debugger",t)})),define(e[1204],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/debug/common/replModel",t)})),define(e[1205],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/emmet/browser/actions/expandAbbreviation",t)})),define(e[1206],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/emmet/browser/actions/showEmmetCommands",t)})),define(e[1207],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/experiments/browser/experiments.contribution",t)})),define(e[1208],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/configBasedRecommendations",t)})), define(e[1209],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations",t)})),define(e[1210],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/exeBasedRecommendations",t)})),define(e[1211],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionEditor",t)})),define(e[1212],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService",t)})),define(e[1213],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensions.contribution",t)})),define(e[1214],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsActions",t)})),define(e[1215],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsActivationProgress",t)})),define(e[1216],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/extensions/browser/extensionsDependencyChecker",t)})),define(e[1217],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsQuickAccess",t)})),define(e[1218],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsViewer",t)})),define(e[1219],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsViewlet",t)})),define(e[1220],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsViews",t)})),define(e[1221],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsWidgets",t)})),define(e[1222],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/extensionsWorkbenchService",t)})),define(e[1223],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/fileBasedRecommendations",t)})),define(e[1224],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/extensions/browser/remoteExtensionsInstaller",t)})),define(e[1225],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/browser/workspaceRecommendations",t)})),define(e[1226],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/common/extensionsFileTemplate",t)})),define(e[1227],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/common/extensionsInput",t)})),define(e[1228],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/extensions/common/extensionsUtils",t)})),define(e[1229],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution",t)})),define(e[1230],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/feedback/browser/feedback",t)})),define(e[1231],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/feedback/browser/feedbackStatusbarItem",t)})),define(e[1232],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/files/browser/editors/binaryFileEditor",t)})),define(e[1233],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/editors/textFileEditor",t)})),define(e[1234],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler",t)})),define(e[1235],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/explorerViewlet",t)})),define(e[1236],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/fileActions",t)})),define(e[1237],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/fileActions.contribution",t)})),define(e[1238],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/fileCommands",t)})),define(e[1239],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/files.contribution",t)})),define(e[1240],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/files/browser/files.web.contribution",t)})),define(e[1241],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/views/emptyView",t)})),define(e[1242],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/views/explorerDecorationsProvider",t)})),define(e[1243],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/views/explorerView",t)})),define(e[1244],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/views/explorerViewer",t)})),define(e[1245],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/browser/views/openEditorsView",t)})),define(e[1246],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/common/dirtyFilesIndicator",t)})),define(e[1247],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/files/common/editors/fileEditorInput",t)})),define(e[1248],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/files/common/workspaceWatcher",t)})),define(e[1249],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/format/browser/formatActionsMultiple",t)})),define(e[1250],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/format/browser/formatActionsNone",t)})),define(e[1251],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/format/browser/formatModified",t)})),define(e[1252],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/issue/browser/issue.web.contribution",t)})),define(e[1253],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/keybindings/browser/keybindings.contribution",t)})),define(e[1254],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/logs/common/logs.contribution",t)})),define(e[1255],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/logs/common/logsActions",t)})),define(e[1256],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/markers",t)})), define(e[1257],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/markers.contribution",t)})),define(e[1258],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/markersFileDecorations",t)})),define(e[1259],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/markersTreeViewer",t)})),define(e[1260],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/markersView",t)})),define(e[1261],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/markersViewActions",t)})),define(e[1262],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/markers/browser/messages",t)})),define(e[1263],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/contrib/coreActions",t)})),define(e[1264],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/contrib/find/findController",t)})),define(e[1265],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/notebook/browser/contrib/fold/folding",t)})),define(e[1266],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/contrib/format/formatting",t)})),define(e[1267],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/contrib/status/editorStatus",t)})),define(e[1268],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/diff/notebookDiffActions",t)})),define(e[1269],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor",t)})),define(e[1270],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/extensionPoint",t)})),define(e[1271],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/notebook.contribution",t)})),define(e[1272],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/notebookEditor",t)})),define(e[1273],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/notebook/browser/notebookEditorWidget",t)})),define(e[1274],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/notebookKernelAssociation",t)})),define(e[1275],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/notebookServiceImpl",t)})),define(e[1276],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer",t)})),define(e[1277],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets",t)})),define(e[1278],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/view/renderers/codeCell",t)})),define(e[1279],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel",t)})),define(e[1280],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/notebook/common/model/notebookTextModel",t)})),define(e[1281],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/notebook/common/notebookEditorModel",t)})),define(e[1282],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/outline/browser/outline.contribution",t)})),define(e[1283],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/outline/browser/outlinePane",t)})),define(e[1284],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/output/browser/logViewer",t)})),define(e[1285],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/output/browser/output.contribution",t)})),define(e[1286],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/output/browser/outputView",t)})),define(e[1287],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/performance/browser/performance.contribution",t)})),define(e[1288],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/performance/browser/perfviewEditor",t)})),define(e[1289],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/keybindingWidgets",t)})), define(e[1290],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/keybindingsEditor",t)})),define(e[1291],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/keybindingsEditorContribution",t)})),define(e[1292],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/keyboardLayoutPicker",t)})),define(e[1293],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/preferences.contribution",t)})),define(e[1294],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/preferencesActions",t)})),define(e[1295],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/preferencesEditor",t)})),define(e[1296],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/preferencesRenderers",t)})),define(e[1297],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/preferencesWidgets",t)})), define(e[1298],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/settingsEditor2",t)})),define(e[1299],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/settingsLayout",t)})),define(e[1300],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/settingsTree",t)})),define(e[1301],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/settingsTreeModels",t)})),define(e[1302],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/settingsWidgets",t)})),define(e[1303],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/browser/tocTree",t)})),define(e[1304],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/preferences/common/preferencesContribution",t)})),define(e[1305],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/quickaccess/browser/commandsQuickAccess",t)})),define(e[1306],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/quickaccess/browser/quickAccess.contribution",t)})),define(e[1307],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/quickaccess/browser/viewQuickAccess",t)})),define(e[1308],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/relauncher/browser/relauncher.contribution",t)})),define(e[1309],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/remote/browser/explorerViewItems",t)})),define(e[1310],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/remote/browser/remote",t)})),define(e[1311],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/remote/browser/remoteIndicator",t)})),define(e[1312],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/remote/browser/tunnelView",t)})),define(e[1313],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/remote/common/remote.contribution",t)})),define(e[1314],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/sash/browser/sash.contribution",t)})), define(e[1315],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/scm/browser/activity",t)})),define(e[1316],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/scm/browser/dirtydiffDecorator",t)})),define(e[1317],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/scm/browser/scm.contribution",t)})),define(e[1318],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/scm/browser/scmRepositoriesViewPane",t)})),define(e[1319],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/scm/browser/scmViewPane",t)})),define(e[1320],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/scm/browser/scmViewPaneContainer",t)})),define(e[1321],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/anythingQuickAccess",t)})),define(e[1322],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/patternInputWidget",t)})),define(e[1323],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/search/browser/replaceService",t)})),define(e[1324],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/search.contribution",t)})),define(e[1325],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/searchActions",t)})),define(e[1326],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/searchResultsView",t)})),define(e[1327],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/searchView",t)})),define(e[1328],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/searchWidget",t)})),define(e[1329],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/browser/symbolsQuickAccess",t)})),define(e[1330],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/search/common/queryBuilder",t)})),define(e[1331],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/searchEditor/browser/searchEditor",t)})), define(e[1332],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/searchEditor/browser/searchEditor.contribution",t)})),define(e[1333],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/searchEditor/browser/searchEditorActions",t)})),define(e[1334],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/searchEditor/browser/searchEditorInput",t)})),define(e[1335],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/searchEditor/browser/searchEditorSerialization",t)})),define(e[1336],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/snippets/browser/configureSnippets",t)})),define(e[1337],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/snippets/browser/insertSnippet",t)})),define(e[1338],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/snippets/browser/snippetCompletionProvider",t)})),define(e[1339],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/snippets/browser/snippets.contribution",t)})), define(e[1340],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/snippets/browser/snippetsFile",t)})),define(e[1341],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/snippets/browser/snippetsService",t)})),define(e[1342],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/surveys/browser/languageSurveys.contribution",t)})),define(e[1343],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/surveys/browser/nps.contribution",t)})),define(e[1344],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/browser/abstractTaskService",t)})),define(e[1345],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/browser/runAutomaticTasks",t)})),define(e[1346],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/browser/task.contribution",t)}));define(e[1347],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/browser/taskQuickPick",t)})),define(e[1348],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/tasks/browser/taskService",t)})),define(e[1349],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/browser/tasksQuickAccess",t)})),define(e[1350],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/browser/terminalTaskSystem",t)})),define(e[1351],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/jsonSchemaCommon",t)})),define(e[1352],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/jsonSchema_v1",t)})),define(e[1353],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/jsonSchema_v2",t)})),define(e[1354],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/problemMatcher",t)})),define(e[1355],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/taskConfiguration",t)})),define(e[1356],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/taskDefinitionRegistry",t)})), define(e[1357],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/taskTemplates",t)})),define(e[1358],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/tasks/common/tasks",t)})),define(e[1359],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/environmentVariableInfo",t)})),define(e[1360],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/links/terminalLink",t)})),define(e[1361],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/links/terminalLinkManager",t)})),define(e[1362],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/links/terminalWordLinkProvider",t)})),define(e[1363],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminal.contribution",t)})),define(e[1364],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminalActions",t)})),define(e[1365],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/terminal/browser/terminalConfigHelper",t)})),define(e[1366],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminalInstance",t)})),define(e[1367],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy",t)})),define(e[1368],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminalQuickAccess",t)})),define(e[1369],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminalService",t)})),define(e[1370],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/browser/terminalView",t)})),define(e[1371],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/common/terminal",t)})),define(e[1372],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/common/terminalColorRegistry",t)})),define(e[1373],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/terminal/common/terminalConfiguration",t)})),define(e[1374],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/terminal/common/terminalMenu",t)})),define(e[1375],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/themes/browser/themes.contribution",t)})),define(e[1376],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/timeline/browser/timeline.contribution",t)})),define(e[1377],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/timeline/browser/timelinePane",t)})),define(e[1378],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/update/browser/releaseNotesEditor",t)})),define(e[1379],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/update/browser/update",t)})),define(e[1380],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/update/browser/update.contribution",t)})),define(e[1381],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/url/browser/trustedDomains",t)})), define(e[1382],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/url/browser/trustedDomainsValidator",t)})),define(e[1383],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/url/browser/url.contribution",t)})),define(e[1384],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/userDataSync/browser/userDataSync",t)})),define(e[1385],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/userDataSync/browser/userDataSync.contribution",t)})),define(e[1386],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView",t)})),define(e[1387],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/userDataSync/browser/userDataSyncViews",t)})),define(e[1388],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/views/browser/treeView",t)})),define(e[1389],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/watermark/browser/watermark",t)})),define(e[1390],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/webview/browser/baseWebviewElement",t)})),define(e[1391],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/webviewPanel/browser/webviewCommands",t)})),define(e[1392],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution",t)})),define(e[1393],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/common/viewsWelcomeContribution",t)})),define(e[1394],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/common/viewsWelcomeExtensionPoint",t)})),define(e[1395],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay",t)})),define(e[1396],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page",t)})),define(e[1397],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/page/browser/welcomePage",t)})),define(e[1398],t([3,4]),(function(e,t){ return e.create("vs/workbench/contrib/welcome/page/browser/welcomePage.contribution",t)})),define(e[1399],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/telemetryOptOut/browser/telemetryOptOut",t)})),define(e[1400],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough",t)})),define(e[1401],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/walkThrough/browser/walkThrough.contribution",t)})),define(e[1402],t([3,4]),(function(e,t){return e.create("vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart",t)})),define(e[1403],t([3,4]),(function(e,t){return e.create("vs/workbench/services/authentication/browser/authenticationService",t)})),define(e[1404],t([3,4]),(function(e,t){return e.create("vs/workbench/services/configuration/common/configurationEditingService",t)})),define(e[1405],t([3,4]),(function(e,t){return e.create("vs/workbench/services/configuration/common/jsonEditingService",t)})), define(e[1406],t([3,4]),(function(e,t){return e.create("vs/workbench/services/configurationResolver/browser/configurationResolverService",t)})),define(e[1407],t([3,4]),(function(e,t){return e.create("vs/workbench/services/configurationResolver/common/configurationResolverSchema",t)})),define(e[1408],t([3,4]),(function(e,t){return e.create("vs/workbench/services/configurationResolver/common/configurationResolverUtils",t)})),define(e[1409],t([3,4]),(function(e,t){return e.create("vs/workbench/services/configurationResolver/common/variableResolver",t)})),define(e[1410],t([3,4]),(function(e,t){return e.create("vs/workbench/services/decorations/browser/decorationsService",t)})),define(e[1411],t([3,4]),(function(e,t){return e.create("vs/workbench/services/dialogs/browser/abstractFileDialogService",t)})),define(e[1412],t([3,4]),(function(e,t){return e.create("vs/workbench/services/dialogs/browser/dialogService",t)})),define(e[1413],t([3,4]),(function(e,t){ return e.create("vs/workbench/services/dialogs/browser/simpleFileDialog",t)})),define(e[1414],t([3,4]),(function(e,t){return e.create("vs/workbench/services/editor/browser/editorService",t)})),define(e[1415],t([3,4]),(function(e,t){return e.create("vs/workbench/services/editor/common/editorOpenWith",t)})),define(e[1416],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensionManagement/common/extensionEnablementService",t)})),define(e[1417],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensionManagement/common/extensionManagementServerService",t)})),define(e[1418],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensionManagement/common/extensionManagementService",t)})),define(e[1419],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensionManagement/common/webExtensionManagementService",t)})),define(e[1420],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensionManagement/common/webExtensionsScannerService",t)})), define(e[1421],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/browser/extensionService",t)})),define(e[1422],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/browser/extensionUrlHandler",t)})),define(e[1423],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/browser/webWorkerExtensionHost",t)})),define(e[1424],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/common/abstractExtensionService",t)})),define(e[1425],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/common/extensionHostManager",t)})),define(e[1426],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/common/extensionsRegistry",t)})),define(e[1427],t([3,4]),(function(e,t){return e.create("vs/workbench/services/extensions/common/remoteExtensionHost",t)})),define(e[1428],t([3,4]),(function(e,t){return e.create("vs/workbench/services/keybinding/browser/keybindingService",t)})), define(e[1429],t([3,4]),(function(e,t){return e.create("vs/workbench/services/keybinding/browser/keymapService",t)})),define(e[1430],t([3,4]),(function(e,t){return e.create("vs/workbench/services/keybinding/common/keybindingEditing",t)})),define(e[1431],t([3,4]),(function(e,t){return e.create("vs/workbench/services/label/common/labelService",t)})),define(e[1432],t([3,4]),(function(e,t){return e.create("vs/workbench/services/lifecycle/browser/lifecycleService",t)})),define(e[1433],t([3,4]),(function(e,t){return e.create("vs/workbench/services/mode/common/workbenchModeService",t)})),define(e[1434],t([3,4]),(function(e,t){return e.create("vs/workbench/services/notification/common/notificationService",t)})),define(e[1435],t([3,4]),(function(e,t){return e.create("vs/workbench/services/preferences/browser/preferencesService",t)})),define(e[1436],t([3,4]),(function(e,t){return e.create("vs/workbench/services/preferences/common/keybindingsEditorModel",t)})),define(e[1437],t([3,4]),(function(e,t){ return e.create("vs/workbench/services/preferences/common/preferences",t)})),define(e[1438],t([3,4]),(function(e,t){return e.create("vs/workbench/services/preferences/common/preferencesEditorInput",t)})),define(e[1439],t([3,4]),(function(e,t){return e.create("vs/workbench/services/preferences/common/preferencesModels",t)})),define(e[1440],t([3,4]),(function(e,t){return e.create("vs/workbench/services/preferences/common/preferencesValidation",t)})),define(e[1441],t([3,4]),(function(e,t){return e.create("vs/workbench/services/progress/browser/progressService",t)})),define(e[1442],t([3,4]),(function(e,t){return e.create("vs/workbench/services/remote/common/abstractRemoteAgentService",t)})),define(e[1443],t([3,4]),(function(e,t){return e.create("vs/workbench/services/textMate/browser/abstractTextMateService",t)})),define(e[1444],t([3,4]),(function(e,t){return e.create("vs/workbench/services/textMate/common/TMGrammarFactory",t)})),define(e[1445],t([3,4]),(function(e,t){ return e.create("vs/workbench/services/textMate/common/TMGrammars",t)})),define(e[1446],t([3,4]),(function(e,t){return e.create("vs/workbench/services/textfile/browser/textFileService",t)})),define(e[1447],t([3,4]),(function(e,t){return e.create("vs/workbench/services/textfile/common/textFileEditorModel",t)})),define(e[1448],t([3,4]),(function(e,t){return e.create("vs/workbench/services/textfile/common/textFileEditorModelManager",t)})),define(e[1449],t([3,4]),(function(e,t){return e.create("vs/workbench/services/textfile/common/textFileSaveParticipant",t)})),define(e[1450],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/browser/fileIconThemeData",t)})),define(e[1451],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/browser/productIconThemeData",t)})),define(e[1452],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/browser/workbenchThemeService",t)})),define(e[1453],t([3,4]),(function(e,t){ return e.create("vs/workbench/services/themes/common/colorExtensionPoint",t)})),define(e[1454],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/colorThemeData",t)})),define(e[1455],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/colorThemeSchema",t)})),define(e[1456],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/fileIconThemeSchema",t)})),define(e[1457],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/productIconThemeSchema",t)})),define(e[1458],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/themeConfiguration",t)})),define(e[1459],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/themeExtensionPoints",t)})),define(e[1460],t([3,4]),(function(e,t){return e.create("vs/workbench/services/themes/common/tokenClassificationExtensionPoint",t)})),define(e[1461],t([3,4]),(function(e,t){ return e.create("vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService",t)})),define(e[1462],t([3,4]),(function(e,t){return e.create("vs/workbench/services/userDataSync/common/userDataSync",t)})),define(e[1463],t([3,4]),(function(e,t){return e.create("vs/workbench/services/views/browser/viewDescriptorService",t)})),define(e[1464],t([3,4]),(function(e,t){return e.create("vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant",t)})),define(e[1465],t([3,4]),(function(e,t){return e.create("vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService",t)})),define(e[1466],t([0,1,7]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserClipboardService=void 0;t.BrowserClipboardService=class{constructor(){this.mapTextToType=new Map,this.findText="",this.resources=[]}async writeText(e,t){if(t)return void this.mapTextToType.set(t,e);try{return await navigator.clipboard.writeText(e)}catch(e){console.error(e)} const n=document.activeElement,o=document.body.appendChild(i.$("textarea",{"aria-hidden":!0}));o.style.height="1px",o.style.width="1px",o.style.position="absolute",o.value=e,o.focus(),o.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(o)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await navigator.clipboard.readText()}catch(e){return console.error(e),""}}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){this.resources=e}async readResources(){return this.resources}async hasResources(){return this.resources.length>0}}})),define(e[1467],t([0,1,6,2]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionHostDebugChannelClient=t.ExtensionHostDebugBroadcastChannel=void 0;class o{constructor(){this._onCloseEmitter=new i.Emitter,this._onReloadEmitter=new i.Emitter,this._onTerminateEmitter=new i.Emitter,this._onLogToEmitter=new i.Emitter, this._onAttachEmitter=new i.Emitter}call(e,t,i){switch(t){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:i[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:i[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:i[0]}));case"log":return Promise.resolve(this._onLogToEmitter.fire({sessionId:i[0],log:i[1]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:i[0],port:i[1],subId:i[2]}))}throw new Error("Method not implemented.")}listen(e,t,i){switch(t){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"log":return this._onLogToEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}t.ExtensionHostDebugBroadcastChannel=o,o.ChannelName="extensionhostdebugservice";class s extends n.Disposable{constructor(e){super(),this.channel=e}reload(e){ this.channel.call("reload",[e])}get onReload(){return this.channel.listen("reload")}close(e){this.channel.call("close",[e])}get onClose(){return this.channel.listen("close")}attachSession(e,t,i){this.channel.call("attach",[e,t,i])}get onAttachSession(){return this.channel.listen("attach")}logToSession(e,t){this.channel.call("log",[e,t])}get onLogToSession(){return this.channel.listen("log")}terminateSession(e,t){this.channel.call("terminate",[e,t])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(e,t,i){return this.channel.call("openExtensionDevelopmentHostWindow",[e,t,i])}}t.ExtensionHostDebugChannelClient=s})),define(e[1468],t([0,1,7,14]),(function(e,t,i,n){"use strict";function o(e,t){const n=Object.create(null);for(let t=0;te.trim())).map(e=>`.${e}`).join("");t.unshift(`${e}${o}${s}`),i=i.parentElement}throw new Error(`Active element not found. Current active element is '${t.join(" > ")}'. Looking for ${e}`)}return!0}async getElements(e,t){const i=document.querySelectorAll(e),n=[];for(let e=0;eo.has(e)?e:e.replace(l,"a"))},t.getRemotes=function(e,t=!1){const i=[];let n;for(;n=a.exec(e);){const e=u(n[1],t);e&&i.push(e)}return i}})),define(e[1471],t([0,1,6,10,510,41]),(function(e,t,i,n,o,s){"use strict";function r(e,t){return n.URI.revive(t?t.transformIncoming(e):e)}function a(e,t){t=t||o.DefaultURITransformer;const i=e.manifest,n=o.transformAndReviveIncomingURIs(Object.assign(Object.assign({},e),{ manifest:void 0}),t);return Object.assign(Object.assign({},n),{manifest:i})}function l(e,t){return t?s.cloneAndChange(e,e=>e instanceof n.URI?t.transformOutgoingURI(e):void 0):e}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTipsChannel=t.ExtensionManagementChannelClient=t.ExtensionManagementChannel=void 0;t.ExtensionManagementChannel=class{constructor(e,t){this.service=e,this.getUriTransformer=t,this.onInstallExtension=i.Event.buffer(e.onInstallExtension,!0),this.onDidInstallExtension=i.Event.buffer(e.onDidInstallExtension,!0),this.onUninstallExtension=i.Event.buffer(e.onUninstallExtension,!0),this.onDidUninstallExtension=i.Event.buffer(e.onDidUninstallExtension,!0)}listen(e,t){const n=this.getUriTransformer(e);switch(t){case"onInstallExtension":return this.onInstallExtension;case"onDidInstallExtension":return i.Event.map(this.onDidInstallExtension,e=>Object.assign(Object.assign({},e),{local:e.local?l(e.local,n):e.local}));case"onUninstallExtension":return this.onUninstallExtension ;case"onDidUninstallExtension":return this.onDidUninstallExtension}throw new Error("Invalid listen")}call(e,t,i){const n=this.getUriTransformer(e);switch(t){case"zip":return this.service.zip(a(i[0],n)).then(e=>(function(e,t){return t?t.transformOutgoingURI(e):e})(e,n));case"unzip":return this.service.unzip(r(i[0],n));case"install":return this.service.install(r(i[0],n));case"getManifest":return this.service.getManifest(r(i[0],n));case"canInstall":return this.service.canInstall(i[0]);case"installFromGallery":return this.service.installFromGallery(i[0]);case"uninstall":return this.service.uninstall(a(i[0],n),i[1]);case"reinstallFromGallery":return this.service.reinstallFromGallery(a(i[0],n));case"getInstalled":return this.service.getInstalled(i[0]).then(e=>e.map(e=>l(e,n)));case"updateMetadata":return this.service.updateMetadata(a(i[0],n),i[1]).then(e=>l(e,n));case"getExtensionsReport":return this.service.getExtensionsReport()}throw new Error("Invalid call")}};t.ExtensionManagementChannelClient=class{ constructor(e){this.channel=e}get onInstallExtension(){return this.channel.listen("onInstallExtension")}get onDidInstallExtension(){return i.Event.map(this.channel.listen("onDidInstallExtension"),e=>Object.assign(Object.assign({},e),{local:e.local?a(e.local,null):e.local}))}get onUninstallExtension(){return this.channel.listen("onUninstallExtension")}get onDidUninstallExtension(){return this.channel.listen("onDidUninstallExtension")}zip(e){return Promise.resolve(this.channel.call("zip",[e]).then(e=>n.URI.revive(e)))}unzip(e){return Promise.resolve(this.channel.call("unzip",[e]))}install(e){return Promise.resolve(this.channel.call("install",[e])).then(e=>a(e,null))}getManifest(e){return Promise.resolve(this.channel.call("getManifest",[e]))}async canInstall(e){return!0}installFromGallery(e){return Promise.resolve(this.channel.call("installFromGallery",[e])).then(e=>a(e,null))}uninstall(e,t=!1){return Promise.resolve(this.channel.call("uninstall",[e,t]))}reinstallFromGallery(e){ return Promise.resolve(this.channel.call("reinstallFromGallery",[e]))}getInstalled(e=null){return Promise.resolve(this.channel.call("getInstalled",[e])).then(e=>e.map(e=>a(e,null)))}updateMetadata(e,t){return Promise.resolve(this.channel.call("updateMetadata",[e,t])).then(e=>a(e,null))}getExtensionsReport(){return Promise.resolve(this.channel.call("getExtensionsReport"))}};t.ExtensionTipsChannel=class{constructor(e){this.service=e}listen(e,t){throw new Error("Invalid listen")}call(e,t,i){switch(t){case"getConfigBasedTips":return this.service.getConfigBasedTips(n.URI.revive(i[0]));case"getImportantExecutableBasedTips":return this.service.getImportantExecutableBasedTips();case"getOtherExecutableBasedTips":return this.service.getOtherExecutableBasedTips();case"getAllWorkspacesTips":return this.service.getAllWorkspacesTips()}throw new Error("Invalid call")}}})),define(e[1472],t([0,1,41]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizeManifest=void 0 ;const n=/^%([\w\d.-]+)%$/i;t.localizeManifest=function(e,t){return i.cloneAndChange(e,e=>{if("string"!=typeof e)return;const i=n.exec(e);return i?t[i[1]]||e:void 0})}})),define(e[1473],t([0,1,1032]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVersionValid=t.isEngineValid=t.isValidExtensionVersion=t.isValidVersion=t.normalizeVersion=t.parseVersion=t.isValidVersionStr=void 0;const n=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;function o(e){return"*"===(e=e.trim())||n.test(e)}function s(e){if(!o(e))return null;if("*"===(e=e.trim()))return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let t=e.match(n);return t?{hasCaret:"^"===t[1],hasGreaterEquals:">="===t[1],majorBase:"x"===t[2]?0:parseInt(t[2],10),majorMustEqual:"x"!==t[2],minorBase:"x"===t[4]?0:parseInt(t[4],10),minorMustEqual:"x"!==t[4],patchBase:"x"===t[6]?0:parseInt(t[6],10),patchMustEqual:"x"!==t[6], preRelease:t[8]||null}:null}function r(e){if(!e)return null;let t=e.majorBase,i=e.majorMustEqual,n=e.minorBase,o=e.minorMustEqual,s=e.patchBase,r=e.patchMustEqual;return e.hasCaret&&(0===t?r=!1:(o=!1,r=!1)),{majorBase:t,majorMustEqual:i,minorBase:n,minorMustEqual:o,patchBase:s,patchMustEqual:r,isMinimum:e.hasGreaterEquals}}function a(e,t){let i,n;if(i="string"==typeof e?r(s(e)):e,n="string"==typeof t?r(s(t)):t,!i||!n)return!1;let o=i.majorBase,a=i.minorBase,l=i.patchBase,c=n.majorBase,d=n.minorBase,h=n.patchBase,u=n.majorMustEqual,g=n.minorMustEqual,p=n.patchMustEqual;return n.isMinimum?o>c||!(od||!(a=h):(1!==o||0!==c||u&&g&&p||(c=1,d=0,h=0,u=!0,g=!1,p=!1),!(oc?!u:!(ad?!g:!(lh)||!p))))}function l(e,t,n=[]){let o=r(s(t));if(!o)return n.push(i.localize(0,null,t)),!1;if(0===o.majorBase){if(!o.majorMustEqual||!o.minorMustEqual)return n.push(i.localize(1,null,t)),!1}else if(!o.majorMustEqual)return n.push(i.localize(2,null,t)),!1 ;return!!a(e,o)||(n.push(i.localize(3,null,e,t)),!1)}t.isValidVersionStr=o,t.parseVersion=s,t.normalizeVersion=r,t.isValidVersion=a,t.isValidExtensionVersion=function(e,t,i){return!(!t.isBuiltin&&void 0!==t.main)||l(e,t.engines.vscode,i)},t.isEngineValid=function(e,t){return"*"===e||l(t,e)},t.isVersionValid=l})),define(e[90],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSyncDescriptor=t.SyncDescriptor=void 0;class i{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}t.SyncDescriptor=i;t.createSyncDescriptor=(e,...t)=>new i(e,t)})),define(e[33],t([0,1,90]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSingletonServiceDescriptors=t.registerSingleton=void 0;const n=[];t.registerSingleton=function(e,t,o){n.push([e,new i.SyncDescriptor(t,[],o)])},t.getSingletonServiceDescriptors=function(){return n}})),define(e[1474],t([0,1]),(function(e,t){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.Graph=t.Node=void 0;class i{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}t.Node=i;t.Graph=class{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new i(e),this._nodes.set(t,n)),n}lookup(e){return this._nodes.get(this._hashFn(e))}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}}})), define(e[5],t([0,1]),(function(e,t){"use strict";var i;function n(e,t,n,o){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:o}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:o}],t[i.DI_TARGET]=t)}function o(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,i,o){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,o,!1)};return t.toString=()=>e,i.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0}),t.optional=t.createDecorator=t.IInstantiationService=t._util=void 0,function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i=t._util||(t._util={})),t.IInstantiationService=o("instantiationService"),t.createDecorator=o,t.optional=function(e){return function(t,i,o){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,o,!0)}}})), define(e[143],t([0,1,5,10,13]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceFileEdit=t.ResourceTextEdit=t.ResourceEdit=t.IBulkEditService=void 0,t.IBulkEditService=i.createDecorator("IWorkspaceEditService");class s{constructor(e){this.metadata=e}static convert(e){return e.edits.map(e=>{if(function(e){return o.isObject(e)&&n.URI.isUri(e.resource)&&o.isObject(e.edit)}(e))return new r(e.resource,e.edit,e.modelVersionId,e.metadata);if(function(e){return o.isObject(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new a(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")})}}t.ResourceEdit=s;class r extends s{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i,this.metadata=n}}t.ResourceTextEdit=r;class a extends s{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i,this.metadata=n}}t.ResourceFileEdit=a})),define(e[72],t([0,1,5]),(function(e,t,i){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.ICodeEditorService=void 0,t.ICodeEditorService=i.createDecorator("codeEditorService")})),define(e[155],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorWorkerService=t.ID_EDITOR_WORKER_SERVICE=void 0,t.ID_EDITOR_WORKER_SERVICE="editorWorkerService",t.IEditorWorkerService=i.createDecorator(t.ID_EDITOR_WORKER_SERVICE)})),define(e[417],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMarkerDecorationsService=void 0,t.IMarkerDecorationsService=i.createDecorator("markerDecorationsService")})),define(e[50],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IModeService=void 0,t.IModeService=i.createDecorator("modeService")})),define(e[46],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldSynchronizeModel=t.IModelService=void 0,t.IModelService=i.createDecorator("modelService"), t.shouldSynchronizeModel=function(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}})),define(e[349],t([0,1,6,133,2,67,195,893,46]),(function(e,t,i,n,o,s,r,a,l){"use strict";function c(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(c):!!e.exclusive)}Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageFeatureRequestDelays=t.LanguageFeatureRegistry=void 0;class d{constructor(){this._clock=0,this._entries=[],this._onDidChange=new i.Emitter}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),o.toDisposable(()=>{if(i){let e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t} ordered(e){const t=[];return this._orderedForEach(e,e=>t.push(e.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))}),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=a.score(t.selector,e.uri,e.getLanguageIdentifier().language,l.shouldSynchronizeModel(e)),c(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(d._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}t.LanguageFeatureRegistry=d;t.LanguageFeatureRequestDelays=class{constructor(e,t,i=Number.MAX_SAFE_INTEGER){ this._registry=e,this.min=t,this.max=i,this._cache=new s.LRUCache(50,.7)}_key(e){return e.id+n.hash(this._registry.all(e))}_clamp(e){return void 0===e?this.min:Math.min(this.max,Math.max(this.min,Math.floor(1.3*e)))}get(e){const t=this._key(e),i=this._cache.get(t);return this._clamp(null==i?void 0:i.value)}update(e,t){const i=this._key(e);let n=this._cache.get(i);return n||(n=new r.MovingAverage,this._cache.set(i,n)),n.update(t),this.get(e)}}})),define(e[45],t([0,1,10,18,349,899,44]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.TokenizationRegistry=t.DocumentRangeSemanticTokensProviderRegistry=t.DocumentSemanticTokensProviderRegistry=t.FoldingRangeProviderRegistry=t.SelectionRangeRegistry=t.ColorProviderRegistry=t.LinkProviderRegistry=t.OnTypeFormattingEditProviderRegistry=t.DocumentRangeFormattingEditProviderRegistry=t.DocumentFormattingEditProviderRegistry=t.CodeActionProviderRegistry=t.CodeLensProviderRegistry=t.TypeDefinitionProviderRegistry=t.ImplementationProviderRegistry=t.DeclarationProviderRegistry=t.DefinitionProviderRegistry=t.OnTypeRenameProviderRegistry=t.DocumentHighlightProviderRegistry=t.DocumentSymbolProviderRegistry=t.EvaluatableExpressionProviderRegistry=t.HoverProviderRegistry=t.SignatureHelpProviderRegistry=t.CompletionProviderRegistry=t.RenameProviderRegistry=t.ReferenceProviderRegistry=t.CommentMode=t.CommentThreadCollapsibleState=t.FoldingRangeKind=t.SymbolKinds=t.SymbolTag=t.SymbolKind=t.isLocationLink=t.DocumentHighlightKind=t.SignatureHelpTriggerKind=t.CodeActionTriggerType=t.CompletionTriggerKind=t.CompletionItemInsertTextRule=t.CompletionItemTag=t.completionKindFromString=t.completionKindToCssClass=t.CompletionItemKind=t.TokenMetadata=t.MetadataConsts=t.StandardTokenType=t.ColorId=t.FontStyle=t.LanguageIdentifier=t.LanguageId=void 0, function(e){e[e.Null=0]="Null",e[e.PlainText=1]="PlainText"}(t.LanguageId||(t.LanguageId={}));t.LanguageIdentifier=class{constructor(e,t){this.language=e,this.id=t}},function(e){e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline"}(t.FontStyle||(t.FontStyle={})),function(e){e[e.None=0]="None",e[e.DefaultForeground=1]="DefaultForeground",e[e.DefaultBackground=2]="DefaultBackground"}(t.ColorId||(t.ColorId={})),function(e){e[e.Other=0]="Other",e[e.Comment=1]="Comment",e[e.String=2]="String",e[e.RegEx=4]="RegEx"}(t.StandardTokenType||(t.StandardTokenType={})),function(e){e[e.LANGUAGEID_MASK=255]="LANGUAGEID_MASK",e[e.TOKEN_TYPE_MASK=1792]="TOKEN_TYPE_MASK",e[e.FONT_STYLE_MASK=14336]="FONT_STYLE_MASK",e[e.FOREGROUND_MASK=8372224]="FOREGROUND_MASK",e[e.BACKGROUND_MASK=4286578688]="BACKGROUND_MASK",e[e.ITALIC_MASK=2048]="ITALIC_MASK",e[e.BOLD_MASK=4096]="BOLD_MASK",e[e.UNDERLINE_MASK=8192]="UNDERLINE_MASK",e[e.SEMANTIC_USE_ITALIC=1]="SEMANTIC_USE_ITALIC", e[e.SEMANTIC_USE_BOLD=2]="SEMANTIC_USE_BOLD",e[e.SEMANTIC_USE_UNDERLINE=4]="SEMANTIC_USE_UNDERLINE",e[e.SEMANTIC_USE_FOREGROUND=8]="SEMANTIC_USE_FOREGROUND",e[e.SEMANTIC_USE_BACKGROUND=16]="SEMANTIC_USE_BACKGROUND",e[e.LANGUAGEID_OFFSET=0]="LANGUAGEID_OFFSET",e[e.TOKEN_TYPE_OFFSET=8]="TOKEN_TYPE_OFFSET",e[e.FONT_STYLE_OFFSET=11]="FONT_STYLE_OFFSET",e[e.FOREGROUND_OFFSET=14]="FOREGROUND_OFFSET",e[e.BACKGROUND_OFFSET=23]="BACKGROUND_OFFSET"}(t.MetadataConsts||(t.MetadataConsts={}));t.TokenMetadata=class{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};` ;return 1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;"),4&n&&(o+="text-decoration: underline;"),o}},function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(t.CompletionItemKind||(t.CompletionItemKind={})),t.completionKindToCssClass=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function", e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const i=e[t];let n=i&&r.iconRegistry.get(i);return n||(console.info("No codicon found for CompletionItemKind "+t),n=r.Codicon.symbolProperty),n.classNames}}(),t.completionKindFromString=function(){let e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15, e["enum-member"]=16,e.enumMember=16,e.keyword=17,e.snippet=27,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,e.typeParameter=24,e.account=25,e.issue=26,function(t,i){let n=e[t];return void 0!==n||i||(n=9),n}}(),function(e){e[e.Deprecated=1]="Deprecated"}(t.CompletionItemTag||(t.CompletionItemTag={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(t.CompletionItemInsertTextRule||(t.CompletionItemInsertTextRule={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e[e.Auto=1]="Auto",e[e.Manual=2]="Manual"}(t.CodeActionTriggerType||(t.CodeActionTriggerType={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){ e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(t.DocumentHighlightKind||(t.DocumentHighlightKind={})),t.isLocationLink=function(e){return e&&i.URI.isUri(e.uri)&&n.Range.isIRange(e.range)&&(n.Range.isIRange(e.originSelectionRange)||n.Range.isIRange(e.targetSelectionRange))},function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(t.SymbolKind||(t.SymbolKind={})),function(e){ e[e.Deprecated=1]="Deprecated"}(t.SymbolTag||(t.SymbolTag={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const i=new Map;i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"), i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return i.get(e)},e.toCssClassName=function(e,t){const n=i.get(e);let o=n&&r.iconRegistry.get("symbol-"+n);return o||(console.info("No codicon found for SymbolKind "+e),o=r.Codicon.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}}(t.SymbolKinds||(t.SymbolKinds={}));class a{constructor(e){this.value=e}}t.FoldingRangeKind=a,a.Comment=new a("comment"),a.Imports=new a("imports"),a.Region=new a("region"),function(e){e[e.Collapsed=0]="Collapsed",e[e.Expanded=1]="Expanded"}(t.CommentThreadCollapsibleState||(t.CommentThreadCollapsibleState={})),function(e){e[e.Editing=0]="Editing",e[e.Preview=1]="Preview"}(t.CommentMode||(t.CommentMode={})),t.ReferenceProviderRegistry=new o.LanguageFeatureRegistry,t.RenameProviderRegistry=new o.LanguageFeatureRegistry,t.CompletionProviderRegistry=new o.LanguageFeatureRegistry, t.SignatureHelpProviderRegistry=new o.LanguageFeatureRegistry,t.HoverProviderRegistry=new o.LanguageFeatureRegistry,t.EvaluatableExpressionProviderRegistry=new o.LanguageFeatureRegistry,t.DocumentSymbolProviderRegistry=new o.LanguageFeatureRegistry,t.DocumentHighlightProviderRegistry=new o.LanguageFeatureRegistry,t.OnTypeRenameProviderRegistry=new o.LanguageFeatureRegistry,t.DefinitionProviderRegistry=new o.LanguageFeatureRegistry,t.DeclarationProviderRegistry=new o.LanguageFeatureRegistry,t.ImplementationProviderRegistry=new o.LanguageFeatureRegistry,t.TypeDefinitionProviderRegistry=new o.LanguageFeatureRegistry,t.CodeLensProviderRegistry=new o.LanguageFeatureRegistry,t.CodeActionProviderRegistry=new o.LanguageFeatureRegistry,t.DocumentFormattingEditProviderRegistry=new o.LanguageFeatureRegistry,t.DocumentRangeFormattingEditProviderRegistry=new o.LanguageFeatureRegistry,t.OnTypeFormattingEditProviderRegistry=new o.LanguageFeatureRegistry,t.LinkProviderRegistry=new o.LanguageFeatureRegistry, t.ColorProviderRegistry=new o.LanguageFeatureRegistry,t.SelectionRangeRegistry=new o.LanguageFeatureRegistry,t.FoldingRangeProviderRegistry=new o.LanguageFeatureRegistry,t.DocumentSemanticTokensProviderRegistry=new o.LanguageFeatureRegistry,t.DocumentRangeSemanticTokensProviderRegistry=new o.LanguageFeatureRegistry,t.TokenizationRegistry=new s.TokenizationRegistryImpl})),define(e[350],t([0,1,45]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SlicedLineTokens=t.LineTokens=void 0;class n{constructor(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}equals(e){return e instanceof n&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){ return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)];return i.TokenMetadata.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return i.TokenMetadata.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return i.TokenMetadata.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return i.TokenMetadata.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return i.TokenMetadata.getInlineStyleFromMetadata(n,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return n.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new o(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}}t.LineTokens=n;class o{ constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i)break;this._tokensCount++}}equals(e){return e instanceof o&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){ return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}t.SlicedLineTokens=o})),define(e[351],t([0,1,14,350,47,18,45,66]),(function(e,t,i,n,o,s,r,a){"use strict";function l(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;s>>0}Object.defineProperty(t,"__esModule",{value:!0}),t.TokensStore=t.TokensStore2=t.MultilineTokens=t.MultilineTokens2=t.LineTokens2=t.SparseEncodedTokens=t.MultilineTokensBuilder=t.countEOL=t.StringEOL=void 0,function(e){e[e.Unknown=0]="Unknown",e[e.Invalid=3]="Invalid",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.StringEOL||(t.StringEOL={})),t.countEOL=l;const d=new Uint32Array(0).buffer;t.MultilineTokensBuilder=class{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1] ;if(i.startLineNumber+i.tokens.length-1+1===e)return void i.tokens.push(t)}this.tokens.push(new p(e,[t]))}static deserialize(e){let t=0;const i=a.readUInt32BE(e,t);t+=4;let n=[];for(let o=0;oe)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;se||d===e&&u>=t)&&(de||h===e&&g>=t){if(ho?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){c=!0;continue}p-=o-i}else if(uo)){c=!0;continue}p=u===t?(g=i)+(p-o):(g=0)+(p-o)}else if(u>n){if(0===a&&!c){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const v=4*l;s[v]=u,s[v+1]=g,s[v+2]=p,s[v+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){ const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new o.Position(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){ if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;if(i<0){const e=i-t;return void(this.startLineNumber-=e)}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const n=-t;this.startLineNumber-=n,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this.startLineNumber;s<0?this.startLineNumber+=t:s>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}t.MultilineTokens2=g;class p{constructor(e,t){this.startLineNumber=e,this.tokens=t}static deserialize(e,t,i){const n=new Uint32Array(e.buffer),o=a.readUInt32BE(e,t);t+=4;const s=a.readUInt32BE(e,t);t+=4;let r=[];for(let i=0;i=this.tokens.length)){ if(t<0&&i>=this.tokens.length)return this.startLineNumber=0,void(this.tokens=[]);if(t!==i)if(t>=0)if(this.tokens[t]=f._deleteEnding(this.tokens[t],e.startColumn-1),i=this.tokens.length||(0!==t?(this.tokens[n]=f._deleteEnding(this.tokens[n],e.column-1),this.tokens[n]=f._insert(this.tokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this.tokens[n]=f._insert(this.tokens[n],e.column-1,i))}_insertLines(e,t){if(0===t)return;let n=[] ;for(let e=0;e0){const i=t[0].getRange(),o=t[t.length-1].getRange();if(!i||!o)return e;n=e.plusRange(i).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;en.endLineNumber){o=o||{index:e};break}if(i.removeTokens(n),i.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(i.endLineNumbern.endLineNumber){o=o||{index:e};continue}const[s,r]=i.split(n);s.isEmpty()?o=o||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length}, t.length>0&&(this._pieces=i.arrayInsert(this._pieces,o.index,t)),n}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(0===i.length)return t;const o=i[v._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!o)return t;const s=t.getCount(),r=o.getCount();let a=0,l=[],c=0,d=0;const h=(e,t)=>{e!==d&&(d=e,l[c++]=e,l[c++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;at)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}t.TokensStore2=v;class f{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let o=null;if(t1&&(t=r.TokenMetadata.getLanguageId(n[1])!==e),!t)return d}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=c(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++} _deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=f._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=f._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null ;i=this._len||(0!==t?(this._lineTokens[n]=f._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=f._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=f._insert(this._lineTokens[n],e.column-1,i))}static _deleteBeginning(e,t){return null===e||e===d?e:f._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===d)return e;const i=m(e),n=i[i.length-2];return f._delete(e,t,n)}static _delete(e,t,i){if(null===e||e===d||t===i)return e;const o=m(e),s=o.length>>>1;if(0===t&&o[o.length-2]===i)return d;const r=n.LineTokens.findIndexInTokensArray(o,t),a=r>0?o[r-1<<1]:0;if(ic&&(o[l++]=t,o[l++]=o[1+(e<<1)],c=t)}if(l===o.length)return e;let u=new Uint32Array(l);return u.set(o.subarray(0,l),0),u.buffer}static _append(e,t){if(t===d)return e;if(e===d)return t;if(null===e)return e;if(null===t)return null;const i=m(e),n=m(t),o=n.length>>>1;let s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let r=n.LineTokens.findIndexInTokensArray(o,t);if(r>0){o[r-1<<1]===t&&r--}for(let e=r;ee.sortIndex-t.sortIndex)}this._mightContainRTL=o,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=d;const f=this._doApplyEdits(u);let S=null;if(t&&m.length>0){m.sort((e,t)=>t.lineNumber-e.lineNumber),S=[];for(let e=0,t=m.length;e0&&m[e-1].lineNumber===t)continue;let i=m[e].oldContent,o=this.getLineContent(t);0!==o.length&&o!==i&&-1===n.firstNonWhitespaceIndex(o)&&S.push(t)}}return this._onDidChangeContent.fire(),new s.ApplyEditsResult(v,f,S)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1 ;const i=e[0].range,n=e[e.length-1].range,s=new o.Range(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,l=i.startColumn;const c=[];for(let i=0,n=e.length;i0&&c.push(n.text),r=s.endLineNumber,l=s.endColumn}const d=c.join(""),[h,u,g]=a.countEOL(d);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:d,eolCount:h,firstLineLength:u,lastLineLength:g,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(c._sortOpsDescending);let t=[];for(let i=0;i0){const e=s+1;c=1===e?new o.Range(i,n,i,n+r):new o.Range(i,n,i+e-1,l+1)}else c=new o.Range(i,n,i,n);return c}static _getInverseEditRanges(e){let t=[],i=0,n=0,s=null;for(let r=0,a=e.length;r0){const e=d.eolCount+1 ;c=1===e?new o.Range(a,l,a,l+d.firstLineLength):new o.Range(a,l,a+e-1,d.lastLineLength+1)}else c=new o.Range(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),s=d}return t}static _sortOpsAscending(e,t){let i=o.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=o.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}t.PieceTreeTextBuffer=c})),define(e[553],t([0,1,24,537,552]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PieceTreeTextBufferBuilder=t.PieceTreeTextBufferFactory=void 0;class s{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let i=this._chunks ;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,o=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0, this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=n.createLineStarts(this._tmpLineStarts,e);this.chunks.push(new n.StringBuffer(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=i.containsRTL(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=i.containsUnusualLineTerminators(e))}finish(e=!0){return this._finish(),new s(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1] ;e.buffer+=String.fromCharCode(this._previousChar);let t=n.createLineStartsFast(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}})),define(e[265],t([0,1,403,45]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nullTokenize2=t.nullTokenize=t.NULL_LANGUAGE_IDENTIFIER=t.NULL_MODE_ID=t.NULL_STATE=void 0;t.NULL_STATE=new class{clone(){return this}equals(e){return this===e}},t.NULL_MODE_ID="vs.editor.nullMode",t.NULL_LANGUAGE_IDENTIFIER=new n.LanguageIdentifier(t.NULL_MODE_ID,0),t.nullTokenize=function(e,t,n,o){return new i.TokenizationResult([new i.Token(o,"",e)],n)},t.nullTokenize2=function(e,n,o,s){let r=new Uint32Array(2);return r[0]=s,r[1]=(16384|e<<0|2<<23)>>>0,new i.TokenizationResult2(r,null===o?t.NULL_STATE:o)}})),define(e[1475],t([0,1,14,21,350,47,45,265,2,232,351,12]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";var u;Object.defineProperty(t,"__esModule",{value:!0}),t.TextModelTokenization=t.TokenizationStateStore=void 0,function(e){ e[e.CHEAP_TOKENIZATION_LENGTH_LIMIT=2048]="CHEAP_TOKENIZATION_LENGTH_LIMIT"}(u||(u={}));class g{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[],o=[];for(let e=0;e=0;t--)this._invalidateLine(e.startLineNumber+t-1);this._acceptDeleteRange(e),this._acceptInsertText(new s.Position(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}t.TokenizationStateStore=g;class p extends l.Disposable{constructor(e){super(),this._isDisposed=!1,this._textModel=e, this._tokenizationStateStore=new g,this._tokenizationSupport=null,this._register(r.TokenizationRegistry.onDidChange(e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeRawContentFast(e=>{e.containsEvent(1)&&this._resetTokenizationState()})),this._register(this._textModel.onDidChangeContentFast(e=>{for(let t=0,i=e.changes.length;t{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){const t=e.getLanguageIdentifier() ;let i=e.isTooLargeForTokenization()?null:r.TokenizationRegistry.get(t.language),o=null;if(i)try{o=i.getInitialState()}catch(e){n.onUnexpectedError(e),i=null}return[i,o]}(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&h.setImmediate(()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=new d.MultilineTokensBuilder,i=c.StopWatch.create(!1);for(;this._hasLinesToTokenize()&&!(i.elapsed()>1);){if(this._tokenizeOneInvalidLine(t)>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)}tokenizeViewport(e,t){const i=new d.MultilineTokensBuilder;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new d.MultilineTokensBuilder ;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--){a=m(r,this._tokenizationSupport,o[e],a).endState}for(let n=t;n<=i;n++){let t=this._textModel.getLineContent(n),i=m(r,this._tokenizationSupport,t,a);e.add(n,i.tokens),this._tokenizationStateStore.setFakeTokens(n-1),a=i.endState}}}function m(e,t,i,s){let r=null;if(t)try{r=t.tokenize2(i,s.clone(),0)}catch(e){ n.onUnexpectedError(e)}return r||(r=a.nullTokenize2(e.id,i,s,0)),o.LineTokens.convertToEndOffset(r.tokens,i.length),r}t.TextModelTokenization=p})),define(e[75],t([0,1,21,6,2,24,10,111,47,18,60,129,305,889,535,553,891,296,1475,262,134,265,404,405,351,55]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I){"use strict";function x(){return new m.PieceTreeTextBufferBuilder}function k(e){const t=x();return t.acceptChunk(e),t.finish()}function D(e,t){return("string"==typeof e?k(e):e).create(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeContentEmitter=t.DidChangeDecorationsEmitter=t.ModelDecorationOptions=t.ModelDecorationMinimapOptions=t.ModelDecorationOverviewRulerOptions=t.TextModel=t.LONG_LINE_BOUNDARY=t.createTextBuffer=t.createTextBufferFactoryFromSnapshot=t.createTextBufferFactoryFromStream=t.createTextBufferFactory=void 0,t.createTextBufferFactory=k,t.createTextBufferFactoryFromStream=function(e,t,i){return new Promise((n,o)=>{const s=x();let r=!1;e.on("data",e=>{if(i){ const t=i(e);t&&(r=!0,o(t))}t&&(e=t(e)),s.acceptChunk("string"==typeof e?e:e.toString())}),e.on("error",e=>{r||(r=!0,o(e))}),e.on("end",()=>{r||(r=!0,n(s.finish()))})})},t.createTextBufferFactoryFromSnapshot=function(e){let t,i=x();for(;"string"==typeof(t=e.read());)i.acceptChunk(t);return i.finish()},t.createTextBuffer=D;let T=0;const R=999;t.LONG_LINE_BOUNDARY=1e4;class A{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;for(;;){let n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const M=()=>{throw new Error("Invalid change accessor")};var L;!function(e){e[e.Relaxed=0]="Relaxed",e[e.SurrogatePairs=1]="SurrogatePairs"}(L||(L={}));class O{constructor(){this._searchCanceledBrand=void 0}}function N(e){return e instanceof O?null:e}O.INSTANCE=new O;class P extends o.Disposable{constructor(e,t,i,o=null,a){super(),this._onWillDispose=this._register(new n.Emitter), this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new G),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new n.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new n.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new n.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new n.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new n.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new $),T++,this.id="$model"+T,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource=null==o?r.URI.parse("inmemory://model/"+T):o,this._undoRedoService=a,this._attachedEditorCount=0,this._buffer=D(e,t.defaultEOL), this._options=P.resolveOptions(this._buffer,t);const l=this._buffer.getLineCount(),d=this._buffer.getValueLengthInRange(new c.Range(1,1,l,this._buffer.getLineLength(l)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=d>P.LARGE_FILE_SIZE_THRESHOLD||l>P.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=d>P.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||C.NULL_LANGUAGE_IDENTIFIER,this._languageRegistryListener=_.LanguageConfigurationRegistry.onDidChange(e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=s.singleLetterHash(T),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new F,this._commandManager=new u.EditStack(this,a),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new E.TokensStore, this._tokens2=new E.TokensStore2,this._tokenization=new S.TextModelTokenization(this)}static resolveOptions(e,t){if(t.detectIndentation){const i=g.guessIndentation(e,t.tabSize,t.insertSpaces);return new h.TextModelResolvedOptions({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new h.TextModelResolvedOptions({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeRawContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.rawContentChangedEvent))}onDidChangeRawContent(e){return this._eventEmitter.slowEvent(t=>e(t.rawContentChangedEvent))}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(), this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._isDisposing=!1}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}equalsTextBuffer(e){return this._assertNotDisposed(),this._buffer.equals(e)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new v.InternalModelContentChangeEvent(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const t=D(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}_createContentChanged2(e,t,i,n,o,s,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}setValueFromTextBuffer(e){if(this._assertNotDisposed(),null===e)return;const t=this.getFullModelRange(),i=this.getValueLengthInRange(t),n=this.getLineCount(),o=this.getLineMaxColumn(n);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(), this._decorations=Object.create(null),this._decorationsTree=new F,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new v.ModelRawContentChangedEvent([new v.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new c.Range(1,1,n,o),0,i,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new v.ModelRawContentChangedEvent([new v.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new c.Range(1,1,o,s),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}_onAfterEOLChange(){ const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}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 e=0,i=0 ;const n=this._buffer.getLineCount();for(let o=1;o<=n;o++){const n=this._buffer.getLineLength(o);n>=t.LONG_LINE_BOUNDARY?i+=n:e+=n}return i>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=new h.TextModelResolvedOptions({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(this._options.equals(s))return;let r=this._options.createChangeEvent(s);this._options=s,this._onDidChangeOptions.fire(r)}detectIndentation(e,t){this._assertNotDisposed();let i=g.guessIndentation(this._buffer,t,e) ;this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let i=0;i({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n} createSnapshot(e=!1){return new A(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){ return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o,s;if(i<1)o=1,s=1;else if(i>t)o=t,s=this.getLineMaxColumn(o);else if(o=0|i,n<=1)s=1;else{const e=this.getLineMaxColumn(o);s=n>=e?e:0|n}const r=e.endLineNumber,a=e.endColumn ;let l,h;if(r<1)l=1,h=1;else if(r>t)l=t,h=this.getLineMaxColumn(l);else if(l=0|r,a<=1)h=1;else{const e=this.getLineMaxColumn(l);h=a>=e?e:0|a}return i===o&&n===s&&r===l&&a===h&&e instanceof c.Range&&!(e instanceof d.Selection)?e:new c.Range(o,s,l,h)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(s.isHighSurrogate(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new l.Position(1,1);if(n>r)return new l.Position(r,this.getLineMaxColumn(r));if(o<=1)return new l.Position(n,1);const a=this.getLineMaxColumn(n);if(o>=a)return new l.Position(n,a);if(1===i){const e=this._buffer.getLineCharCode(n,o-2) ;if(s.isHighSurrogate(e))return new l.Position(n,o-1)}return new l.Position(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof l.Position&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,a=s.isHighSurrogate(e),l=s.isHighSurrogate(t);return!a&&!l}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof c.Range&&!(e instanceof d.Selection)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,r=i.lineNumber,a=i.column;{ const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,i=s.isHighSurrogate(e),l=s.isHighSurrogate(t);return i||l?n===r&&o===a?new c.Range(n,o-1,r,a-1):i&&l?new c.Range(n,o-1,r,a+1):i?new c.Range(n,o-1,r,a):new c.Range(n,o,r,a+1):new c.Range(n,o,r,a)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new c.Range(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=R){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>c.Range.isIRange(e))&&(a=t.map(e=>this.validateRange(e)))),null===a&&(a=[this.getFullModelRange()]),a=a.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);const l=[];let d ;if(l.push(a.reduce((e,t)=>c.Range.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t))),!i&&e.indexOf("\n")<0){const t=new f.SearchParams(e,i,n,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,s,r)}else d=t=>f.TextModelSearch.findMatches(this,new f.SearchParams(e,i,n,o),t,s,r);return l.map(d).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new f.SearchParams(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new c.Range(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,s,1);return f.TextModelSearch.findNextMatch(this,new f.SearchParams(e,i,n,o),r,s),d.length>0?d[0]:(l=new c.Range(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),(d=this.findMatchesLineByLine(l,t,s,1)).length>0?d[0]:null)}return f.TextModelSearch.findNextMatch(this,new f.SearchParams(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){ this._assertNotDisposed();const r=this.validatePosition(t);return f.TextModelSearch.findPreviousMatch(this,new f.SearchParams(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof h.ValidAnnotatedEditOperation?e:new h.ValidAnnotatedEditOperation(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})),n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&!(n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}} if(s){const e=new c.Range(n,1,n,o);t.push(new h.ValidAnnotatedEditOperation(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map(e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new c.Range(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map(e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new c.Range(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}});this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o) }finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==s.length){let e=[],t=i;for(let i=0,n=s.length;i0?n.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(n.rangeOffset,n.rangeLength,n.text.length,n.forceMoveMarkers) ;const c=n.range.startLineNumber,d=n.range.endLineNumber,h=d-c,u=r,g=Math.min(h,u),p=u-h;for(let i=g;i>=0;i--){const n=c+i,s=o-t-p+n;e.push(new v.ModelRawLineChanged(n,this.getLineContent(s)))}if(gthis._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,H(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},o=null;try{o=t(n)}catch(e){i.onUnexpectedError(e)}return n.addDecoration=M,n.changeDecoration=M,n.changeDecorationOptions=M,n.removeDecoration=M,n.deltaDecorations=M,o}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)} _setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:K[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(K[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),r=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(r);return this._getDecorationsInRange(new c.Range(s,1,r,a),i,n)}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);return this._getDecorationsInRange(n,t,i)}getOverviewRulerDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,i);return this._ensureNodesHaveRanges(n)}getAllDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,i);return this._ensureNodesHaveRanges(n)}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),s=this.getVersionId(),r=this._decorationsTree.intervalSearch(n,o,t,i,s) ;return this._ensureNodesHaveRanges(r)}_ensureNodesHaveRanges(e){for(let t=0,i=e.length;tthis.getLineCount())throw new Error("Illegal value for lineNumber") ;this._tokens.setTokens(this._languageIdentifier.id,e-1,this._buffer.getLineLength(e),t,!1)}setTokens(e){if(0===e.length)return;let t=[];for(let i=0,n=e.length;i0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasSemanticTokens(){return this._tokens2.isComplete()}setPartialSemanticTokens(e,t){if(this.hasSemanticTokens())return;const i=this._tokens2.setPartial(e,t) ;this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}clearSemanticTokens(){this._tokens2.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)} tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new l.Position(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed() ;const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=P._findLanguageBoundaries(n,o),a=b.getWordAtText(t.column,_.LanguageConfigurationRegistry.getWordDefinition(n.getLanguageId(o)),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=P._findLanguageBoundaries(n,o-1),a=b.getWordAtText(t.column,_.LanguageConfigurationRegistry.getWordDefinition(n.getLanguageId(o-1)),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n=0;e--){const t=i.getEndOffset(e);if(t<=n)break;y.ignoreBracketsInToken(i.getStandardTokenType(e))&&(n=t)}const a=Math.min(o.length,e.column-1+r.maxBracketLength);let l=null;for(;;){ const i=w.BracketsUtils.findNextBracketInRange(r.forwardRegex,t,o,n,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=o.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t){if(t instanceof O)return null;l=t}}n=i.endColumn-1}if(l)return l}if(s>0&&i.getStartOffset(s)===e.column-1){const r=s-1,a=_.LanguageConfigurationRegistry.getBracketsSupport(i.getLanguageId(r));if(a&&!y.ignoreBracketsInToken(i.getStandardTokenType(r))){const s=Math.max(0,e.column-1-a.maxBracketLength);let l=Math.min(o.length,e.column-1+a.maxBracketLength);for(let e=r+1;e=l)break;y.ignoreBracketsInToken(i.getStandardTokenType(e))&&(l=t)}const c=w.BracketsUtils.findPrevBracketInRange(a.reversedRegex,t,o,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){ const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),t=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],null);if(t)return t instanceof O?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof O?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return O.INSTANCE;const c=w.BracketsUtils.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this._getLineTokens(e),o=i.getCount(),s=this._buffer.getLineContent(e);let r=o-1,l=s.length,c=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r>=0;r--){ const t=i.getLanguageId(r)===n&&!y.ignoreBracketsInToken(i.getStandardTokenType(r));if(t)d?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return O.INSTANCE;const c=w.BracketsUtils.findNextBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this._getLineTokens(e),o=i.getCount(),s=this._buffer.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r=1;e--){const o=this._getLineTokens(e),s=o.getCount(),r=this._buffer.getLineContent(e);let a=s-1,l=r.length,c=r.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=_.LanguageConfigurationRegistry.getBracketsSupport(i))}let d=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&d&&l!==c){const t=w.BracketsUtils.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t);d=!1}i=t,n=_.LanguageConfigurationRegistry.getBracketsSupport(i)}const s=!!n&&!y.ignoreBracketsInToken(o.getStandardTokenType(a));if(s)d?l=o.getStartOffset(a):(l=o.getStartOffset(a),c=o.getEndOffset(a));else if(n&&d&&l!==c){ const t=w.BracketsUtils.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t)}d=s}if(n&&d&&l!==c){const t=w.BracketsUtils.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this._getLineTokens(e),s=i.getCount(),r=this._buffer.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=_.LanguageConfigurationRegistry.getBracketsSupport(n))}let d=!0;for(;aDate.now()-e<=t}const n=this.validatePosition(e),o=this.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return O.INSTANCE;const a=w.BracketsUtils.findNextBracketInRange(e.forwardRegex,t,n,o,s);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,i);o=a.endColumn-1}return null};let d=-1,h=null;for(let e=n.lineNumber;e<=o;e++){ const t=this._getLineTokens(e),i=t.getCount(),o=this._buffer.getLineContent(e);let s=0,r=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),r=n.column-1,l=n.column-1;const e=t.getLanguageId(s);d!==e&&a(d=e,h=_.LanguageConfigurationRegistry.getBracketsSupport(d))}let u=!0;for(;sn)throw new Error("Illegal value for lineNumber");const o=_.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,c=-1;const d=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===h){h=-1,u=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let v=0,f=!0,S=0,b=!0,C=0,y=0;for(let o=0;f||b;o++){const r=e-o,g=e+o;o>1&&(r<1||r1&&(g>n||g>i)&&(b=!1),o>5e4&&(f=!1,b=!1);let _=-1;if(f){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,_=Math.ceil(e/this._options.indentSize)):(d(r),_=this._getIndentLevelForWhitespaceLine(s,a,c))}let w=-1;if(b){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,u=e,w=Math.ceil(e/this._options.indentSize)):(m(g),w=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==o){if(1===o){if(g<=n&&w>=0&&y+1===w){f=!1,v=g,S=g,C=w;continue}if(r>=1&&_>=0&&_-1===y){b=!1,v=r,S=r,C=_;continue}if(v=e,S=e,0===(C=y))return{startLineNumber:v,endLineNumber:S,indent:C}}f&&(_>=C?v=r:f=!1),b&&(w>=C?S=g:b=!1)}else y=_}return{startLineNumber:v,endLineNumber:S,indent:C}}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=_.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),o=Boolean(n&&n.offSide);let s=new Array(t-e+1),r=-2,a=-1,l=-2,c=-1 ;for(let n=e;n<=t;n++){let t=n-e;const d=this._computeIndentLevel(n-1);if(d>=0)r=n-1,a=d,s[t]=Math.ceil(d/this._options.indentSize);else{if(-2===r){r=-1,a=-1;for(let e=n-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){r=e,a=t;break}}}if(-1!==l&&(-2===l||l=0){l=e,c=t;break}}}s[t]=this._getIndentLevelForWhitespaceLine(o,a,c)}}return s}_getIndentLevelForWhitespaceLine(e,t,i){return-1===t||-1===i?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}t.DidChangeContentEmitter=$})),define(e[139],t([0,1,21,24,47,18,60,75,134]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isQuote=t.CursorColumns=t.EditOperationResult=t.CursorState=t.PartialViewCursorState=t.PartialModelCursorState=t.CursorContext=t.SingleCursorState=t.CursorConfiguration=t.EditOperationType=t.RevealTarget=void 0,function(e){e[e.Primary=0]="Primary",e[e.TopMost=1]="TopMost",e[e.BottomMost=2]="BottomMost"}(t.RevealTarget||(t.RevealTarget={})),function(e){ e[e.Other=0]="Other",e[e.Typing=1]="Typing",e[e.DeletingLeft=2]="DeletingLeft",e[e.DeletingRight=3]="DeletingRight"}(t.EditOperationType||(t.EditOperationType={}));const c=()=>!0,d=()=>!1,h=e=>" "===e||"\t"===e;class u{constructor(e,t,i){this._languageIdentifier=e;const n=i.options,o=n.get(117);this.readOnly=n.get(72),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.lineHeight=n.get(51),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=n.get(104),this.wordSeparators=n.get(105),this.emptySelectionClipboard=n.get(26),this.copyWithSyntaxHighlighting=n.get(16),this.multiCursorMergeOverlapping=n.get(60),this.multiCursorPaste=n.get(62),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(7),this.autoClosingOvertype=n.get(6),this.autoSurround=n.get(10),this.autoIndent=n.get(8),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:u._getShouldAutoClose(e,this.autoClosingQuotes), bracket:u._getShouldAutoClose(e,this.autoClosingBrackets)};const s=l.LanguageConfigurationRegistry.getAutoClosingPairs(e.id);this.autoClosingPairsOpen2=s.autoClosingPairsOpen,this.autoClosingPairsClose2=s.autoClosingPairsClose;let r=u._getSurroundingPairs(e);if(r)for(const e of r)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(117)||e.hasChanged(105)||e.hasChanged(26)||e.hasChanged(60)||e.hasChanged(62)||e.hasChanged(5)||e.hasChanged(7)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(104)||e.hasChanged(51)||e.hasChanged(72)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=u._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return a.TextModel.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return l.LanguageConfigurationRegistry.getElectricCharacters(e.id)}catch(e){return i.onUnexpectedError(e),null}} static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return h;case"languageDefined":return u._getLanguageDefinedShouldAutoClose(e);case"always":return c;case"never":return d}}static _getLanguageDefinedShouldAutoClose(e){try{const t=l.LanguageConfigurationRegistry.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(e){return i.onUnexpectedError(e),d}}static _getSurroundingPairs(e){try{return l.LanguageConfigurationRegistry.getSurroundingPairs(e.id)}catch(e){return i.onUnexpectedError(e),null}}}t.CursorConfiguration=u;class g{constructor(e,t,i,n){this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=g._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){ return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new g(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new o.Position(t,i),n):new g(new s.Range(t,i,t,i),n,new o.Position(t,i),n)}static _computeSelection(e,t){let i,n,o,s;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,s=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,o=t.lineNumber,s=t.column):(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,s=t.column),new r.Selection(i,n,o,s)}}t.SingleCursorState=g;t.CursorContext=class{constructor(e,t,i){this.model=e,this.coordinatesConverter=t,this.cursorConfig=i}};class p{constructor(e){this.modelState=e,this.viewState=null}}t.PartialModelCursorState=p;class m{constructor(e){this.modelState=null,this.viewState=e}}t.PartialViewCursorState=m;class v{constructor(e,t){this.modelState=e,this.viewState=t}static fromModelState(e){return new p(e)}static fromViewState(e){return new m(e)}static fromModelSelection(e){ const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,r=e.positionColumn,a=new g(new s.Range(t,i,t,i),0,new o.Position(n,r),0);return v.fromModelState(a)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i=65536?2:1,9===t)r=f.nextRenderTabStop(r,i);else{let i=n.getGraphemeBreakType(t);for(;a=65536?2:1,i=o} n.isFullWidthCharacter(t)||n.isEmojiImprecise(t)?r+=2:r+=1}}return r}static toStatusbarColumn(e,t,i){const o=e.length,s=t-1=65536?2:1,9===t?r=f.nextRenderTabStop(r,i):r+=1}return r+1}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const o=e.length;let s=0,r=1,a=0;for(;a=65536?2:1,9===l)c=f.nextRenderTabStop(s,i);else{let t=n.getGraphemeBreakType(l);for(;a=65536?2:1,t=s}c=n.isFullWidthCharacter(l)||n.isEmojiImprecise(l)?s+2:s+1}const d=a+1;if(c>=t){return c-tr?r:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return e-1-(e-1)%t}static prevIndentTabStop(e,t){return e-1-(e-1)%t}}t.CursorColumns=f,t.isQuote=function(e){return"'"===e||'"'===e||"`"===e}})),define(e[418],t([0,1,24,139,18,60,134]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShiftCommand=t.cachedStringRepeat=void 0;const a=Object.create(null);function l(e,t){a[e]||(a[e]=["",e]);const i=a[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}t.cachedStringRepeat=l;class c{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,o,s){const r=n.CursorColumns.visibleColumnFromColumn(e,t,i);if(s){const e=l(" ",o);return l(e,n.CursorColumns.prevIndentTabStop(r,o)/o)}return l("\t",n.CursorColumns.prevRenderTabStop(r,i)/i)} static shiftIndent(e,t,i,o,s){const r=n.CursorColumns.visibleColumnFromColumn(e,t,i);if(s){const e=l(" ",o);return l(e,n.CursorColumns.nextIndentTabStop(r,o)/o)}return l("\t",n.CursorColumns.nextRenderTabStop(r,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const s=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&s!==a&&(a-=1);const{tabSize:d,indentSize:h,insertSpaces:u}=this._opts,g=s===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,p=0;for(let m=s;m<=a;m++,l=p){p=0;let a,v=e.getLineContent(m),f=i.firstNonWhitespaceIndex(v);if((!this._opts.isUnshift||0!==v.length&&0!==f)&&(g||this._opts.isUnshift||0!==v.length)){if(-1===f&&(f=v.length),m>1){if(n.CursorColumns.visibleColumnFromColumn(v,f+1,d)%h!=0&&e.isCheapToTokenize(m-1)){ let t=r.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent,e,new o.Range(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)));if(t){if(p=l,t.appendText)for(let e=0,i=t.appendText.length;ea,h=r>l,u=rl)continue;if(fr)continue;if(v1&&n--,s.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)} static columnSelectRight(e,t,o){let s=0;const r=Math.min(o.fromViewLineNumber,o.toViewLineNumber),a=Math.max(o.fromViewLineNumber,o.toViewLineNumber);for(let o=r;o<=a;o++){const r=t.getLineMaxColumn(o),a=i.CursorColumns.visibleColumnFromColumn2(e,t,new n.Position(o,r));s=Math.max(s,a)}let l=o.toViewVisualColumn;return le.getLineMinColumn(t)?i-=s.prevCharLength(e.getLineContent(t),i-1):t>1&&(t-=1,i=e.getLineMaxColumn(t)),new n.Position(t,i)}static left(e,t,i,n){const o=a.leftPosition(t,i,n);return new r(o.lineNumber,o.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{let n=a.left(e,t,i.position.lineNumber,i.position.column-(o-1));s=n.lineNumber,r=n.column}return i.move(n,s,r,0)}static rightPosition(e,t,i){return id?(n=d,o=l?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),o)):o=i.CursorColumns.columnFromVisibleColumn2(e,t,n,c),s=h?0:c-i.CursorColumns.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),new r(n,o,s)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);let l=a.down(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,t,s){let r=s.selection,l=a.down(e,t,r.selectionStartLineNumber,r.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),c=a.down(e,t,r.positionLineNumber,r.positionColumn,s.leftoverVisibleColumns,1,!1) ;return new i.SingleCursorState(new o.Range(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new n.Position(c.lineNumber,c.column),c.leftoverVisibleColumns)}static up(e,t,n,o,s,a,l){const c=i.CursorColumns.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize)+s,d=1===n&&1===o;return(n-=a)<1?(n=1,o=l?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),o)):o=i.CursorColumns.columnFromVisibleColumn2(e,t,n,c),s=d?0:c-i.CursorColumns.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),new r(n,o,s)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);let l=a.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateUp(e,t,s){ let r=s.selection,l=a.up(e,t,r.selectionStartLineNumber,r.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),c=a.up(e,t,r.positionLineNumber,r.positionColumn,s.leftoverVisibleColumns,1,!1);return new i.SingleCursorState(new o.Range(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new n.Position(c.lineNumber,c.column),c.leftoverVisibleColumns)}static moveToBeginningOfLine(e,t,i,n){let o,s=i.position.lineNumber,r=t.getLineMinColumn(s),a=t.getLineFirstNonWhitespaceColumn(s)||r;return o=i.position.column===a?r:a,i.move(n,s,o,0)}static moveToEndOfLine(e,t,i,n,o){let s=i.position.lineNumber,r=t.getLineMaxColumn(s);return i.move(n,s,r,o?1073741824-r:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let o=t.getLineCount(),s=t.getLineMaxColumn(o);return i.move(n,o,s,0)}}t.MoveOperations=a})),define(e[420],t([0,1,24,259,139,419,18]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.DeleteOperations=void 0;t.DeleteOperations=class{static deleteRight(e,t,i,o){let a=[],l=3!==e;for(let e=0,c=o.length;e=c.length+1)return!1;const d=c.charAt(l.column-2),h=i.get(d);if(!h)return!1;if(o.isQuote(d)){if("never"===t)return!1}else if("never"===e)return!1;const u=c.charAt(l.column-1);let g=!1;for(const e of h)e.open===d&&e.close===u&&(g=!0);if(!g)return!1}return!0}static _runAutoClosingPairDelete(e,t,i){let o=[];for(let e=0,t=i.length;e1){let n=a.getLineContent(e.lineNumber),s=i.firstNonWhitespaceIndex(n),l=-1===s?n.length+1:s+1;if(e.column<=l){let i=o.CursorColumns.visibleColumnFromColumn2(t,a,e),n=o.CursorColumns.prevIndentTabStop(i,t.indentSize),s=o.CursorColumns.columnFromVisibleColumn2(t,a,e.lineNumber,n);u=new r.Range(e.lineNumber,s,e.lineNumber,e.column)}else u=new r.Range(e.lineNumber,e.column-1,e.lineNumber,e.column)}else{let i=s.MoveOperations.left(t,a,e.lineNumber,e.column);u=new r.Range(i.lineNumber,i.column,e.lineNumber,e.column)}} u.isEmpty()?c[e]=null:(u.startLineNumber!==u.endLineNumber&&(d=!0),c[e]=new n.ReplaceCommand(u,""))}return[d,c]}static cut(e,t,i){let s=[];for(let o=0,a=i.length;o1?(e=d.lineNumber-1,i=t.getLineMaxColumn(d.lineNumber-1),l=d.lineNumber,c=t.getLineMaxColumn(d.lineNumber)):(e=d.lineNumber,i=1,l=d.lineNumber,c=t.getLineMaxColumn(d.lineNumber));let h=new r.Range(e,i,l,c);h.isEmpty()?s[o]=null:s[o]=new n.ReplaceCommand(h,"")}else s[o]=null;else s[o]=new n.ReplaceCommand(a,"")}return new o.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}})),define(e[421],t([0,1,21,24,259,418,886,139,295,18,60,297,134]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeWithAutoClosingCommand=t.TypeOperations=void 0;class g{static indent(e,t,i){ if(null===t||null===i)return[];let n=[];for(let t=0,o=i.length;t1){let o;for(o=i-1;o>=1;o--){const e=t.getLineContent(o);if(n.lastNonWhitespaceIndex(e)>=0)break}if(o<1)return null;const r=t.getLineMaxColumn(o),a=u.LanguageConfigurationRegistry.getEnterAction(e.autoIndent,t,new c.Range(o,r,o,r));a&&(s=a.indentation+a.appendText)}return o&&(o===h.IndentAction.Indent&&(s=g.shiftIndent(e,s)),o===h.IndentAction.Outdent&&(s=g.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="",r=i.getStartPosition();if(e.insertSpaces){let i=a.CursorColumns.visibleColumnFromColumn2(e,t,r),n=e.indentSize,o=n-i%n;for(let e=0;e=4){const r=u.LanguageConfigurationRegistry.getIndentForEnter(e.autoIndent,t,s,{unshiftIndent:t=>g.unshiftIndent(e,t),shiftIndent:t=>g.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(r){let h=a.CursorColumns.visibleColumnFromColumn2(e,t,s.getEndPosition());const u=s.endColumn;let g="\n";d!==e.normalizeIndentation(r.beforeEnter)&&(g=e.normalizeIndentation(r.beforeEnter)+l.substring(d.length,s.startColumn-1)+"\n",s=new c.Range(s.startLineNumber,1,s.endLineNumber,s.endColumn));const p=t.getLineContent(s.endLineNumber),m=n.firstNonWhitespaceIndex(p);if(s=m>=0?s.setEndPosition(s.endLineNumber,Math.max(s.endColumn,m+1)):s.setEndPosition(s.endLineNumber,t.getLineMaxColumn(s.endLineNumber)),i)return new o.ReplaceCommandWithoutChangingPosition(s,g+e.normalizeIndentation(r.afterEnter),!0);{let t=0 ;return u<=m+1&&(e.insertSpaces||(h=Math.ceil(h/e.indentSize)),t=Math.min(h+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new o.ReplaceCommandWithOffsetCursorState(s,g+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return g._typeCommand(s,"\n"+e.normalizeIndentation(d),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eg.shiftIndent(e,t),unshiftIndent:t=>g.unshiftIndent(e,t)});if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber) ;return 0===o?g._typeCommand(new c.Range(i.startLineNumber,0,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):g._typeCommand(new c.Range(i.startLineNumber,0,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairsClose2.has(o))return!1;for(let s=0,r=i.length;s2?c.charCodeAt(l.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t=0||i.indexOf(t)>=0}static _isBeforeClosingBrace(e,t,i){const n=e.autoClosingPairsClose2.get(i);if(!n)return!1;const o=g._autoClosingPairIsSymmetric(t);for(const e of n){const t=g._autoClosingPairIsSymmetric(e);if(o||!t)return!0}return!1}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairsOpen2.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i){if(t.getValueInRange(new c.Range(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}}o&&(s=e)}return s}static _isAutoClosingOpenCharType(e,t,n,o,s){const r=a.isQuote(o),c=r?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===c)return null ;const d=this._findAutoClosingPairOpen(e,t,n.map(e=>e.getPosition()),o);if(!d)return null;const h=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let o=0,a=n.length;op.column-1){const t=m.charAt(p.column-1);if(!g._isBeforeClosingBrace(e,d,t)&&!h(t))return null}if(!t.isCheapToTokenize(p.lineNumber))return null;if(1===d.open.length&&r&&"always"!==c){const t=l.getMapForWordSeparators(e.wordSeparators);if(s&&p.column>1&&0===t.get(m.charCodeAt(p.column-2)))return null;if(!s&&p.column>2&&0===t.get(m.charCodeAt(p.column-3)))return null}t.forceTokenization(p.lineNumber);const v=t.getLineTokens(p.lineNumber);let f=!1;try{f=u.LanguageConfigurationRegistry.shouldAutoClosePair(d,v,s?p.column:p.column-1)}catch(e){i.onUnexpectedError(e)}if(!f)return null}return d}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){let l=[];for(let e=0,t=n.length;enew o.ReplaceCommand(new c.Range(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new a.EditOperationResult(1,e,{shouldPushStackElementBefore:!0, shouldPushStackElementAfter:!1})}const h=this._isAutoClosingOpenCharType(t,i,s,l,!1);return h?this._runAutoClosingOpenCharType(e,t,i,s,l,!1,h):null}static typeWithInterceptors(e,t,i,n,s,r,l){if(!e&&"\n"===l){let e=[];for(let t=0,o=s.length;t=0;o--){let i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let s=n;s=0;o--){let n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let a=c._findPreviousWordOnLine(e,t,new r.Position(o,s));if(0===n)return new r.Position(o,a?a.start+1:1) ;if(1===n)return a&&2===a.wordType&&a.end-a.start==1&&0===a.nextCharClass&&(a=c._findPreviousWordOnLine(e,t,new r.Position(o,a.start+1))),new r.Position(o,a?a.start+1:1);if(3===n){for(;a&&2===a.wordType;)a=c._findPreviousWordOnLine(e,t,new r.Position(o,a.start+1));return new r.Position(o,a?a.start+1:1)}return a&&s<=a.end+1&&(a=c._findPreviousWordOnLine(e,t,new r.Position(o,a.start+1))),new r.Position(o,a?a.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,o=e.getLineMaxColumn(n);if(1===t.column)return n>1?new r.Position(n-1,e.getLineMaxColumn(n-1)):t;const s=e.getLineContent(n);for(let e=t.column-1;e>1;e--){const t=s.charCodeAt(e-2),a=s.charCodeAt(e-1);if(95===t&&95!==a)return new r.Position(n,e);if(i.isLowerAsciiLetter(t)&&i.isUpperAsciiLetter(a))return new r.Position(n,e);if(i.isUpperAsciiLetter(t)&&i.isUpperAsciiLetter(a)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new r.Position(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new r.Position(o,s)}static _moveWordPartRight(e,t){const n=t.lineNumber,o=e.getLineMaxColumn(n);if(t.column===o)return n1?u=1:(h--, u=n.getLineMaxColumn(h)):(g&&u<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new r.Position(h,g.start+1))),g?u=g.end+1:u>1?u=1:(h--,u=n.getLineMaxColumn(h))),new a.Range(h,u,d.lineNumber,d.column)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new a.Range(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n=p.start+1&&(p=c._findNextWordOnLine(i,n,new r.Position(d,p.end+1))),p?h=p.start+1:hBoolean(e))}t.WordPartOperations=class extends c{static deleteWordPartLeft(e){const t=d([c.deleteWordLeft(e,0),c.deleteWordLeft(e,2),c._deleteWordPartLeft(e.model,e.selection)]);return t.sort(a.Range.compareRangesUsingEnds),t[2]}static deleteWordPartRight(e){const t=d([c.deleteWordRight(e,0),c.deleteWordRight(e,2),c._deleteWordPartRight(e.model,e.selection)]);return t.sort(a.Range.compareRangesUsingStarts),t[0]}static moveWordPartLeft(e,t,i){const n=d([c.moveWordLeft(e,t,i,0),c.moveWordLeft(e,t,i,2),c._moveWordPartLeft(t,i)]);return n.sort(r.Position.compare),n[2]}static moveWordPartRight(e,t,i){const n=d([c.moveWordRight(e,t,i,0),c.moveWordRight(e,t,i,2),c._moveWordPartRight(t,i)]);return n.sort(r.Position.compare),n[0]}}})), define(e[554],t([0,1,13,139,419,352,47,18]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorMove=t.CursorMoveCommands=void 0;t.CursorMoveCommands=class{static addCursorDown(e,t,i){let s=[],r=0;for(let a=0,l=t.length;at&&(i=t,o=e.model.getLineMaxColumn(i)),n.CursorState.fromModelState(new n.SingleCursorState(new a.Range(l.lineNumber,1,i,o),0,new r.Position(i,o),0))}const d=t.modelState.selectionStart.getStartPosition().lineNumber;if(l.lineNumberd){const i=e.getLineCount();let o=c.lineNumber+1,s=1;return o>i&&(o=i,s=e.getLineMaxColumn(o)), n.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(),o,s,0))}{const e=t.modelState.selectionStart.getEndPosition();return n.CursorState.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,o){const r=e.model.validatePosition(o);return n.CursorState.fromModelState(s.WordOperations.word(e.cursorConfig,e.model,t.modelState,i,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new n.CursorState(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,o=t.viewState.position.column;return n.CursorState.fromViewState(new n.SingleCursorState(new a.Range(i,o,i,o),0,new r.Position(i,o),0))}static moveTo(e,t,i,o,s){const a=e.model.validatePosition(o),l=s?e.coordinatesConverter.validateViewPosition(new r.Position(s.lineNumber,s.column),a):e.coordinatesConverter.convertModelPositionToViewPosition(a);return n.CursorState.fromViewState(t.viewState.move(i,l.lineNumber,l.column,0))}static simpleMove(e,t,i,n,o,s){switch(i){ case 0:return 4===s?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===s?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===s?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===s?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return this._moveToViewMinColumn(e,t,n);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 6:return this._moveToViewCenterColumn(e,t,n);case 7:return this._moveToViewMaxColumn(e,t,n);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 9:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 11:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i) ;return[this._moveToModelPosition(e,t[0],n,i,s)]}case 10:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{let i=[];for(let o=0,r=t.length;oi.endLineNumber-1&&(s=i.endLineNumber-1),s1;let a=[];for(let l=0,c=t.length;l1;let a=[];for(let l=0,c=t.length;li){let e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;te.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber);for(let n=0;nc&&e.index--;e.splice(c,1),t.splice(l,1),this._removeSecondaryCursor(c-1),n--}}}}})), define(e[555],t([0,1,21,24,1478,139,420,421,18,60,407,2,411]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.CursorModelState=void 0;class g{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class m extends h.Disposable{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new s.CursorContext(this._model,this._coordinatesConverter,n), this._cursors=new o.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=h.dispose(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new s.CursorContext(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;tm.MAX_CURSOR_COUNT&&(n=n.slice(0,m.MAX_CURSOR_COUNT),o=!0);const s=new g(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,s,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);else{const s=o[0],r=new l.Range(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,r,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,o){const s=this._cursors.getViewPositions();if(s.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,o);else{const r=s[0],a=new l.Range(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,a,null,i,n,o)}} _emitCursorRevealRange(e,t,i,n,o,s,r){e.emitViewEvent(new d.ViewRevealRangeRequestEvent(t,i,n,o,s,r))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=s.CursorState.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,s.CursorState.fromModelSelections(t))}}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 e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:s.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:s.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}getPosition(){return this._cursors.getPrimaryCursor().modelState.position}setSelections(e,t,i){this.setStates(e,t,0,s.CursorState.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=new g(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections() ;if(e.emitViewEvent(new d.ViewCursorStateChangedEvent(a,r)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some((e,t)=>!e.modelState.equals(n.cursorState[t].modelState))){const a=n?n.cursorState.map(e=>e.modelState.selection):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new u.CursorStateChangedEvent(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairsClose2.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);let s=[],r=[];const a=this._model.pushEditOperations(this.getSelections(),i,e=>{ if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,n,o=0){if(this.context.cursorConfig.readOnly)return;const s=new g(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){i.onUnexpectedError(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,o,s,!1)&&this._revealPrimaryCursor(t,n,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{if("keyboard"===t){const e=p.getAllAutoClosedCharacters(this._autoClosedActions) ;this._executeEditOperation(a.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),e)),this._selectionsWhenCompositionStarted=null}},e,t)}type(e,t,i){this._executeEdit(()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(a.TypeOperations.replacePreviousChar(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i))},e,n)} paste(e,t,i,n,o){this._executeEdit(()=>{this._executeEditOperation(a.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,o,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(r.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new s.EditOperationResult(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new s.EditOperationResult(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}t.Cursor=m,m.MAX_CURSOR_COUNT=1e4;class v{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,i=>{let n=[];for(let t=0;te.identifier.minor-t.identifier.minor;let s=[];for(let i=0;i0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]) ;return 0===e.trackedRangesDirection[i]?new c.Selection(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new c.Selection(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s});r||(r=e.selectionsBefore);let a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort((e,t)=>t-e);for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{l.Range.isEmpty(e)&&""===i||o.push({identifier:{major:t,minor:s++},range:e,text:i,forceMoveMarkers:r,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let a=!1;const d={addEditOperation:r,addTrackedEditOperation:(e,t,i)=>{a=!0, r(e,t,i)},trackSelection:(t,i)=>{const n=c.Selection.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{n.getEditOperations(e.model,d)}catch(e){return i.onUnexpectedError(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:o,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){(e=e.slice(0)).sort((e,t)=>-l.Range.compareRangesUsingEnds(e.range,t.range));let t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major).toString()]=!0;for(let t=0;t0&&i--}}return t}}})), define(e[306],t([0,1,24,350,265]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tokenizeLineToHTML=t.tokenizeToString=void 0;const s={getInitialState:()=>o.NULL_STATE,tokenize2:(e,t,i)=>o.nullTokenize2(0,e,t,i)};t.tokenizeToString=function(e,t=s){return function(e,t){let o='
    ',s=e.split(/\r\n|\r|\n/),r=t.getInitialState();for(let e=0,a=s.length;e0&&(o+="
    ");let l=t.tokenize2(a,r,0);n.LineTokens.convertToEndOffset(l.tokens,a.length);let c=new n.LineTokens(l.tokens,a).inflate(),d=0;for(let e=0,t=c.getCount();e${i.escape(a.substring(d,n))}`,d=n}r=l.endState}return o+="
    "}(e,t||s)},t.tokenizeLineToHTML=function(e,t,i,n,o,s,r){let a="
    ",l=n,c=0;for(let d=0,h=t.getCount();d0;)u+=r?" ":" ",e--;break;case 60:u+="<";break;case 62:u+=">";break;case 38:u+="&";break;case 0:u+="�";break;case 65279:case 8232:case 8233:case 133:u+="�";break;case 13:u+="​";break;case 32:u+=r?" ":" ";break;default:u+=String.fromCharCode(t)}}if(a+=`${u}`,h>o||l>=o)break}return a+="
    "}})),define(e[64],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITextModelService=void 0,t.ITextModelService=i.createDecorator("textModelService")})),define(e[112],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITextResourcePropertiesService=t.ITextResourceConfigurationService=void 0,t.ITextResourceConfigurationService=i.createDecorator("textResourceConfigurationService"),t.ITextResourcePropertiesService=i.createDecorator("textResourcePropertiesService")})),define(e[556],t([0,1,6,533,45]),(function(e,t,i,n,o){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.MinimapTokensColorTracker=void 0;class s{constructor(){this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),o.TokenizationRegistry.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()})}static getInstance(){return this._INSTANCE||(this._INSTANCE=new s),this._INSTANCE}_updateColorMap(){const e=o.TokenizationRegistry.getColorMap();if(!e)return this._colors=[n.RGBA8.Empty],void(this._backgroundIsLight=!0);this._colors=[n.RGBA8.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}t.MinimapTokensColorTracker=s,s._INSTANCE=null})),define(e[422],t([0,1,14,47,18,75,407,299,235]),(function(e,t,i,n,o,s,r,a,l){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityLinesCollection=t.IdentityCoordinatesConverter=t.SplitLine=t.SplitLinesCollection=t.CoordinatesConverter=t.LineBreakData=t.OutputPosition=void 0;class c{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}}t.OutputPosition=c;class d{constructor(e,t,i){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i}static getInputOffsetOfOutputPosition(e,t,i){return 0===t?i:e[t-1]+i}static getOutputPositionOfInputOffset(e,t){let i=0,n=e.length-1,o=0,s=0;for(;i<=n;){const r=e[o=i+(n-i)/2|0];if(t<(s=o>0?e[o-1]:0))n=o-1;else{if(!(t>=r))break;i=o+1}}return new c(o,t-s)}}t.LineBreakData=d;class h{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)} validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}convertModelRangeToViewRange(e){return this._lines.convertModelRangeToViewRange(e)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}}var u;t.CoordinatesConverter=h,function(e){e[e.BlockNone=0]="BlockNone",e[e.BlockSubsequent=1]="BlockSubsequent",e[e.BlockAll=2]="BlockAll"}(u||(u={}));class g{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=i+t;for(let n=0;n0?this._modelToView[t-1]:0;return new a.PrefixSumIndexOfResult(t,e-i)}}t.SplitLinesCollection=class{constructor(e,t,i,n,o,s,r,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=n,this.tabSize=o,this.wrappingStrategy=s,this.wrappingColumn=r,this.wrappingIndent=a,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])} createCoordinatesConverter(){return new h(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);let i=this.model.getLinesContent();const n=i.length,s=this.createLineBreaksComputer();for(let e=0;ethis.model.getDecorationRange(e)).sort(o.Range.compareRangesUsingStarts),c=1,d=0,h=-1,u=h+1=c&&t<=d,o=_(r[e],!i);a[e]=o.getViewLineCount(),this.lines[e]=o}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new g(a)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(0===e.length)return[];let t=e.map(e=>this.model.validateRange(e)).sort(o.Range.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,s=t[0].endLineNumber;for(let e=1,r=t.length;es+1?(i.push(new o.Range(n,1,s,1)),n=r.startLineNumber,s=r.endLineNumber):r.endLineNumber>s&&(s=r.endLineNumber)}return i.push(new o.Range(n,1,s,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(o.Range.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n=a&&t<=l?this.lines[e].isVisible()&&(this.lines[e]=this.lines[e].setVisible(!1),i=!0):(h=!0,this.lines[e].isVisible()||(this.lines[e]=this.lines[e].setVisible(!0),i=!0)),i){let t=this.lines[e].getViewLineCount() ;this.prefixSumComputer.changeValue(e,t)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const o=this.fontInfo.equals(e),s=this.wrappingStrategy===t,r=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&s&&r&&a)return!1;const l=o&&s&&!r&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.lines.length;ea?(p=(g=(d=(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1)+1)+(o-a)-1,l=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i) ;const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[],r=[],a=[];const l=i.lineNumber-1,c=o.lineNumber-1;let d=null;for(let e=l;e<=c;e++){const t=this.lines[e];if(t.isVisible()){ let o=t.getViewLineNumberOfModelPosition(0,e===l?i.column:1),s=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),c=s-o+1,h=0;c>1&&1===t.getViewLineMinColumn(this.model,e+1,s)&&(h=0===o?1:2),r.push(c),a.push(h),null===d&&(d=new n.Position(e+1,0))}else null!==d&&(s=s.concat(this.model.getLinesIndentGuides(d.lineNumber,e)),d=null)}null!==d&&(s=s.concat(this.model.getLinesIndentGuides(d.lineNumber,o.lineNumber)),d=null);const h=t-e+1;let u=new Array(h),g=0;for(let e=0,t=s.length;et&&(h=!0,d=t-o+1);let u=c+d;if(l.getViewLinesData(this.model,n+1,c,u,o-e,i,a),o+=d,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e) ;let o=this.prefixSumComputer.getIndexOf(e-1),s=o.index,r=o.remainder,a=this.lines[s],l=a.getViewLineMinColumn(this.model,s+1,r),c=a.getViewLineMaxColumn(this.model,s+1,r);tc&&(t=c);let d=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new n.Position(s+1,d)).equals(i)?new n.Position(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new o.Range(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,s=i.remainder,r=this.lines[o].getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new n.Position(o+1,r))}convertViewRangeToModelRange(e){ const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new o.Range(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t){const i=this.model.validatePosition(new n.Position(e,t)),o=i.lineNumber,s=i.column;let r=o-1,a=!1;for(;r>0&&!this.lines[r].isVisible();)r--,a=!0;if(0===r&&!this.lines[r].isVisible())return new n.Position(1,1);const l=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));let c;return c=a?this.lines[r].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(r+1)):this.lines[o-1].getViewPositionOfModelPosition(l,s)}convertModelRangeToViewRange(e){let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn) ;return e.startLineNumber===e.endLineNumber&&t.lineNumber!==i.lineNumber&&i.column===this.getViewLineMinColumn(i.lineNumber)?new o.Range(t.lineNumber,t.column,i.lineNumber-1,this.getViewLineMaxColumn(i.lineNumber-1)):new o.Range(t.lineNumber,t.column,i.lineNumber,i.column)}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const e=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.lines[i].isVisible();)i--;if(0===i&&!this.lines[i].isVisible())return 1;const n=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),o=new y;for(const e of n){const t=e.options.overviewRuler,n=t?t.position:0;if(0===n)continue ;const s=t.getColor(i),r=this._getViewLineNumberForModelPosition(e.range.startLineNumber,e.range.startColumn),a=this._getViewLineNumberForModelPosition(e.range.endLineNumber,e.range.endColumn);o.accept(s,r,a,n)}return o.result}getDecorationsInRange(e,t,i){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new o.Range(s.lineNumber,1,r.lineNumber,r.column),t,i);let a=[];const l=s.lineNumber-1,c=r.lineNumber-1;let d=null;for(let e=l;e<=c;e++){if(this.lines[e].isVisible())null===d&&(d=new n.Position(e+1,e===l?s.column:1));else if(null!==d){const n=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new o.Range(d.lineNumber,d.column,e,n),t,i)),d=null}}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new o.Range(d.lineNumber,d.column,r.lineNumber,r.column),t,i)),d=null),a.sort((e,t)=>{ const i=o.Range.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i});let h=[],u=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,h[u++]=e)}return h}};class p{constructor(){}isVisible(){return!0}setVisible(e){return e?this:m.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),o=n.getLineContent();return new l.ViewLineData(o,!1,1,o.length+1,0,n.inflate())}getViewLinesData(e,t,i,n,o,s,r){s[o]?r[o]=this.getViewLineData(e,t,0):r[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new n.Position(e,t)}getViewLineNumberOfModelPosition(e,t){return e}}p.INSTANCE=new p;class m{constructor(){}isVisible(){return!1}setVisible(e){return e?p.INSTANCE:this} getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,s,r){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}}m.INSTANCE=new m;class v{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){ return d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=S(this._lineBreakData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i)-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return i>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){ if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,i).length+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});i>0&&(s=S(this._lineBreakData.wrappedTextIndentLength)+s);let r=i>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=s.length+1,c=i+10&&(d=this._lineBreakData.wrappedTextIndentLength);let h=e.getLineTokens(t);const u=0===i?0:this._lineBreakData.breakOffsetsVisibleColumn[i-1];return new l.ViewLineData(s,c,r,a,u,h.sliceAndInflate(n,o,d))}getViewLinesData(e,t,i,n,o,s,r){if(!this._isVisible)throw new Error("Not supported");for(let a=i;a0&&(i0&&(s+=this._lineBreakData.wrappedTextIndentLength),new n.Position(e+o,s)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");return e+d.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex}}t.SplitLine=v;let f=[""];function S(e){if(e>=f.length)for(let t=1;t<=e;t++)f[t]=b(t);return f[e]}function b(e){return new Array(e+1).join(" ")}function _(e,t){return null===e?t?p.INSTANCE:m.INSTANCE:new v(e,t)}class C{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){ return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}}t.IdentityCoordinatesConverter=C;t.IdentityLinesCollection=class{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new C(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new r.ViewLinesDeletedEvent(t,i)}onModelLinesInserted(e,t,i,n){return new r.ViewLinesInsertedEvent(t,i)} onModelLineChanged(e,t,i){return[!1,new r.ViewLinesChangedEvent(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const i=t-e+1;let n=new Array(i);for(let e=0;e=t)return void(i>s&&(o[o.length-1]=i));o.push(n,t,i)}else this.result[e]=[n,t,i]}}})),define(e[1479],t([0,1,24,258,422]),(function(e,t,i,n,o){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),t.MonospaceLineBreaksComputerFactory=void 0,function(e){e[e.NONE=0]="NONE",e[e.BREAK_BEFORE=1]="BREAK_BEFORE",e[e.BREAK_AFTER=2]="BREAK_AFTER",e[e.BREAK_IDEOGRAPHIC=3]="BREAK_IDEOGRAPHIC"}(s||(s={}));class r extends n.CharacterClassifier{constructor(e,t){super(0);for(let t=0;t=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let a=[],l=[];class c{constructor(e,t){this.classifier=new r(e,t)}static create(e){return new c(e.get(108),e.get(107))}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[],s=[];return{addRequest:(e,t)=>{o.push(e),s.push(t)},finalize:()=>{const r=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let c=[];for(let e=0,a=o.length;e=0){let e=Math.abs(g[I]-w);for(;I+1=e)break;e=t,I++}}for(;It&&(t=C,s=y);let a=0,l=0,c=0,m=0;if(s<=w){ let v=s,y=0===t?0:n.charCodeAt(t-1),E=0===t?0:e.get(y),I=!0;for(let s=t;sC&&p(y,E,d,h)&&(a=t,l=v),(v+=g)>w){t>C?(c=t,m=v-g):(c=s+1,m=v),v-l>f&&(a=0),I=!1;break}y=d,E=h}if(I){_>0&&(S[_]=h[h.length-1],b[_]=g[h.length-1],_++);break}}if(0===a){let d=s,h=n.charCodeAt(t),g=e.get(h),v=!1;for(let o=t-1;o>=C;o--){const t=o+1,s=n.charCodeAt(o);if(9===s){v=!0;break}let u,S;if(i.isLowSurrogate(s)?(o--,u=0,S=2):(u=e.get(s),S=i.isFullWidthCharacter(s)?r:1),d<=w){if(0===c&&(c=t,m=d),d<=w-f)break;if(p(s,u,h,g)){a=t,l=d;break}}d-=S,h=s,g=u}if(0!==a){const e=f-(m-l);if(e<=o){const t=n.charCodeAt(c);let s;e-(s=i.isHighSurrogate(t)?2:u(t,m,o,r))<0&&(a=0)}}if(v){I--;continue}}for(0===a&&(a=c,l=m),C=a,S[_]=a,y=l,b[_]=l,_++,w=l+f;I<0||I=v)break;v=e,I++}}return 0===_?null:(S.length=_,b.length=_,a=t.breakOffsets,l=t.breakOffsetsVisibleColumn, t.breakOffsets=S,t.breakOffsetsVisibleColumn=b,t.wrappedTextIndentLength=v,t)}function h(e,t,n,s,r,a){if(-1===s)return null;const l=t.length;if(l<=1)return null;const c=m(t,n,s,r,a),d=s-c;let h=[],g=[],v=0,f=0,S=0,b=s,_=t.charCodeAt(0),C=e.get(_),y=u(_,0,n,r),w=1;i.isHighSurrogate(_)&&(y+=1,_=t.charCodeAt(1),C=e.get(_),w++);for(let o=w;ob&&((0===f||y-S>d)&&(f=s,S=y-c),h[v]=f,g[v]=S,v++,b=S+d,f=0),_=a,C=l}return 0===v?null:(h[v]=l,g[v]=y,new o.LineBreakData(h,g,c))}function u(e,t,n,o){return 9===e?n-t%n:i.isFullWidthCharacter(e)?o:1}function g(e,t){return t-e%t}function p(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function m(e,t,n,o,s){let r=0;if(0!==s){const a=i.firstNonWhitespaceIndex(e);if(-1!==a){for(let i=0;in&&(r=0)}}return r} t.MonospaceLineBreaksComputerFactory=c})),define(e[1480],t([0,1,55,2,24,111,47,18,45,306,556,407,915,422,235,971,15,12,555,139,411]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewModel=void 0;const C=!0;class y extends n.Disposable{constructor(e,t,i,n,o,s){if(super(),this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new _.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new v.RunOnceScheduler(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new v.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0, C&&this.model.isTooLargeForTokenization())this._lines=new g.IdentityLinesCollection(this.model);else{const e=this._configuration.options,t=e.get(36),i=e.get(112),s=e.get(118),r=e.get(111);this._lines=new g.SplitLinesCollection(this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new S.Cursor(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new u.ViewLayout(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll(e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new h.ViewScrollChangedEvent(e)),this._eventDispatcher.emitOutgoingEvent(new _.ScrollChangedEvent(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(e=>{this._eventDispatcher.emitOutgoingEvent(e) })),this._decorations=new m.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(d.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new h.ViewTokensColorsChangedEvent)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){ this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new r.Position(e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new r.Position(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new h.ViewFocusChangedEvent(e)),this._eventDispatcher.emitOutgoingEvent(new _.FocusChangedEvent(!e,e))}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new h.ViewThemeChangedEvent)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){let e=new r.Position(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,s=o.get(36),a=o.get(112),l=o.get(118),c=o.get(111) ;if(this._lines.setWrappingSettings(s,a,l.wrappingColumn,c)&&(e.emitViewEvent(new h.ViewFlushedEvent),e.emitViewEvent(new h.ViewLineMappingChangedEvent),e.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(72)&&(this._decorations.reset(),e.emitViewEvent(new h.ViewDecorationsChangedEvent(null))),e.emitViewEvent(new h.ViewConfigurationChangedEvent(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}b.CursorConfiguration.shouldRecreate(t)&&(this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration), this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e.changes,s=e.versionId,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(const t of e.detail)r.addRequest(t,null);break;case 2:r.addRequest(e.detail,null)}const a=r.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new h.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o), this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=a[l];l++;const[o,r,c,d]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),c&&(t.emitViewEvent(c),this.viewLayout.onLinesInserted(c.fromLineNumber,c.toLineNumber)),d&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber));break}}this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new h.ViewLineMappingChangedEvent),t.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){ const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let i=0,n=e.ranges.length;i{ this._eventDispatcher.emitSingleViewEvent(new h.ViewLanguageConfigurationEvent),this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new h.ViewFlushedEvent),e.emitViewEvent(new h.ViewLineMappingChangedEvent),e.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()} this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new h.ViewDecorationsChangedEvent(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new h.ViewFlushedEvent),t.emitViewEvent(new h.ViewLineMappingChangedEvent),t.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){ const e=this._configuration.options.get(117),t=this._configuration.options.get(51),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new a.Range(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],o=0,s=t.startLineNumber,r=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let e=0,t=i.length;el||(se.startLineNumber);let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){let t=[],n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}let r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r} getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(1===i.id)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new a.Range(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(36),r=this._getColorMap(),l=o.fontFamily===s.EDITOR_FONT_DEFAULTS.fontFamily?o.fontFamily:`'${o.fontFamily}', ${s.EDITOR_FONT_DEFAULTS.fontFamily}`;return{mode:i.language,html:'
    '+this._getHTMLToCopy(n,r)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.getLineTokens(e),d=l.getLineContent(),h=e===i?n-1:0,u=e===o?s-1:d.length ;a+=""===d?"
    ":c.tokenizeLineToHTML(d,l.inflate(),t,h,u,r,f.isWindows)}return a}_getColorMap(){let e=l.TokenizationRegistry.getColorMap(),t=["#000000"];if(e)for(let n=1,o=e.length;nthis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){ return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t){this._withViewEventsCollector(i=>this._cursor.setSelections(i,e,t))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new _.ReadOnlyEditAttemptEvent):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}replacePreviousChar(e,t,i){this._executeCursorEdit(n=>this._cursor.replacePreviousChar(n,e,t,i))}paste(e,t,i,n){this._executeCursorEdit(o=>this._cursor.paste(o,e,t,i,n))}cut(e){ this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new a.Range(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new h.ViewRevealRangeRequestEvent(e,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new a.Range(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new h.ViewRevealRangeRequestEvent(e,i,null,0,!0,0)))}revealRange(e,t,i,n,o){this._withViewEventsCollector(s=>s.emitViewEvent(new h.ViewRevealRangeRequestEvent(e,i,null,n,t,o)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){ return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new h.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new _.ViewZonesChangedEvent))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}}t.ViewModel=y})),define(e[237],t([0,1,14,31,21,67,24,18,45,96,349]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineModel=t.OutlineGroup=t.OutlineElement=t.TreeElement=void 0;class h{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`, void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static getElementById(e,t){if(!e)return;let i=r.commonPrefixLength(e,t.id);if(i===e.length)return t;if(!(i0&&a.Range.areIntersecting(e[n-1],t.symbol.range)&&(n-=1):n=o;let s,r=[];for(;ns)&&(s=t.severity)}for(const[,e]of t.children)this._updateMarker(r,e);s&&(t.marker={count:r.length,topSev:s}),i.coalesceInPlace(e)}}t.OutlineGroup=g;class p extends h{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t){let i=this._keys.for(e,!0),o=p._requests.get(i);if(!o){ let t=new n.CancellationTokenSource;o={promiseCnt:0,source:t,promise:p._create(e,t.token),model:void 0},p._requests.set(i,o);const s=Date.now();o.promise.then(()=>{this._requestDurations.update(e,Date.now()-s)})}return o.model?Promise.resolve(o.model):(o.promiseCnt+=1,t.onCancellationRequested(()=>{0==--o.promiseCnt&&(o.source.cancel(),p._requests.delete(i))}),new Promise((e,t)=>{o.promise.then(t=>{o.model=t,e(t)},e=>{p._requests.delete(i),t(e)})}))}static getRequestDelay(e){return e?this._requestDurations.get(e):this._requestDurations.min}static _create(e,t){const s=new n.CancellationTokenSource(t),r=new p(e.uri),a=l.DocumentSymbolProviderRegistry.ordered(e),c=a.map((t,i)=>{var n;let a=h.findId(`provider_${i}`,r),l=new g(a,r,null!==(n=t.displayName)&&void 0!==n?n:"Unknown Outline Provider",i);return Promise.resolve(t.provideDocumentSymbols(e,s.token)).then(e=>{for(const t of e||[])p._makeOutlineElement(t,l);return l},e=>(o.onUnexpectedExternalError(e),l)).then(e=>{h.empty(e)?e.remove():r._groups.set(a,e)}) }),d=l.DocumentSymbolProviderRegistry.onDidChange(()=>{const t=l.DocumentSymbolProviderRegistry.ordered(e);i.equals(t,a)||s.cancel()});return Promise.all(c).then(()=>s.token.isCancellationRequested&&!t.isCancellationRequested?p._create(e,t):r._compact()).finally(()=>{d.dispose()})}static _makeOutlineElement(e,t){let i=h.findId(e,t),n=new u(i,t,e);if(e.children)for(const t of e.children)p._makeOutlineElement(t,n);t.children.set(n.id,n)}static get(e){for(;e;){if(e instanceof p)return e;e=e.parent}}adopt(){let e=new p(this.uri);for(const[t,i]of this._groups)e._groups.set(t,i.adopt(e));return e._compact()}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=c.Iterable.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}merge(e){return this.uri.toString()===e.uri.toString()&&(this._groups.size===e._groups.size&&(this._groups=e._groups,this.children=e.children,!0))} getItemEnclosingPosition(e,t){let i;if(t){let e=t.parent;for(;e&&!i;)e instanceof g&&(i=e),e=e.parent}let n=void 0;for(const[,t]of this._groups)if((n=t.getItemEnclosingPosition(e))&&(!i||i===t))break;return n}getItemById(e){return h.getElementById(e,this)}updateMarker(e){e.sort(a.Range.compareRangesUsingStarts);for(const[,t]of this._groups)t.updateMarker(e.slice(0))}}t.OutlineModel=p,p._requestDurations=new d.LanguageFeatureRequestDelays(l.DocumentSymbolProviderRegistry,350),p._requests=new s.LRUCache(9,.75),p._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(e,t){return`${e.id}/${t?e.getVersionId():""}/${this._hash(l.DocumentSymbolProviderRegistry.all(e))}`}_hash(e){let t="";for(const i of e){let e=this._data.get(i);void 0===e&&(e=this._counter++,this._data.set(i,e)),t+=e}return t}}})),define(e[1481],t([0,1,75,44]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingDecorationProvider=t.foldingCollapsedIcon=t.foldingExpandedIcon=void 0, t.foldingExpandedIcon=n.registerIcon("folding-expanded",n.Codicon.chevronDown),t.foldingCollapsedIcon=n.registerIcon("folding-collapsed",n.Codicon.chevronRight);class o{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?o.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?o.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:o.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?o.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:o.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}t.FoldingDecorationProvider=o,o.COLLAPSED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:t.foldingCollapsedIcon.classNames}),o.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:1,afterContentClassName:"inline-folded", className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:t.foldingCollapsedIcon.classNames}),o.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:t.foldingExpandedIcon.classNames}),o.EXPANDED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+t.foldingExpandedIcon.classNames}),o.HIDDEN_RANGE_DECORATION=i.ModelDecorationOptions.register({stickiness:1})})),define(e[1482],t([0,1,346,75,134]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeRanges=t.RangesCollector=t.IndentRangeProvider=t.ID_INDENT_PROVIDER=void 0;const s=5e3;t.ID_INDENT_PROVIDER="indent";t.IndentRangeProvider=class{constructor(e){this.editorModel=e,this.id=t.ID_INDENT_PROVIDER}dispose(){}compute(e){let t=o.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id),i=t&&!!t.offSide,n=t&&t.markers ;return Promise.resolve(a(this.editorModel,i,n))}};class r{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>i.MAX_LINE_NUMBER||t>i.MAX_LINE_NUMBER)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new i.FoldingRegions(e,t)}{let t=0,o=this._indentOccurrences.length;for(let e=0;ethis._foldingRangesLimit){o=e;break}t+=i}}const s=e.getOptions().tabSize;let r=new Uint32Array(this._foldingRangesLimit),a=new Uint32Array(this._foldingRangesLimit);for(let i=this._length-1,l=0;i>=0;i--){ let c=this._startIndexes[i],d=e.getLineContent(c),h=n.TextModel.computeIndentLevel(d,s);(h0;i--){let o,s=e.getLineContent(i),r=n.TextModel.computeIndentLevel(s,a),h=d[d.length-1];if(-1!==r){if(c&&(o=s.match(c))){if(!o[1]){d.push({indent:-2,endAbove:i,line:i});continue}{let e=d.length-1;for(;e>0&&-2!==d[e].indent;)e--;if(e>0){d.length=e+1,h=d[e],l.insertFirst(i,h.line,r),h.line=i,h.indent=r,h.endAbove=i;continue}}}if(h.indent>r){do{d.pop(),h=d[d.length-1]}while(h.indent>r);let e=h.endAbove-1;e-i>=1&&l.insertFirst(i,e,r)}h.indent===r?h.endAbove=i:d.push({indent:r,endAbove:i,line:i})}else t&&(h.endAbove=i)}return l.toIndentRanges(e)}t.RangesCollector=r, t.computeRanges=a})),define(e[1483],t([0,1,24,418,18,60,297,134,546]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoveLinesCommand=void 0;t.MoveLinesCommand=class{constructor(e,t,i){this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let r=this._selection;r.startLineNumbere.getLineTokens(t), getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i),getLineContent:null};if(r.startLineNumber===r.endLineNumber&&1===e.getLineMaxColumn(r.startLineNumber)){let i=r.startLineNumber,n=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(n)?t.addEditOperation(new o.Range(1,1,1,1),null):(t.addEditOperation(new o.Range(i,1,i,1),e.getLineContent(n)),t.addEditOperation(new o.Range(n,1,n,e.getLineMaxColumn(n)),null)),r=new s.Selection(n,1,n,1)}else{let n,s;if(this._isMovingDown){n=r.endLineNumber+1,s=e.getLineContent(n),t.addEditOperation(new o.Range(n-1,e.getLineMaxColumn(n-1),n,e.getLineMaxColumn(n)),null);let d=s;if(this.shouldAutoIndent(e,r)){let p=this.matchEnterRule(e,u,c,n,r.startLineNumber-1);if(null!==p){let t=i.getLeadingWhitespace(e.getLineContent(n)),o=p+l.getSpaceCnt(t,c),r=l.generateIndent(o,c,h);d=r+this.trimLeft(s)}else{g.getLineContent=t=>t===r.startLineNumber?e.getLineContent(n):e.getLineContent(t) ;let t=a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,g,e.getLanguageIdAtPosition(n,1),r.startLineNumber,u);if(null!==t){let o=i.getLeadingWhitespace(e.getLineContent(n)),r=l.getSpaceCnt(t,c);if(r!==l.getSpaceCnt(o,c)){let e=l.generateIndent(r,c,h);d=e+this.trimLeft(s)}}}t.addEditOperation(new o.Range(r.startLineNumber,1,r.startLineNumber,1),d+"\n");let m=this.matchEnterRule(e,u,c,r.startLineNumber,r.startLineNumber,d);if(null!==m)0!==m&&this.getIndentEditsOfMovingBlock(e,t,r,c,h,m);else{g.getLineContent=t=>t===r.startLineNumber?d:t>=r.startLineNumber+1&&t<=r.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let o=a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,g,e.getLanguageIdAtPosition(n,1),r.startLineNumber+1,u);if(null!==o){const n=i.getLeadingWhitespace(e.getLineContent(r.startLineNumber)),s=l.getSpaceCnt(o,c),a=l.getSpaceCnt(n,c);if(s!==a){const i=s-a;this.getIndentEditsOfMovingBlock(e,t,r,c,h,i)}}} }else t.addEditOperation(new o.Range(r.startLineNumber,1,r.startLineNumber,1),d+"\n")}else if(n=r.startLineNumber-1,s=e.getLineContent(n),t.addEditOperation(new o.Range(n,1,n+1,1),null),t.addEditOperation(new o.Range(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,r)){g.getLineContent=t=>t===n?e.getLineContent(r.startLineNumber):e.getLineContent(t);let o=this.matchEnterRule(e,u,c,r.startLineNumber,r.startLineNumber-2);if(null!==o)0!==o&&this.getIndentEditsOfMovingBlock(e,t,r,c,h,o);else{let o=a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,g,e.getLanguageIdAtPosition(r.startLineNumber,1),n,u);if(null!==o){let n=i.getLeadingWhitespace(e.getLineContent(r.startLineNumber)),s=l.getSpaceCnt(o,c),a=l.getSpaceCnt(n,c);if(s!==a){let i=s-a;this.getIndentEditsOfMovingBlock(e,t,r,c,h,i)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,i){return{ shiftIndent:o=>n.ShiftCommand.shiftIndent(o,o.length+1,e,t,i),unshiftIndent:o=>n.ShiftCommand.unshiftIndent(o,o.length+1,e,t,i)}}matchEnterRule(e,t,n,s,c,d){let h=c;for(;h>=1;){let t;if(t=h===c&&void 0!==d?d:e.getLineContent(h),i.lastNonWhitespaceIndex(t)>=0)break;h--}if(h<1||s>e.getLineCount())return null;let u=e.getLineMaxColumn(h),g=a.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,e,new o.Range(h,u,h,u));if(g){let o=g.indentation;g.indentAction===r.IndentAction.None?o=g.indentation+g.appendText:g.indentAction===r.IndentAction.Indent?o=g.indentation+g.appendText:g.indentAction===r.IndentAction.IndentOutdent?o=g.indentation:g.indentAction===r.IndentAction.Outdent&&(o=t.unshiftIndent(g.indentation)+g.appendText);let c=e.getLineContent(s);if(this.trimLeft(c).indexOf(this.trimLeft(o))>=0){let r=i.getLeadingWhitespace(e.getLineContent(s)),c=i.getLeadingWhitespace(o),d=a.LanguageConfigurationRegistry.getIndentMetadata(e,s);return null!==d&&2&d&&(c=t.unshiftIndent(c)), l.getSpaceCnt(c,n)-l.getSpaceCnt(r,n)}}return null}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==a.LanguageConfigurationRegistry.getIndentRulesSupport(i)}getIndentEditsOfMovingBlock(e,t,n,s,r,a){for(let c=n.startLineNumber;c<=n.endLineNumber;c++){let d=e.getLineContent(c),h=i.getLeadingWhitespace(d),u=l.getSpaceCnt(h,s)+a,g=l.generateIndent(u,s,r);g!==h&&(t.addEditOperation(new o.Range(c,1,c,h.length+1),g),c===n.endLineNumber&&n.endColumn<=h.length+1&&""===g&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new m(this.editor), this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()} get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=l.Range.isIRange(e)?l.Range.lift(e):l.Range.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:c.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(51),t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`, this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(51),a=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(r/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(r/9)),this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new g(s,i.lineNumber,i.column,t,e=>this._onViewZoneTop(e),e=>this._onViewZoneHeight(e)),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new p(u+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=e+"px", this.container.style.borderBottomWidth=e+"px"}let d=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new n.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(), this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){let i=(t.currentY-e.startY)/this.editor.getOption(51),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}})),define(e[88],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IClipboardService=void 0,t.IClipboardService=i.createDecorator("clipboardService")})),define(e[32],t([0,1,2,13,5,6,194,96]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.NullCommandService=t.CommandsRegistry=t.ICommandService=void 0,t.ICommandService=o.createDecorator("commandService"),t.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new s.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...o){return n.validateConstraints(o,t),i(e,...o)}}const{id:o}=e;let s=this._commands.get(o);s||(s=new r.LinkedList,this._commands.set(o,s));let a=s.unshift(e),l=i.toDisposable(()=>{a();const e=this._commands.get(o);(null==e?void 0:e.isEmpty())&&this._commands.delete(o)});return this._onDidRegisterCommand.fire(o),l}registerCommandAlias(e,i){return t.CommandsRegistry.registerCommand(e,(e,...n)=>e.get(t.ICommandService).executeCommand(i,...n))} getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return a.Iterable.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}},t.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:()=>i.Disposable.None,onDidExecuteCommand:()=>i.Disposable.None,executeCommand:()=>Promise.resolve(void 0)}})),define(e[1484],t([0,1,10,18,46,31,64,237,32,13,96]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";async function h(e,t,i){const n=await a.OutlineModel.create(e,i),o=[];for(const e of n.children.values())e instanceof a.OutlineElement?o.push(e.symbol):o.push(...d.Iterable.map(e.children.values(),e=>e.symbol));let s=[];return i.isCancellationRequested?s:(t?function e(t,i,n){for(let o of i)t.push({kind:o.kind,tags:o.tags,name:o.name,detail:o.detail,containerName:o.containerName||n,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&e(t,o.children,o.name)}(s,o,""):s=o,s.sort(u))}function u(e,t){ return n.Range.compareRangesUsingStarts(e.range,t.range)}Object.defineProperty(t,"__esModule",{value:!0}),t.getDocumentSymbols=void 0,t.getDocumentSymbols=h,l.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[n]=t;c.assertType(i.URI.isUri(n));const a=e.get(o.IModelService).getModel(n);if(a)return h(a,!1,s.CancellationToken.None);const l=await e.get(r.ITextModelService).createModelReference(n);try{return await h(l.object.textEditorModel,!1,s.CancellationToken.None)}finally{l.dispose()}}))})),define(e[1485],t([0,1,31,21,10,18,45,46,32,2,14,13]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLinks=t.LinksList=t.Link=void 0;class u{constructor(e,t){this._link=e,this._provider=t}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}async resolve(e){ return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}}t.Link=u;class g extends c.Disposable{constructor(e){super();let t=[];for(const[i,n]of e){const e=i.links.map(e=>new u(e,n));t=g._union(t,e),c.isDisposable(i)&&this._register(i)}this.links=t}static _union(e,t){let i,n,o,r,a=[];for(i=0,o=0,n=e.length,r=t.length;iPromise.resolve(o.provideLinks(e,t)).then(e=>{e&&(i[s]=[e,o])},n.onUnexpectedExternalError));return Promise.all(o).then(()=>{const e=new g(d.coalesce(i)) ;return t.isCancellationRequested?(e.dispose(),new g([])):e})}t.LinksList=g,t.getLinks=p,l.CommandsRegistry.registerCommand("_executeLinkProvider",async(e,...t)=>{let[n,s]=t;h.assertType(n instanceof o.URI),"number"!=typeof s&&(s=0);const r=e.get(a.IModelService).getModel(n);if(!r)return[];const l=await p(r,i.CancellationToken.None);if(!l)return[];for(let e=0;ethis._deserializeAndExpression(e,t)))}static _deserializeAndExpression(e,t){let i=e.split("&&");return b.create(i.map(e=>this._deserializeOne(e,t)))}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return m.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return u.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return f.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return g.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?v.create(e.substr(1).trim()):h.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(i.isFalsyOrWhitespace(e)){if(t)throw new Error("missing regexp-value for =~-expression") ;return console.warn("missing regexp-value for =~-expression"),null}let n=e.indexOf("/"),o=e.lastIndexOf("/");if(n===o||n<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let s=e.slice(n+1,o),r="i"===e[o+1]?"i":"";try{return new RegExp(s,r)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function l(e,t){return e.cmp(t)}t.ContextKeyExpr=a;class c{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}map(e){return this}negate(){return d.INSTANCE}}t.ContextKeyFalseExpr=c,c.INSTANCE=new c;class d{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}map(e){return this}negate(){return c.INSTANCE}}t.ContextKeyTrueExpr=d, d.INSTANCE=new d;class h{constructor(e){this.key=e,this.type=2}static create(e){const t=s.get(e);return"boolean"==typeof t?t?d.INSTANCE:c.INSTANCE:new h(e)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:0}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(e){return e.mapDefined(this.key)}negate(){return v.create(this.key)}}t.ContextKeyDefinedExpr=h;class u{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"==typeof t)return t?h.create(e):v.create(e);const i=s.get(e);if("boolean"==typeof i){return t===(i?"true":"false")?d.INSTANCE:c.INSTANCE}return new u(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valuee.value?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)==this.value}serialize(){ return this.key+" == '"+this.value+"'"}keys(){return[this.key]}map(e){return e.mapEquals(this.key,this.value)}negate(){return m.create(this.key,this.value)}}t.ContextKeyEqualsExpr=u;class g{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new g(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valueKeye.valueKey?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&r.call(t,i)}serialize(){return this.key+" in '"+this.valueKey+"'"}keys(){return[this.key,this.valueKey]}map(e){return e.mapIn(this.key,this.valueKey)}negate(){return p.create(this)}}t.ContextKeyInExpr=g;class p{constructor(e){this._actual=e,this.type=11}static create(e){return new p(e)}cmp(e){ return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(e){return new p(this._actual.map(e))}negate(){return this._actual}}t.ContextKeyNotInExpr=p;class m{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"==typeof t)return t?v.create(e):h.create(e);const i=s.get(e);if("boolean"==typeof i){return t===(i?"true":"false")?c.INSTANCE:d.INSTANCE}return new m(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valuee.value?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return this.key+" != '"+this.value+"'"}keys(){return[this.key]}map(e){return e.mapNotEquals(this.key,this.value)}negate(){ return u.create(this.key,this.value)}}t.ContextKeyNotEqualsExpr=m;class v{constructor(e){this.key=e,this.type=3}static create(e){const t=s.get(e);return"boolean"==typeof t?t?c.INSTANCE:d.INSTANCE:new v(e)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:0}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return"!"+this.key}keys(){return[this.key]}map(e){return e.mapNot(this.key)}negate(){return h.create(this.key)}}t.ContextKeyNotExpr=v;class f{constructor(e,t){this.key=e,this.regexp=t,this.type=7}static create(e,t){return new f(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}evaluate(e){let t=e.getValue(this.key) ;return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}map(e){return e.mapRegex(this.key,this.regexp)}negate(){return S.create(this)}}t.ContextKeyRegexExpr=f;class S{constructor(e){this._actual=e,this.type=8}static create(e){return new S(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(e){return new S(this._actual.map(e))}negate(){return this._actual}}t.ContextKeyNotRegexExpr=S;class b{constructor(e){this.expr=e,this.type=6}static create(e){return b._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1 ;for(let t=0,i=this.expr.length;t1;){const e=t[t.length-1];if(9!==e.type)break;t.pop();const i=t.pop(),n=_.create(e.expr.map(e=>b.create([e,i])));n&&(t.push(n),t.sort(l))}return 1===t.length?t[0]:new b(t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}map(e){return new b(this.expr.map(t=>t.map(e)))}negate(){let e=[] ;for(let t of this.expr)e.push(t.negate());return _.create(e)}}t.ContextKeyAndExpr=b;class _{constructor(e){this.expr=e,this.type=9}static create(e){const t=_._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new _(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}map(e){return new _(this.expr.map(t=>t.map(e)))}negate(){let e=[];for(let t of this.expr)e.push(t.negate());const t=e=>9===e.type?e.expr:[e];for(;e.length>1;){const i=e.shift(),n=e.shift(),o=[];for(const e of t(i))for(const i of t(n))o.push(a.and(e,i));e.unshift(a.or(...o))}return e[0]}}t.ContextKeyOrExpr=_;t.RawContextKey=class extends h{constructor(e,t){super(e),this._defaultValue=t}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return a.not(this.key)}isEqualTo(e){return a.equals(this.key,e)}notEqualsTo(e){return a.notEquals(this.key,e)}},t.IContextKeyService=n.createDecorator("contextKeyService"),t.SET_CONTEXT_COMMAND_ID="setContext"})),define(e[58],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorContextKeys=void 0,function(e){ e.editorSimpleInput=new i.RawContextKey("editorSimpleInput",!1),e.editorTextFocus=new i.RawContextKey("editorTextFocus",!1),e.focus=new i.RawContextKey("editorFocus",!1),e.textInputFocus=new i.RawContextKey("textInputFocus",!1),e.readOnly=new i.RawContextKey("editorReadonly",!1),e.columnSelection=new i.RawContextKey("editorColumnSelection",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new i.RawContextKey("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new i.RawContextKey("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new i.RawContextKey("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new i.RawContextKey("isInEmbeddedEditor",!1),e.canUndo=new i.RawContextKey("canUndo",!1),e.canRedo=new i.RawContextKey("canRedo",!1),e.hoverVisible=new i.RawContextKey("editorHoverVisible",!1), e.inCompositeEditor=new i.RawContextKey("inCompositeEditor",void 0),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new i.RawContextKey("editorLangId",""),e.hasCompletionItemProvider=new i.RawContextKey("editorHasCompletionItemProvider",!1),e.hasCodeActionsProvider=new i.RawContextKey("editorHasCodeActionsProvider",!1),e.hasCodeLensProvider=new i.RawContextKey("editorHasCodeLensProvider",!1),e.hasDefinitionProvider=new i.RawContextKey("editorHasDefinitionProvider",!1),e.hasDeclarationProvider=new i.RawContextKey("editorHasDeclarationProvider",!1),e.hasImplementationProvider=new i.RawContextKey("editorHasImplementationProvider",!1),e.hasTypeDefinitionProvider=new i.RawContextKey("editorHasTypeDefinitionProvider",!1),e.hasHoverProvider=new i.RawContextKey("editorHasHoverProvider",!1),e.hasDocumentHighlightProvider=new i.RawContextKey("editorHasDocumentHighlightProvider",!1),e.hasDocumentSymbolProvider=new i.RawContextKey("editorHasDocumentSymbolProvider",!1), e.hasReferenceProvider=new i.RawContextKey("editorHasReferenceProvider",!1),e.hasRenameProvider=new i.RawContextKey("editorHasRenameProvider",!1),e.hasSignatureHelpProvider=new i.RawContextKey("editorHasSignatureHelpProvider",!1),e.hasDocumentFormattingProvider=new i.RawContextKey("editorHasDocumentFormattingProvider",!1),e.hasDocumentSelectionFormattingProvider=new i.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1),e.hasMultipleDocumentFormattingProvider=new i.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1),e.hasMultipleDocumentSelectionFormattingProvider=new i.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1)}(t.EditorContextKeys||(t.EditorContextKeys={}))})),define(e[557],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineConfigKeys=t.OutlineViewFocused=t.OutlineViewFiltered=t.OutlineViewId=void 0,t.OutlineViewId="outline",t.OutlineViewFiltered=new i.RawContextKey("outlineFiltered",!1), t.OutlineViewFocused=new i.RawContextKey("outlineFocused",!1),function(e){e.icons="outline.icons",e.problemsEnabled="outline.problems.enabled",e.problemsColors="outline.problems.colors",e.problemsBadges="outline.problems.badges"}(t.OutlineConfigKeys||(t.OutlineConfigKeys={}))}));var r=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};define(e[1486],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestAlternatives=void 0;let n=class e{constructor(t,i){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:i},n){if(0===t.items.length)return void this.reset();e._moveIndex(!0,t,i)!==i?(this._acceptNext=n,this._model=t,this._index=i,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}), this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(;(n=(n+t.items.length+(e?1:-1))%t.items.length)!==i&&t.items[n].completion.additionalTextEdits;);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};n.OtherSuggestions=new i.RawContextKey("hasOtherSuggestions",!1),n=o([r(1,i.IContextKeyService)],n),t.SuggestAlternatives=n})),define(e[1487],t([0,1,8,2]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordContextKey=void 0;let s=class e extends n.Disposable{constructor(t,i){super(),this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(i),this._register(this._editor.onDidChangeConfiguration(e=>e.hasChanged(101)&&this._update())),this._update()}dispose(){var e;super.dispose(), null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(101);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};s.AtEnd=new i.RawContextKey("atEndOfWord",!1),s=o([r(1,i.IContextKeyService)],s),t.WordContextKey=s})),define(e[105],t([0,1,5,8]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_ACCESSIBILITY_MODE_ENABLED=t.AccessibilitySupport=t.IAccessibilityService=void 0,t.IAccessibilityService=i.createDecorator("accessibilityService"), function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={})),t.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new n.RawContextKey("accessibilityModeEnabled",!1)})),define(e[156],t([0,1,8,12]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputFocusedContext=t.InputFocusedContextKey=t.IsDevelopmentContext=t.IsMacNativeContext=t.IsWebContext=t.IsWindowsContext=t.IsLinuxContext=t.IsMacContext=void 0,t.IsMacContext=new i.RawContextKey("isMac",n.isMacintosh),t.IsLinuxContext=new i.RawContextKey("isLinux",n.isLinux),t.IsWindowsContext=new i.RawContextKey("isWindows",n.isWindows),t.IsWebContext=new i.RawContextKey("isWeb",n.isWeb),t.IsMacNativeContext=new i.RawContextKey("isMacNative",n.isMacintosh&&!n.isWeb),t.IsDevelopmentContext=new i.RawContextKey("isDevelopment",!1),t.InputFocusedContextKey="inputFocus",t.InputFocusedContext=new i.RawContextKey(t.InputFocusedContextKey,!1)})), define(e[36],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IContextMenuService=t.IContextViewService=void 0,t.IContextViewService=i.createDecorator("contextViewService"),t.IContextMenuService=i.createDecorator("contextMenuService")})),define(e[307],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionHostDebugService=void 0,t.IExtensionHostDebugService=i.createDecorator("extensionHostDebugService")})),define(e[71],t([0,1,5,17,1030]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFileNamesMessage=t.ConfirmResult=t.IFileDialogService=t.IDialogService=void 0,t.IDialogService=i.createDecorator("dialogService"),t.IFileDialogService=i.createDecorator("fileDialogService"),function(e){e[e.SAVE=0]="SAVE",e[e.DONT_SAVE=1]="DONT_SAVE",e[e.CANCEL=2]="CANCEL"}(t.ConfirmResult||(t.ConfirmResult={}));const s=10;t.getFileNamesMessage=function(e){const t=[] ;return t.push(...e.slice(0,s).map(e=>"string"==typeof e?e:n.basename(e))),e.length>s&&(e.length-s==1?t.push(o.localize(0,null)):t.push(o.localize(1,null,e.length-s))),t.push(""),t.join("\n")}})),define(e[423],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=void 0,t.IDownloadService=i.createDecorator("downloadService")})),define(e[84],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INativeEnvironmentService=t.IEnvironmentService=void 0,t.IEnvironmentService=i.createDecorator("environmentService"),t.INativeEnvironmentService=i.createDecorator("nativeEnvironmentService")})),define(e[76],t([0,1,1031,5,29]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.PreferencesLocalizedLabel=t.PreferencesLabel=t.ExtensionsChannelId=t.ExtensionsLocalizedLabel=t.ExtensionsLabel=t.DefaultIconPath=t.IExtensionTipsService=t.IGlobalExtensionEnablementService=t.ENABLED_EXTENSIONS_STORAGE_PATH=t.DISABLED_EXTENSIONS_STORAGE_PATH=t.IExtensionManagementService=t.ExtensionManagementError=t.INSTALL_ERROR_INCOMPATIBLE=t.INSTALL_ERROR_MALICIOUS=t.INSTALL_ERROR_NOT_SUPPORTED=t.IExtensionGalleryService=t.InstallOperation=t.StatisticType=t.SortOrder=t.SortBy=t.isIExtensionIdentifier=t.EXTENSION_IDENTIFIER_REGEX=t.EXTENSION_IDENTIFIER_PATTERN=void 0,t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.EXTENSION_IDENTIFIER_REGEX=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN),t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)},function(e){e[e.NoneOrRelevance=0]="NoneOrRelevance",e[e.LastUpdatedDate=1]="LastUpdatedDate",e[e.Title=2]="Title",e[e.PublisherName=3]="PublisherName", e[e.InstallCount=4]="InstallCount",e[e.PublishedDate=5]="PublishedDate",e[e.AverageRating=6]="AverageRating",e[e.WeightedRating=12]="WeightedRating"}(t.SortBy||(t.SortBy={})),function(e){e[e.Default=0]="Default",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(t.SortOrder||(t.SortOrder={})),function(e){e.Uninstall="uninstall"}(t.StatisticType||(t.StatisticType={})),function(e){e[e.None=0]="None",e[e.Install=1]="Install",e[e.Update=2]="Update"}(t.InstallOperation||(t.InstallOperation={})),t.IExtensionGalleryService=n.createDecorator("extensionGalleryService"),t.INSTALL_ERROR_NOT_SUPPORTED="notsupported",t.INSTALL_ERROR_MALICIOUS="malicious",t.INSTALL_ERROR_INCOMPATIBLE="incompatible";class s extends Error{constructor(e,t){super(e),this.code=t}}t.ExtensionManagementError=s,t.IExtensionManagementService=n.createDecorator("extensionManagementService"),t.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",t.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled", t.IGlobalExtensionEnablementService=n.createDecorator("IGlobalExtensionEnablementService"),t.IExtensionTipsService=n.createDecorator("IExtensionTipsService"),t.DefaultIconPath=o.FileAccess.asBrowserUri("./media/defaultIcon.png",e).toString(!0),t.ExtensionsLabel=i.localize(0,null),t.ExtensionsLocalizedLabel={value:t.ExtensionsLabel,original:"Extensions"},t.ExtensionsChannelId="extensions",t.PreferencesLabel=i.localize(1,null),t.PreferencesLocalizedLabel={value:t.PreferencesLabel,original:"Preferences"}})),define(e[424],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionRecommendationNotificationService=t.RecommendationsNotificationResult=t.RecommendationSource=void 0,function(e){e[e.FILE=1]="FILE",e[e.WORKSPACE=2]="WORKSPACE",e[e.EXE=3]="EXE"}(t.RecommendationSource||(t.RecommendationSource={})),function(e){e.Ignored="ignored",e.Cancelled="cancelled",e.TooMany="toomany",e.Accepted="reacted" }(t.RecommendationsNotificationResult||(t.RecommendationsNotificationResult={})),t.IExtensionRecommendationNotificationService=i.createDecorator("IExtensionRecommendationNotificationService")})),define(e[104],t([0,1,24,5]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBuiltinExtensionsScannerService=t.isAuthenticaionProviderExtension=t.isLanguagePackExtension=t.ExtensionIdentifier=t.ExtensionType=t.EXTENSION_CATEGORIES=t.isIExtensionIdentifier=t.BUILTIN_MANIFEST_CACHE_FILE=t.USER_MANIFEST_CACHE_FILE=t.MANIFEST_CACHE_FOLDER=void 0,t.MANIFEST_CACHE_FOLDER="CachedExtensions",t.USER_MANIFEST_CACHE_FILE="user",t.BUILTIN_MANIFEST_CACHE_FILE="builtin",t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)}, t.EXTENSION_CATEGORIES=["Azure","Data Science","Debuggers","Extension Packs","Formatters","Keymaps","Language Packs","Linters","Machine Learning","Notebooks","Programming Languages","SCM Providers","Snippets","Themes","Testing","Visualization","Other"],function(e){e[e.System=0]="System",e[e.User=1]="User"}(t.ExtensionType||(t.ExtensionType={}));t.ExtensionIdentifier=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static equals(e,t){if(null==e)return null==t;if(null==t)return!1;if("string"==typeof e||"string"==typeof t){let n="string"==typeof e?e:e.value,o="string"==typeof t?t:t.value;return i.equalsIgnoreCase(n,o)}return e._lower===t._lower}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}},t.isLanguagePackExtension=function(e){return!(!e.contributes||!e.contributes.localizations)&&e.contributes.localizations.length>0},t.isAuthenticaionProviderExtension=function(e){return!(!e.contributes||!e.contributes.authentication)&&e.contributes.authentication.length>0}, t.IBuiltinExtensionsScannerService=n.createDecorator("IBuiltinExtensionsScannerService")})),define(e[106],t([0,1,24,104]),(function(e,t,i,n){"use strict";function o(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||0===i.compareIgnoreCase(e.id,t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.getMaliciousExtensionsSet=t.BetterMergeId=t.getGalleryExtensionTelemetryData=t.getLocalExtensionTelemetryData=t.groupByExtension=t.getGalleryExtensionId=t.adoptToGalleryExtensionId=t.ExtensionIdentifierWithVersion=t.areSameExtensions=void 0,t.areSameExtensions=o;class s{constructor(e,t){this.identifier=e,this.version=t}key(){return`${this.identifier.id}-${this.version}`}equals(e){return e instanceof s&&(o(this.identifier,e.identifier)&&this.version===e.version)}}t.ExtensionIdentifierWithVersion=s,t.adoptToGalleryExtensionId=function(e){return e.toLocaleLowerCase()},t.getGalleryExtensionId=function(e,t){return`${e.toLocaleLowerCase()}.${t.toLocaleLowerCase()}`},t.groupByExtension=function(e,t){ const i=[],n=e=>{for(const n of i)if(n.some(i=>o(t(i),t(e))))return n;return null};for(const t of e){const e=n(t);e?e.push(t):i.push([t])}return i},t.getLocalExtensionTelemetryData=function(e){return{id:e.identifier.id,name:e.manifest.name,galleryId:null,publisherId:e.publisherId,publisherName:e.manifest.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:e.manifest.extensionDependencies&&e.manifest.extensionDependencies.length>0}},t.getGalleryExtensionTelemetryData=function(e){return Object.assign({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,publisherId:e.publisherId,publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:!!(e.properties.dependencies&&e.properties.dependencies.length>0)},e.telemetryData)},t.BetterMergeId=new n.ExtensionIdentifier("pprice.better-merge"),t.getMaliciousExtensionsSet=function(e){const t=new Set;for(const i of e)i.malicious&&t.add(i.id.id);return t}})),define(e[25],t([0,1,1035,48,10,5,24,13]),(function(e,t,i,n,o,s,r,a){ "use strict";var l;Object.defineProperty(t,"__esModule",{value:!0}),t.BinarySize=t.FALLBACK_MAX_MEMORY_SIZE_MB=t.MIN_MAX_MEMORY_SIZE_MB=t.whenProviderRegistered=t.etag=t.ETAG_DISABLED=t.FileKind=t.FILES_EXCLUDE_CONFIG=t.FILES_ASSOCIATIONS_CONFIG=t.HotExitConfiguration=t.AutoSaveConfiguration=t.FileOperationResult=t.FileOperationError=t.isParent=t.FileChangesEvent=t.FileChangeType=t.FileOperationEvent=t.FileOperation=t.toFileOperationResult=t.toFileSystemProviderErrorCode=t.markAsFileSystemProviderError=t.ensureFileSystemProviderError=t.createFileSystemProviderError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.hasFileReadStreamCapability=t.hasOpenReadWriteCloseCapability=t.hasFileFolderCopyCapability=t.hasReadWriteCapability=t.FileSystemProviderCapabilities=t.FileType=t.IFileService=void 0,t.IFileService=s.createDecorator("fileService"),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={})),function(e){ e[e.FileReadWrite=2]="FileReadWrite",e[e.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",e[e.FileReadStream=16]="FileReadStream",e[e.FileFolderCopy=8]="FileFolderCopy",e[e.PathCaseSensitive=1024]="PathCaseSensitive",e[e.Readonly=2048]="Readonly",e[e.Trash=4096]="Trash"}(t.FileSystemProviderCapabilities||(t.FileSystemProviderCapabilities={})),t.hasReadWriteCapability=function(e){return!!(2&e.capabilities)},t.hasFileFolderCopyCapability=function(e){return!!(8&e.capabilities)},t.hasOpenReadWriteCloseCapability=function(e){return!!(4&e.capabilities)},t.hasFileReadStreamCapability=function(e){return!!(16&e.capabilities)},function(e){e.FileExists="EntryExists",e.FileNotFound="EntryNotFound",e.FileNotADirectory="EntryNotADirectory",e.FileIsADirectory="EntryIsADirectory",e.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",e.FileTooLarge="EntryTooLarge",e.NoPermissions="NoPermissions",e.Unavailable="Unavailable",e.Unknown="Unknown"}(l=t.FileSystemProviderErrorCode||(t.FileSystemProviderErrorCode={})) ;class c extends Error{constructor(e,t){super(e),this.code=t}}function d(e,t){const i=new c(e.toString(),t);return h(i,t),i}function h(e,t){return e.name=t?`${t} (FileSystemError)`:"FileSystemError",e}function u(e){if(!e)return l.Unknown;if(e instanceof c)return e.code;const t=/^(.+) \(FileSystemError\)$/.exec(e.name);if(!t)return l.Unknown;switch(t[1]){case l.FileExists:return l.FileExists;case l.FileIsADirectory:return l.FileIsADirectory;case l.FileNotADirectory:return l.FileNotADirectory;case l.FileNotFound:return l.FileNotFound;case l.FileExceedsMemoryLimit:return l.FileExceedsMemoryLimit;case l.FileTooLarge:return l.FileTooLarge;case l.NoPermissions:return l.NoPermissions;case l.Unavailable:return l.Unavailable}return l.Unknown}t.FileSystemProviderError=c,t.createFileSystemProviderError=d,t.ensureFileSystemProviderError=function(e){return e||d(i.localize(0,null),l.Unknown)},t.markAsFileSystemProviderError=h,t.toFileSystemProviderErrorCode=u,t.toFileOperationResult=function(e){ if(e instanceof p)return e.fileOperationResult;switch(u(e)){case l.FileNotFound:return 1;case l.FileIsADirectory:return 0;case l.FileNotADirectory:return 10;case l.NoPermissions:return 6;case l.FileExists:return 4;case l.FileExceedsMemoryLimit:return 9;case l.FileTooLarge:return 7;default:return 11}},function(e){e[e.CREATE=0]="CREATE",e[e.DELETE=1]="DELETE",e[e.MOVE=2]="MOVE",e[e.COPY=3]="COPY"}(t.FileOperation||(t.FileOperation={}));t.FileOperationEvent=class{constructor(e,t,i){this.resource=e,this.operation=t,this.target=i}isOperation(e){return this.operation===e}},function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(t.FileChangeType||(t.FileChangeType={}));class g{constructor(e,t){this.changes=e,this.extUri=t}contains(e,t){if(!e)return!1;const i=!a.isUndefinedOrNull(t);return this.changes.some(n=>(!i||n.type===t)&&(2===n.type?this.extUri.isEqualOrParent(e,n.resource):this.extUri.isEqual(e,n.resource)))}getAdded(){return this.getOfType(1)}gotAdded(){return this.hasType(1)} getDeleted(){return this.getOfType(2)}gotDeleted(){return this.hasType(2)}getUpdated(){return this.getOfType(0)}gotUpdated(){return this.hasType(0)}getOfType(e){return this.changes.filter(t=>t.type===e)}hasType(e){return this.changes.some(t=>t.type===e)}filter(e){return new g(this.changes.filter(t=>e(t)),this.extUri)}}t.FileChangesEvent=g,t.isParent=function(e,t,i){return!(!e||!t||e===t)&&(!(t.length>e.length)&&(t.charAt(t.length-1)!==n.sep&&(t+=n.sep),i?r.startsWithIgnoreCase(e,t):0===e.indexOf(t)))};class p extends Error{constructor(e,t,i){super(e),this.fileOperationResult=t,this.options=i}static isFileOperationError(e){return e instanceof Error&&!a.isUndefinedOrNull(e.fileOperationResult)}}t.FileOperationError=p,function(e){e[e.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=5]="FILE_READ_ONLY", e[e.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",e[e.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",e[e.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",e[e.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",e[e.FILE_NOT_DIRECTORY=10]="FILE_NOT_DIRECTORY",e[e.FILE_OTHER_ERROR=11]="FILE_OTHER_ERROR"}(t.FileOperationResult||(t.FileOperationResult={})),t.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},t.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},t.FILES_ASSOCIATIONS_CONFIG="files.associations",t.FILES_EXCLUDE_CONFIG="files.exclude",function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(t.FileKind||(t.FileKind={})),t.ETAG_DISABLED="",t.etag=function(e){if("number"==typeof e.size&&"number"==typeof e.mtime)return e.mtime.toString(29)+e.size.toString(31)},t.whenProviderRegistered=function(e,t){return t.canHandleResource(o.URI.from({scheme:e.scheme }))?Promise.resolve():new Promise((i,n)=>{const o=t.onDidChangeFileSystemProviderRegistrations(t=>{t.scheme===e.scheme&&t.added&&(o.dispose(),i())})})},t.MIN_MAX_MEMORY_SIZE_MB=2048,t.FALLBACK_MAX_MEMORY_SIZE_MB=4096;class m{static formatSize(e){return e{const s=window.indexedDB.open(e,t);s.onerror=e=>o(s.error),s.onsuccess=()=>{const e=s.result;for(const t of i)if(!e.objectStoreNames.contains(t))return console.error(`Error while creating indexedDB. Could not create ${t} object store`),void n(null);n(e)},s.onupgradeneeded=()=>{const e=s.result;for(const t of i)e.objectStoreNames.contains(t)||e.createObjectStore(t)}})}};class h extends o.Disposable{constructor(e,t,i){super(),this.scheme=e,this.database=t,this.store=i,this.capabilities=1026,this.onDidChangeCapabilities=s.Event.None,this._onDidChangeFile=this._register(new s.Emitter), this.onDidChangeFile=this._onDidChangeFile.event,this.versions=new Map,this.dirs=new Set,this.dirs.add("/")}watch(e,t){return o.Disposable.None}async mkdir(e){try{if((await this.stat(e)).type===n.FileType.File)throw n.createFileSystemProviderError(l.localize(0,null),n.FileSystemProviderErrorCode.FileNotADirectory)}catch(e){}await this.stat(a.dirname(e)),this.dirs.add(e.path)}async stat(e){try{const t=await this.readFile(e);return{type:n.FileType.File,ctime:0,mtime:this.versions.get(e.toString())||0,size:t.byteLength}}catch(e){}if((await this.readdir(e)).length)return{type:n.FileType.Directory,ctime:0,mtime:0,size:0};if(this.dirs.has(e.path))return{type:n.FileType.Directory,ctime:0,mtime:0,size:0};throw n.createFileSystemProviderError(l.localize(1,null),n.FileSystemProviderErrorCode.FileNotFound)}async readdir(e){if(await this.hasKey(e.path))throw n.createFileSystemProviderError(l.localize(2,null),n.FileSystemProviderErrorCode.FileNotADirectory);const t=await this.getAllKeys(),i=new Map;for(const o of t){ const t=this.toResource(o);if(a.extUri.isEqualOrParent(t,e)){const o=a.extUri.relativePath(e,t);if(o){const e=o.split("/");i.set(e[0],[e[0],1===e.length?n.FileType.File:n.FileType.Directory])}}}return[...i.values()]}async readFile(e){if(!await this.hasKey(e.path))throw n.createFileSystemProviderError(l.localize(3,null),n.FileSystemProviderErrorCode.FileNotFound);const t=await this.getValue(e.path);return"string"==typeof t?r.VSBuffer.fromString(t).buffer:t}async writeFile(e,t,i){if(!await this.hasKey(e.path)){if((await this.readdir(e)).length)throw n.createFileSystemProviderError(l.localize(4,null),n.FileSystemProviderErrorCode.FileIsADirectory)}await this.setValue(e.path,t),this.versions.set(e.toString(),(this.versions.get(e.toString())||0)+1),this._onDidChangeFile.fire([{resource:e,type:0}])}async delete(e,t){if(await this.hasKey(e.path))return await this.deleteKey(e.path),this.versions.delete(e.path),void this._onDidChangeFile.fire([{resource:e,type:2}]);if(t.recursive){const i=await this.readdir(e) ;await Promise.all(i.map(([i])=>this.delete(a.joinPath(e,i),t)))}}rename(e,t,i){return Promise.reject(new Error("Not Supported"))}toResource(e){return i.URI.file(e).with({scheme:this.scheme})}async getAllKeys(){return new Promise(async(e,t)=>{const i=this.database.transaction([this.store]).objectStore(this.store).getAllKeys();i.onerror=()=>t(i.error),i.onsuccess=()=>e(i.result)})}hasKey(e){return new Promise(async(t,i)=>{const n=this.database.transaction([this.store]).objectStore(this.store).getKey(e);n.onerror=()=>i(n.error),n.onsuccess=()=>{t(!!n.result)}})}getValue(e){return new Promise(async(t,i)=>{const n=this.database.transaction([this.store]).objectStore(this.store).get(e);n.onerror=()=>i(n.error),n.onsuccess=()=>t(n.result||"")})}setValue(e,t){return new Promise(async(i,n)=>{const o=this.database.transaction([this.store],"readwrite").objectStore(this.store).put(t,e);o.onerror=()=>n(o.error),o.onsuccess=()=>i()})}deleteKey(e){return new Promise(async(t,i)=>{ const n=this.database.transaction([this.store],"readwrite").objectStore(this.store).delete(e);n.onerror=()=>i(n.error),n.onsuccess=()=>t()})}}})),define(e[1489],t([0,1,6,2,17,25]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryFileSystemProvider=void 0;class r{constructor(e){this.type=s.FileType.File,this.ctime=Date.now(),this.mtime=Date.now(),this.size=0,this.name=e}}class a{constructor(e){this.type=s.FileType.Directory,this.ctime=Date.now(),this.mtime=Date.now(),this.size=0,this.name=e,this.entries=new Map}}class l extends n.Disposable{constructor(){super(...arguments),this.capabilities=1026,this.onDidChangeCapabilities=i.Event.None,this.root=new a(""),this._onDidChangeFile=this._register(new i.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._bufferedChanges=[]}async stat(e){return this._lookup(e,!1)}async readdir(e){const t=this._lookupAsDirectory(e,!1);let i=[];return t.entries.forEach((e,t)=>i.push([t,e.type])),i}async readFile(e){ const t=this._lookupAsFile(e,!1).data;if(t)return t;throw new s.FileSystemProviderError("file not found",s.FileSystemProviderErrorCode.FileNotFound)}async writeFile(e,t,i){let n=o.basename(e),l=this._lookupParentDirectory(e),c=l.entries.get(n);if(c instanceof a)throw new s.FileSystemProviderError("file is directory",s.FileSystemProviderErrorCode.FileIsADirectory);if(!c&&!i.create)throw new s.FileSystemProviderError("file not found",s.FileSystemProviderErrorCode.FileNotFound);if(c&&i.create&&!i.overwrite)throw new s.FileSystemProviderError("file exists already",s.FileSystemProviderErrorCode.FileExists);c||(c=new r(n),l.entries.set(n,c),this._fireSoon({type:1,resource:e})),c.mtime=Date.now(),c.size=t.byteLength,c.data=t,this._fireSoon({type:0,resource:e})}async rename(e,t,i){if(!i.overwrite&&this._lookup(t,!0))throw new s.FileSystemProviderError("file exists already",s.FileSystemProviderErrorCode.FileExists) ;let n=this._lookup(e,!1),r=this._lookupParentDirectory(e),a=this._lookupParentDirectory(t),l=o.basename(t);r.entries.delete(n.name),n.name=l,a.entries.set(l,n),this._fireSoon({type:2,resource:e},{type:1,resource:t})}async delete(e,t){let i=o.dirname(e),n=o.basename(e),s=this._lookupAsDirectory(i,!1);s.entries.has(n)&&(s.entries.delete(n),s.mtime=Date.now(),s.size-=1,this._fireSoon({type:0,resource:i},{resource:e,type:2}))}async mkdir(e){let t=o.basename(e),i=o.dirname(e),n=this._lookupAsDirectory(i,!1),s=new a(t);n.entries.set(s.name,s),n.mtime=Date.now(),n.size+=1,this._fireSoon({type:0,resource:i},{type:1,resource:e})}_lookup(e,t){let i=e.path.split("/"),n=this.root;for(const e of i){if(!e)continue;let i;if(n instanceof a&&(i=n.entries.get(e)),!i){if(t)return;throw new s.FileSystemProviderError("file not found",s.FileSystemProviderErrorCode.FileNotFound)}n=i}return n}_lookupAsDirectory(e,t){let i=this._lookup(e,t);if(i instanceof a)return i ;throw new s.FileSystemProviderError("file not a directory",s.FileSystemProviderErrorCode.FileNotADirectory)}_lookupAsFile(e,t){let i=this._lookup(e,t);if(i instanceof r)return i;throw new s.FileSystemProviderError("file is a directory",s.FileSystemProviderErrorCode.FileIsADirectory)}_lookupParentDirectory(e){const t=o.dirname(e);return this._lookupAsDirectory(t,!1)}watch(e,t){return n.Disposable.None}_fireSoon(...e){this._bufferedChanges.push(...e),this._fireSoonHandle&&clearTimeout(this._fireSoonHandle),this._fireSoonHandle=setTimeout(()=>{this._onDidChangeFile.fire(this._bufferedChanges),this._bufferedChanges.length=0},5)}}t.InMemoryFileSystemProvider=l})),define(e[1490],t([0,1,1036,66,25,21]),(function(e,t,i,n,o,s){"use strict";function r(e){if(e.isCancellationRequested)throw s.canceled();return!0}function a(e,t){if(null==t?void 0:t.limits){if("number"==typeof t.limits.memory&&e>t.limits.memory)throw o.createFileSystemProviderError(i.localize(0,null),o.FileSystemProviderErrorCode.FileExceedsMemoryLimit) ;if("number"==typeof t.limits.size&&e>t.limits.size)throw o.createFileSystemProviderError(i.localize(1,null),o.FileSystemProviderErrorCode.FileTooLarge)}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.readFileIntoStream=void 0,t.readFileIntoStream=async function(e,t,i,s,l,c){let d=void 0;try{await async function(e,t,i,s,l,c){r(c);const d=await e.open(t,{create:!1});r(c);try{let t=0,o=0,h=l&&"number"==typeof l.length?l.length:void 0,u=n.VSBuffer.alloc(Math.min(l.bufferSize,"number"==typeof h?h:l.bufferSize)),g=l&&"number"==typeof l.position?l.position:0,p=0;do{o=await e.read(d,g,u.buffer,p,u.byteLength-p),g+=o,t+=o,"number"==typeof h&&(h-=o),(p+=o)===u.byteLength&&(await i.write(s(u)),u=n.VSBuffer.alloc(Math.min(l.bufferSize,"number"==typeof h?h:l.bufferSize)),p=0)}while(o>0&&("number"!=typeof h||h>0)&&r(c)&&a(t,l));if(p>0){let e=p;"number"==typeof h&&(e=Math.min(p,h)),i.write(s(u.slice(0,e)))}}catch(e){throw o.ensureFileSystemProviderError(e)}finally{await e.close(d)}}(e,t,i,s,l,c)}catch(e){d=e }finally{d&&l.errorTransformer&&(d=l.errorTransformer(d)),i.end(d)}}})),define(e[131],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceCollection=void 0;t.ServiceCollection=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}})),define(e[1491],t([0,1,21,1474,90,5,131,15]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=void 0;const l=!1;class c extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.toString()}}class d{constructor(e=new r.ServiceCollection,t=!1,i){this._services=e,this._strict=t,this._parent=i,this._services.set(s.IInstantiationService,this)}createChild(e){return new d(e,this._strict,this)}invokeFunction(e,...t){let n=u.traceInvocation(e),o=!1;try{return e({get:(e,t)=>{ if(o)throw i.illegalState("service accessor is only valid during the invocation of its target method");const r=this._getOrCreateServiceInstance(e,n);if(!r&&t!==s.optional)throw new Error(`[invokeFunction] unknown service '${e}'`);return r}},...t)}finally{o=!0,n.stop()}}createInstance(e,...t){let i,n;return e instanceof o.SyncDescriptor?(i=u.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=u.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=s._util.getServiceDependencies(e).sort((e,t)=>e.index-t.index),o=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);if(!n&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);o.push(n)}let r=n.length>0?n[0].index:t.length;if(t.length!==r){console.warn(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let i=r-t.length ;t=i>0?t.concat(new Array(i)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof o.SyncDescriptor)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof o.SyncDescriptor?this._createAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_createAndCacheServiceInstance(e,t,i){const r=new n.Graph(e=>e.id.toString());let a=0;const l=[{id:e,desc:t,_trace:i}];for(;l.length;){const t=l.pop();if(r.lookupOrInsertNode(t),a++>1e3)throw new c(r);for(let i of s._util.getServiceDependencies(t.desc.ctor)){let n=this._getServiceInstanceOrDescriptor(i.id) ;if(n||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),n instanceof o.SyncDescriptor){const e={id:i.id,desc:n,_trace:t._trace.branch(i.id,!0)};r.insertEdge(t,e),l.push(e)}}}for(;;){const e=r.roots();if(0===e.length){if(!r.isEmpty())throw new c(r);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof o.SyncDescriptor){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}r.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof o.SyncDescriptor)return this._createServiceInstance(t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const i=new a.IdleValue(()=>this._createInstance(e,t,n)) ;return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!=typeof o?o:(o=o.bind(n),e[t]=o,o)},set:(e,t,n)=>(i.value[t]=n,!0)})}return this._createInstance(e,t,n)}}var h;t.InstantiationService=d,function(e){e[e.Creation=0]="Creation",e[e.Invocation=1]="Invocation",e[e.Branch=2]="Branch"}(h||(h={}));class u{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return l?new u(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):u._None}static traceCreation(e){return l?new u(0,e.name):u._None}branch(e,t){let i=new u(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;u._totals+=e;let t=!1;let i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n") }(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${u._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(i.join("\n"))}}u._None=new class extends u{constructor(){super(-1,null)}stop(){}branch(){return this}},u._totals=0})),define(e[1492],t([0,1,24]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeGitHubUrl=void 0,t.normalizeGitHubUrl=function(e){return e.endsWith(".git")&&(e=e.substr(0,e.length-4)),(e=i.rtrim(e,"/")).endsWith("/new")&&(e=i.rtrim(e,"/new")),e.endsWith("/issues")&&(e=i.rtrim(e,"/issues")),e}})),define(e[1493],t([0,1,1037,14,15,6,2]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractKeybindingService=void 0;class a extends r.Disposable{constructor(e,t,i,n,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=r,this._onDidUpdateKeybindings=this._register(new s.Emitter),this._currentChord=null, this._currentChordChecker=new o.IntervalTimer,this._currentChordStatusMessage=null,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:s.Event.None}get inChordMode(){return!!this._currentChord}dispose(){super.dispose()}getDefaultKeybindingsContent(){return""}toggleLogging(){return this._logging=!this._logging,this._logging}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getDefaultKeybindings(){return this._getResolver().getDefaultKeybindings()}getKeybindings(){return this._getResolver().getKeybindings()}customKeybindingsCount(){return 0}lookupKeybindings(e){return n.coalesce(this._getResolver().lookupKeybindings(e).map(e=>e.resolvedKeybinding))}lookupKeybinding(e){const t=this._getResolver().lookupPrimaryKeybinding(e);if(t)return t.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e) ;if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,s,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(i.localize(0,null,t));const n=Date.now();this._currentChordChecker.cancelAndSet(()=>{this._documentHasFocus()?Date.now()-n>5e3&&this._leaveChordMode():this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}dispatchByUserSettingsLabel(e,t){const i=this.resolveUserBinding(e);i.length>=1&&this._doDispatch(i[0],t)}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t)}_doDispatch(e,t){let n=!1 ;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;const[o]=e.getDispatchParts();if(null===o)return this._log("\\ Keyboard event cannot be dispatched."),n;const s=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null,a=e.getLabel(),l=this._getResolver().resolve(s,r,o);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(o,a),n):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(i.localize(1,null,this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,e=>this._notificationService.warn(e)):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,e=>this._notificationService.warn(e)),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)} mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}t.AbstractKeybindingService=a})),define(e[425],t([0,1,21,303,79]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseResolvedKeybinding=void 0;class s extends o.ResolvedKeybinding{constructor(e,t){if(super(),0===t.length)throw i.illegalArgument("parts");this._os=e,this._parts=t}getLabel(){return n.UILabelProvider.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return n.AriaLabelProvider.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1?null:n.ElectronAcceleratorLabelProvider.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return n.UserSettingsLabelProvider.toLabel(this._os,this._parts,e=>this._getUserSettingsLabel(e))}isWYSIWYG(){return this._parts.every(e=>this._isWYSIWYG(e))}isChord(){return this._parts.length>1}getParts(){ return this._parts.map(e=>this._getPart(e))}_getPart(e){return new o.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}}t.BaseResolvedKeybinding=s})),define(e[35],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeybindingService=t.KeybindingSource=void 0,function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(t.KeybindingSource||(t.KeybindingSource={})),t.IKeybindingService=i.createDecorator("keybindingService")})),define(e[354],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementsAfterNulls=t.ResolvedKeybindingItem=void 0;function i(e){let t=[];for(let i=0,n=e.length;i=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return i.KeyCodeUtils.toString(e)}_getElectronAccelerator(e){return e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){ if(e.isDuplicateModifierCase())return"";const t=i.KeyCodeUtils.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_isWYSIWYG(){return!0}_getDispatchPart(e){return o.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=i.KeyCodeUtils.toString(e.keyCode)}}t.USLayoutResolvedKeybinding=o})),define(e[52],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILabelService=void 0,t.ILabelService=i.createDecorator("labelService")})),define(e[186],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILayoutService=void 0,t.ILayoutService=i.createDecorator("layoutService")})),define(e[1495],t([0,1,514,2,186]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextViewService=void 0;let a=class extends n.Disposable{constructor(e){super(),this.layoutService=e, this.currentViewDisposable=n.Disposable.None,this.container=e.container,this.contextView=this._register(new i.ContextView(this.container,1)),this.layout(),this._register(e.onLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const o=n.toDisposable(()=>{this.currentViewDisposable===o&&this.hideContextView()});return this.currentViewDisposable=o,o}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};a=o([r(0,s.ILayoutService)],a),t.ContextViewService=a})),define(e[89],t([0,1,6,5,15]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.handleVetos=t.NullLifecycleService=t.LifecyclePhaseToString=t.LifecyclePhase=t.StartupKindToString=t.StartupKind=t.ShutdownReason=t.ILifecycleService=void 0,t.ILifecycleService=n.createDecorator("lifecycleService"),function(e){e[e.CLOSE=1]="CLOSE",e[e.QUIT=2]="QUIT",e[e.RELOAD=3]="RELOAD",e[e.LOAD=4]="LOAD"}(t.ShutdownReason||(t.ShutdownReason={})),function(e){e[e.NewWindow=1]="NewWindow",e[e.ReloadedWindow=3]="ReloadedWindow",e[e.ReopenedWindow=4]="ReopenedWindow"}(t.StartupKind||(t.StartupKind={})),t.StartupKindToString=function(e){switch(e){case 1:return"NewWindow";case 3:return"ReloadedWindow";case 4:return"ReopenedWindow"}},function(e){e[e.Starting=1]="Starting",e[e.Ready=2]="Ready",e[e.Restored=3]="Restored",e[e.Eventually=4]="Eventually"}(t.LifecyclePhase||(t.LifecyclePhase={})),t.LifecyclePhaseToString=function(e){switch(e){case 1:return"Starting";case 2:return"Ready";case 3:return"Restored";case 4:return"Eventually"}},t.NullLifecycleService={_serviceBrand:void 0,onBeforeShutdown:i.Event.None, onWillShutdown:i.Event.None,onShutdown:i.Event.None,phase:3,startupKind:1,when:()=>Promise.resolve()},t.handleVetos=function(e,t){if(0===e.length)return Promise.resolve(!1);const i=[];let n=!1;for(let s of e){if(!0===s)return Promise.resolve(!0);o.isThenable(s)&&i.push(s.then(e=>{e&&(n=!0)},e=>{t(e),n=!0}))}return Promise.all(i).then(()=>n)}})),define(e[39],t([0,1,5,2,12,6,130]),(function(e,t,i,n,o,s,r){"use strict";function a(){return(new Date).toISOString()}var l;Object.defineProperty(t,"__esModule",{value:!0}),t.getLogLevel=t.NullLogService=t.DelegatedLogService=t.MultiplexLogService=t.ConsoleLogInMainService=t.LogServiceAdapter=t.ConsoleLogService=t.ConsoleLogMainService=t.AbstractLogService=t.DEFAULT_LOG_LEVEL=t.LogLevel=t.ILoggerService=t.ILogService=void 0,t.ILogService=i.createDecorator("logService"),t.ILoggerService=i.createDecorator("loggerService"),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical", e[e.Off=6]="Off"}(l=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=l.Info;class c extends n.Disposable{constructor(){super(...arguments),this.level=t.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new s.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}t.AbstractLogService=c;t.ConsoleLogMainService=class extends c{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e),this.useColors=!o.isWindows}trace(e,...t){this.getLevel()<=l.Trace&&(this.useColors?console.log(`[main ${a()}]`,e,...t):console.log(`[main ${a()}]`,e,...t))}debug(e,...t){this.getLevel()<=l.Debug&&(this.useColors?console.log(`[main ${a()}]`,e,...t):console.log(`[main ${a()}]`,e,...t))}info(e,...t){this.getLevel()<=l.Info&&(this.useColors?console.log(`[main ${a()}]`,e,...t):console.log(`[main ${a()}]`,e,...t))}warn(e,...t){ this.getLevel()<=l.Warning&&(this.useColors?console.warn(`[main ${a()}]`,e,...t):console.warn(`[main ${a()}]`,e,...t))}error(e,...t){this.getLevel()<=l.Error&&(this.useColors?console.error(`[main ${a()}]`,e,...t):console.error(`[main ${a()}]`,e,...t))}critical(e,...t){this.getLevel()<=l.Critical&&(this.useColors?console.error(`[main ${a()}]`,e,...t):console.error(`[main ${a()}]`,e,...t))}dispose(){}flush(){}};t.ConsoleLogService=class extends c{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=l.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=l.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=l.Info&&console.log("%c INFO","color: #33f",e,...t)}warn(e,...t){this.getLevel()<=l.Warning&&console.log("%c WARN","color: #993",e,...t)}error(e,...t){this.getLevel()<=l.Error&&console.log("%c ERR","color: #f33",e,...t)}critical(e,...t){ this.getLevel()<=l.Critical&&console.log("%cCRITI","background: #f33; color: white",e,...t)}dispose(){}flush(){}};class d extends c{constructor(e,i=t.DEFAULT_LOG_LEVEL){super(),this.adapter=e,this.setLevel(i)}trace(e,...t){this.getLevel()<=l.Trace&&this.adapter.consoleLog("trace",[this.extractMessage(e),...t])}debug(e,...t){this.getLevel()<=l.Debug&&this.adapter.consoleLog("debug",[this.extractMessage(e),...t])}info(e,...t){this.getLevel()<=l.Info&&this.adapter.consoleLog("info",[this.extractMessage(e),...t])}warn(e,...t){this.getLevel()<=l.Warning&&this.adapter.consoleLog("warn",[this.extractMessage(e),...t])}error(e,...t){this.getLevel()<=l.Error&&this.adapter.consoleLog("error",[this.extractMessage(e),...t])}critical(e,...t){this.getLevel()<=l.Critical&&this.adapter.consoleLog("critical",[this.extractMessage(e),...t])}extractMessage(e){return"string"==typeof e?e:r.toErrorMessage(e,this.getLevel()<=l.Trace)}dispose(){}flush(){}}t.LogServiceAdapter=d;t.ConsoleLogInMainService=class extends d{ constructor(e,i=t.DEFAULT_LOG_LEVEL){super({consoleLog:(t,i)=>e.consoleLog(t,i)},i)}};t.MultiplexLogService=class extends c{constructor(e){super(),this.logServices=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.logServices)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.logServices)i.trace(e,...t)}debug(e,...t){for(const i of this.logServices)i.debug(e,...t)}info(e,...t){for(const i of this.logServices)i.info(e,...t)}warn(e,...t){for(const i of this.logServices)i.warn(e,...t)}error(e,...t){for(const i of this.logServices)i.error(e,...t)}critical(e,...t){for(const i of this.logServices)i.critical(e,...t)}flush(){for(const e of this.logServices)e.flush()}dispose(){for(const e of this.logServices)e.dispose()}};class h extends n.Disposable{constructor(e){super(),this.logService=e,this._register(e)}get onDidChangeLogLevel(){return this.logService.onDidChangeLogLevel}setLevel(e){this.logService.setLevel(e)}getLevel(){return this.logService.getLevel()}trace(e,...t){ this.logService.trace(e,...t)}debug(e,...t){this.logService.debug(e,...t)}info(e,...t){this.logService.info(e,...t)}warn(e,...t){this.logService.warn(e,...t)}error(e,...t){this.logService.error(e,...t)}critical(e,...t){this.logService.critical(e,...t)}flush(){this.logService.flush()}}t.DelegatedLogService=h;t.NullLogService=class{constructor(){this.onDidChangeLogLevel=(new s.Emitter).event}setLevel(e){}getLevel(){return l.Info}trace(e,...t){}debug(e,...t){}info(e,...t){}warn(e,...t){}error(e,...t){}critical(e,...t){}dispose(){}flush(){}},t.getLogLevel=function(e){if(e.verbose)return l.Trace;if("string"==typeof e.logLevel){switch(e.logLevel.toLowerCase()){case"trace":return l.Trace;case"debug":return l.Debug;case"info":return l.Info;case"warn":return l.Warning;case"error":return l.Error;case"critical":return l.Critical;case"off":return l.Off}}return t.DEFAULT_LOG_LEVEL}})),define(e[558],t([0,1,15,2,398,399,18,45,134,907,46,112,24,14,39,232,21]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.EditorWorkerClient=t.EditorWorkerHost=t.EditorWorkerServiceImpl=void 0;const b=6e4,_=3e5;function C(e,t){let i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let y=class extends n.Disposable{constructor(e,t,i){super(),this._modelService=e,this._workerManager=this._register(new E(this._modelService)),this._logService=i,this._register(c.LinkProviderRegistry.register("*",{provideLinks:(e,t)=>C(this._modelService,e.uri)?this._workerManager.withWorker().then(t=>t.computeLinks(e.uri)).then(e=>e&&{links:e}):Promise.resolve({links:[]})})),this._register(c.CompletionProviderRegistry.register("*",new w(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}canComputeDiff(e,t){return C(this._modelService,e)&&C(this._modelService,t)}computeDiff(e,t,i,n){return this._workerManager.withWorker().then(o=>o.computeDiff(e,t,i,n))}canComputeDirtyDiff(e,t){return C(this._modelService,e)&&C(this._modelService,t)}computeDirtyDiff(e,t,i){ return this._workerManager.withWorker().then(n=>n.computeDirtyDiff(e,t,i))}computeMoreMinimalEdits(e,t){if(m.isNonEmptyArray(t)){if(!C(this._modelService,e))return Promise.resolve(t);const i=f.StopWatch.create(!0),n=this._workerManager.withWorker().then(i=>i.computeMoreMinimalEdits(e,t));return n.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),n}return Promise.resolve(void 0)}canNavigateValueSet(e){return C(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return C(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};y=o([r(0,u.IModelService),r(1,g.ITextResourceConfigurationService),r(2,v.ILogService)],y),t.EditorWorkerServiceImpl=y;class w{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i} async provideCompletionItems(e,t){const{wordBasedSuggestions:i}=this._configurationService.getValue(e.uri,t,"editor");if(!i)return;if(!C(this._modelService,e.uri))return;const n=e.getWordAtPosition(t),o=n?new l.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn):l.Range.fromPositions(t),s=o.setEndPosition(t.lineNumber,t.column),r=await this._workerManager.withWorker(),a=await r.textualSuggest(e.uri,t);return a?{suggestions:a.map(e=>({kind:18,label:e,insertText:e,range:{insert:s,replace:o}}))}:void 0}}class E extends n.Disposable{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new i.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(_/2)),this._register(this._modelService.onModelRemoved(e=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return ;0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;(new Date).getTime()-this._lastWorkerUsedTime>_&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new D(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class I extends n.Disposable{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let e=new i.IntervalTimer;e.cancelAndSet(()=>this._checkStopModelSync(),Math.round(b/2)),this._register(e)}}dispose(){for(let e in this._syncedModels)n.dispose(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e){for(const t of e){ let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[i]>b&&t.push(i)}for(const e of t)this._stopModelSync(e)}_beginModelSync(e){let t=this._modelService.getModel(e);if(!t)return;if(t.isTooLargeForSyncing())return;let i=e.toString();this._proxy.acceptNewModel({url:t.uri.toString(),lines:t.getLinesContent(),EOL:t.getEOL(),versionId:t.getVersionId()});const o=new n.DisposableStore;o.add(t.onDidChangeContent(e=>{this._proxy.acceptModelChanged(i.toString(),e)})),o.add(t.onWillDispose(()=>{this._stopModelSync(i)})),o.add(n.toDisposable(()=>{this._proxy.acceptRemovedModel(i)})),this._syncedModels[i]=o}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],n.dispose(t)}}class x{constructor(e){this._instance=e, this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class k{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}t.EditorWorkerHost=k;class D extends n.Disposable{constructor(e,t,i){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new a.DefaultWorkerFactory(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new s.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new k(this)))}catch(e){s.logOnceWebWorkerWarning(e),this._worker=new x(new h.EditorSimpleWorker(new k(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(s.logOnceWebWorkerWarning(e),this._worker=new x(new h.EditorSimpleWorker(new k(this),null)),this._getOrCreateWorker().getProxyObject()))} _getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new I(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e){return this._disposed?Promise.reject(S.canceled()):this._getProxy().then(t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t]).then(o=>o.computeDiff(e.toString(),t.toString(),i,n))}computeDirtyDiff(e,t,i){return this._withSyncedResources([e,t]).then(n=>n.computeDirtyDiff(e.toString(),t.toString(),i))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return null;let o=d.LanguageConfigurationRegistry.getWordDefinition(n.getLanguageIdentifier().id),s=o.source,r=p.regExpFlags(o) ;return i.textualSuggest(e.toString(),t,s,r)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let o=d.LanguageConfigurationRegistry.getWordDefinition(n.getLanguageIdentifier().id),s=o.source,r=p.regExpFlags(o);return i.computeWordRanges(e.toString(),t,s,r)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{let o=this._modelService.getModel(e);if(!o)return null;let s=d.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),r=s.source,a=p.regExpFlags(s);return n.navigateValueSet(e.toString(),t,i,r,a)})}dispose(){super.dispose(),this._disposed=!0}}t.EditorWorkerClient=D})),define(e[559],t([0,1,45,39,351]),(function(e,t,i,n,o){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),t.toMultilineTokens2=t.SemanticTokensProviderStyling=t.SemanticTokensProviderStylingConstants=void 0,function(e){e[e.NO_STYLING=2147483647]="NO_STYLING" }(t.SemanticTokensProviderStylingConstants||(t.SemanticTokensProviderStylingConstants={}));t.SemanticTokensProviderStyling=class{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new a}getMetadata(e,t,o){const s=this._hashTable.get(e,t,o.id);let r;if(s)r=s.metadata,this._logService.getLevel()===n.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${i.TokenMetadata.getForeground(r)}, fontStyle ${i.TokenMetadata.getFontStyle(r).toString(2)}`);else{let s=this._legend.tokenTypes[e];const a=[];if(s){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===n.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend")) ;const i=this._themeService.getColorTheme().getTokenStyleMetadata(s,a,o.language);if(void 0===i)r=2147483647;else{if(r=0,void 0!==i.italic){r|=1|(i.italic?1:0)<<11}if(void 0!==i.bold){r|=2|(i.bold?2:0)<<11}if(void 0!==i.underline){r|=4|(i.underline?4:0)<<11}if(i.foreground){r|=8|i.foreground<<14}0===r&&(r=2147483647)}}else this._logService.getLevel()===n.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,s="not-in-legend";this._hashTable.add(e,t,o.id,r),this._logService.getLevel()===n.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${s}) / ${t} (${a.join(" ")}): foreground ${i.TokenMetadata.getForeground(r)}, fontStyle ${i.TokenMetadata.getFontStyle(r).toString(2)}`)}return r}},function(e){e[e.DesiredTokensPerArea=400]="DesiredTokensPerArea",e[e.DesiredMaxAreas=1024]="DesiredMaxAreas"}(s||(s={})),t.toMultilineTokens2=function(e,t,i){ const n=e.data,s=e.data.length/5|0,r=Math.max(Math.ceil(s/1024),400),a=[];let l=0,c=1,d=0;for(;le&&0===n[5*t];)t--;if(t-1===e){let e=h;for(;e+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=a._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{const t=this._foreignModuleHost?n.getAllMethodNames(this._foreignModuleHost):[] ;return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>(function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)});let o={};for(const e of t)o[e]=n(e,i);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(e=>this.getProxy())}}})),define(e[1497],t([0,1,2,25,6,17,1034,67,14,110,39,66,291,15,31,29,1490,96]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileService=void 0;let _=class extends i.Disposable{constructor(e){super(),this.logService=e,this.BUFFER_SIZE=65536,this._onDidChangeFileSystemProviderRegistrations=this._register(new s.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new s.Emitter), this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new s.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new s.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onError=this._register(new s.Emitter),this.onError=this._onError.event,this._onDidFilesChange=this._register(new s.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this.activeWatchers=new Map,this.writeQueues=new Map}registerProvider(e,t){if(this.provider.has(e))throw new Error(`A filesystem provider for the scheme '${e}' is already registered.`);this.provider.set(e,t),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:e,provider:t});const o=new i.DisposableStore;return o.add(t.onDidChangeFile(e=>this._onDidFilesChange.fire(new n.FileChangesEvent(e,this.getExtUri(t).extUri)))), o.add(t.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:t,scheme:e}))),"function"==typeof t.onDidErrorOccur&&o.add(t.onDidErrorOccur(e=>this._onError.fire(new Error(e)))),i.toDisposable(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:e,provider:t}),this.provider.delete(e),i.dispose(o)})}async activateProvider(e){const t=[];this._onWillActivateFileSystemProvider.fire({scheme:e,join(e){e&&t.push(e)}}),this.provider.has(e)||await Promise.all(t)}canHandleResource(e){return this.provider.has(e.scheme)}hasCapability(e,t){const i=this.provider.get(e.scheme);return!!(i&&i.capabilities&t)}listCapabilities(){return b.Iterable.map(this.provider,([e,t])=>({scheme:e,capabilities:t.capabilities}))}async withProvider(e){if(!a.isAbsolutePath(e))throw new n.FileOperationError(l.localize(0,null,this.resourceForError(e)),8);await this.activateProvider(e.scheme);const t=this.provider.get(e.scheme);if(!t){const t=new Error;throw t.name="ENOPRO", t.message=l.localize(1,null,e.toString()),t}return t}async withReadProvider(e){const t=await this.withProvider(e);if(n.hasOpenReadWriteCloseCapability(t)||n.hasReadWriteCapability(t)||n.hasFileReadStreamCapability(t))return t;throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(e){const t=await this.withProvider(e);if(n.hasOpenReadWriteCloseCapability(t)||n.hasReadWriteCapability(t))return t;throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(e,t){try{return await this.doResolveFile(e,t)}catch(t){if(n.toFileSystemProviderErrorCode(t)===n.FileSystemProviderErrorCode.FileNotFound)throw new n.FileOperationError(l.localize(2,null,this.resourceForError(e)),1);throw n.ensureFileSystemProviderError(t)}}async doResolveFile(e,t){ const i=await this.withProvider(e),n=null==t?void 0:t.resolveTo,o=null==t?void 0:t.resolveSingleChildDescendants,s=null==t?void 0:t.resolveMetadata,r=await i.stat(e);let a;return this.toFileStat(i,e,r,void 0,!!s,(t,i)=>(a||((a=c.TernarySearchTree.forUris()).set(e,!0),d.isNonEmptyArray(n)&&n.forEach(e=>a.set(e,!0))),!!Boolean(a.findSuperstr(t.resource)||a.get(t.resource))||!(!t.isDirectory||!o)&&1===i))}async toFileStat(e,t,i,o,s,r){const l={resource:t,name:h.getBaseLabel(t),isFile:0!=(i.type&n.FileType.File),isDirectory:0!=(i.type&n.FileType.Directory),isSymbolicLink:0!=(i.type&n.FileType.SymbolicLink),mtime:i.mtime,ctime:i.ctime,size:i.size,etag:n.etag({mtime:i.mtime,size:i.size})};if(l.isDirectory&&r(l,o)){try{const i=await e.readdir(t),n=await Promise.all(i.map(async([n,o])=>{try{const l=a.joinPath(t,n),c=s?await e.stat(l):{type:o};return await this.toFileStat(e,l,c,i.length,s,r)}catch(e){return this.logService.trace(e),null}}));l.children=d.coalesce(n)}catch(e){this.logService.trace(e),l.children=[]} return l}return l}async resolveAll(e){return Promise.all(e.map(async e=>{try{return{stat:await this.doResolveFile(e.resource,e.options),success:!0}}catch(e){return this.logService.trace(e),{stat:void 0,success:!1}}}))}async exists(e){const t=await this.withProvider(e);try{return!!await t.stat(e)}catch(e){return!1}}async canCreateFile(e,t){try{await this.doValidateCreateFile(e,t)}catch(e){return e}return!0}async doValidateCreateFile(e,t){if(!(null==t?void 0:t.overwrite)&&await this.exists(e))throw new n.FileOperationError(l.localize(3,null,this.resourceForError(e)),3,t)}async createFile(e,t=g.VSBuffer.fromString(""),i){await this.doValidateCreateFile(e,i);const o=await this.writeFile(e,t);return this._onDidRunOperation.fire(new n.FileOperationEvent(e,0,o)),o}async writeFile(e,t,i){const o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e);try{let s;if(await this.validateWriteFile(o,e,i)||await this.mkdirp(o,a.dirname(e)), !n.hasReadWriteCapability(o)||t instanceof g.VSBuffer)s=t;else if(p.isReadableStream(t)){const e=await p.peekStream(t,3);s=e.ended?g.VSBuffer.concat(e.buffer):e}else s=p.peekReadable(t,e=>g.VSBuffer.concat(e),3);!n.hasOpenReadWriteCloseCapability(o)||n.hasReadWriteCapability(o)&&s instanceof g.VSBuffer?await this.doWriteUnbuffered(o,e,s):await this.doWriteBuffered(o,e,s instanceof g.VSBuffer?g.bufferToReadable(s):s)}catch(t){throw new n.FileOperationError(l.localize(4,null,this.resourceForError(e),n.ensureFileSystemProviderError(t).toString()),n.toFileOperationResult(t),i)}return this.resolve(e,{resolveMetadata:!0})}async validateWriteFile(e,t,i){let o=void 0;try{o=await e.stat(t)}catch(e){return}if(0!=(o.type&n.FileType.Directory))throw new n.FileOperationError(l.localize(5,null,this.resourceForError(t)),0,i);if(i&&"number"==typeof i.mtime&&"string"==typeof i.etag&&i.etag!==n.ETAG_DISABLED&&"number"==typeof o.mtime&&"number"==typeof o.size&&i.mtimee,e=>{throw o.cancel(),e});try{let r;i&&"string"==typeof i.etag&&i.etag!==n.ETAG_DISABLED&&await s,r=!n.hasOpenReadWriteCloseCapability(e)&&!n.hasFileReadStreamCapability(e)||n.hasReadWriteCapability(e)&&(null==i?void 0:i.preferUnbuffered)?this.readFileUnbuffered(e,t,i):n.hasFileReadStreamCapability(e)?Promise.resolve(this.readFileStreamed(e,t,o.token,i)):Promise.resolve(this.readFileBuffered(e,t,o.token,i));const[a,l]=await Promise.all([s,r]);return Object.assign(Object.assign({},a),{value:l})}catch(e){ throw new n.FileOperationError(l.localize(7,null,this.resourceForError(t),n.ensureFileSystemProviderError(e).toString()),n.toFileOperationResult(e),i)}}readFileStreamed(e,t,i,o=Object.create(null)){const s=e.readFileStream(t,o,i);return p.transform(s,{data:e=>e instanceof g.VSBuffer?e:g.VSBuffer.wrap(e),error:e=>new n.FileOperationError(l.localize(8,null,this.resourceForError(t),n.ensureFileSystemProviderError(e).toString()),n.toFileOperationResult(e),o)},e=>g.VSBuffer.concat(e))}readFileBuffered(e,t,i,o=Object.create(null)){const s=g.newWriteableBufferStream();return S.readFileIntoStream(e,t,s,e=>e,Object.assign(Object.assign({},o),{bufferSize:this.BUFFER_SIZE,errorTransformer:e=>new n.FileOperationError(l.localize(9,null,this.resourceForError(t),n.ensureFileSystemProviderError(e).toString()),n.toFileOperationResult(e),o)}),i),s}async readFileUnbuffered(e,t,i){let n=await e.readFile(t);return i&&"number"==typeof i.position&&(n=n.slice(i.position)),i&&"number"==typeof i.length&&(n=n.slice(0,i.length)), this.validateReadFileLimits(t,n.byteLength,i),g.bufferToStream(g.VSBuffer.wrap(n))}async validateReadFile(e,t){const i=await this.resolve(e,{resolveMetadata:!0});if(i.isDirectory)throw new n.FileOperationError(l.localize(10,null,this.resourceForError(e)),0,t);if(t&&"string"==typeof t.etag&&t.etag!==n.ETAG_DISABLED&&t.etag===i.etag)throw new n.FileOperationError(l.localize(11,null),2,t);return this.validateReadFileLimits(e,i.size,t),i}validateReadFileLimits(e,t,i){if(null==i?void 0:i.limits){let o=void 0;if("number"==typeof i.limits.memory&&t>i.limits.memory&&(o=9),"number"==typeof i.limits.size&&t>i.limits.size&&(o=7),"number"==typeof o)throw new n.FileOperationError(l.localize(12,null,this.resourceForError(e)),o)}}async canMove(e,t,i){return this.doCanMoveCopy(e,t,"move",i)}async canCopy(e,t,i){return this.doCanMoveCopy(e,t,"copy",i)}async doCanMoveCopy(e,t,i,n){if(e.toString()!==t.toString())try{ const o="move"===i?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e):await this.withReadProvider(e),s=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);await this.doValidateMoveCopy(o,e,s,t,i,n)}catch(e){return e}return!0}async move(e,t,i){const o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e),s=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),r=await this.doMoveCopy(o,e,s,t,"move",!!i),a=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new n.FileOperationEvent(e,"move"===r?2:3,a)),a}async copy(e,t,i){const o=await this.withReadProvider(e),s=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),r=await this.doMoveCopy(o,e,s,t,"copy",!!i),a=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new n.FileOperationEvent(e,"copy"===r?3:2,a)),a}async doMoveCopy(e,t,i,o,s,r){if(t.toString()===o.toString())return s ;const{exists:l,isSameResourceWithDifferentPathCase:c}=await this.doValidateMoveCopy(e,t,i,o,s,r);if(l&&!c&&r&&await this.del(o,{recursive:!0}),await this.mkdirp(i,a.dirname(o)),"copy"===s){if(e===i&&n.hasFileFolderCopyCapability(e))await e.copy(t,o,{overwrite:r});else{const n=await this.resolve(t);n.isDirectory?await this.doCopyFolder(e,n,i,o):await this.doCopyFile(e,t,i,o)}return s}return e===i?(await e.rename(t,o,{overwrite:r}),s):(await this.doMoveCopy(e,t,i,o,"copy",r),await this.del(t,{recursive:!0}),"copy")}async doCopyFile(e,t,i,o){return n.hasOpenReadWriteCloseCapability(e)&&n.hasOpenReadWriteCloseCapability(i)?this.doPipeBuffered(e,t,i,o):n.hasOpenReadWriteCloseCapability(e)&&n.hasReadWriteCapability(i)?this.doPipeBufferedToUnbuffered(e,t,i,o):n.hasReadWriteCapability(e)&&n.hasOpenReadWriteCloseCapability(i)?this.doPipeUnbufferedToBuffered(e,t,i,o):n.hasReadWriteCapability(e)&&n.hasReadWriteCapability(i)?this.doPipeUnbuffered(e,t,i,o):void 0}async doCopyFolder(e,t,i,n){await i.mkdir(n), Array.isArray(t.children)&&await Promise.all(t.children.map(async t=>{const o=a.joinPath(n,t.name);return t.isDirectory?this.doCopyFolder(e,await this.resolve(t.resource),i,o):this.doCopyFile(e,t.resource,i,o)}))}async doValidateMoveCopy(e,t,i,o,s,r){let a=!1;if(e===i){const{extUri:i,isPathCaseSensitive:n}=this.getExtUri(e);if(n||(a=i.isEqual(t,o)),a&&"copy"===s)throw new Error(l.localize(13,null,this.resourceForError(t),this.resourceForError(o)));if(!a&&i.isEqualOrParent(o,t))throw new Error(l.localize(14,null,this.resourceForError(t),this.resourceForError(o)))}const c=await this.exists(o);if(c&&!a){if(!r)throw new n.FileOperationError(l.localize(15,null,this.resourceForError(t),this.resourceForError(o)),4);if(e===i){const{extUri:i}=this.getExtUri(e);if(i.isEqualOrParent(t,o))throw new Error(l.localize(16,null,this.resourceForError(t),this.resourceForError(o)))}}return{exists:c,isSameResourceWithDifferentPathCase:a}}getExtUri(e){const t=!!(1024&e.capabilities);return{extUri:t?a.extUri:a.extUriIgnorePathCase, isPathCaseSensitive:t}}async createFolder(e){const t=this.throwIfFileSystemIsReadonly(await this.withProvider(e),e);await this.mkdirp(t,e);const i=await this.resolve(e,{resolveMetadata:!0});return this._onDidRunOperation.fire(new n.FileOperationEvent(e,0,i)),i}async mkdirp(e,t){const i=[],{extUri:o}=this.getExtUri(e);for(;!o.isEqual(t,a.dirname(t));)try{if(0==((await e.stat(t)).type&n.FileType.Directory))throw new Error(l.localize(17,null,this.resourceForError(t)));break}catch(e){if(n.toFileSystemProviderErrorCode(e)!==n.FileSystemProviderErrorCode.FileNotFound)throw e;i.push(a.basename(t)),t=a.dirname(t)}for(let o=i.length-1;o>=0;o--){t=a.joinPath(t,i[o]);try{await e.mkdir(t)}catch(e){if(n.toFileSystemProviderErrorCode(e)!==n.FileSystemProviderErrorCode.FileExists)throw e}}}async canDelete(e,t){try{await this.doValidateDelete(e,t)}catch(e){return e}return!0}async doValidateDelete(e,t){const i=this.throwIfFileSystemIsReadonly(await this.withProvider(e),e) ;if(!!(null==t?void 0:t.useTrash)&&!(4096&i.capabilities))throw new Error(l.localize(18,null,this.resourceForError(e)));const o=await this.exists(e);if(!o)throw new n.FileOperationError(l.localize(19,null,this.resourceForError(e)),1);if(!!!(null==t?void 0:t.recursive)&&o){const t=await this.resolve(e);if(t.isDirectory&&Array.isArray(t.children)&&t.children.length>0)throw new Error(l.localize(20,null,this.resourceForError(e)))}return i}async del(e,t){const i=await this.doValidateDelete(e,t),o=!!(null==t?void 0:t.useTrash),s=!!(null==t?void 0:t.recursive);await i.delete(e,{recursive:s,useTrash:o}),this._onDidRunOperation.fire(new n.FileOperationEvent(e,1))}watch(e,t={recursive:!1,excludes:[]}){let n=!1,o=i.toDisposable(()=>n=!0);return this.doWatch(e,t).then(e=>{n?i.dispose(e):o=e},e=>this.logService.error(e)),i.toDisposable(()=>i.dispose(o))}async doWatch(e,t){const n=await this.withProvider(e),o=this.toWatchKey(n,e,t),s=this.activeWatchers.get(o)||{count:0,disposable:n.watch(e,t)} ;return this.activeWatchers.has(o)||this.activeWatchers.set(o,s),s.count+=1,i.toDisposable(()=>{s.count--,0===s.count&&(i.dispose(s.disposable),this.activeWatchers.delete(o))})}toWatchKey(e,t,i){const{extUri:n}=this.getExtUri(e);return[n.getComparisonKey(t),String(i.recursive),i.excludes.join()].join()}dispose(){super.dispose(),this.activeWatchers.forEach(e=>i.dispose(e.disposable)),this.activeWatchers.clear()}ensureWriteQueue(e,t){const{extUri:n}=this.getExtUri(e),o=n.getComparisonKey(t);let r=this.writeQueues.get(o);if(!r){r=new m.Queue,this.writeQueues.set(o,r),s.Event.once(r.onFinished)(()=>{this.writeQueues.delete(o),i.dispose(r)})}return r}async doWriteBuffered(e,t,i){return this.ensureWriteQueue(e,t).queue(async()=>{const o=await e.open(t,{create:!0});try{p.isReadableStream(i)||p.isReadableBufferedStream(i)?await this.doWriteStreamBufferedQueued(e,o,i):await this.doWriteReadableBufferedQueued(e,o,i)}catch(e){throw n.ensureFileSystemProviderError(e)}finally{await e.close(o)}})} async doWriteStreamBufferedQueued(e,t,i){let n,o=0;if(p.isReadableBufferedStream(i)){if(i.buffer.length>0){const n=g.VSBuffer.concat(i.buffer);await this.doWriteBuffer(e,t,n,n.byteLength,o,0),o+=n.byteLength}if(i.ended)return;n=i.stream}else n=i;return new Promise(async(i,s)=>{n.on("data",async i=>{n.pause();try{await this.doWriteBuffer(e,t,i,i.byteLength,o,0)}catch(e){return s(e)}o+=i.byteLength,setTimeout(()=>n.resume())}),n.on("error",e=>s(e)),n.on("end",()=>i())})}async doWriteReadableBufferedQueued(e,t,i){let n,o=0;for(;null!==(n=i.read());)await this.doWriteBuffer(e,t,n,n.byteLength,o,0),o+=n.byteLength}async doWriteBuffer(e,t,i,n,o,s){let r=0;for(;rthis.doWriteUnbufferedQueued(e,t,i))}async doWriteUnbufferedQueued(e,t,i){let n ;n=i instanceof g.VSBuffer?i:p.isReadableStream(i)?await g.streamToBuffer(i):p.isReadableBufferedStream(i)?await g.bufferedStreamToBuffer(i):g.readableToBuffer(i),await e.writeFile(t,n.buffer,{create:!0,overwrite:!0})}async doPipeBuffered(e,t,i,n){return this.ensureWriteQueue(i,n).queue(()=>this.doPipeBufferedQueued(e,t,i,n))}async doPipeBufferedQueued(e,t,i,o){let s=void 0,r=void 0;try{s=await e.open(t,{create:!1}),r=await i.open(o,{create:!0});const n=g.VSBuffer.alloc(this.BUFFER_SIZE);let a=0,l=0,c=0;do{c=await e.read(s,a,n.buffer,l,n.byteLength-l),await this.doWriteBuffer(i,r,n,c,a,l),a+=c,(l+=c)===n.byteLength&&(l=0)}while(c>0)}catch(e){throw n.ensureFileSystemProviderError(e)}finally{await Promise.all(["number"==typeof s?e.close(s):Promise.resolve(),"number"==typeof r?i.close(r):Promise.resolve()])}}async doPipeUnbuffered(e,t,i,n){return this.ensureWriteQueue(i,n).queue(()=>this.doPipeUnbufferedQueued(e,t,i,n))}async doPipeUnbufferedQueued(e,t,i,n){return i.writeFile(n,await e.readFile(t),{create:!0, overwrite:!0})}async doPipeUnbufferedToBuffered(e,t,i,n){return this.ensureWriteQueue(i,n).queue(()=>this.doPipeUnbufferedToBufferedQueued(e,t,i,n))}async doPipeUnbufferedToBufferedQueued(e,t,i,o){const s=await i.open(o,{create:!0});try{const n=await e.readFile(t);await this.doWriteBuffer(i,s,g.VSBuffer.wrap(n),n.byteLength,0,0)}catch(e){throw n.ensureFileSystemProviderError(e)}finally{await i.close(s)}}async doPipeBufferedToUnbuffered(e,t,i,n){const o=await g.streamToBuffer(this.readFileBuffered(e,t,v.CancellationToken.None));await this.doWriteUnbuffered(i,n,o)}throwIfFileSystemIsReadonly(e,t){if(2048&e.capabilities)throw new n.FileOperationError(l.localize(21,null,this.resourceForError(t)),6);return e}resourceForError(e){return e.scheme===f.Schemas.file?e.fsPath:e.toString(!0)}};_=o([r(0,u.ILogService)],_),t.FileService=_})),define(e[1498],t([0,1,6,15,2,89,39,199]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractLifecycleService=void 0 ;let d=class extends s.Disposable{constructor(e){super(),this.logService=e,this._onBeforeShutdown=this._register(new i.Emitter),this.onBeforeShutdown=this._onBeforeShutdown.event,this._onWillShutdown=this._register(new i.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onShutdown=this._register(new i.Emitter),this.onShutdown=this._onShutdown.event,this._startupKind=1,this._phase=1,this.phaseWhen=new Map}get startupKind(){return this._startupKind}get phase(){return this._phase}set phase(e){if(ethis.consoleLog(e,t)},e)}consoleLog(e,t){const i=window;"function"==typeof i.codeAutomationLog&&i.codeAutomationLog(e,t)}}t.ConsoleLogInAutomationService=n})),define(e[560],t([0,1,39]),(function(e,t,i){"use strict";function n(e,t){switch(t){case i.LogLevel.Trace:return e.trace;case i.LogLevel.Debug:return e.debug;case i.LogLevel.Info:return e.info;case i.LogLevel.Warning:return e.warn;case i.LogLevel.Error:return e.error;case i.LogLevel.Critical:return e.critical;default:throw new Error("Invalid log level")}}Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLogService=void 0;class o extends i.AbstractLogService{constructor(e=i.DEFAULT_LOG_LEVEL){super(),this.buffer=[],this._logger=void 0,this.setLevel(e),this._register(this.onDidChangeLogLevel(e=>{ this._logger&&this._logger.setLevel(e)}))}set logger(e){this._logger=e;for(const{level:t,args:i}of this.buffer){n(e,t).apply(e,i)}this.buffer=[]}_log(e,...t){if(this._logger){n(this._logger,e).apply(this._logger,t)}else this.getLevel()<=e&&this.buffer.push({level:e,args:t})}trace(e,...t){this._log(i.LogLevel.Trace,e,...t)}debug(e,...t){this._log(i.LogLevel.Debug,e,...t)}info(e,...t){this._log(i.LogLevel.Info,e,...t)}warn(e,...t){this._log(i.LogLevel.Warning,e,...t)}error(e,...t){this._log(i.LogLevel.Error,e,...t)}critical(e,...t){this._log(i.LogLevel.Critical,e,...t)}dispose(){this._logger&&this._logger.dispose()}flush(){this._logger&&this._logger.flush()}}t.BufferLogService=o})),define(e[426],t([0,1,39,25,15,66,17,2,5,560]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileLoggerService=t.FileLogService=void 0;let u=class extends i.AbstractLogService{constructor(e,t,i,n){super(),this.name=e,this.resource=t,this.fileService=n,this.backupIndex=1, this.setLevel(i),this.queue=this._register(new s.Queue),this.initializePromise=this.initialize()}trace(){this.getLevel()<=i.LogLevel.Trace&&this._log(i.LogLevel.Trace,this.format(arguments))}debug(){this.getLevel()<=i.LogLevel.Debug&&this._log(i.LogLevel.Debug,this.format(arguments))}info(){this.getLevel()<=i.LogLevel.Info&&this._log(i.LogLevel.Info,this.format(arguments))}warn(){this.getLevel()<=i.LogLevel.Warning&&this._log(i.LogLevel.Warning,this.format(arguments))}error(){if(this.getLevel()<=i.LogLevel.Error){const e=arguments[0];if(e instanceof Error){const t=Array.prototype.slice.call(arguments);t[0]=e.stack,this._log(i.LogLevel.Error,this.format(t))}else this._log(i.LogLevel.Error,this.format(arguments))}}critical(){this.getLevel()<=i.LogLevel.Critical&&this._log(i.LogLevel.Critical,this.format(arguments))}flush(){}log(e,t){this._log(e,this.format(t))}async initialize(){await this.fileService.createFile(this.resource)}_log(e,t){this.queue.queue(async()=>{await this.initializePromise ;let i=await this.loadContent();i.length>5242880&&(await this.fileService.writeFile(this.getBackupResource(),a.VSBuffer.fromString(i)),i=""),i+=`[${this.getCurrentTimestamp()}] [${this.name}] [${this.stringifyLogLevel(e)}] ${t}\n`,await this.fileService.writeFile(this.resource,a.VSBuffer.fromString(i))})}getCurrentTimestamp(){const e=e=>e<10?`0${e}`:e,t=new Date;return`${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())} ${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}.${(e=>e<10?`00${e}`:e<100?`0${e}`:e)(t.getMilliseconds())}`}getBackupResource(){return this.backupIndex=this.backupIndex>5?1:this.backupIndex,l.joinPath(l.dirname(this.resource),`${l.basename(this.resource)}_${this.backupIndex++}`)}async loadContent(){try{return(await this.fileService.readFile(this.resource)).value.toString()}catch(e){return""}}stringifyLogLevel(e){switch(e){case i.LogLevel.Critical:return"critical";case i.LogLevel.Debug:return"debug";case i.LogLevel.Error:return"error";case i.LogLevel.Info:return"info" ;case i.LogLevel.Trace:return"trace";case i.LogLevel.Warning:return"warning"}return""}format(e){let t="";for(let i=0;i0?" ":"")+n}return t}};u=o([r(3,n.IFileService)],u),t.FileLogService=u;let g=class extends c.Disposable{constructor(e,t,i){super(),this.logService=e,this.instantiationService=t,this.fileService=i,this.loggers=new Map,this._register(e.onDidChangeLogLevel(e=>this.loggers.forEach(t=>t.setLevel(e))))}getLogger(e){let t=this.loggers.get(e.toString());return t||(t=new h.BufferLogService(this.logService.getLevel()),this.loggers.set(e.toString(),t),n.whenProviderRegistered(e,this.fileService).then(()=>t.logger=this.instantiationService.createInstance(u,l.basename(e),e,this.logService.getLevel()))),t}dispose(){this.loggers.forEach(e=>e.dispose()),this.loggers.clear(),super.dispose()}};g=o([r(0,i.ILogService),r(1,d.IInstantiationService),r(2,n.IFileService)],g),t.FileLoggerService=g})), define(e[1500],t([0,1,39,6]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FollowerLogService=t.LoggerChannelClient=t.LoggerChannel=void 0;t.LoggerChannel=class{constructor(e){this.service=e,this.onDidChangeLogLevel=n.Event.buffer(e.onDidChangeLogLevel,!0)}listen(e,t){switch(t){case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error(`Event not found: ${t}`)}call(e,t,i){switch(t){case"setLevel":return this.service.setLevel(i),Promise.resolve();case"consoleLog":return this.consoleLog(i[0],i[1]),Promise.resolve()}throw new Error(`Call not found: ${t}`)}consoleLog(e,t){let i=console.log;switch(e){case"error":i=console.error;break;case"warn":i=console.warn;break;case"info":i=console.info}i.call(console,...t)}};class o{constructor(e){this.channel=e}get onDidChangeLogLevel(){return this.channel.listen("onDidChangeLogLevel")}setLevel(e){o.setLevel(this.channel,e)}static setLevel(e,t){return e.call("setLevel",t)}consoleLog(e,t){ this.channel.call("consoleLog",[e,t])}}t.LoggerChannelClient=o;class s extends i.DelegatedLogService{constructor(e,t){super(t),this.parent=e,this._register(e.onDidChangeLogLevel(e=>t.setLevel(e)))}setLevel(e){super.setLevel(e),this.parent.setLevel(e)}}t.FollowerLogService=s})),define(e[107],t([0,1,5,1039,97]),(function(e,t,i,n,o){"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),t.IMarkerService=t.IMarkerData=t.MarkerSeverity=t.MarkerTag=void 0,function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(t.MarkerTag||(t.MarkerTag={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(s=t.MarkerSeverity||(t.MarkerSeverity={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=n.localize(0,null),t[e.Warning]=n.localize(1,null),t[e.Info]=n.localize(2,null),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case o.default.Error:return e.Error;case o.default.Warning: return e.Warning;case o.default.Info:return e.Info;case o.default.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return o.default.Error;case e.Warning:return o.default.Warning;case e.Info:return o.default.Info;case e.Hint:return o.default.Ignore}}}(s=t.MarkerSeverity||(t.MarkerSeverity={})),function(e){const t="";function i(e,i){let n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(s.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t), void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(t.IMarkerData||(t.IMarkerData={})),t.IMarkerService=i.createDecorator("markerService")})),define(e[561],t([0,1,107,10,6,2,18,24,14,5,33,194]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMarkerNavigationService=t.MarkerList=t.MarkerCoordinate=void 0;class p{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}t.MarkerCoordinate=p;let m=class e{constructor(t,o){this._markerService=o,this._onDidChange=new s.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new a.DisposableStore,this._markers=[],this._nextIdx=-1,n.URI.isUri(t)?this._resourceFilter=e=>e.toString()===t.toString():t&&(this._resourceFilter=t);const r=()=>{this._markers=this._markerService.read({resource:n.URI.isUri(t)?t:void 0,severities:i.MarkerSeverity.Error|i.MarkerSeverity.Warning|i.MarkerSeverity.Info }),"function"==typeof t&&(this._markers=this._markers.filter(e=>this._resourceFilter(e.resource))),this._markers.sort(e._compareMarker)};r(),this._dispoables.add(o.onMarkerChanged(e=>{this._resourceFilter&&!e.some(e=>this._resourceFilter(e))||(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new p(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex(t=>t.resource.toString()===e.uri.toString());o<0&&(o=d.binarySearch(this._markers,{resource:e.uri},(e,t)=>c.compare(e.resource.toString(),t.resource.toString())))<0&&(o=~o);for(let i=o;it.resource.toString()===e.toString());if(!(i<0))for(;it())}getMarkerList(e){for(let t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new m(e,this._markerService)}};v=o([r(0,i.IMarkerService)],v),u.registerSingleton(t.IMarkerNavigationService,v,!0)})),define(e[1501],t([0,1,14,29,10,6,107,67,96]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerService=void 0;class c{constructor(){this._byResource=new a.ResourceMap,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new a.ResourceMap,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){ let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:l.Iterable.empty():o.URI.isUri(e)?null!==(s=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==s?s:l.Iterable.empty():l.Iterable.map(l.Iterable.concat(...this._byOwner.values()),e=>e[1])}}class d{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new a.ResourceMap,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0} ;if(e.scheme===n.Schemas.inMemory||e.scheme===n.Schemas.walkThrough||e.scheme===n.Schemas.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===r.MarkerSeverity.Error?t.errors+=1:i===r.MarkerSeverity.Warning?t.warnings+=1:i===r.MarkerSeverity.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class h{constructor(){this._onMarkerChanged=new s.Emitter,this.onMarkerChanged=s.Event.debounce(this._onMarkerChanged.event,h._debouncer,0),this._data=new c,this._stats=new d(this)}dispose(){this._stats.dispose()}getStatistics(){return this._stats}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,n){if(i.isFalsyOrEmpty(n)){this._data.delete(t,e)&&this._onMarkerChanged.fire([t])}else{const i=[];for(const o of n){const n=h._toMarker(e,t,o);n&&i.push(n)} this._data.set(t,e,i),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}=i;if(s)return{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a=a>0?a:1,startColumn:l=l>0?l:1,endLineNumber:c=c>=a?c:a,endColumn:d=d>0?d:l,relatedInformation:h,tags:u}}changeAll(e,t){const n=[],o=this._data.values(e);if(o)for(let t of o){const i=l.Iterable.first(t);i&&(n.push(i.resource),this._data.delete(i.resource,e))}if(i.isNonEmptyArray(t)){const i=new a.ResourceMap;for(const{resource:o,marker:s}of t){const t=h._toMarker(e,o,s);if(!t)continue;const r=i.get(o);r?r.push(t):(i.set(o,[t]),n.push(o))}for(const[t,n]of i)this._data.set(t,e,n)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(h._accept(i,n)){const e=t.push(i) ;if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(h._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(let t of this._data.values())for(let i of t)if(h._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _debouncer(e,t){e||(h._dedupeMap=new a.ResourceMap,e=[]);for(const i of t)h._dedupeMap.has(i)||(h._dedupeMap.set(i,!0),e.push(i));return e}}t.MarkerService=h})),define(e[28],t([0,1,97,5,6]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpProgress=t.NoOpNotification=t.NotificationsFilter=t.NeverShowAgainScope=t.INotificationService=t.Severity=void 0,t.Severity=i.default,t.INotificationService=n.createDecorator("notificationService"),function(e){e[e.WORKSPACE=0]="WORKSPACE",e[e.GLOBAL=1]="GLOBAL"}(t.NeverShowAgainScope||(t.NeverShowAgainScope={})),function(e){e[e.OFF=0]="OFF", e[e.SILENT=1]="SILENT",e[e.ERROR=2]="ERROR"}(t.NotificationsFilter||(t.NotificationsFilter={}));t.NoOpNotification=class{constructor(){this.progress=new s,this.onDidClose=o.Event.None,this.onDidChangeVisibility=o.Event.None}updateSeverity(e){}updateMessage(e){}updateActions(e){}close(){}};class s{infinite(){}done(){}total(e){}worked(e){}}t.NoOpProgress=s})),define(e[42],t([0,1,10,5,2,24]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchesScheme=t.NullOpenerService=t.IOpenerService=void 0,t.IOpenerService=n.createDecorator("openerService"),t.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener:()=>o.Disposable.None,registerValidator:()=>o.Disposable.None,registerExternalUriResolver:()=>o.Disposable.None,setExternalOpener(){},open:async()=>!1,resolveExternalUri:async e=>({resolved:e,dispose(){}})}),t.matchesScheme=function(e,t){return i.URI.isUri(e)?s.equalsIgnoreCase(e.scheme,t):s.startsWithIgnoreCase(e,t+":")}})), define(e[1502],t([0,1,7,194,196,29,17,10,72,32,42,218]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenerService=void 0;let p=class{constructor(e){this._commandService=e}async open(e){if(!u.matchesScheme(e,a.Schemas.command))return!1;"string"==typeof e&&(e=c.URI.parse(e));let t=[];try{t=s.parse(decodeURIComponent(e.query))}catch(i){try{t=s.parse(e.query)}catch(e){}}return Array.isArray(t)||(t=[t]),await this._commandService.executeCommand(e.path,...t),!0}};p=o([r(0,h.ICommandService)],p);let m=class{constructor(e){this._editorService=e}async open(e,t){"string"==typeof e&&(e=c.URI.parse(e));let i=void 0;const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===a.Schemas.file&&(e=l.normalizePath(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i, context:(null==t?void 0:t.fromUserGesture)?g.EditorOpenContext.USER:g.EditorOpenContext.API}},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}};m=o([r(0,d.ICodeEditorService)],m);let v=class{constructor(e,t){this._openers=new n.LinkedList,this._validators=new n.LinkedList,this._resolvers=new n.LinkedList,this._externalOpener={openExternal:e=>(u.matchesScheme(e,a.Schemas.http)||u.matchesScheme(e,a.Schemas.https)?i.windowOpenNoOpener(e):window.location.href=e,Promise.resolve(!0))},this._openers.push({open:async(e,t)=>!!((null==t?void 0:t.openExternal)||u.matchesScheme(e,a.Schemas.mailto)||u.matchesScheme(e,a.Schemas.http)||u.matchesScheme(e,a.Schemas.https))&&(await this._doOpenExternal(e,t),!0)}),this._openers.push(new p(t)),this._openers.push(new m(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setExternalOpener(e){ this._externalOpener=e}async open(e,t){for(const t of this._validators.toArray())if(!await t.shouldOpen(e))return!1;for(const i of this._openers.toArray()){if(await i.open(e,t))return!0}return!1}async resolveExternalUri(e,t){for(const i of this._resolvers.toArray()){const n=await i.resolveExternalUri(e,t);if(n)return n}return{resolved:e,dispose:()=>{}}}async _doOpenExternal(e,t){const i="string"==typeof e?c.URI.parse(e):e,{resolved:n}=await this.resolveExternalUri(i,t);return"string"==typeof e&&i.toString()===n.toString()?this._externalOpener.openExternal(e):this._externalOpener.openExternal(encodeURI(n.toString(!0)))}dispose(){this._validators.clear()}};v=o([r(0,d.ICodeEditorService),r(1,h.ICommandService)],v),t.OpenerService=v})),define(e[308],t([0,1,256,42,50,21,306,5,6,2,45]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownRenderer=void 0;let g=class extends h.Disposable{constructor(e,t,i=n.NullOpenerService){super(),this._editor=e, this._modeService=t,this._openerService=i,this._onDidRenderCodeBlock=this._register(new d.Emitter),this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}getOptions(e){return{codeBlockRenderer:(e,t)=>{let i=null;if(e)i=this._modeService.getModeIdForLanguageName(e);else{const e=this._editor.getModel();e&&(i=e.getLanguageIdentifier().language)}return this._modeService.triggerMode(i||""),Promise.resolve(!0).then(e=>{const n=u.TokenizationRegistry.getPromise(i||"");return n?n.then(e=>l.tokenizeToString(t,e)):l.tokenizeToString(t,void 0)}).then(e=>`${e}`)},codeBlockRenderCallback:()=>this._onDidRenderCodeBlock.fire(),actionHandler:{callback:e=>{this._openerService.open(e,{fromUserGesture:!0}).catch(a.onUnexpectedError)},disposeables:e}}}render(e){const t=new h.DisposableStore;let n;return{element:n=e?i.renderMarkdown(e,this.getOptions(t)):document.createElement("span"),dispose:()=>t.dispose()}}} ;g=o([r(1,s.IModeService),r(2,c.optional(n.IOpenerService))],g),t.MarkdownRenderer=g})),define(e[1503],t([0,1,7,137,2,544,545,308,42,14]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModesGlyphHoverWidget=void 0;class d{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const o of t){if(!o.options.glyphMarginClassName)continue;const t=o.options.glyphMarginHoverMessage;t&&!n.isEmptyMarkdownString(t)&&i.push(...c.asArray(t).map(e))}return i}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class h extends r.GlyphHoverWidget{constructor(e,t,i=l.NullOpenerService){super(h.ID,e),this._renderDisposeables=this._register(new o.DisposableStore),this._messages=[], this._lastLineNumber=-1,this._markdownRenderer=this._register(new a.MarkdownRenderer(this._editor,t,i)),this._computer=new d(this._editor),this._hoverOperation=new s.HoverOperation(this._computer,e=>this._withResult(e),void 0,e=>this._withResult(e),300)}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),super.hide()}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const e of t){const t=this._markdownRenderer.render(e.value);this._renderDisposeables.add(t), n.appendChild(i.$("div.hover-row",void 0,t.element))}this.updateContents(n),this.showAt(e)}}t.ModesGlyphHoverWidget=h,h.ID="editor.contrib.modesGlyphHoverWidget"})),define(e[1504],t([0,1,6,42,7,99,74,2,55]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;let h=class extends c.Disposable{constructor(e,t){super(),this.styles={textLinkForeground:d.Color.fromHex("#006AB1")},this.el=s.$("a",{tabIndex:0,href:e.href,title:e.title},e.label);const n=a.domEvent(this.el,"click"),o=i.Event.chain(a.domEvent(this.el,"keypress")).map(e=>new l.StandardKeyboardEvent(e)).filter(e=>3===e.keyCode).event,r=i.Event.any(n,o);this._register(r(i=>{s.EventHelper.stop(i,!0),t.open(e.href)})),this.applyStyles()}style(e){this.styles=e,this.applyStyles()}applyStyles(){var e;this.el.style.color=(null===(e=this.styles.textLinkForeground)||void 0===e?void 0:e.toString())||""}};h=o([r(1,n.IOpenerService)],h),t.Link=h})),define(e[309],t([0,1,12,182,29,17]),(function(e,t,i,n,o,s){ "use strict";let r;if(Object.defineProperty(t,"__esModule",{value:!0}),i.isWeb||void 0===e||"function"!=typeof e.__$__nodeRequire)r={},0===Object.keys(r).length&&Object.assign(r,{version:"1.50.0-dev",nameShort:i.isWeb?"Code Web - OSS Dev":"Code - OSS Dev",nameLong:i.isWeb?"Code Web - OSS Dev":"Code - OSS Dev",applicationName:"code-oss",dataFolderName:".vscode-oss",urlProtocol:"code-oss",reportIssueUrl:"https://github.com/microsoft/vscode/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/master/LICENSE.txt",extensionAllowedProposedApi:["ms-vscode.vscode-js-profile-flame","ms-vscode.vscode-js-profile-table","ms-vscode.references-view","ms-vscode.github-browser"]});else{const t=s.dirname(o.FileAccess.asFileUri("",e));r=e.__$__nodeRequire(s.joinPath(t,"product.json").fsPath);const i=e.__$__nodeRequire(s.joinPath(t,"package.json").fsPath);n.env.VSCODE_DEV&&Object.assign(r,{nameShort:`${r.nameShort} Dev`,nameLong:`${r.nameLong} Dev`,dataFolderName:`${r.dataFolderName}-dev`}), Object.assign(r,{version:i.version})}t.default=r})),define(e[61],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IProductService=void 0,t.IProductService=i.createDecorator("productService")})),define(e[68],t([0,1,5,31,2]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorProgressService=t.LongRunningOperation=t.Progress=t.emptyProgressRunner=t.ProgressLocation=t.IProgressService=void 0,t.IProgressService=i.createDecorator("progressService"),function(e){e[e.Explorer=1]="Explorer",e[e.Scm=3]="Scm",e[e.Extensions=5]="Extensions",e[e.Window=10]="Window",e[e.Notification=15]="Notification",e[e.Dialog=20]="Dialog"}(t.ProgressLocation||(t.ProgressLocation={})),t.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class s{constructor(e){this.callback=e}get value(){return this._value}report(e){this._value=e,this.callback(this._value)}}t.Progress=s,s.None=Object.freeze({report(){}});class r extends o.Disposable{ constructor(e){super(),this.progressIndicator=e,this.currentOperationId=0,this.currentOperationDisposables=this._register(new o.DisposableStore)}start(e){this.stop();const t=++this.currentOperationId,i=new n.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{t===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},e),this.currentOperationDisposables.add(o.toDisposable(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add(o.toDisposable(()=>i.cancel())),this.currentOperationDisposables.add(o.toDisposable(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:t,token:i.token,stop:()=>this.doStop(t),isCurrent:()=>this.currentOperationId===t}}stop(){this.doStop(this.currentOperationId)}doStop(e){this.currentOperationId===e&&this.currentOperationDisposables.clear()}}t.LongRunningOperation=r,t.IEditorProgressService=i.createDecorator("editorProgressService")})), define(e[200],t([0,1,31,2,15]),(function(e,t,i,n,o){"use strict";var s;function r(e){const t=e;return Array.isArray(t.items)}Object.defineProperty(t,"__esModule",{value:!0}),t.PickerQuickAccessProvider=t.TriggerAction=void 0,function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(s=t.TriggerAction||(t.TriggerAction={}));class a extends n.Disposable{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var l;const c=new n.DisposableStore;e.canAcceptInBackground=!!(null===(l=this.options)||void 0===l?void 0:l.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let d=void 0;const h=c.add(new n.MutableDisposable),u=async()=>{const s=h.value=new n.DisposableStore;null==d||d.dispose(!0),e.busy=!1;const l=(d=new i.CancellationTokenSource(t)).token,c=e.value.substr(this.prefix.length).trim(),u=this.getPicks(c,s,l),g=(t,i)=>{var n;let o,s=void 0;if(r(t)?(o=t.items, s=t.active):o=t,0===o.length){if(i)return!1;c.length>0&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(o=[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0};if(null===u);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(u)){let t=!1,i=!1;await Promise.all([(async()=>{await o.timeout(a.FAST_PICKS_RACE_DELAY),l.isCancellationRequested||i||(t=g(u.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await u.additionalPicks;if(l.isCancellationRequested)return;let o,s,a=void 0;r(u.picks)?(o=u.picks.items,a=u.picks.active):o=u.picks;let c=void 0;if(r(n)?(s=n.items,c=n.active):s=n,s.length>0||!t){let t=void 0;if(!a&&!c){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}g({items:[...o,...s],active:a||c||t})}}finally{l.isCancellationRequested||(e.busy=!1),i=!0}})()])}else if(u instanceof Promise){e.busy=!0;try{const t=await u;if(l.isCancellationRequested)return;g(t)}finally{l.isCancellationRequested||(e.busy=!1)}}else g(u)} ;return c.add(e.onDidChangeValue(()=>u())),u(),c.add(e.onDidAccept(t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))})),c.add(e.onDidTriggerItemButton(async({button:i,item:n})=>{var o,r;if("function"==typeof n.trigger){const a=null!==(r=null===(o=n.buttons)||void 0===o?void 0:o.indexOf(i))&&void 0!==r?r:-1;if(a>=0){const i=n.trigger(a,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case s.NO_ACTION:break;case s.CLOSE_PICKER:e.hide();break;case s.REFRESH_PICKER:u();break;case s.REMOVE_ITEM:const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice();i.splice(t,1),e.items=i}}}}})),c}}t.PickerQuickAccessProvider=a,a.FAST_PICKS_RACE_DELAY=200}));var a=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),l=this&&this.__exportStar||function(e,t){ for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||a(t,e,i)};define(e[49],t([0,1,5,512]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IQuickInputService=void 0,l(n,t),t.IQuickInputService=i.createDecorator("quickInputService")})),define(e[16],t([0,1,13,389]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=void 0;t.Registry=new class{constructor(){this.data=new Map}add(e,t){n.ok(i.isString(e)),n.ok(i.isObject(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}knows(e){return this.data.has(e)}as(e){return this.data.get(e)||null}}})),define(e[176],t([0,1,973,6,45,134,16]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLAINTEXT_LANGUAGE_IDENTIFIER=t.PLAINTEXT_MODE_ID=t.ModesRegistry=t.EditorModesRegistry=t.Extensions=void 0,t.Extensions={ModesRegistry:"editor.modesRegistry"};class a{constructor(){ this._onDidChangeLanguages=new n.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}})})),define(e[187],t([0,1,29,17,176,25]),(function(e,t,i,n,o,s){"use strict";function r(e,t,s){if(!s)return null;let r=null;if(s.scheme===i.Schemas.data){const e=n.DataUri.parseMetaData(s).get(n.DataUri.META_DATA_MIME);e&&(r=t.getModeId(e))}else{const t=e.getModel(s);t&&(r=t.getModeId())}return r&&r!==o.PLAINTEXT_MODE_ID?r:t.getModeIdByFilepathOrFirstLine(s)}function a(e){return e.replace(/\s/g,"\\$&")}Object.defineProperty(t,"__esModule",{value:!0}),t.cssEscape=t.detectModeId=t.getIconClassesForModeId=t.getIconClasses=void 0,t.getIconClasses=function(e,t,o,l){const c=l===s.FileKind.ROOT_FOLDER?["rootfolder-icon"]:l===s.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(o){let d;if(o.scheme===i.Schemas.data){d=n.DataUri.parseMetaData(o).get(n.DataUri.META_DATA_LABEL)}else d=a(n.basenameOrAuthority(o).toLowerCase()) ;if(l===s.FileKind.FOLDER)c.push(`${d}-name-folder-icon`);else{if(d){c.push(`${d}-name-file-icon`);const e=d.split(".");for(let t=1;t0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}} ;i.Registry.add(t.Extensions.JSONContribution,o)})),define(e[57],t([0,1,1029,6,16,13,126]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getScopes=t.validateProperty=t.getDefaultValue=t.overrideIdentifierFromKey=t.OVERRIDE_PROPERTY_PATTERN=t.resourceLanguageSettingsSchemaId=t.resourceSettings=t.windowSettings=t.machineOverridableSettings=t.machineSettings=t.applicationSettings=t.allSettings=t.ConfigurationScope=t.Extensions=void 0,t.Extensions={Configuration:"base.contributions.configuration"},function(e){e[e.APPLICATION=1]="APPLICATION",e[e.MACHINE=2]="MACHINE",e[e.WINDOW=3]="WINDOW",e[e.RESOURCE=4]="RESOURCE",e[e.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",e[e.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"}(t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.machineSettings={properties:{},patternProperties:{}},t.machineOverridableSettings={properties:{}, patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";const a=o.Registry.as(r.Extensions.JSONContribution);function l(e){return e.substring(1,e.length-1)}function c(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}t.OVERRIDE_PROPERTY_PATTERN=new RegExp("\\[.*\\]$"),t.overrideIdentifierFromKey=l,t.getDefaultValue=c;const d=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new n.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new n.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:i.localize(0,null),properties:{}}, this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},a.registerSchema(t.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,i=!0){const n=[];e.forEach(e=>{n.push(...this.validateAndRegisterProperties(e,i)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}),a.registerSchema(t.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}deregisterConfigurations(e){const i=[],n=e=>{if(e.properties)for(const t in e.properties)i.push(t),delete this.configurationProperties[t],this.removeFromSchema(t,e.properties[t]) ;e.allOf&&e.allOf.forEach(e=>n(e))};for(const t of e){n(t);const e=this.configurationContributors.indexOf(t);-1!==e&&this.configurationContributors.splice(e,1)}a.registerSchema(t.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerDefaultConfigurations(e){const n=[],o=[];for(const s of e)for(const e in s)if(n.push(e),this.defaultValues[e]=s[e],t.OVERRIDE_PROPERTY_PATTERN.test(e)){const n={type:"object",default:this.defaultValues[e],description:i.localize(1,null,e),$ref:t.resourceLanguageSettingsSchemaId};o.push(l(e)),this.configurationProperties[e]=n,this.defaultLanguageConfigurationOverridesNode.properties[e]=n}else{const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.registerOverrideIdentifiers(o),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}deregisterDefaultConfigurations(e){const i=[] ;for(const n of e)for(const e in n)if(i.push(e),delete this.defaultValues[e],t.OVERRIDE_PROPERTY_PATTERN.test(e))delete this.configurationProperties[e],delete this.defaultLanguageConfigurationOverridesNode.properties[e];else{const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.updateOverridePropertyPatternKey(),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}notifyConfigurationSchemaUpdated(...e){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,i=!0,n=3){n=s.isUndefinedOrNull(e.scope)?n:e.scope;let o=[],r=e.properties;if(r)for(let e in r){if(i&&h(e)){delete r[e];continue}const a=r[e];this.updatePropertyDefaultValue(e,a),t.OVERRIDE_PROPERTY_PATTERN.test(e)?a.scope=void 0:a.scope=s.isUndefinedOrNull(a.scope)?n:a.scope, !r[e].hasOwnProperty("included")||r[e].included?(this.configurationProperties[e]=r[e],!r[e].deprecationMessage&&r[e].markdownDeprecationMessage&&(r[e].deprecationMessage=r[e].markdownDeprecationMessage),o.push(e)):(this.excludedConfigurationProperties[e]=r[e],delete r[e])}let a=e.allOf;if(a)for(let e of a)o.push(...this.validateAndRegisterProperties(e,i,n));return o}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,i){switch(t.allSettings.properties[e]=i,i.scope){case 1:t.applicationSettings.properties[e]=i;break;case 2:t.machineSettings.properties[e]=i;break;case 6:t.machineOverridableSettings.properties[e]=i;break;case 3:t.windowSettings.properties[e]=i;break;case 4:t.resourceSettings.properties[e]=i ;break;case 5:t.resourceSettings.properties[e]=i,this.resourceLanguageSettingsSchema.properties[e]=i}}removeFromSchema(e,i){switch(delete t.allSettings.properties[e],i.scope){case 1:delete t.applicationSettings.properties[e];break;case 2:delete t.machineSettings.properties[e];break;case 6:delete t.machineOverridableSettings.properties[e];break;case 3:delete t.windowSettings.properties[e];break;case 4:case 5:delete t.resourceSettings.properties[e]}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const n=`[${e}]`,o={type:"object",description:i.localize(2,null),errorMessage:i.localize(3,null),$ref:t.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(n,o),t.allSettings.properties[n]=o,t.applicationSettings.properties[n]=o,t.machineSettings.properties[n]=o,t.machineOverridableSettings.properties[n]=o,t.windowSettings.properties[n]=o,t.resourceSettings.properties[n]=o}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e] ;s.isUndefined(i)&&(i=t.default),s.isUndefined(i)&&(i=c(t.type)),t.default=i}};function h(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?i.localize(4,null,e):void 0!==d.getConfigurationProperties()[e]?i.localize(5,null,e):null}o.Registry.add(t.Extensions.Configuration,d),t.validateProperty=h,t.getScopes=function(){const e=[],t=d.getConfigurationProperties();for(const i of Object.keys(t))e.push([i,t[i].scope]);return e.push(["launch",4]),e.push(["task",4]),e}})),define(e[238],t([0,1,969,6,2,41,14,111,345,264,57,16,141]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDiffEditorConfigurationKey=t.isEditorConfigurationKey=t.editorConfigurationBaseNode=t.CommonEditorConfiguration=t.ComputedEditorOptions=t.TabFocus=void 0,t.TabFocus=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){ this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}};const g=Object.hasOwnProperty;class p{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}t.ComputedEditorOptions=p;class m{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class v{static readOptions(e){const t=e,i=new m;for(const e of a.editorOptionsRegistry){const n="_never_"===e.name?void 0:t[e.name];i._write(e.id,n)}return i}static validateOptions(e){const t=new a.ValidatedEditorOptions;for(const i of a.editorOptionsRegistry)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new p;for(const n of a.editorOptionsRegistry)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&r.equals(e,t) ;for(let i in e)if(!v._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of a.editorOptionsRegistry){const s=!v._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new a.ConfigurationChangedEvent(i):null}}function f(e){const t=s.deepClone(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const s=e.acceptSuggestionOnEnter;!0===s?e.acceptSuggestionOnEnter="on":!1===s&&(e.acceptSuggestionOnEnter="off");const r=e.tabCompletion ;!1===r?e.tabCompletion="off":!0===r&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",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"};u.forEach(e,e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)})}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const d=e.autoIndent ;!0===d?e.autoIndent="full":!1===d&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never")}(t),t}class S extends o.Disposable{constructor(e,i){super(),this._onDidChange=this._register(new n.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new n.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new a.ComputeOptionsMemory,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=f(i),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._register(l.EditorZoom.onDidChangeZoomLevel(e=>this._recomputeOptions())),this._register(t.TabFocus.onDidChangeTabFocus(e=>this._recomputeOptions()))}observeReferenceElement(e){}dispose(){super.dispose()}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const i=v.checkEquals(e,t) ;if(null===i)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),i=c.BareFontInfo.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,this.isSimpleWidget),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(i),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:t.TabFocus.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return v.computeOptions(this._validatedOptions,n)}static _subsetEquals(e,t){for(const i in t)if(g.call(t,i)){const n=t[i],o=e[i];if(o===n)continue;if(Array.isArray(o)&&Array.isArray(n)){if(!r.equals(o,n))return!1;continue} if(o&&"object"==typeof o&&n&&"object"==typeof n){if(!this._subsetEquals(o,n))return!1;continue}return!1}return!0}updateOptions(e){if(void 0===e)return;const t=f(e);S._subsetEquals(this._rawOptions,t)||(this._rawOptions=s.mixin(this._rawOptions,t||{}),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=S._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}t.CommonEditorConfiguration=S,t.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:i.localize(0,null),scope:5}) ;const b=h.Registry.as(d.Extensions.Configuration),_=Object.assign(Object.assign({},t.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:a.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:i.localize(1,null)},"editor.insertSpaces":{type:"boolean",default:a.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:i.localize(2,null)},"editor.detectIndentation":{type:"boolean",default:a.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:i.localize(3,null)},"editor.trimAutoWhitespace":{type:"boolean",default:a.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:i.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:a.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:i.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:i.localize(6,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[i.localize(7,null),i.localize(8,null),i.localize(9,null)], default:"configuredByTheme",description:i.localize(10,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:i.localize(11,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:i.localize(12,null)},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:i.localize(13,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.localize(14,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.localize(15,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.localize(16,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:i.localize(17,null)}}});for(const e of a.editorOptionsRegistry){const t=e.schema;if(void 0!==t)if(void 0!==(C=t).type||void 0!==C.anyOf)_.properties[`editor.${e.name}`]=t;else for(let e in t)g.call(t,e)&&(_.properties[e]=t[e])}var C;let y=null;function w(){return null===y&&(y=Object.create(null),Object.keys(_.properties).forEach(e=>{y[e]=!0})),y} t.isEditorConfigurationKey=function(e){return w()[`editor.${e}`]||!1},t.isDiffEditorConfigurationKey=function(e){return w()[`diffEditor.${e}`]||!1},b.registerConfiguration(_)})),define(e[201],t([0,1,80,6,2,12,881,400,238,111,264]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=t.serializeFontInfo=t.restoreFontInfo=t.readFontInfo=t.clearAllFontInfos=void 0;class h{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}t.clearAllFontInfos=function(){u.INSTANCE.clearCache()},t.readFontInfo=function(e){return u.INSTANCE.readConfiguration(e)},t.restoreFontInfo=function(e){u.INSTANCE.restoreFontInfo(e)},t.serializeFontInfo=function(){ const e=u.INSTANCE.saveFontInfo();return e.length>0?e:null};class u extends o.Disposable{constructor(){super(),this._onDidChange=this._register(new n.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new h,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new h,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(let i=0,n=e.length;ie.isTrusted)}restoreFontInfo(e){for(let t=0,i=e.length;t.001){I=!1;break}}let k=!0;I&&C.width!==x&&(k=!1),C.width>_.width&&(k=!1);const D=i.getTimeSinceLastZoomLevelChanged()>2e3;return new d.FontInfo({zoomLevel:i.getZoomLevel(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:I,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width, canUseHalfwidthRightwardsArrow:k,spaceWidth:a.width,middotWidth:y.width,wsmiddotWidth:w.width,maxDigitWidth:E},D)}}u.INSTANCE=new u;class g extends l.CommonEditorConfiguration{constructor(e,t,n=null,o){super(e,t),this.accessibilityService=o,this._elementSizeObserver=this._register(new a.ElementSizeObserver(n,t.dimension,()=>this._onReferenceDomElementSizeChanged())),this._register(u.INSTANCE.onDidChange(()=>this._onCSSBasedConfigurationChanged())),this._validatedOptions.get(9)&&this._elementSizeObserver.startObserving(),this._register(i.onDidChangeZoomLevel(e=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){ e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}_onReferenceDomElementSizeChanged(){this._recomputeOptions()}_onCSSBasedConfigurationChanged(){this._recomputeOptions()}observeReferenceElement(e){this._elementSizeObserver.observe(e)}dispose(){super.dispose()}_getExtraEditorClassName(){let e="";return i.isSafari||i.isWebkitWebView||(e+="no-user-select "),s.isMacintosh&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:i.isWebKit||i.isFirefox,pixelRatio:i.getPixelRatio(),zoomLevel:i.getZoomLevel(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return u.INSTANCE.readConfiguration(e)}} t.Configuration=g})),define(e[1505],t([0,1,422,260,24,201]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DOMLineBreaksComputerFactory=void 0;class r{static create(){return new r}constructor(){}createLineBreaksComputer(e,t,r,a){t|=0,r=+r;let d=[];return{addRequest:(e,t)=>{d.push(e)},finalize:()=>(function(e,t,r,a,d){if(-1===a){const t=[];for(let i=0,n=e.length;ih?(s=0,a=0):c=h-e}const u=n.substr(s),b=l(u,a,r,c,g);p[i]=s,m[i]=a,v[i]=u,f[i]=b[0],S[i]=b[1]}u.innerHTML=g.build(), u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);let b=document.createRange();const _=Array.prototype.slice.call(u.children,0);let C=[];for(let t=0;t');const r=e.length;let a=t,l=0,c=[],d=[],h=0");for(let t=0;t"),c[t]=l,d[t]=a;const n=h;h=t+1"),c[e.length]=l,d[e.length]=a,s.appendASCIIString(""),[c,d]}function c(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{!function e(t,i,n,o,s,r,a,l){if(o===r)return;s=s||d(t,i,n[o],n[o+1]);a=a||d(t,i,n[r],n[r+1]);if(Math.abs(s[0].top-a[0].top)<=.1)return;if(o+1===r)return void l.push(r);const c=o+(r-o)/2|0;const h=d(t,i,n[c],n[c+1]);e(t,i,n,o,s,c,h,l);e(t,i,n,c,h,r,a,l)}(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function d(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}t.DOMLineBreaksComputerFactory=r, function(e){e[e.SPAN_MODULO_LIMIT=16384]="SPAN_MODULO_LIMIT"}(a||(a={}))})),define(e[1506],t([0,1,109,201,402,142]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarginViewOverlays=t.ContentViewOverlays=t.ViewOverlayLine=t.ViewOverlays=void 0;class r extends s.ViewPart{constructor(e){super(e),this._visibleLines=new o.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender());for(let i=0,n=t.length;i'),n.appendASCIIString(o),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t), this._domNode.setHeight(this._lineHeight))}}t.ViewOverlayLine=a;t.ContentViewOverlays=class extends r{constructor(e){super(e);const t=this._context.configuration.options.get(117);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(117);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}};t.MarginViewOverlays=class extends r{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(117);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),n.Configuration.applyFontInfo(this.domNode,t.get(36))}onConfigurationChanged(e){const t=this._context.configuration.options;n.Configuration.applyFontInfo(this.domNode,t.get(36));const i=t.get(117) ;return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}})),define(e[1507],t([0,1,7,109,24,201,111,47,18,233]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewCursor=void 0;class d{constructor(e,t,i,n,o,s){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=s}}t.ViewCursor=class{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(36);this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=n.createFastDomNode(document.createElement("div")), this._domNode.setClassName(`cursor ${c.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),s.Configuration.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new a.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(e){const t=this._context.configuration.options,i=t.get(36);return this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),s.Configuration.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="" ;if(this._cursorStyle===r.TextEditorCursorStyle.Line||this._cursorStyle===r.TextEditorCursorStyle.LineThin){const n=e.visibleRangeForPosition(this._position);if(!n||n.outsideRenderedLine)return null;let s;if(this._cursorStyle===r.TextEditorCursorStyle.Line){if((s=i.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){const e=this._context.model.getLineContent(this._position.lineNumber),i=o.nextCharLength(e,this._position.column-1);t=e.substr(this._position.column-1,i)}}else s=i.computeScreenAwareSize(1);let a=n.left;s>=2&&a>=1&&(a-=1);const l=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new d(l,a,s,this._lineHeight,t,"")}const n=this._context.model.getLineContent(this._position.lineNumber),s=o.nextCharLength(n,this._position.column-1),a=e.linesVisibleRangesForRange(new l.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+s),!1);if(!a||0===a.length)return null;const c=a[0] ;if(c.outsideRenderedLine||0===c.ranges.length)return null;const h=c.ranges[0],u=h.width<1?this._typicalHalfwidthCharacterWidth:h.width;let g="";if(this._cursorStyle===r.TextEditorCursorStyle.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=n.substr(this._position.column-1,s);const i=e.tokens.findTokenIndexAtOffset(this._position.column-1);g=e.tokens.getClassName(i)}let p=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,m=this._lineHeight;return this._cursorStyle!==r.TextEditorCursorStyle.Underline&&this._cursorStyle!==r.TextEditorCursorStyle.UnderlineThin||(p+=this._lineHeight-2,m=2),new d(p,h.left,u,m,t,g)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent), this._domNode.setClassName(`cursor ${c.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}})),define(e[1508],t([0,1,21,6,2,184,24,45,176,265,57,16]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagesRegistry=void 0;const u=Object.prototype.hasOwnProperty;class g extends o.Disposable{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new n.Emitter),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[], this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(l.ModesRegistry.onDidChangeLanguages(e=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=l.ModesRegistry.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach(e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier}),t.mimetypes.forEach(e=>{this._mimeTypesMap[e]=t.identifier})}),h.Registry.as(d.Extensions.Configuration).registerOverrideIdentifiers(l.ModesRegistry.getLanguages().map(e=>e.id)),this._onDidChange.fire()}_getLanguageId(e){ if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(u.call(this._languages,t))i=this._languages[t];else{const e=this._getLanguageId(t);i={identifier:new a.LanguageIdentifier(t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=i}this._mergeLanguage(i,e)}_mergeLanguage(e,t){const n=t.id;let o=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),o=t.mimetypes[0]),o||(o=`text/x-${n}`,e.mimetypes.push(o)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)s.registerTextMime({id:n,mime:o,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let i of t.filenames)s.registerTextMime({id:n,mime:o,filename:i},this._warnOnOverwrite), e.filenames.push(i);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)s.registerTextMime({id:n,mime:o,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);r.regExpLeadsToEndlessLoop(t)||s.registerTextMime({id:n,mime:o,firstline:t},this._warnOnOverwrite)}catch(e){i.onUnexpectedError(e)}}e.aliases.push(n);let a=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(a=0===t.aliases.length?[null]:t.aliases),null!==a)for(const t of a)t&&0!==t.length&&e.aliases.push(t);let l=null!==a&&a.length>0;if(l&&null===a[0]);else{let t=(l?a[0]:null)||n;!l&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!u.call(this._mimeTypesMap,e)||u.call(this._languages,e)}getRegisteredModes(){return Object.keys(this._languages)}getRegisteredLanguageNames(){return Object.keys(this._nameMap)}getLanguageName(e){ return u.call(this._languages,e)?this._languages[e].name:null}getModeIdForLanguageNameLowercase(e){return u.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}getConfigurationFiles(e){return u.call(this._languages,e)&&this._languages[e].configurationFiles||[]}getMimeForMode(e){if(!u.call(this._languages,e))return null;return this._languages[e].mimetypes[0]||null}extractModeIds(e){return e?e.split(",").map(e=>e.trim()).map(e=>u.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e).filter(e=>u.call(this._languages,e)):[]}getLanguageIdentifier(e){if(e===c.NULL_MODE_ID||0===e)return c.NULL_LANGUAGE_IDENTIFIER;let t;if("string"==typeof e)t=e;else if(!(t=this._languageIdToLanguage[e]))return null;return u.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromLanguageName(e){return e&&u.call(this._nameMap,e)?[this._nameMap[e].language]:[]}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=s.guessMimeTypes(e,t);return this.extractModeIds(i.join(","))} getExtensions(e){if(!u.call(this._nameMap,e))return[];const t=this._nameMap[e];return this._languages[t.language].extensions}getFilenames(e){if(!u.call(this._nameMap,e))return[];const t=this._nameMap[e];return this._languages[t.language].filenames}}t.LanguagesRegistry=g})),define(e[1509],t([0,1,6,2,892,265,1508,14]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeServiceImpl=void 0;class l extends n.Disposable{constructor(e,t){super(),this._onDidChange=this._register(new i.Emitter),this.onDidChange=this._onDidChange.event,this._selector=t,this.languageIdentifier=this._selector(),this._register(e(()=>this._evaluate()))}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}t.ModeServiceImpl=class{constructor(e=!1){this._onDidCreateMode=new i.Emitter,this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=new i.Emitter, this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=new r.LanguagesRegistry(!0,e),this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire())}_onReady(){return Promise.resolve(!0)}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getRegisteredModes(){return this._registry.getRegisteredModes()}getRegisteredLanguageNames(){return this._registry.getRegisteredLanguageNames()}getExtensions(e){return this._registry.getExtensions(e)}getFilenames(e){return this._registry.getFilenames(e)}getMimeForMode(e){return this._registry.getMimeForMode(e)}getLanguageName(e){return this._registry.getLanguageName(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return a.firstOrDefault(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return a.firstOrDefault(t,null)}getLanguageIdentifier(e){ return this._registry.getLanguageIdentifier(e)}getConfigurationFiles(e){return this._registry.getConfigurationFiles(e)}create(e){return new l(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)})}createByLanguageName(e){return new l(this.onLanguagesMaybeChanged,()=>{const t=this._getModeIdByLanguageName(e);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(e,t){return new l(this.onLanguagesMaybeChanged,()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)})}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||s.NULL_LANGUAGE_IDENTIFIER;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}waitForLanguageRegistration(){return this._onReady().then(()=>{})}_getModeIdByLanguageName(e){const t=this._registry.getModeIdsFromLanguageName(e);return a.firstOrDefault(t,null)} _getOrCreateMode(e){if(!this._instantiatedModes.hasOwnProperty(e)){let t=this.getLanguageIdentifier(e)||s.NULL_LANGUAGE_IDENTIFIER;this._instantiatedModes[e]=new o.FrankensteinMode(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}})),define(e[9],t([0,1,41,13,10,16,5,57]),(function(e,t,i,n,o,s,r,a){"use strict";function l(e,t){const i=Object.create(null);for(let n in e)c(i,n,e[n],t);return i}function c(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let e=0;e-1===t.keys.indexOf(e)):[...n.keys]:[],s=t?n?t.keys.filter(e=>-1===n.keys.indexOf(e)):[...t.keys]:[],r=[];if(n&&t)for(const e of t.keys)if(-1!==n.keys.indexOf(e)){const o=d(t.contents,e),s=d(n.contents,e);i.equals(o,s)||r.push(e)}const l=[],c=e=>{const t={};for(const i of e)for(const e of i.identifiers)t[h(e)]=i;return t},u=n?c(n.overrides):{},g=t?c(t.overrides):{};if(Object.keys(u).length)for(const e of o){const t=u[e];t&&l.push([a.overrideIdentifierFromKey(e),t.keys])}if(Object.keys(g).length)for(const e of s){const t=g[e];t&&l.push([a.overrideIdentifierFromKey(e),t.keys])}if(Object.keys(u).length&&Object.keys(g).length)for(const t of r){const i=g[t],n=u[t];if(i&&n){const o=e({contents:i.contents,keys:i.keys,overrides:[]},{contents:n.contents,keys:n.keys,overrides:[]}) ;l.push([a.overrideIdentifierFromKey(t),[...o.added,...o.removed,...o.updated]])}}return{added:o,removed:s,updated:r,overrides:l}},t.toOverrides=function(e,t){const i=[];for(const n of Object.keys(e))if(a.OVERRIDE_PROPERTY_PATTERN.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:[a.overrideIdentifierFromKey(n).trim()],keys:Object.keys(o),contents:l(o,t)})}return i},t.toValuesTree=l,t.addToValueTree=c,t.removeFromValueTree=function(e,t){!function e(t,i){const n=i.shift();if(0===i.length)return void delete t[n];if(-1!==Object.keys(t).indexOf(n)){const o=t[n];"object"!=typeof o||Array.isArray(o)||(e(o,i),0===Object.keys(o).length&&delete t[n])}}(e,t.split("."))},t.getConfigurationValue=d,t.merge=function e(t,i,o){Object.keys(i).forEach(s=>{"__proto__"!==s&&(s in t?n.isObject(t[s])&&n.isObject(i[s])?e(t[s],i[s],o):o&&(t[s]=i[s]):t[s]=i[s])})},t.getConfigurationKeys=function(){const e=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)}, t.getDefaultValues=function(){const e=Object.create(null),t=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(let i in t){c(e,i,t[i].default,e=>console.error(`Conflict in default settings: ${e}`))}return e},t.keyFromOverrideIdentifier=h,t.getMigratedSettingValue=function(e,t,i){const n=e.inspect(t),o=e.inspect(i);return void 0!==n.userValue||void 0!==n.workspaceValue||void 0!==n.workspaceFolderValue?n.value:void 0!==o.userValue||void 0!==o.workspaceValue||void 0!==o.workspaceFolderValue?o.value:n.defaultValue}})),define(e[1510],t([0,1,6,2,47,50,46,9]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextResourceConfigurationService=void 0;let d=class extends n.Disposable{constructor(e,t,n){super(),this.configurationService=e,this.modelService=t,this.modeService=n,this._onDidChangeConfiguration=this._register(new i.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event, this._register(this.configurationService.onDidChangeConfiguration(e=>this._onDidChangeConfiguration.fire(this.toResourceConfigurationChangeEvent(e))))}getValue(e,t,i){return"string"==typeof i?this._getValue(e,s.Position.isIPosition(t)?t:null,i):this._getValue(e,null,"string"==typeof t?t:void 0)}updateValue(e,t,i,n){var o,s,r,a,l;const c=this.getLanguage(e,null),d=this.configurationService.inspect(t,{resource:e,overrideIdentifier:c});switch(void 0===n&&(n=this.deriveConfigurationTarget(d,c)),n){case 7:return this._updateValue(t,i,n,null===(o=d.memory)||void 0===o?void 0:o.override,e,c);case 5:return this._updateValue(t,i,n,null===(s=d.workspaceFolder)||void 0===s?void 0:s.override,e,c);case 4:return this._updateValue(t,i,n,null===(r=d.workspace)||void 0===r?void 0:r.override,e,c);case 3:return this._updateValue(t,i,n,null===(a=d.userRemote)||void 0===a?void 0:a.override,e,c);default:return this._updateValue(t,i,n,null===(l=d.userLocal)||void 0===l?void 0:l.override,e,c)}}_updateValue(e,t,i,n,o,s){ return s&&void 0!==n?this.configurationService.updateValue(e,t,{resource:o,overrideIdentifier:s},i):this.configurationService.updateValue(e,t,{resource:o},i)}deriveConfigurationTarget(e,t){var i,n,o,s,r,a,l,c,d;if(t){if(void 0!==(null===(i=e.memory)||void 0===i?void 0:i.override))return 7;if(void 0!==(null===(n=e.workspaceFolder)||void 0===n?void 0:n.override))return 5;if(void 0!==(null===(o=e.workspace)||void 0===o?void 0:o.override))return 4;if(void 0!==(null===(s=e.userRemote)||void 0===s?void 0:s.override))return 3;if(void 0!==(null===(r=e.userLocal)||void 0===r?void 0:r.override))return 2}return void 0!==(null===(a=e.memory)||void 0===a?void 0:a.value)?7:void 0!==(null===(l=e.workspaceFolder)||void 0===l?void 0:l.value)?5:void 0!==(null===(c=e.workspace)||void 0===c?void 0:c.value)?4:void 0!==(null===(d=e.userRemote)||void 0===d?void 0:d.value)?3:2}_getValue(e,t,i){const n=e?this.getLanguage(e,t):void 0;return void 0===i?this.configurationService.getValue({resource:e,overrideIdentifier:n }):this.configurationService.getValue(i,{resource:e,overrideIdentifier:n})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?this.modeService.getLanguageIdentifier(i.getLanguageIdAtPosition(t.lineNumber,t.column)).language:i.getLanguageIdentifier().language:this.modeService.getModeIdByFilepathOrFirstLine(e)}toResourceConfigurationChangeEvent(e){return{affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>{const n=this.getLanguage(t,null);return e.affectsConfiguration(i,{resource:t,overrideIdentifier:n})}}}};d=o([r(0,c.IConfigurationService),r(1,l.IModelService),r(2,a.IModeService)],d),t.TextResourceConfigurationService=d})),define(e[1511],t([0,1,2,105,6,8,9]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityService=void 0;let c=class extends i.Disposable{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new s.Emitter, this._accessibilityModeEnabledContext=n.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())})),i(),this.onDidChangeScreenReaderOptimized(()=>i())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}alwaysUnderlineAccessKeys(){return Promise.resolve(!1)}setAccessibilitySupport(e){this._accessibilitySupport!==e&&(this._accessibilitySupport=e,this._onDidChangeScreenReaderOptimized.fire())}};c=o([r(0,a.IContextKeyService),r(1,l.IConfigurationService)],c),t.AccessibilityService=c})), define(e[427],t([0,1,93,67,14,13,41,10,57,9,16,2,6,17]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllKeysConfigurationChangeEvent=t.ConfigurationChangeEvent=t.mergeChanges=t.Configuration=t.UserSettings=t.ConfigurationModelParser=t.DefaultConfigurationModel=t.ConfigurationModel=void 0;class p{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?c.getConfigurationValue(this.contents,e):this.contents}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?c.getConfigurationValue(i,e):i:void 0}getKeysForOverrideIdentifier(e){ for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.keys;return[]}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const e of o.distinct([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=r.deepClone(n),this.mergeContents(n,o)):n=o),i[e]=n}return new p(i,this.keys,this.overrides)}merge(...e){const t=r.deepClone(this.contents),i=r.deepClone(this.overrides),n=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=i.filter(t=>o.equals(t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):i.push(r.deepClone(e))}for(const e of s.keys)-1===n.indexOf(e)&&n.push(e)}return new p(t,n,i)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const i of Object.keys(t))i in e&&s.isObject(e[i])&&s.isObject(t[i])?this.mergeContents(e[i],t[i]):e[i]=r.deepClone(t[i])} checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?r.deepFreeze(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),c.addToValueTree(this.contents,e,t,e=>{throw new Error(e)})}removeValue(e){this.removeKey(e)&&c.removeFromValueTree(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;iconsole.error(`Conflict in default settings file: ${e}`)) });super(e,t,i)}};class m{constructor(e,t){this._name=e,this._scopes=t,this._raw=null,this._configurationModel=null,this._parseErrors=[]}get configurationModel(){return this._configurationModel||new p}get errors(){return this._parseErrors}parseContent(e){if(!s.isUndefinedOrNull(e)){const t=this.doParseContent(e);this.parseRaw(t)}}parseRaw(e){this._raw=e;const t=this.doParseRaw(e);this._configurationModel=new p(t.contents,t.keys,t.overrides)}parse(){this._raw&&this.parseRaw(this._raw)}doParseContent(e){let t={},n=null,o=[],s=[],r=[];function a(e){Array.isArray(o)?o.push(e):n&&(o[n]=e)}let l={onObjectBegin:()=>{let e={};a(e),s.push(o),o=e,n=null},onObjectProperty:e=>{n=e},onObjectEnd:()=>{o=s.pop()},onArrayBegin:()=>{let e=[];a(e),s.push(o),o=e,n=null},onArrayEnd:()=>{o=s.pop()},onLiteralValue:a,onError:(e,t,i)=>{r.push({error:e,offset:t,length:i})}};if(e)try{i.visit(e,l),t=o[0]||{}}catch(e){console.error(`Error while parsing settings file ${this._name}: ${e}`),this._parseErrors=[e]}return t}doParseRaw(e){ if(this._scopes){const t=d.Registry.as(l.Extensions.Configuration).getConfigurationProperties();e=this.filterByScope(e,t,!0,this._scopes)}return{contents:c.toValuesTree(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`)),keys:Object.keys(e),overrides:c.toOverrides(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`))}}filterByScope(e,t,i,n){const o={};for(let s in e)if(l.OVERRIDE_PROPERTY_PATTERN.test(s)&&i)o[s]=this.filterByScope(e[s],t,!1,n);else{const i=this.getScope(s,t);void 0!==i&&-1===n.indexOf(i)||(o[s]=e[s])}return o}getScope(e,t){const i=t[e];return i?void 0!==i.scope?i.scope:3:void 0}}t.ConfigurationModelParser=m;class v extends h.Disposable{constructor(e,t,i){super(),this.userSettingsResource=e,this.scopes=t,this.fileService=i,this._onDidChange=this._register(new u.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new m(this.userSettingsResource.toString(),this.scopes),this._register(this.fileService.watch(g.dirname(this.userSettingsResource))), this._register(u.Event.filter(this.fileService.onDidFilesChange,e=>e.contains(this.userSettingsResource))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const e=await this.fileService.readFile(this.userSettingsResource);return this.parser.parseContent(e.value.toString()||"{}"),this.parser.configurationModel}catch(e){return new p}}reprocess(){return this.parser.parse(),this.parser.configurationModel}}t.UserSettings=v;class f{constructor(e,t,i=new p,o=new p,s=new n.ResourceMap,r=new p,a=new n.ResourceMap,l=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=o,this._folderConfigurations=s,this._memoryConfiguration=r,this._memoryConfigurationByResource=a,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new n.ResourceMap,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n ;i.resource?(n=this._memoryConfigurationByResource.get(i.resource))||(n=new p,this._memoryConfigurationByResource.set(i.resource,n)):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){ const n=this.getConsolidateConfigurationModel(t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),r=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,a=t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),l=t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),c=t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),d=t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),h=i?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,u=s?t.overrideIdentifier?s.freeze().override(t.overrideIdentifier).getValue(e):s.freeze().getValue(e):void 0,g=t.overrideIdentifier?r.override(t.overrideIdentifier).getValue(e):r.getValue(e),p=n.getValue(e),m=o.distinct(o.flatten(n.overrides.map(e=>e.identifiers))).filter(t=>void 0!==n.getOverrideValue(e,t)) ;return{defaultValue:a,userValue:l,userLocalValue:c,userRemoteValue:d,workspaceValue:h,workspaceFolderValue:u,memoryValue:g,value:p,default:void 0!==a?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:void 0!==l?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:void 0!==c?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:void 0!==d?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:void 0!==h?{value:this._workspaceConfiguration.freeze().getValue(e), override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:void 0!==u?{value:null==s?void 0:s.freeze().getValue(e),override:t.overrideIdentifier?null==s?void 0:s.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:void 0!==g?{value:r.getValue(e),override:t.overrideIdentifier?r.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:m.length?m:void 0}}keys(e){const t=this.getFolderConfigurationModelForResource(void 0,e);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:t?t.freeze().keys:[]}}updateDefaultConfiguration(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(e){this._localUserConfiguration=e,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null, this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(e){this._remoteUserConfiguration=e,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)}deleteFolderConfiguration(e){this.folderConfigurations.delete(e),this._foldersConsolidatedConfigurations.delete(e)}compareAndUpdateDefaultConfiguration(e,t){const i=t.filter(e=>l.OVERRIDE_PROPERTY_PATTERN.test(e)).map(t=>{ const i=l.overrideIdentifierFromKey(t),n=this._defaultConfiguration.getKeysForOverrideIdentifier(i),o=e.getKeysForOverrideIdentifier(i),s=[...o.filter(e=>-1===n.indexOf(e)),...n.filter(e=>-1===o.indexOf(e)),...n.filter(t=>!r.equals(this._defaultConfiguration.override(i).getValue(t),e.override(i).getValue(t)))];return[i,s]});return this.updateDefaultConfiguration(e),{keys:t,overrides:i}}compareAndUpdateLocalUserConfiguration(e){const{added:t,updated:i,removed:n,overrides:o}=c.compare(this.localUserConfiguration,e),s=[...t,...i,...n];return s.length&&this.updateLocalUserConfiguration(e),{keys:s,overrides:o}}compareAndUpdateRemoteUserConfiguration(e){const{added:t,updated:i,removed:n,overrides:o}=c.compare(this.remoteUserConfiguration,e);let s=[...t,...i,...n];return s.length&&this.updateRemoteUserConfiguration(e),{keys:s,overrides:o}}compareAndUpdateWorkspaceConfiguration(e){const{added:t,updated:i,removed:n,overrides:o}=c.compare(this.workspaceConfiguration,e);let s=[...t,...i,...n] ;return s.length&&this.updateWorkspaceConfiguration(e),{keys:s,overrides:o}}compareAndUpdateFolderConfiguration(e,t){const i=this.folderConfigurations.get(e),{added:n,updated:o,removed:s,overrides:r}=c.compare(i,t);let a=[...n,...o,...s];return!a.length&&i||this.updateFolderConfiguration(e,t),{keys:a,overrides:r}}compareAndDeleteFolderConfiguration(e){const t=this.folderConfigurations.get(e);if(!t)throw new Error("Unknown folder");this.deleteFolderConfiguration(e);const{added:i,updated:n,removed:o,overrides:s}=c.compare(t,void 0);return{keys:[...i,...n,...o],overrides:s}}get defaults(){return this._defaultConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){ return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){ let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e},[])}}allKeys(){ const e=new Set;return this._defaultConfiguration.freeze().keys.forEach(t=>e.add(t)),this.userConfiguration.freeze().keys.forEach(t=>e.add(t)),this._workspaceConfiguration.freeze().keys.forEach(t=>e.add(t)),this._folderConfigurations.forEach(t=>t.freeze().keys.forEach(t=>e.add(t))),[...e.values()]}getAllKeysForOverrideIdentifier(e){const t=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(e).forEach(e=>t.add(e)),this.userConfiguration.getKeysForOverrideIdentifier(e).forEach(e=>t.add(e)),this._workspaceConfiguration.getKeysForOverrideIdentifier(e).forEach(e=>t.add(e)),this._folderConfigurations.forEach(i=>i.getKeysForOverrideIdentifier(e).forEach(e=>t.add(e))),[...t.values()]}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),o=this.parseConfigurationModel(e.workspace),s=e.folders.reduce((e,t)=>(e.set(a.URI.revive(t[0]),this.parseConfigurationModel(t[1])),e),new n.ResourceMap);return new f(t,i,new p,o,s,new p,new n.ResourceMap,!1)} static parseConfigurationModel(e){return new p(e.contents,e.keys,e.overrides).freeze()}}t.Configuration=f,t.mergeChanges=function(...e){if(0===e.length)return{keys:[],overrides:[]};if(1===e.length)return e[0];const t=new Set,i=new Map;for(const o of e)o.keys.forEach(e=>t.add(e)),o.overrides.forEach(([e,t])=>{const o=n.getOrSet(i,e,new Set);t.forEach(e=>o.add(e))});const o=[];return i.forEach((e,t)=>o.push([t,[...e.values()]])),{keys:[...t.values()],overrides:o}};class S{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach(e=>o.add(e)),e.overrides.forEach(([,e])=>e.forEach(e=>o.add(e))),this.affectedKeys=[...o.values()];const s=new p;this.affectedKeys.forEach(e=>s.setValue(e,{})),this.affectedKeysTree=s.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=f.parse(this.previous.data)),this._previousConfiguration} affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!r.equals(n,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=c.toValuesTree({[t]:!0},()=>{});for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}t.ConfigurationChangeEvent=S;t.AllKeysConfigurationChangeEvent=class extends S{constructor(e,t,i,n){super({keys:e.allKeys(),overrides:[]},void 0,e,t),this.source=i,this.sourceConfig=n}}})),define(e[82],t([0,1,79,12,32,16]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=t.KeybindingsRegistry=t.KeybindingWeight=void 0,function(e){e[e.EditorCore=0]="EditorCore",e[e.EditorContrib=100]="EditorContrib",e[e.WorkbenchContrib=200]="WorkbenchContrib", e[e.BuiltinExtension=300]="BuiltinExtension",e[e.ExternalExtension=400]="ExternalExtension"}(t.KeybindingWeight||(t.KeybindingWeight={}));class r{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===n.OS){if(e&&e.win)return e.win}else if(2===n.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}static bindToCurrentPlatform2(e){if(1===n.OS){if(e&&e.win)return e.win}else if(2===n.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=r.bindToCurrentPlatform(e);if(t&&t.primary){const o=i.createKeybinding(t.primary,n.OS);o&&this._registerDefaultKeybinding(o,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let o=0,s=t.secondary.length;o=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&r._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,o,s,r){1===n.OS&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:r,weight1:o,weight2:s,extensionId:null}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){ return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(a)),this._cachedMergedKeybindings.slice(0)}}function a(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}t.KeybindingsRegistry=new r,t.Extensions={EditorModes:"platform.keybindingsRegistry"},s.Registry.add(t.Extensions.EditorModes,t.KeybindingsRegistry)}));var c=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);oe===v.CommandPalette}}addCommand(e){return this.addCommands(g.Iterable.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent), h.toDisposable(()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){return this.appendMenuItems(g.Iterable.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new p.LinkedList;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new p.LinkedList,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),h.toDisposable(()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}})}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===v.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)m(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};let f=class extends i.Action{ constructor(e,t,i){super(e,t),this._commandService=i}run(...e){return this._commandService.executeCommand(this.id,...e)}};f=o([r(2,d.ICommandService)],f),t.ExecuteCommandAction=f;class S extends i.SubmenuAction{constructor(e,t,n,o){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,()=>{const s=[],r=t.createMenu(e.submenu,n),a=r.getActions(o);r.dispose();for(let e of a){const[,t]=e;t.length>0&&(s.push(...t),s.push(new i.Separator))}return s.length&&s.pop(),s},"submenu"),this.item=e}}t.SubmenuItemAction=S;let b=class e extends f{constructor(t,i,n,o,s){if("string"==typeof t.title?super(t.id,t.title,s):super(t.id,t.title.value,s),this._cssClass=void 0,this._enabled=!t.precondition||o.contextMatchesRules(t.precondition),this._tooltip=t.tooltip?"string"==typeof t.tooltip?t.tooltip:t.tooltip.value:void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this._checked=o.contextMatchesRules(e.condition), this._checked&&e.tooltip&&(this._tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value)}this._options=n||{},this.item=t,this.alt=i?new e(i,void 0,this._options,o,s):void 0}dispose(){this.alt&&this.alt.dispose(),super.dispose()}run(...e){let t=[];return this._options.arg&&(t=[...t,this._options.arg]),this._options.shouldForwardArgs&&(t=[...t,...e]),super.run(...t)}};b=o([r(3,l.IContextKeyService),r(4,d.ICommandService)],b),t.MenuItemAction=b;class _{constructor(e,t,i,o,s,r){this._id=t,this._label=i,this._keybindings=o,this._keybindingContext=s,this._keybindingWeight=r,this._descriptor=n.createSyncDescriptor(e,this._id,this._label)}static create(e,t,i,n,o,s){return new _(e,t,i,n,o,s)}static from(e,t,i,n){return _.create(e,e.ID,e.LABEL,t,i,n)}get syncDescriptor(){return this._descriptor}get id(){return this._id}get label(){return this._label}get keybindings(){return this._keybindings}get keybindingContext(){return this._keybindingContext}get keybindingWeight(){return this._keybindingWeight}} t.SyncActionDescriptor=_;t.Action2=class{constructor(e){this.desc=e}},t.registerAction2=function(e){const i=new h.DisposableStore,n=new e,o=n.desc,{f1:s,menu:r,keybinding:u,description:g}=o,p=c(o,["f1","menu","keybinding","description"]);if(i.add(d.CommandsRegistry.registerCommand({id:p.id,handler:(e,...t)=>n.run(e,...t),description:g})),Array.isArray(r)?i.add(t.MenuRegistry.appendMenuItems(r.map(e=>({id:e.id,item:Object.assign({command:p},e)})))):r&&i.add(t.MenuRegistry.appendMenuItem(r.id,Object.assign({command:p},r))),s&&(i.add(t.MenuRegistry.appendMenuItem(v.CommandPalette,{command:p,when:p.precondition})),i.add(t.MenuRegistry.addCommand(p))),Array.isArray(u))for(let e of u)a.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},e),{id:p.id,when:p.precondition?l.ContextKeyExpr.and(p.precondition,e.when):e.when}));else u&&a.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},u),{id:p.id,when:p.precondition?l.ContextKeyExpr.and(p.precondition,u.when):u.when})) ;return i}})),define(e[1512],t([0,1,6,2,20,32,8]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuService=void 0;let c=class{constructor(e){this._commandService=e}createMenu(e,t){return new d(e,this._commandService,t,this)}};c=o([r(0,a.ICommandService)],c),t.MenuService=c;let d=class e{constructor(e,t,o,r){this._id=e,this._commandService=t,this._contextKeyService=o,this._menuService=r,this._onDidChange=new i.Emitter,this._dispoables=new n.DisposableStore,this._menuGroups=[],this._contextKeys=new Set,this._build(),this._dispoables.add(i.Event.debounce(i.Event.filter(s.MenuRegistry.onDidChangeMenu,e=>e.has(this._id)),()=>{},50)(this._build,this)),this._dispoables.add(i.Event.debounce(this._contextKeyService.onDidChangeContext,(e,t)=>e||t.affectsSome(this._contextKeys),50)(e=>e&&this._onDidChange.fire(void 0),this))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear() ;const t=s.MenuRegistry.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(let n of t){const t=n.group||"";if(i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(n),e._fillInKbExprKeys(n.when,this._contextKeys),s.isIMenuItem(n)&&n.command.precondition&&e._fillInKbExprKeys(n.command.precondition,this._contextKeys),s.isIMenuItem(n)&&n.command.toggled){const t=n.command.toggled.condition||n.command.toggled;e._fillInKbExprKeys(t,this._contextKeys)}}this._onDidChange.fire(this)}get onDidChange(){return this._onDidChange.event}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=s.isIMenuItem(t)?new s.MenuItemAction(t.command,t.alt,e,this._contextKeyService,this._commandService):new s.SubmenuItemAction(t,this._menuService,this._contextKeyService,e);r.push(i)}r.length>0&&t.push([n,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){ let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let r=t.order||0,a=i.order||0;return ra?1:e._compareTitles(s.isIMenuItem(t)?t.command.title:t.title,s.isIMenuItem(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.value,n="string"==typeof t?t:t.value;return i.localeCompare(n)}};d=o([r(1,a.ICommandService),r(2,l.IContextKeyService),r(3,s.IMenuService)],d)})),define(e[219],t([0,1,8,154,944,82,945]),(function(e,t,i,n,s,a,l){"use strict";function c(e,t){return e.getContext(document.activeElement).getValue(t)}function d(e,n){const o=function(e,t){return e.createScoped(t.target)}(e,n);return function(e,t,n){new i.RawContextKey(n,t).bindTo(e)}(o,n,t.HistoryNavigationWidgetContext),{scopedContextKeyService:o,historyNavigationEnablement:new i.RawContextKey(t.HistoryNavigationEnablementContext,!0).bindTo(o)}}Object.defineProperty(t,"__esModule",{value:!0}), t.ContextScopedReplaceInput=t.ContextScopedFindInput=t.ContextScopedHistoryInputBox=t.createAndBindHistoryNavigationWidgetScopedContextKeyService=t.HistoryNavigationEnablementContext=t.HistoryNavigationWidgetContext=void 0,t.HistoryNavigationWidgetContext="historyNavigationWidget",t.HistoryNavigationEnablementContext="historyNavigationEnabled",t.createAndBindHistoryNavigationWidgetScopedContextKeyService=d;let h=class extends n.HistoryInputBox{constructor(e,t,i,n){super(e,t,i),this._register(d(n,{target:this.element,historyNavigator:this}).scopedContextKeyService)}};h=o([r(3,i.IContextKeyService)],h),t.ContextScopedHistoryInputBox=h;let u=class extends s.FindInput{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(d(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};u=o([r(3,i.IContextKeyService)],u),t.ContextScopedFindInput=u;let g=class extends l.ReplaceInput{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(d(n,{target:this.inputBox.element, historyNavigator:this.inputBox}).scopedContextKeyService)}};g=o([r(3,i.IContextKeyService)],g),t.ContextScopedReplaceInput=g,a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:i.ContextKeyExpr.and(i.ContextKeyExpr.has(t.HistoryNavigationWidgetContext),i.ContextKeyExpr.equals(t.HistoryNavigationEnablementContext,!0)),primary:16,secondary:[528],handler:(e,n)=>{const o=c(e.get(i.IContextKeyService),t.HistoryNavigationWidgetContext);if(o){o.historyNavigator.showPreviousValue()}}}),a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:i.ContextKeyExpr.and(i.ContextKeyExpr.has(t.HistoryNavigationWidgetContext),i.ContextKeyExpr.equals(t.HistoryNavigationEnablementContext,!0)),primary:18,secondary:[530],handler:(e,n)=>{const o=c(e.get(i.IContextKeyService),t.HistoryNavigationWidgetContext);if(o){o.historyNavigator.showNextValue()}}})})),define(e[428],t([0,1,14,20,32]),(function(e,t,i,n,o){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.KeybindingResolver=void 0;class s{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let t=0,i=e.length;t=0;i--)this._isTargetedForRemoval(e[i],o,s,t,r)&&e.splice(i,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){let n=i[e];if(n.command===t.command)continue;const o=n.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&n.keypressParts[1]!==t.keypressParts[1]||s.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i9===e.type?e.expr:[e];let n=i(e.negate()).concat(i(t));for(let e=0;e=0;e--)i[n++]=t[e];return i}lookupPrimaryKeybinding(e){let t=this._lookupMap.get(e);return void 0===t||0===t.length?null:t[t.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${r(o.when)}, source: ${a(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${r(o.when)}, source: ${a(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(s.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}static getAllUnboundCommands(e){const t=[],s=new Map,r=(n,r)=>{if(!s.has(n)&&(s.set(n,!0),"_"!==n[0]&&0!==n.indexOf("vscode.")&&!0!==e.get(n))){if(!r){const e=o.CommandsRegistry.getCommand(n);if(e&&"object"==typeof e.description&&i.isNonEmptyArray(e.description.args))return} t.push(n)}};for(const e of n.MenuRegistry.getCommands().keys())r(e,!0);for(const e of o.CommandsRegistry.getCommands().keys())r(e,!1);return t}}function r(e){return e?`${e.serialize()}`:"no when condition"}function a(e){return e.isDefault?e.extensionId?`built-in extension ${e.extensionId}`:"built-in":e.extensionId?`user extension ${e.extensionId}`:"user"}t.KeybindingResolver=s})),define(e[1513],t([0,1,6,2,41,32,9,8,428]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyService=t.AbstractContextKeyService=t.Context=void 0;const h="data-keybinding-context";class u{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}updateParent(e){this._parent=e}collectAllValues(){ let e=this._parent?this._parent.collectAllValues():Object.create(null);return delete(e=Object.assign(Object.assign({},e),this._value))._contextId,e}}t.Context=u;class g extends u{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}collectAllValues(){return Object.create(null)}}g.INSTANCE=new g;class p extends u{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=new Map,this._listener=this._configurationService.onDidChangeConfiguration(e=>{if(6===e.source){const e=Array.from(this._values.keys());this._values.clear(),i.fire(new f(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`;this._values.has(e)&&(this._values.delete(e),t.push(e))}i.fire(new f(t))}})}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(p._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(p._keyPrefix.length),i=this._configurationService.getValue(t);let n=void 0;switch(typeof i){case"number": case"boolean":case"string":n=i;break;default:Array.isArray(i)&&(n=JSON.stringify(i))}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}collectAllValues(){const e=Object.create(null);return this._values.forEach((t,i)=>e[i]=t),Object.assign(Object.assign({},e),super.collectAllValues())}}p._keyPrefix="config.";class m{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class v{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class f{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class S{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class b{constructor(e){ this._onDidChangeContext=new i.PauseableEmitter({merge:e=>new S(e)}),this._isDisposed=!1,this._myContextId=e}get contextId(){return this._myContextId}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new m(this,e,t)}get onDidChangeContext(){return this._onDidChangeContext.event}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new C(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return d.KeybindingResolver.contextMatchesRules(t,e)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId) ;i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new v(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new v(e))}getContext(e){return this._isDisposed?g.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(h)){const t=e.getAttribute(h);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}t.AbstractContextKeyService=b;let _=class extends b{constructor(e){super(0),this._contexts=new Map,this._toDispose=new n.DisposableStore,this._lastContextId=0;const t=new p(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?g.INSTANCE:this._contexts.get(e)||g.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId ;return this._contexts.set(t,new u(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}updateParent(e){throw new Error("Cannot update parent of root ContextKeyService")}};_=o([r(0,l.IConfigurationService)],_),t.ContextKeyService=_;class C extends b{constructor(e,t){super(e.createChildContext()),this._parent=e,this.updateParentChangeListener(),t&&(this._domNode=t,this._domNode.setAttribute(h,String(this._myContextId)))}updateParentChangeListener(){this._parentChangeListener&&this._parentChangeListener.dispose(),this._parentChangeListener=this._parent.onDidChangeContext(e=>{this._onDidChangeContext.fire(e)})}dispose(){var e;this._isDisposed=!0,this._parent.disposeContext(this._myContextId),null===(e=this._parentChangeListener)||void 0===e||e.dispose(),this._domNode&&(this._domNode.removeAttribute(h),this._domNode=void 0)}get onDidChangeContext(){return this._onDidChangeContext.event}getContextValuesContainer(e){ return this._isDisposed?g.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}updateParent(e){var t;if(!e)return void(null===(t=this._parentChangeListener)||void 0===t||t.dispose());const i=this._parent.getContextValuesContainer(this._myContextId),n=i.collectAllValues();this._parent=e,this.updateParentChangeListener();const o=this._parent.getContextValuesContainer(this._parent.contextId);i.updateParent(o);const r=i.collectAllValues(),a=Object.assign(Object.assign({},s.distinct(n,r)),s.distinct(r,n)),l=Object.keys(a);this._onDidChangeContext.fire(new f(l))}}a.CommandsRegistry.registerCommand(c.SET_CONTEXT_COMMAND_ID,(function(e,t,i){e.get(c.IContextKeyService).createKey(String(t),i)}))})),define(e[157],t([0,1,16,14,2]),(function(e,t,i,n,o){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.QuickAccessRegistry=t.Extensions=t.DefaultQuickAccessFilterValue=void 0,function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(t.DefaultQuickAccessFilterValue||(t.DefaultQuickAccessFilterValue={})),t.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class s{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),o.toDisposable(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return n.coalesce([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0||this.defaultProvider}clear(){const e=[...this.providers],t=this.defaultProvider;return this.providers=[],this.defaultProvider=void 0,()=>{this.providers=e, this.defaultProvider=t}}}t.QuickAccessRegistry=s,i.Registry.add(t.Extensions.Quickaccess,new s)})),define(e[1514],t([0,1,49,157,16,1041,2]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HelpQuickAccessProvider=void 0;let c=class e{constructor(e){this.quickInputService=e,this.registry=s.Registry.as(n.Extensions.Quickaccess)}provide(t){const i=new l.DisposableStore;i.add(t.onDidAccept(()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})})),i.add(t.onDidChangeValue(t=>{const i=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));i&&i.prefix&&i.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})}));const{editorProviders:n,globalProviders:o}=this.getQuickAccessProviders();return t.items=0===n.length||0===o.length?[...0===n.length?o:n]:[{label:a.localize(0,null),type:"separator"},...o,{label:a.localize(1,null),type:"separator"},...n],i}getQuickAccessProviders(){const t=[],i=[] ;for(const n of this.registry.getQuickAccessProviders().sort((e,t)=>e.prefix.localeCompare(t.prefix)))if(n.prefix!==e.PREFIX)for(const e of n.helpEntries){const o=e.prefix||n.prefix,s=o||"…";(e.needsEditor?i:t).push({prefix:o,label:s,ariaLabel:a.localize(2,null,s,e.description),description:e.description})}return{editorProviders:i,globalProviders:t}}};c.PREFIX="?",c=o([r(0,i.IQuickInputService)],c),t.HelpQuickAccessProvider=c})),define(e[1515],t([0,1,49,2,157,16,31,5,135]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickAccessController=void 0;let h=class extends n.Disposable{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=a.Registry.as(s.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){var o;const[r,a]=this.getOrInstantiateProvider(e),l=this.visibleQuickAccess,c=null==l?void 0:l.descriptor ;if(l&&a&&c===a)return e===a.prefix||(null==t?void 0:t.preserveValue)||(l.picker.value=e),void this.adjustValueSelection(l.picker,a,t);if(a&&!(null==t?void 0:t.preserveValue)){let t=void 0;if(l&&c&&c!==a){const e=l.value.substr(c.prefix.length);e&&(t=`${a.prefix}${e}`)}if(!t){const e=null==r?void 0:r.defaultFilterValue;e===s.DefaultQuickAccessFilterValue.LAST?t=this.lastAcceptedPickerValues.get(a):"string"==typeof e&&(t=`${a.prefix}${e}`)}"string"==typeof t&&(e=t)}const d=new n.DisposableStore,h=d.add(this.quickInputService.createQuickPick());h.value=e,this.adjustValueSelection(h,a,t),h.placeholder=null==a?void 0:a.placeholder,h.quickNavigate=null==t?void 0:t.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!l,("number"==typeof(null==t?void 0:t.itemActivation)||(null==t?void 0:t.quickNavigateConfiguration))&&(h.itemActivation=null!==(o=null==t?void 0:t.itemActivation)&&void 0!==o?o:i.ItemActivation.SECOND),h.contextKey=null==a?void 0:a.contextKey,h.filterValue=e=>e.substring(a?a.prefix.length:0), (null==a?void 0:a.placeholder)&&(h.ariaLabel=null==a?void 0:a.placeholder);const u=this.registerPickerListeners(h,r,a,e,d);r&&d.add(r.provide(h,u)),h.show()}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,o,s){const r=this.visibleQuickAccess={picker:e,descriptor:i,value:o};s.add(n.toDisposable(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):r.value=e})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)}));const a=s.add(new l.CancellationTokenSource);return d.once(e.onDidHide)(()=>{0===e.selectedItems.length&&a.cancel(),s.dispose()}),a.token}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0] ;let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};h=o([r(0,i.IQuickInputService),r(1,c.IInstantiationService)],h),t.QuickAccessController=h})),define(e[1516],t([0,1,29,6,2]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteAuthorityResolverService=void 0;class s extends o.Disposable{constructor(e){super(),this._onDidChangeConnectionData=this._register(new n.Emitter),this.onDidChangeConnectionData=this._onDidChangeConnectionData.event,this._cache=new Map,this._connectionTokens=new Map,e&&i.RemoteAuthorities.setDelegate(e)}async resolveAuthority(e){if(!this._cache.has(e)){const t=this._doResolveAuthority(e);i.RemoteAuthorities.set(e,t.authority.host,t.authority.port),this._cache.set(e,t),this._onDidChangeConnectionData.fire()}return this._cache.get(e)}getConnectionData(e){if(!this._cache.has(e))return null;const t=this._cache.get(e),i=this._connectionTokens.get(e) ;return{host:t.authority.host,port:t.authority.port,connectionToken:i}}_doResolveAuthority(e){if(e.indexOf(":")>=0){const t=e.split(":");return{authority:{authority:e,host:t[0],port:parseInt(t[1],10)}}}return{authority:{authority:e,host:e,port:80}}}_clearResolvedAuthority(e){}_setResolvedAuthority(e){}_setResolvedAuthorityError(e,t){}_setAuthorityConnectionToken(e,t){this._connectionTokens.set(e,t),i.RemoteAuthorities.setConnectionToken(e,t),this._onDidChangeConnectionData.fire()}}t.RemoteAuthorityResolverService=s})),define(e[158],t([0,1,5]),(function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteAuthorityResolverError=t.RemoteAuthorityResolverErrorCode=t.IRemoteAuthorityResolverService=void 0,t.IRemoteAuthorityResolverService=i.createDecorator("remoteAuthorityResolverService"),function(e){e.Unknown="Unknown",e.NotAvailable="NotAvailable",e.TemporarilyNotAvailable="TemporarilyNotAvailable",e.NoResolverFound="NoResolverFound" }(n=t.RemoteAuthorityResolverErrorCode||(t.RemoteAuthorityResolverErrorCode={}));class o extends Error{constructor(e,t=n.Unknown,i){super(e),this._message=e,this._code=t,this._detail=i,this.isHandled=t===n.NotAvailable&&!0===i,"function"==typeof Object.setPrototypeOf&&Object.setPrototypeOf(this,o.prototype)}static isTemporarilyNotAvailable(e){return e instanceof o&&e._code===n.TemporarilyNotAvailable}static isNoResolverFound(e){return e instanceof o&&e._code===n.NoResolverFound}static isHandled(e){return e instanceof o&&e.isHandled}}t.RemoteAuthorityResolverError=o})),define(e[1517],t([0,1,66,2,6,7,15,158]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserSocketFactory=t.defaultWebSocketFactory=void 0;class l extends n.Disposable{constructor(e){super(),this._onData=new o.Emitter,this.onData=this._onData.event,this._onClose=this._register(new o.Emitter),this.onClose=this._onClose.event,this._onError=this._register(new o.Emitter),this.onError=this._onError.event, this._socket=e,this._fileReader=new FileReader,this._queue=[],this._isReading=!1,this._isClosed=!1,this._fileReader.onload=e=>{this._isReading=!1;const i=e.target.result;this._onData.fire(i),this._queue.length>0&&t(this._queue.shift())};const t=e=>{this._isReading?this._queue.push(e):(this._isReading=!0,this._fileReader.readAsArrayBuffer(e))};this._socketMessageListener=e=>{t(e.data)},this._socket.addEventListener("message",this._socketMessageListener),this.onOpen=o.Event.fromDOMEventEmitter(this._socket,"open");let i=null;const n=()=>{const e=i;i=null,this._onError.fire(e)},l=this._register(new r.RunOnceScheduler(n,0)),c=e=>{l.cancel(),i=e,n()};this._register(s.addDisposableListener(this._socket,"close",e=>{this._isClosed=!0,i&&(window.navigator.onLine?e.wasClean?(l.cancel(), n()):c(new a.RemoteAuthorityResolverError(e.reason||`WebSocket close with status code ${e.code}`,a.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,e)):c(new a.RemoteAuthorityResolverError("Browser is offline",a.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,e))),this._onClose.fire()})),this._register(s.addDisposableListener(this._socket,"error",e=>{l.cancel(),i=e,l.schedule()}))}send(e){this._isClosed||this._socket.send(e)}close(){this._isClosed=!0,this._socket.close(),this._socket.removeEventListener("message",this._socketMessageListener),this.dispose()}}t.defaultWebSocketFactory=new class{create(e){return new l(new WebSocket(e))}};class c{constructor(e){this.socket=e}dispose(){this.socket.close()}onData(e){return this.socket.onData(t=>e(i.VSBuffer.wrap(new Uint8Array(t))))}onClose(e){return this.socket.onClose(e)}onEnd(e){return n.Disposable.None}write(e){this.socket.send(e.buffer)}end(){this.socket.close()}drain(){return Promise.resolve()}}t.BrowserSocketFactory=class{constructor(e){ this._webSocketFactory=e||t.defaultWebSocketFactory}connect(e,t,i,n){const o=this._webSocketFactory.create(`ws://${e}:${t}/?${i}&skipWebSocketFrames=false`),s=o.onError(e=>n(e,void 0));o.onOpen(()=>{s.dispose(),n(void 0,new c(o))})}}})),define(e[562],t([0,1,734,92,2,66,6,158,21,15]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionHostPersistentConnection=t.ManagementPersistentConnection=t.ReconnectionPermanentFailureEvent=t.ConnectionGainEvent=t.ReconnectionRunningEvent=t.ReconnectionWaitEvent=t.ConnectionLostEvent=t.PersistentConnectionEventType=t.connectRemoteAgentTunnel=t.connectRemoteAgentExtensionHost=t.connectRemoteAgentManagement=t.ConnectionType=void 0;const d=12e4,h=3e4;async function u(e,t,n){const o=R(e,t),{protocol:r,ownsProtocol:a}=await new Promise((t,n)=>{e.logService.trace(`${o} 1/6. invoking socketFactory.connect().`), e.socketFactory.connect(e.host,e.port,`reconnectionToken=${e.reconnectionToken}&reconnection=${e.reconnectionProtocol?"true":"false"}`,(s,r)=>{if(s||!r)return e.logService.error(`${o} socketFactory.connect() failed. Error:`),e.logService.error(s),void n(s);e.logService.trace(`${o} 2/6. socketFactory.connect() was successful.`),e.reconnectionProtocol?(e.reconnectionProtocol.beginAcceptReconnection(r,null),t({protocol:e.reconnectionProtocol,ownsProtocol:!1})):t({protocol:new i.PersistentProtocol(r,null),ownsProtocol:!0})})});return new Promise((i,l)=>{const c=setTimeout(()=>{const t=new Error("handshake timeout");t.code="ETIMEDOUT",t.syscall="connect",e.logService.error(`${o} the handshake took longer than 10 seconds. Error:`),e.logService.error(t),a&&k(r),l(t)},1e4),d=r.onControlMessage(async h=>{const u=JSON.parse(h.toString());d.dispose();const g=D(u);if(g)return e.logService.error(`${o} received error control message when negotiating connection. Error:`),e.logService.error(g),a&&k(r),l(g) ;if("sign"===u.type){e.logService.trace(`${o} 4/6. received SignRequest control message.`);const l=await e.signService.sign(u.data),d={type:"connectionType",commit:e.commit,signedData:l,desiredConnectionType:t};n&&(d.args=n),e.logService.trace(`${o} 5/6. sending ConnectionTypeRequest control message.`),r.sendControl(s.VSBuffer.fromString(JSON.stringify(d))),clearTimeout(c),i({protocol:r,ownsProtocol:a})}else{const t=new Error("handshake error");e.logService.error(`${o} received unexpected control message. Error:`),e.logService.error(t),a&&k(r),l(t)}});e.logService.trace(`${o} 3/6. sending AuthRequest control message.`);r.sendControl(s.VSBuffer.fromString(JSON.stringify({type:"auth",auth:"00000000000000000000"})))})}async function g(e,t,i){const n=Date.now(),o=R(e,t),{protocol:s,ownsProtocol:r}=await u(e,t,i);return new Promise((t,i)=>{const a=s.onControlMessage(l=>{a.dispose();const c=JSON.parse(l.toString()),d=D(c) ;if(d)return e.logService.error(`${o} received error control message when negotiating connection. Error:`),e.logService.error(d),r&&k(s),i(d);e.reconnectionProtocol&&e.reconnectionProtocol.endAcceptReconnection(),e.logService.trace(`${o} 6/6. handshake finished, connection is up and running after ${A(n)}!`),t({protocol:s,firstMessage:c})})})}async function p(e){const{protocol:t}=await g(e,1,void 0);return{protocol:t}}async function m(e,t){const{protocol:i,firstMessage:n}=await g(e,2,t);return{protocol:i,debugPort:n&&n.debugPort}}async function v(e,t,i){const{host:n,port:o}=await e.addressProvider.getAddress();return{commit:e.commit,host:n,port:o,reconnectionToken:t,reconnectionProtocol:i,socketFactory:e.socketFactory,signService:e.signService,logService:e.logService}}function f(e){return c.createCancelablePromise(t=>new Promise((i,n)=>{const o=setTimeout(i,1e3*e);t.onCancellationRequested(()=>{clearTimeout(o),i()})}))}!function(e){e[e.Management=1]="Management",e[e.ExtensionHost=2]="ExtensionHost", e[e.Tunnel=3]="Tunnel"}(t.ConnectionType||(t.ConnectionType={})),t.connectRemoteAgentManagement=async function(e,t,i){try{const o=n.generateUuid(),s=await v(e,o,null),{protocol:r}=await x(s.logService,p(s),d);return new E(e,t,i,o,r)}catch(t){throw e.logService.error("[remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:"),e.logService.error(t),w.triggerPermanentFailure(),t}},t.connectRemoteAgentExtensionHost=async function(e,t){try{const i=n.generateUuid(),o=await v(e,i,null),{protocol:s,debugPort:r}=await x(o.logService,m(o,t),d);return new I(e,t,i,s,r)}catch(t){throw e.logService.error("[remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:"),e.logService.error(t),w.triggerPermanentFailure(),t}},t.connectRemoteAgentTunnel=async function(e,t){const i=await v(e,n.generateUuid(),null);return await x(i.logService,async function(e,t){ const i=Date.now(),n=R(e,3),{protocol:o}=await u(e,3,t);return e.logService.trace(`${n} 6/6. handshake finished, connection is up and running after ${A(i)}!`),o}(i,{port:t}),d)},function(e){e[e.ConnectionLost=0]="ConnectionLost",e[e.ReconnectionWait=1]="ReconnectionWait",e[e.ReconnectionRunning=2]="ReconnectionRunning",e[e.ReconnectionPermanentFailure=3]="ReconnectionPermanentFailure",e[e.ConnectionGain=4]="ConnectionGain"}(t.PersistentConnectionEventType||(t.PersistentConnectionEventType={}));class S{constructor(){this.type=0}}t.ConnectionLostEvent=S;class b{constructor(e,t){this.durationSeconds=e,this.cancellableTimer=t,this.type=1}skipWait(){this.cancellableTimer.cancel()}}t.ReconnectionWaitEvent=b;class _{constructor(){this.type=2}}t.ReconnectionRunningEvent=_;class C{constructor(){this.type=4}}t.ConnectionGainEvent=C;class y{constructor(){this.type=3}}t.ReconnectionPermanentFailureEvent=y;class w extends o.Disposable{constructor(e,t,i,n){super(),this._connectionType=e, this._onDidStateChange=this._register(new r.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._options=t,this.reconnectionToken=i,this.protocol=n,this._isReconnecting=!1,this._onDidStateChange.fire(new C),this._register(n.onSocketClose(()=>this._beginReconnecting())),this._register(n.onSocketTimeout(()=>this._beginReconnecting())),w._instances.push(this),w._permanentFailure&&this._gotoPermanentFailure()}static triggerPermanentFailure(){this._permanentFailure=!0,this._instances.forEach(e=>e._gotoPermanentFailure())}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(w._permanentFailure)return;const e=T(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${e} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new S);const t=[5,5,10,10,10,10,10,30],i=Date.now();let n=-1;do{ const o=++n108e5){ this._options.logService.error(`${e} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time has expired! Will give up now! Error:`),this._options.logService.error(t),w.triggerPermanentFailure();break}if(a.RemoteAuthorityResolverError.isTemporarilyNotAvailable(t)){this._options.logService.info(`${e} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(t);continue}if(("ETIMEDOUT"===t.code||"ENETUNREACH"===t.code||"ECONNREFUSED"===t.code||"ECONNRESET"===t.code)&&"connect"===t.syscall){this._options.logService.info(`${e} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(t);continue}if(l.isPromiseCanceledError(t)){this._options.logService.info(`${e} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(t);continue} this._options.logService.error(`${e} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`),this._options.logService.error(t),w.triggerPermanentFailure();break}}while(!w._permanentFailure)}_gotoPermanentFailure(){this._onDidStateChange.fire(new y),k(this.protocol)}}w._permanentFailure=!1,w._instances=[];class E extends w{constructor(e,t,n,o,s){super(1,e,o,s),this.client=this._register(new i.Client(s,{remoteAuthority:t,clientId:n},e.ipcLogger))}async _reconnect(e){await p(e)}}t.ManagementPersistentConnection=E;class I extends w{constructor(e,t,i,n,o){super(2,e,i,n),this._startArguments=t,this.debugPort=o}async _reconnect(e){await m(e,this._startArguments)}}function x(e,t,i){return new Promise((n,o)=>{let s=setTimeout(()=>{const t=new Error("Time limit reached");t.code="ETIMEDOUT",t.syscall="connect",e.error("[remote-connection] The time limit has been reached for a connection. Error:"),e.error(t),o(t)},i) ;t.then(e=>{clearTimeout(s),n(e)},e=>{clearTimeout(s),o(e)})})}function k(e){try{e.acceptDisconnect();const t=e.getSocket();e.dispose(),t.dispose()}catch(e){l.onUnexpectedError(e)}}function D(e){if(e&&"error"===e.type){const t=new Error(`Connection error: ${e.reason}`);return t.code="VSCODE_CONNECTION_ERROR",t}return null}function T(e,t,i){return`[remote-connection][${function(e,t){for(;e.length{this._tunnelProvider=void 0}}):{dispose:()=>{}}} get tunnels(){const e=[];return Array.from(this._tunnels.values()).forEach(t=>Array.from(t.values()).forEach(t=>e.push(t.value))),Promise.all(e)}dispose(){for(const e of this._tunnels.values()){for(const{value:t}of e.values())t.then(e=>e.dispose());e.clear()}this._tunnels.clear()}openTunnel(e,t,i,n){if(!e)return;t||(t="localhost");const o=this.retainOrCreateTunnel(e,t,i,n);return o?o.then(e=>{const n=this.makeTunnel(e);return e.tunnelRemoteHost===t&&e.tunnelRemotePort===i||this.logService.warn("Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),this._onTunnelOpened.fire(n),n}):o}makeTunnel(e){return{tunnelRemotePort:e.tunnelRemotePort,tunnelRemoteHost:e.tunnelRemoteHost,tunnelLocalPort:e.tunnelLocalPort,localAddress:e.localAddress,dispose:()=>{const t=this._tunnels.get(e.tunnelRemoteHost);if(t){const i=t.get(e.tunnelRemotePort);i&&(i.refcount--,this.tryDisposeTunnel(e.tunnelRemoteHost,e.tunnelRemotePort,i))}}}}async tryDisposeTunnel(e,t,i){if(i.refcount<=0){ const n=i.value.then(e=>{e.dispose(!0),this._onTunnelClosed.fire({host:e.tunnelRemoteHost,port:e.tunnelRemotePort})});return this._tunnels.has(e)&&this._tunnels.get(e).delete(t),n}}async closeTunnel(e,t){const i=this._tunnels.get(e);if(i&&i.has(t)){const n=i.get(t);n.refcount=0,await this.tryDisposeTunnel(e,t,n)}}addTunnelToMap(e,t,i){this._tunnels.has(e)||this._tunnels.set(e,new Map),this._tunnels.get(e).set(t,{refcount:1,value:i})}getTunnelFromMap(e,t){const i="localhost"===(n=e)?"127.0.0.1":"127.0.0.1"===n?"localhost":void 0;var n;let o;if(i){const t=this._tunnels.get(e),n=this._tunnels.get(i);o=t&&n?new Map([...Array.from(t.entries()),...Array.from(n.entries())]):null!=t?t:n}else o=this._tunnels.get(e);return o?o.get(t):void 0}};a=o([r(0,s.ILogService)],a),t.AbstractTunnelService=a;t.TunnelService=class extends a{retainOrCreateTunnel(e,t,i,n){const o=this.getTunnelFromMap(t,i);if(o)return++o.refcount,o.value;if(this._tunnelProvider){const e=this._tunnelProvider.forwardPort({remoteAddress:{host:t,port:i}}) ;return e&&this.addTunnelToMap(t,i,e),e}}}})),define(e[1518],t([0,1,9,39,735]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestService=void 0;let a=class{constructor(e,t){this.configurationService=e,this.logService=t}request(e,t){return this.logService.trace("RequestService#request",e.url),e.proxyAuthorization||(e.proxyAuthorization=this.configurationService.getValue("http.proxyAuthorization")),s.request(e,t)}async resolveProxy(e){}};a=o([r(0,i.IConfigurationService),r(1,n.ILogService)],a),t.RequestService=a})),define(e[167],t([0,1,1042,5,57,16,66]),(function(e,t,i,n,o,s,r){"use strict";function a(e){return e.res.statusCode&&e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function l(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.asJson=t.asText=t.isSuccess=t.IRequestService=void 0,t.IRequestService=n.createDecorator("requestService"),t.isSuccess=a,t.asText=async function(e){ if(!a(e))throw new Error("Server returned "+e.res.statusCode);return l(e)?null:(await r.streamToBuffer(e.stream)).toString()},t.asJson=async function(e){if(!a(e))throw new Error("Server returned "+e.res.statusCode);if(l(e))return null;const t=(await r.streamToBuffer(e.stream)).toString();try{return JSON.parse(t)}catch(e){throw e.message+=":\n"+t,e}},s.Registry.as(o.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:i.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:i.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:i.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:i.localize(3,null)},"http.proxySupport":{type:"string",enum:["off","on","override"],enumDescriptions:[i.localize(4,null),i.localize(5,null),i.localize(6,null)],default:"override",description:i.localize(7,null)}, "http.systemCertificates":{type:"boolean",default:!0,description:i.localize(8,null)}}})})),define(e[1519],t([0,1,167,31,25,29]),(function(e,t,i,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadService=void 0;let l=class{constructor(e,t){this.requestService=e,this.fileService=t}async download(e,t,o=n.CancellationToken.None){if(e.scheme===a.Schemas.file||e.scheme===a.Schemas.vscodeRemote)return void await this.fileService.copy(e,t);const s={type:"GET",url:e.toString()},r=await this.requestService.request(s,o);if(200!==r.res.statusCode){const e=await i.asText(r);throw new Error(`Expected 200, got back ${r.res.statusCode} instead.\n\n${e}`)}await this.fileService.writeFile(t,r.stream)}};l=o([r(0,i.IRequestService),r(1,s.IFileService)],l),t.DownloadService=l})),define(e[1520],t([0,1,61,25,14,141,167,31,39,17,1470,2]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTipsService=void 0;let p=class extends g.Disposable{ constructor(e,t,i,n){super(),this.fileService=e,this.productService=t,this.requestService=i,this.logService=n,this.allConfigBasedTips=new Map,this.productService.configBasedExtensionTips&&a.forEach(this.productService.configBasedExtensionTips,({value:e})=>this.allConfigBasedTips.set(e.configPath,e))}getConfigBasedTips(e){return this.getValidConfigBasedTips(e)}getAllWorkspacesTips(){return this.fetchWorkspacesTips()}async getImportantExecutableBasedTips(){return[]}async getOtherExecutableBasedTips(){return[]}async getValidConfigBasedTips(e){const t=[];for(const[i,n]of this.allConfigBasedTips)try{const o=await this.fileService.readFile(h.joinPath(e,i)),r=new Map;a.forEach(n.recommendations,({key:e,value:i})=>{if(s.isNonEmptyArray(i.remotes))for(const t of i.remotes)r.set(t,{extensionId:e,extensionName:i.name,configName:n.configName,important:!!i.important,isExtensionPack:!!i.isExtensionPack});else t.push({extensionId:e,extensionName:i.name,configName:n.configName,important:!!i.important, isExtensionPack:!!i.isExtensionPack})});const l=u.getDomainsOfRemotes(o.value.toString(),[...r.keys()]);for(const e of l){const i=r.get(e);i&&t.push(i)}}catch(e){}return t}async fetchWorkspacesTips(){var e,t;if(!(null===(e=this.productService.extensionsGallery)||void 0===e?void 0:e.recommendationsUrl))return[];try{const e=await this.requestService.request({type:"GET",url:null===(t=this.productService.extensionsGallery)||void 0===t?void 0:t.recommendationsUrl},c.CancellationToken.None);if(200!==e.res.statusCode)return[];const i=await l.asJson(e);return i&&i.workspaceRecommendations||[]}catch(e){return this.logService.error(e),[]}}};p=o([r(0,n.IFileService),r(1,i.IProductService),r(2,l.IRequestService),r(3,d.ILogService)],p),t.ExtensionTipsService=p})),define(e[1521],t([0,1,31,66]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestChannelClient=t.RequestChannel=void 0;t.RequestChannel=class{constructor(e){this.service=e}listen(e,t){throw new Error("Invalid listen")} call(e,t,o){switch(t){case"request":return this.service.request(o[0],i.CancellationToken.None).then(async({res:e,stream:t})=>{const i=await n.streamToBuffer(t);return[{statusCode:e.statusCode,headers:e.headers},i]})}throw new Error("Invalid call")}};class o{constructor(e){this.channel=e}async request(e,t){return o.request(this.channel,e,t)}static async request(e,t,i){const[o,s]=await e.call("request",[t]);return{res:o,stream:n.bufferToStream(s)}}}t.RequestChannelClient=o})),define(e[1522],t([0,1,5,133,2]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebResourceIdentityService=t.IResourceIdentityService=void 0,t.IResourceIdentityService=i.createDecorator("IResourceIdentityService");class s extends o.Disposable{async resolveResourceIdentity(e){return n.hash(e.toString()).toString(16)}}t.WebResourceIdentityService=s})),define(e[356],t([0,1,92,66]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getServiceMachineId=void 0, t.getServiceMachineId=async function(e,t,o){let s=o&&o.get("storage.serviceMachineId",0)||null;if(s)return s;try{const n=(await t.readFile(e.serviceMachineIdResource)).value.toString();s=i.isUUID(n)?n:null}catch(e){s=null}if(!s){s=i.generateUuid();try{await t.writeFile(e.serviceMachineIdResource,n.VSBuffer.fromString(s))}catch(e){}}return o&&o.store("storage.serviceMachineId",s,0),s}})),define(e[1523],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignService=void 0;t.SignService=class{constructor(e){this._tkn=e||null}async sign(e){return this._tkn||""}}})),define(e[357],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISignService=t.SIGN_SERVICE_ID=void 0,t.SIGN_SERVICE_ID="signService",t.ISignService=i.createDecorator(t.SIGN_SERVICE_ID)})),define(e[26],t([0,1,5,6,2,13]),(function(e,t,i,n,o,s){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}), t.logStorage=t.InMemoryStorageService=t.StorageScope=t.WillSaveStateReason=t.IStorageService=t.IS_NEW_KEY=void 0,t.IS_NEW_KEY="__$__isNewStorageMarker",t.IStorageService=i.createDecorator("storageService"),function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(r=t.WillSaveStateReason||(t.WillSaveStateReason={})),function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={}));class a extends o.Disposable{constructor(){super(...arguments),this._onDidChangeStorage=this._register(new n.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this._onWillSaveState=this._register(new n.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.globalCache=new Map,this.workspaceCache=new Map}getCache(e){return 0===e?this.globalCache:this.workspaceCache}get(e,t,i){const n=this.getCache(t).get(e);return s.isUndefinedOrNull(n)?i:n}getBoolean(e,t,i){const n=this.getCache(t).get(e);return s.isUndefinedOrNull(n)?i:"true"===n}getNumber(e,t,i){ const n=this.getCache(t).get(e);return s.isUndefinedOrNull(n)?i:parseInt(n,10)}store(e,t,i){if(s.isUndefinedOrNull(t))return this.remove(e,i);const n=String(t);return this.getCache(i).get(e)===n?Promise.resolve():(this.getCache(i).set(e,n),this._onDidChangeStorage.fire({scope:i,key:e}),Promise.resolve())}remove(e,t){return this.getCache(t).delete(e)?(this._onDidChangeStorage.fire({scope:t,key:e}),Promise.resolve()):Promise.resolve()}logStorage(){l(this.globalCache,this.workspaceCache,"inMemory","inMemory")}async migrate(e){}flush(){this._onWillSaveState.fire({reason:r.NONE})}isNew(){return!0}async close(){}}async function l(e,t,i,n){const o=e=>{try{return JSON.parse(e)}catch(t){return e}},s=new Map,r=new Map;e.forEach((e,t)=>{s.set(t,e),r.set(t,o(e))});const a=new Map,l=new Map;t.forEach((e,t)=>{a.set(t,e),l.set(t,o(e))}),console.group(`Storage: Global (path: ${i})`);let c=[];s.forEach((e,t)=>{c.push({key:t,value:e})}),console.table(c),console.groupEnd(),console.log(r), console.group(`Storage: Workspace (path: ${n})`);let d=[];a.forEach((e,t)=>{d.push({key:t,value:e})}),console.table(d),console.groupEnd(),console.log(l)}t.InMemoryStorageService=a,t.logStorage=l})),define(e[1524],t([0,1,67,26,45,2,15,5,9,33,50]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISuggestMemoryService=t.SuggestMemoryService=t.PrefixMemory=t.LRUMemory=t.NoMemory=t.Memory=void 0;class g{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;let n=i[0].score[0];for(let e=0;ea&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(a=o.touch,r=t),i[t].completion.preselect&&-1===s)return t}return-1!==r?r:-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:s.completionKindFromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}t.LRUMemory=m;class v extends g{constructor(){super("recentlyUsedByPrefix"),this._trie=i.TernarySearchTree.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageIdentifier().language}/${n}`;this._trie.set(o,{ type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let o=`${e.getLanguageIdentifier().language}/${n}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;ee.push([i,t])),e.sort((e,t)=>-(e[1].touch-t[1].touch)).forEach((e,t)=>e[1].touch=t),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:s.completionKindFromString(i.type),this._trie.set(t,i)}}}t.PrefixMemory=v;let f=class e{constructor(e,t,i){this._storageService=e,this._modeService=t,this._configService=i,this._disposables=new a.DisposableStore,this._persistSoon=new l.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(e=>{ e.reason===n.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(t,i){var n,o;const s=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(n=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(i.lineNumber,i.column)))||void 0===n?void 0:n.language,resource:t.uri});if((null===(o=this._strategy)||void 0===o?void 0:o.name)!==s){this._saveState();const t=e._strategyCtors.get(s)||p;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=this._storageService.get(`${e._storagePrefix}/${s}`,t);i&&this._strategy.fromJSON(JSON.parse(i))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){ const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,i,t)}}};f._strategyCtors=new Map([["recentlyUsedByPrefix",v],["recentlyUsed",m],["first",p]]),f._storagePrefix="suggest/memories",f=o([r(0,n.IStorageService),r(1,u.IModeService),r(2,d.IConfigurationService)],f),t.SuggestMemoryService=f,t.ISuggestMemoryService=c.createDecorator("ISuggestMemories"),h.registerSingleton(t.ISuggestMemoryService,f,!0)})),define(e[563],t([0,1,6,2,76,106,26,13]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageManager=t.GlobalExtensionEnablementService=void 0;let d=class extends n.Disposable{constructor(e){super(),this._onDidChangeEnablement=new i.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this.storageManger=this._register(new h(e)),this._register(this.storageManger.onDidChange(e=>this._onDidChangeEnablement.fire({ extensions:e,source:"storage"})))}async enableExtension(e,t){return!!this._removeFromDisabledExtensions(e)&&(this._onDidChangeEnablement.fire({extensions:[e],source:t}),!0)}async disableExtension(e,t){return!!this._addToDisabledExtensions(e)&&(this._onDidChangeEnablement.fire({extensions:[e],source:t}),!0)}getDisabledExtensions(){return this._getExtensions(s.DISABLED_EXTENSIONS_STORAGE_PATH)}async getDisabledExtensionsAsync(){return this.getDisabledExtensions()}_addToDisabledExtensions(e){let t=this.getDisabledExtensions();return!!t.every(t=>!a.areSameExtensions(t,e))&&(t.push(e),this._setDisabledExtensions(t),!0)}_removeFromDisabledExtensions(e){let t=this.getDisabledExtensions();for(let i=0;ithis.onDidStorageChange(e)))}get(e,t){let i;return 0===t?(c.isUndefinedOrNull(this.storage[e])&&(this.storage[e]=this._get(e,t)),i=this.storage[e]):i=this._get(e,t),JSON.parse(i)}set(e,t,i){let n=JSON.stringify(t.map(({id:e,uuid:t})=>({id:e,uuid:t})));this._get(e,i)!==n&&(0===i&&(t.length?this.storage[e]=n:delete this.storage[e]),this._set(e,t.length?n:void 0,i))}onDidStorageChange(e){if(0===e.scope&&!c.isUndefinedOrNull(this.storage[e.key])){if(this._get(e.key,e.scope)!==this.storage[e.key]){const t=this.get(e.key,e.scope);delete this.storage[e.key];const i=this.get(e.key,e.scope),n=t.filter(e=>!i.some(t=>a.areSameExtensions(e,t))),o=i.filter(e=>!t.some(t=>a.areSameExtensions(t,e))) ;(n.length||o.length)&&this._onDidChange.fire([...n,...o])}}}_get(e,t){return this.storageService.get(e,t,"[]")}_set(e,t,i){t?this.storageService.store(e,t,i):this.storageService.remove(e,i)}}t.StorageManager=h})),define(e[1525],t([0,1,2,6,26,84,25,736,17,15,66,13]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileStorageDatabase=t.BrowserStorageService=void 0;let p=class extends i.Disposable{constructor(e,t){super(),this.environmentService=e,this.fileService=t,this._onDidChangeStorage=this._register(new n.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this._onWillSaveState=this._register(new n.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.periodicFlushScheduler=this._register(new h.RunOnceScheduler(()=>this.doFlushWhenIdle(),5e3)),this.runWhenIdleDisposable=void 0}initialize(e){return this.initializePromise||(this.initializePromise=this.doInitialize(e)),this.initializePromise}async doInitialize(e){ const t=d.joinPath(this.environmentService.userRoamingDataHome,"state");await this.fileService.createFolder(t),this.workspaceStorageFile=d.joinPath(t,`${e.id}.json`),this.workspaceStorageDatabase=this._register(new m(this.workspaceStorageFile,!1,this.fileService)),this.workspaceStorage=this._register(new c.Storage(this.workspaceStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this._onDidChangeStorage.fire({key:e,scope:1}))),this.globalStorageFile=d.joinPath(t,"global.json"),this.globalStorageDatabase=this._register(new m(this.globalStorageFile,!0,this.fileService)),this.globalStorage=this._register(new c.Storage(this.globalStorageDatabase)),this._register(this.globalStorage.onDidChangeStorage(e=>this._onDidChangeStorage.fire({key:e,scope:0}))),await Promise.all([this.workspaceStorage.init(),this.globalStorage.init()]);const i=this.globalStorage.getBoolean(s.IS_NEW_KEY);void 0===i?this.globalStorage.set(s.IS_NEW_KEY,!0):i&&this.globalStorage.set(s.IS_NEW_KEY,!1) ;const n=this.workspaceStorage.getBoolean(s.IS_NEW_KEY);void 0===n?this.workspaceStorage.set(s.IS_NEW_KEY,!0):n&&this.workspaceStorage.set(s.IS_NEW_KEY,!1),this.periodicFlushScheduler.schedule()}get(e,t,i){return this.getStorage(t).get(e,i)}getBoolean(e,t,i){return this.getStorage(t).getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t).getNumber(e,i)}store(e,t,i){this.getStorage(i).set(e,t)}remove(e,t){this.getStorage(t).delete(e)}getStorage(e){return g.assertIsDefined(0===e?this.globalStorage:this.workspaceStorage)}async logStorage(){const[e,t,i,n]=g.assertAllDefined(this.globalStorage,this.workspaceStorage,this.globalStorageFile,this.workspaceStorageFile),o=await Promise.all([e.items,t.items]);return s.logStorage(o[0],o[1],i.toString(),n.toString())}async migrate(e){throw new Error("Migrating storage is currently unsupported in Web")}doFlushWhenIdle(){i.dispose(this.runWhenIdleDisposable),this.runWhenIdleDisposable=h.runWhenIdle(()=>{document.hasFocus()&&!this.hasPendingUpdate&&this.flush(), this.periodicFlushScheduler.schedule()})}get hasPendingUpdate(){return!!this.globalStorageDatabase&&this.globalStorageDatabase.hasPendingUpdate||!!this.workspaceStorageDatabase&&this.workspaceStorageDatabase.hasPendingUpdate}flush(){this._onWillSaveState.fire({reason:s.WillSaveStateReason.NONE})}close(){this.dispose()}isNew(e){return!0===this.getBoolean(s.IS_NEW_KEY,e)}dispose(){i.dispose(this.runWhenIdleDisposable),this.runWhenIdleDisposable=void 0,super.dispose()}};p=o([r(0,a.IEnvironmentService),r(1,l.IFileService)],p),t.BrowserStorageService=p;let m=class extends i.Disposable{constructor(e,t,i){super(),this.file=e,this.watchForExternalChanges=t,this.fileService=i,this._onDidChangeItemsExternal=this._register(new n.Emitter),this.onDidChangeItemsExternal=this._onDidChangeItemsExternal.event,this.pendingUpdate=Promise.resolve(),this._hasPendingUpdate=!1,this.isWatching=!1}get hasPendingUpdate(){return this._hasPendingUpdate}async ensureWatching(){if(this.isWatching||!this.watchForExternalChanges)return ;const e=await this.fileService.exists(this.file);!this.isWatching&&e&&(this.isWatching=!0,this._register(this.fileService.watch(this.file)),this._register(this.fileService.onDidFilesChange(e=>{document.hasFocus()||e.contains(this.file,0)&&this.onDidStorageChangeExternal()})))}async onDidStorageChangeExternal(){const e=await this.doGetItemsFromFile();let t=new Map,i=new Set;this.cache?(e.forEach((e,i)=>{var n;(null===(n=this.cache)||void 0===n?void 0:n.get(i))!==e&&t.set(i,e)}),this.cache.forEach((t,n)=>{e.has(n)||i.add(n)})):t=e,this.cache=e,(t.size>0||i.size>0)&&this._onDidChangeItemsExternal.fire({changed:t,deleted:i})}async getItems(){if(!this.cache)try{this.cache=await this.doGetItemsFromFile()}catch(e){this.cache=new Map}return this.cache}async doGetItemsFromFile(){await this.pendingUpdate;const e=await this.fileService.readFile(this.file);return this.ensureWatching(),new Map(JSON.parse(e.value.toString()))}async updateItems(e){const t=await this.getItems() ;return e.insert&&e.insert.forEach((e,i)=>t.set(i,e)),e.delete&&e.delete.forEach(e=>t.delete(e)),await this.pendingUpdate,this.pendingUpdate=(async()=>{try{this._hasPendingUpdate=!0,await this.fileService.writeFile(this.file,u.VSBuffer.fromString(JSON.stringify(Array.from(t.entries())))),this.ensureWatching()}finally{this._hasPendingUpdate=!1}})(),this.pendingUpdate}close(){return this.pendingUpdate}};m=o([r(2,l.IFileService)],m),t.FileStorageDatabase=m})),define(e[1526],t([0,1,14,21,2,41]),(function(e,t,i,n,o,s){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorEvent=void 0,function(e){e.compare=function(e,t){return e.callstackt.callstack?1:0}}(r=t.ErrorEvent||(t.ErrorEvent={}));class a{constructor(e,t=a.ERROR_FLUSH_TIMEOUT){this._flushHandle=-1,this._buffer=[],this._disposables=new o.DisposableStore,this._telemetryService=e,this._flushDelay=t;const i=n.errorHandler.addListener(e=>this._onErrorEvent(e));this._disposables.add(o.toDisposable(i)), this.installErrorListeners()}dispose(){clearTimeout(this._flushHandle),this._flushBuffer(),this._disposables.dispose()}installErrorListeners(){}_onErrorEvent(e){if(!e)return;e.detail&&e.detail.stack&&(e=e.detail);let t=Array.isArray(e.stack)?e.stack.join("\n"):e.stack,i=e.message?e.message:s.safeStringify(e);t&&this._enqueue({msg:i,callstack:t})}_enqueue(e){const t=i.binarySearch(this._buffer,e,r.compare);t<0?(e.count=1,this._buffer.splice(~t,0,e)):(this._buffer[t].count||(this._buffer[t].count=0),this._buffer[t].count+=1),-1===this._flushHandle&&(this._flushHandle=setTimeout(()=>{this._flushBuffer(),this._flushHandle=-1},this._flushDelay))}_flushBuffer(){for(let e of this._buffer)this._telemetryService.publicLogError2("UnhandledError",e);this._buffer.length=0}}t.default=a,a.ERROR_FLUSH_TIMEOUT=5e3})),define(e[1527],t([0,1,2,12,1526]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends o.default{installErrorListeners(){let e,t=this ;"function"==typeof n.globals.onerror&&(e=n.globals.onerror),n.globals.onerror=function(i,n,o,s,r){t._onUncaughtError(i,n,o,s,r),e&&e.apply(this,arguments)},this._disposables.add(i.toDisposable(()=>{e&&(n.globals.onerror=e)}))}_onUncaughtError(e,t,i,n,o){let s={callstack:e,msg:e,file:t,line:i,column:n};if(o){let{name:e,message:t,stack:i}=o;s.uncaught_error_name=e,t&&(s.uncaught_error_msg=t),i&&(s.callstack=Array.isArray(o.stack)?o.stack=o.stack.join("\n"):o.stack)}this._enqueue(s)}}t.default=s})),define(e[23],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.machineIdKey=t.lastSessionDateStorageKey=t.firstSessionDateStorageKey=t.currentSessionDateStorageKey=t.instanceStorageKey=t.ITelemetryService=void 0,t.ITelemetryService=i.createDecorator("telemetryService"),t.instanceStorageKey="telemetry.instanceId",t.currentSessionDateStorageKey="telemetry.currentSessionDate",t.firstSessionDateStorageKey="telemetry.firstSessionDate", t.lastSessionDateStorageKey="telemetry.lastSessionDate",t.machineIdKey="telemetry.machineId"})),define(e[37],t([0,1,963,21,10,72,47,46,64,20,32,8,82,16,23,13]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectAllCommand=t.RedoCommand=t.UndoCommand=t.EditorExtensionsRegistry=t.registerDiffEditorContribution=t.registerEditorContribution=t.registerInstantiatedEditorAction=t.registerMultiEditorAction=t.registerEditorAction=t.registerEditorCommand=t.registerModelCommand=t.registerModelAndPositionCommand=t.registerDefaultLanguageCommand=t.registerLanguageCommand=t.EditorAction2=t.MultiEditorAction=t.EditorAction=t.EditorCommand=t.ProxyCommand=t.MultiCommand=t.Command=void 0;class v{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){ if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=this._kbOpts.kbExpr;this.precondition&&(e=e?h.ContextKeyExpr.and(e,this.precondition):this.precondition),u.KeybindingsRegistry.registerCommandAndKeybindingRule({id:this.id,handler:(e,t)=>this.runCommand(e,t),weight:this._kbOpts.weight,args:this._kbOpts.args,when:e,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else d.CommandsRegistry.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){c.MenuRegistry.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon},when:e.when,order:e.order})}}t.Command=v;class f extends v{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]), this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e{if(e.get(h.IContextKeyService).contextMatchesRules(m.withNullAsUndefined(this.precondition)))return this.runEditorCommand(e,n,t)})}}t.EditorCommand=b;class _ extends b{constructor(e){super(_.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){ return t.menuId||(t.menuId=c.MenuId.EditorContext),t.title||(t.title=e.label),t.when=h.ContextKeyExpr.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(p.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}t.EditorAction=_;t.MultiEditorAction=class extends _{constructor(e){super(e),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e{if(e.get(h.IContextKeyService).contextMatchesRules(m.withNullAsUndefined(this.desc.precondition)))return this.runEditorCommand(e,n,t)})}}function y(e,t){d.CommandsRegistry.registerCommand(e,(e,i)=>t(e,i||{}))}t.EditorAction2=C,t.registerLanguageCommand=y,t.registerDefaultLanguageCommand=function(e,t){y(e,(function(e,i){const{resource:s,position:c}=i;if(!(s instanceof o.URI))throw n.illegalArgument("resource");if(!r.Position.isIPosition(c))throw n.illegalArgument("position");const d=e.get(a.IModelService).getModel(s);if(d){const e=r.Position.lift(c);return t(d,e,i)}return e.get(l.ITextModelService).createModelReference(s).then(e=>new Promise((n,o)=>{try{n(t(e.object.textEditorModel,r.Position.lift(c),i))}catch(e){o(e)}}).finally(()=>{e.dispose()}))}))},t.registerModelAndPositionCommand=function(e,t){ d.CommandsRegistry.registerCommand(e,(function(e,...i){const[n,s]=i;m.assertType(o.URI.isUri(n)),m.assertType(r.Position.isIPosition(s));const c=e.get(a.IModelService).getModel(n);if(c){const e=r.Position.lift(s);return t(c,e,...i.slice(2))}return e.get(l.ITextModelService).createModelReference(n).then(e=>new Promise((n,o)=>{try{n(t(e.object.textEditorModel,r.Position.lift(s),i.slice(2)))}catch(e){o(e)}}).finally(()=>{e.dispose()}))}))},t.registerModelCommand=function(e,t){d.CommandsRegistry.registerCommand(e,(function(e,...i){const[n]=i;m.assertType(o.URI.isUri(n));const s=e.get(a.IModelService).getModel(n);return s?t(s,...i.slice(1)):e.get(l.ITextModelService).createModelReference(n).then(e=>new Promise((n,o)=>{try{n(t(e.object.textEditorModel,i.slice(1)))}catch(e){o(e)}}).finally(()=>{e.dispose()}))}))},t.registerEditorCommand=function(e){return w.INSTANCE.registerEditorCommand(e),e},t.registerEditorAction=function(e){const t=new e;return w.INSTANCE.registerEditorAction(t),t}, t.registerMultiEditorAction=function(e){return w.INSTANCE.registerEditorAction(e),e},t.registerInstantiatedEditorAction=function(e){w.INSTANCE.registerEditorAction(e)},t.registerEditorContribution=function(e,t){w.INSTANCE.registerEditorContribution(e,t)},t.registerDiffEditorContribution=function(e,t){w.INSTANCE.registerDiffEditorContribution(e,t)},function(e){e.getEditorCommand=function(e){return w.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return w.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return w.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return w.INSTANCE.getEditorContributions().filter(t=>e.indexOf(t.id)>=0)},e.getDiffEditorContributions=function(){return w.INSTANCE.getDiffEditorContributions()}}(t.EditorExtensionsRegistry||(t.EditorExtensionsRegistry={}));class w{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){ this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}registerDiffEditorContribution(e,t){this.diffEditorContributions.push({id:e,ctor:t})}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function E(e){return e.register(),e}w.INSTANCE=new w,g.Registry.add("editor.contributions",w.INSTANCE),t.UndoCommand=E(new f({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:c.MenuId.MenubarEditMenu,group:"1_do",title:i.localize(0,null),order:1},{menuId:c.MenuId.CommandPalette,group:"",title:i.localize(1,null),order:1}]})),E(new S(t.UndoCommand,{id:"default:undo",precondition:void 0})),t.RedoCommand=E(new f({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103, secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:c.MenuId.MenubarEditMenu,group:"1_do",title:i.localize(2,null),order:2},{menuId:c.MenuId.CommandPalette,group:"",title:i.localize(3,null),order:1}]})),E(new S(t.RedoCommand,{id:"default:redo",precondition:void 0})),t.SelectAllCommand=E(new f({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:c.MenuId.MenubarSelectionMenu,group:"1_basic",title:i.localize(4,null),order:1},{menuId:c.MenuId.CommandPalette,group:"",title:i.localize(5,null),order:1}]}))})),define(e[266],t([0,1,961,80,13,37,72,1476,139,420,554,421,47,18,58,8,82]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoreEditingCommands=t.CoreNavigationCommands=t.RevealLine_=t.EditorScroll_=t.CoreEditorCommand=void 0;const f=0;class S extends s.EditorCommand{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}var b,_,C;t.CoreEditorCommand=S, function(e){let t,i;e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!o.isObject(e))return!1;const t=e;return!!o.isString(t.to)&&(!(!o.isUndefined(t.by)&&!o.isString(t.by))&&(!(!o.isUndefined(t.value)&&!o.isNumber(t.value))&&!(!o.isUndefined(t.revealCursor)&&!o.isBoolean(t.revealCursor))))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string", enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Down:i=2;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;default:n=2}return{direction:i,unit:n,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}},function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(t=e.Direction||(e.Direction={})),function(e){e[e.Line=1]="Line",e[e.WrappedLine=2]="WrappedLine",e[e.Page=3]="Page",e[e.HalfPage=4]="HalfPage"}(i=e.Unit||(e.Unit={}))}(b=t.EditorScroll_||(t.EditorScroll_={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object", description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!o.isObject(e))return!1;const t=e;return!!o.isNumber(t.lineNumber)&&!(!o.isUndefined(t.at)&&!o.isString(t.at))},schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:"number"},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(_=t.RevealLine_||(t.RevealLine_={}));class y{constructor(e){e.addImplementation(1e4,(e,t)=>{const i=e.get(r.ICodeEditorService).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&(this.runEditorCommand(e,i,t),!0)}),e.addImplementation(1e3,(e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)}), e.addImplementation(0,(e,t)=>{const i=e.get(r.ICodeEditorService).getActiveCodeEditor();return!!i&&(i.focus(),this.runEditorCommand(e,i,t),!0)})}}!function(e){class t extends S{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[d.CursorMoveCommands.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=s.registerEditorCommand(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=s.registerEditorCommand(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class o extends S{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map(e=>l.CursorState.fromViewState(e))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber, fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=s.registerEditorCommand(new class extends o{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new u.Position(n.viewPosition.lineNumber,n.viewPosition.column),o);let r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,l=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return a.ColumnSelection.columnSelect(e.cursorConfig,e,r,l,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=s.registerEditorCommand(new class extends o{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){ return a.ColumnSelection.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=s.registerEditorCommand(new class extends o{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return a.ColumnSelection.columnSelectRight(e.cursorConfig,e,i)}});class r extends o{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return a.ColumnSelection.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=s.registerEditorCommand(new r({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=s.registerEditorCommand(new r({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class c extends o{constructor(e){ super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return a.ColumnSelection.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=s.registerEditorCommand(new c({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=s.registerEditorCommand(new c({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class h extends S{constructor(){super({id:"cursorMove",precondition:void 0,description:d.CursorMove.description})}runCoreEditorCommand(e,t){const i=d.CursorMove.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,h._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6: case 7:case 8:return d.CursorMoveCommands.simpleMove(e,t,i.direction,n,o,i.unit);case 9:case 11:case 10:case 12:return d.CursorMoveCommands.viewportMove(e,t,i.direction,n,o);default:return null}}}let m;e.CursorMoveImpl=h,e.CursorMove=s.registerEditorCommand(new h),function(e){e[e.PAGE_SIZE_MARKER=-1]="PAGE_SIZE_MARKER"}(m||(m={}));class v extends S{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,d.CursorMoveCommands.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=s.registerEditorCommand(new v({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})), e.CursorLeftSelect=s.registerEditorCommand(new v({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1039}})),e.CursorRight=s.registerEditorCommand(new v({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=s.registerEditorCommand(new v({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1041}})),e.CursorUp=s.registerEditorCommand(new v({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=s.registerEditorCommand(new v({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0, kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=s.registerEditorCommand(new v({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:11}})),e.CursorPageUpSelect=s.registerEditorCommand(new v({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1035}})),e.CursorDown=s.registerEditorCommand(new v({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=s.registerEditorCommand(new v({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{ primary:1042},linux:{primary:1042}}})),e.CursorPageDown=s.registerEditorCommand(new v({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:12}})),e.CursorPageDownSelect=s.registerEditorCommand(new v({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1036}})),e.CreateCursor=s.registerEditorCommand(new class extends S{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?d.CursorMoveCommands.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):d.CursorMoveCommands.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;io&&(n=o);const s=new g.Range(n,1,n,e.model.getLineMaxColumn(n));let r=0;if(i.at)switch(i.at){case _.RawAtArgument.Top:r=3;break;case _.RawAtArgument.Center:r=1;break;case _.RawAtArgument.Bottom:r=4}const a=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,a,r,0)}}),e.SelectAll=new class extends y{constructor(){super(s.SelectAllCommand)}runDOMCommand(){n.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel() ;n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[d.CursorMoveCommands.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=s.registerEditorCommand(new class extends S{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[l.CursorState.fromModelSelection(t.selection)])}})}(C=t.CoreNavigationCommands||(t.CoreNavigationCommands={}));const w=m.ContextKeyExpr.and(p.EditorContextKeys.textInputFocus,p.EditorContextKeys.columnSelection);function E(e,t){v.KeybindingsRegistry.registerKeybindingRule({id:e,primary:t,when:w,weight:f+1})}function I(e){return e.register(),e}E(C.CursorColumnSelectLeft.id,1039),E(C.CursorColumnSelectRight.id,1041),E(C.CursorColumnSelectUp.id,1040),E(C.CursorColumnSelectPageUp.id,1035),E(C.CursorColumnSelectDown.id,1042),E(C.CursorColumnSelectPageDown.id,1036),function(e){class t extends s.EditorCommand{runEditorCommand(e,t,i){ const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=s.registerEditorCommand(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:p.EditorContextKeys.writable,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,h.TypeOperations.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection)))}}),e.Outdent=s.registerEditorCommand(new class extends t{constructor(){super({id:"outdent",precondition:p.EditorContextKeys.writable,kbOpts:{weight:f,kbExpr:m.ContextKeyExpr.and(p.EditorContextKeys.editorTextFocus,p.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,h.TypeOperations.outdent(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.Tab=s.registerEditorCommand(new class extends t{ constructor(){super({id:"tab",precondition:p.EditorContextKeys.writable,kbOpts:{weight:f,kbExpr:m.ContextKeyExpr.and(p.EditorContextKeys.editorTextFocus,p.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,h.TypeOperations.tab(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.DeleteLeft=s.registerEditorCommand(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=c.DeleteOperations.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=s.registerEditorCommand(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{ weight:f,kbExpr:p.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=c.DeleteOperations.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends y{constructor(){super(s.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().undo()}},e.Redo=new class extends y{constructor(){super(s.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().redo()}}}(t.CoreEditingCommands||(t.CoreEditingCommands={}));class x extends s.Command{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(r.ICodeEditorService).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}} function k(e,t){I(new x("default:"+e,e)),I(new x(e,e,t))}k("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),k("replacePreviousChar"),k("compositionStart"),k("compositionEnd"),k("paste"),k("cut")})),define(e[1528],t([0,1,37,8,31,194,5,33]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorKeybindingCancellationTokenSource=void 0;const l=r.createDecorator("IEditorCancelService"),c=new n.RawContextKey("cancellableOperation",!1);a.registerSingleton(l,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,o=this._tokens.get(e);return o||(o=e.invokeWithinContext(e=>{return{key:c.bindTo(e.get(n.IContextKeyService)),tokens:new s.LinkedList}}),this._tokens.set(e,o)),o.key.set(!0),i=o.tokens.push(t),()=>{i&&(i(),o.key.set(!o.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0) ;class d extends o.CancellationTokenSource{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(t=>t.get(l).add(e,this))}dispose(){this._unregister(),super.dispose()}}t.EditorKeybindingCancellationTokenSource=d,i.registerEditorCommand(new class extends i.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:c})}runEditorCommand(e,t){e.get(l).cancel(t)}})})),define(e[177],t([0,1,24,18,31,2,1528]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StableEditorScrollState=t.TextModelCancellationTokenSource=t.EditorStateCancellationTokenSource=t.EditorState=t.CodeEditorStateFlag=void 0,function(e){e[e.Value=1]="Value",e[e.Selection=2]="Selection",e[e.Position=4]="Position",e[e.Scroll=8]="Scroll"}(t.CodeEditorStateFlag||(t.CodeEditorStateFlag={}));class a{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel() ;this.modelVersionId=t?i.format("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof a))return!1;const t=e;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(e){return this._equals(new a(e,this.flags))}}t.EditorState=a;class l extends r.EditorKeybindingCancellationTokenSource{constructor(e,t,i,o){super(e,o),this.editor=e,this._listener=new s.DisposableStore, 4&t&&this._listener.add(e.onDidChangeCursorPosition(e=>{i&&n.Range.containsPosition(i,e.position)||this.cancel()})),2&t&&this._listener.add(e.onDidChangeCursorSelection(e=>{i&&n.Range.containsRange(i,e.selection)||this.cancel()})),8&t&&this._listener.add(e.onDidScrollChange(e=>this.cancel())),1&t&&(this._listener.add(e.onDidChangeModel(e=>this.cancel())),this._listener.add(e.onDidChangeModelContent(e=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}t.EditorStateCancellationTokenSource=l;class c extends o.CancellationTokenSource{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}t.TextModelCancellationTokenSource=c;class d{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column) ;i=e.getScrollTop()-o}}return new d(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}t.StableEditorScrollState=d})),define(e[1529],t([0,1,266,47,12]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewController=void 0;t.ViewController=class{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}replacePreviousChar(e,t){this.commandDelegate.replacePreviousChar(e,t)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){ this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){i.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position) }_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){i.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){i.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,n){e=this._validateViewColumn(e),i.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),i.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){i.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){i.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))} _wordSelectDrag(e){i.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){i.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){i.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){i.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){i.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){i.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){i.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){ this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}})),define(e[1530],t([0,1,37,977,58,60,79,8,137,103,783]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionAnchorSet=void 0,t.SelectionAnchorSet=new c.RawContextKey("selectionAnchorSet",!1);let u=class e{constructor(e,i){this.editor=e,this.selectionAnchorSetContextKey=t.SelectionAnchorSet.bindTo(i),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){ const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:a.Selection.fromPositions(e,e),options:{stickiness:1,hoverMessage:(new d.MarkdownString).appendText(n.localize(0,null)),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),h.alert(n.localize(1,null,e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(a.Selection.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0, this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};u.ID="editor.contrib.selectionAnchorController",u=o([r(1,c.IContextKeyService)],u);class g extends i.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:n.localize(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2080),weight:100}})}async run(e,t){u.get(t).setSelectionAnchor()}}class p extends i.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:n.localize(3,null),alias:"Go to Selection Anchor",precondition:t.SelectionAnchorSet})}async run(e,t){u.get(t).goToSelectionAnchor()}}class m extends i.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:n.localize(4,null),alias:"Select from Anchor to Cursor",precondition:t.SelectionAnchorSet,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2089),weight:100}})} async run(e,t){u.get(t).selectFromAnchorToCursor()}}class v extends i.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:n.localize(5,null),alias:"Cancel Selection Anchor",precondition:t.SelectionAnchorSet,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(e,t){u.get(t).cancelSelectionAnchor()}}i.registerEditorContribution(u.ID,u),i.registerEditorAction(g),i.registerEditorAction(p),i.registerEditorAction(m),i.registerEditorAction(v)})),define(e[1531],t([0,1,979,37,58,916]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends n.EditorAction{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const e of n)i.push(new s.MoveCaretCommand(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}n.registerEditorAction(class extends r{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:i.localize(0,null), alias:"Move Selected Text Left",precondition:o.EditorContextKeys.writable})}}),n.registerEditorAction(class extends r{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:i.localize(1,null),alias:"Move Selected Text Right",precondition:o.EditorContextKeys.writable})}})})),define(e[1532],t([0,1,980,37,259,18,58,419]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends n.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:i.localize(0,null),alias:"Transpose Letters",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],r=t.getSelections();for(let e of r){if(!e.isEmpty())continue;let t=e.startLineNumber,r=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===r||2===r&&2===l))continue ;let c=r===l?e.getPosition():a.MoveOperations.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),d=a.MoveOperations.leftPosition(i,c.lineNumber,c.column),h=a.MoveOperations.leftPosition(i,d.lineNumber,d.column),u=i.getValueInRange(s.Range.fromPositions(h,d)),g=i.getValueInRange(s.Range.fromPositions(d,c)),p=s.Range.fromPositions(h,c);n.push(new o.ReplaceCommand(p,g+u))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}n.registerEditorAction(l)})),define(e[358],t([0,1,981,80,12,534,37,72,58,20,88]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasteAction=t.CopyAction=t.CutAction=void 0;const h=o.isNative||document.queryCommandSupported("cut"),u=o.isNative||document.queryCommandSupported("copy"),g=u&&!n.isEdge,p=!n.isFirefox||document.queryCommandSupported("paste");function m(e){return e.register(),e}t.CutAction=h?m(new r.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.isNative?{ primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:c.MenuId.MenubarEditMenu,group:"2_ccp",title:i.localize(0,null),order:1},{menuId:c.MenuId.EditorContext,group:"9_cutcopypaste",title:i.localize(1,null),when:l.EditorContextKeys.writable,order:1},{menuId:c.MenuId.CommandPalette,group:"",title:i.localize(2,null),order:1}]})):void 0,t.CopyAction=u?m(new r.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:c.MenuId.MenubarEditMenu,group:"2_ccp",title:i.localize(3,null),order:2},{menuId:c.MenuId.EditorContext,group:"9_cutcopypaste",title:i.localize(4,null),order:2},{menuId:c.MenuId.CommandPalette,group:"",title:i.localize(5,null),order:1}]})):void 0,t.PasteAction=p?m(new r.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.isNative?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]}, weight:100}:void 0,menuOpts:[{menuId:c.MenuId.MenubarEditMenu,group:"2_ccp",title:i.localize(6,null),order:3},{menuId:c.MenuId.EditorContext,group:"9_cutcopypaste",title:i.localize(7,null),when:l.EditorContextKeys.writable,order:3},{menuId:c.MenuId.CommandPalette,group:"",title:i.localize(8,null),order:1}]})):void 0;class v extends r.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:i.localize(9,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:l.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;!t.getOption(26)&&t.getSelection().isEmpty()||(s.CopyOptions.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function f(e,t){e&&(e.addImplementation(1e4,(e,i)=>{const n=e.get(a.ICodeEditorService).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(26),i=n.getSelection() ;return!(!i||!i.isEmpty()||e)||(document.execCommand(t),!0)}return!1}),e.addImplementation(0,(e,i)=>(document.execCommand(t),!0)))}f(t.CutAction,"cut"),f(t.CopyAction,"copy"),t.PasteAction&&(t.PasteAction.addImplementation(1e4,(e,t)=>{const i=e.get(a.ICodeEditorService),n=e.get(d.IClipboardService),r=i.getFocusedCodeEditor();if(r&&r.hasTextFocus()){return!(!document.execCommand("paste")&&o.isWeb)||((async()=>{const e=await n.readText();if(""!==e){const t=s.InMemoryClipboardMetadataManager.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=r.getOption(26)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),r.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}})(),!0)}return!1}),t.PasteAction.addImplementation(0,(e,t)=>(document.execCommand("paste"),!0))),g&&r.registerEditorAction(v)})),define(e[240],t([0,1,14,31,21,2,10,177,37,18,60,45,46,215,68]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.getCodeActions=t.CodeActionItem=t.fixAllCommandId=t.organizeImportsCommandId=t.sourceActionCommandId=t.refactorCommandId=t.codeActionCommandId=void 0,t.codeActionCommandId="editor.action.codeAction",t.refactorCommandId="editor.action.refactor",t.sourceActionCommandId="editor.action.sourceAction",t.organizeImportsCommandId="editor.action.organizeImports",t.fixAllCommandId="editor.action.fixAll";class m{constructor(e,t){this.action=e,this.provider=t}async resolve(e){var t;if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){o.onUnexpectedExternalError(e)}t&&(this.action.edit=t.edit)}return this}}t.CodeActionItem=m;class v extends s.Disposable{constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=i.mergeSort([...e],v.codeActionsComparator),this.validActions=this.allActions.filter(({action:e})=>!e.disabled)}static codeActionsComparator({action:e},{action:t}){ return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:i.isNonEmptyArray(e.diagnostics)?i.isNonEmptyArray(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:i.isNonEmptyArray(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&g.CodeActionKind.QuickFix.contains(new g.CodeActionKind(e.kind))&&!!e.isPreferred)}}const f={actions:[],documentation:void 0};function S(e,t,n,r,l){var c;const d=n.filter||{},u={only:null===(c=d.include)||void 0===c?void 0:c.value,trigger:n.type},p=new a.TextModelCancellationTokenSource(e,l),S=function(e,t){return h.CodeActionProviderRegistry.all(e).filter(e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some(e=>g.mayIncludeActionsOfKind(t,new g.CodeActionKind(e))))}(e,d),b=new s.DisposableStore,_=S.map(async i=>{try{r.report(i);const n=await i.provideCodeActions(e,t,u,p.token);if(n&&b.add(n),p.token.isCancellationRequested)return f ;const o=((null==n?void 0:n.actions)||[]).filter(e=>e&&g.filtersAction(d,e)),s=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map(e=>({kind:new g.CodeActionKind(e.kind),command:e.command}));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new g.CodeActionKind(e.kind)))return t.command;return}(i,o,d.include);return{actions:o.map(e=>new m(e,i)),documentation:s}}catch(e){if(o.isPromiseCanceledError(e))throw e;return o.onUnexpectedExternalError(e),f}}),C=h.CodeActionProviderRegistry.onDidChange(()=>{const t=h.CodeActionProviderRegistry.all(e);i.equals(t,S)||p.cancel()});return Promise.all(_).then(e=>{const t=i.flatten(e.map(e=>e.actions)),n=i.coalesce(e.map(e=>e.documentation));return new v(t,n,b)}).finally(()=>{C.dispose(),p.dispose()})}t.getCodeActions=S,l.registerLanguageCommand("_executeCodeActionProvider",(async function(e,t){ const{resource:i,rangeOrSelection:s,kind:a,itemResolveCount:l}=t;if(!(i instanceof r.URI))throw o.illegalArgument();const h=e.get(u.IModelService).getModel(i);if(!h)throw o.illegalArgument();const m=d.Selection.isISelection(s)?d.Selection.liftSelection(s):c.Range.isIRange(s)?h.validateRange(s):void 0;if(!m)throw o.illegalArgument();const v=await S(h,m,{type:2,filter:{includeSourceActions:!0,include:a&&a.value?new g.CodeActionKind(a.value):void 0}},p.Progress.None,n.CancellationToken.None),f=[],b=Math.min(v.validActions.length,"number"==typeof l?l:0);for(let e=0;ee.action)}finally{setTimeout(()=>v.dispose(),100)}}))})),define(e[1533],t([0,1,7,30,21,230,2,47,45,240,215,36,35]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionKeybindingResolver=t.CodeActionMenu=void 0;class m extends n.Action{constructor(e,t){ super(e.command?e.command.id:e.title,e.title,void 0,!e.disabled,t),this.action=e}}let v=class extends l.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new l.MutableDisposable),this._keybindingResolver=new f({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}async show(e,t,i,n){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,s.canceled();this._visible=!0,this._showingActions.value=t;const r=this.getMenuActions(e,o,t.documentation),a=c.Position.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver();this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:()=>a,getActions:()=>r,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof m?l(e.action):void 0})} getMenuActions(e,t,i){var o,s;const r=e=>new m(e.action,()=>this._delegate.onSelectCodeAction(e)),a=t.map(r),l=[...i],c=this._editor.getModel();if(c&&a.length)for(const i of d.CodeActionProviderRegistry.all(c))i._getAdditionalMenuItems&&l.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(s=null===(o=e.filter)||void 0===o?void 0:o.include)||void 0===s?void 0:s.value},t.map(e=>e.action)));return l.length&&a.push(new n.Separator,...l.map(e=>r(new h.CodeActionItem({title:e.title,command:e},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=i.getDomNodePagePosition(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}}};v=o([r(2,g.IContextMenuService),r(3,p.IKeybindingService)],v),t.CodeActionMenu=v;class f{constructor(e){this._keybindingProvider=e}getResolver(){ const e=new a.Lazy(()=>this._keybindingProvider.getKeybindings().filter(e=>f.codeActionCommands.indexOf(e.command)>=0).filter(e=>e.resolvedKeybinding).map(e=>{let t=e.commandArgs;return e.command===h.organizeImportsCommandId?t={kind:u.CodeActionKind.SourceOrganizeImports.value}:e.command===h.fixAllCommandId&&(t={kind:u.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},u.CodeActionCommandArgs.fromUser(t,{kind:u.CodeActionKind.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new u.CodeActionKind(e.kind);return t.filter(e=>e.kind.contains(i)).filter(t=>!t.preferred||e.isPreferred).reduceRight((e,t)=>e?e.kind.contains(t.kind)?t:e:t,void 0)}}t.CodeActionKeybindingResolver=f,f.codeActionCommands=[h.refactorCommandId,h.codeActionCommandId,h.sourceActionCommandId,h.organizeImportsCommandId,h.fixAllCommandId]})), define(e[1534],t([0,1,15,6,2,18,45,8,68,240,17]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionModel=t.CodeActionsState=t.SUPPORTED_CODE_ACTIONS=void 0,t.SUPPORTED_CODE_ACTIONS=new a.RawContextKey("supportedCodeAction","");class h extends o.Disposable{constructor(e,t,n,o=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=o,this._autoTriggerTimer=this._register(new i.TimeoutTimer),this._register(this._markerService.onMarkerChanged(e=>this._onMarkerChanges(e))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(e=>d.isEqual(e,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:1})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:1})},this._delay)} _getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(s.Range.intersectRanges(n,e))return s.Range.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&1===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),s={trigger:e,selection:t,position:o};return this._signalChange(s),s}}var u;!function(e){let t;!function(e){e[e.Empty=0]="Empty",e[e.Triggered=1]="Triggered"}(t=e.Type||(e.Type={})),e.Empty={type:0} ;e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this.actions=n,this.type=1}}}(u=t.CodeActionsState||(t.CodeActionsState={}));class g extends o.Disposable{constructor(e,i,s,a){super(),this._editor=e,this._markerService=i,this._progressService=a,this._codeActionOracle=this._register(new o.MutableDisposable),this._state=u.Empty,this._onDidChangeState=this._register(new n.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._supportedCodeActions=t.SUPPORTED_CODE_ACTIONS.bindTo(s),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(r.CodeActionProviderRegistry.onDidChange(()=>this._update())),this._update()}dispose(){super.dispose(),this.setState(u.Empty,!0)}_update(){this._codeActionOracle.value=void 0,this.setState(u.Empty);const e=this._editor.getModel();if(e&&r.CodeActionProviderRegistry.has(e)&&!this._editor.getOption(72)){const t=[] ;for(const i of r.CodeActionProviderRegistry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new h(this._editor,this._markerService,t=>{var n;if(!t)return void this.setState(u.Empty);const o=i.createCancelablePromise(i=>c.getCodeActions(e,t.selection,t.trigger,l.Progress.None,i));2===t.trigger.type&&(null===(n=this._progressService)||void 0===n||n.showWhile(o,250)),this.setState(new u.Triggered(t.trigger,t.selection,t.position,o))},void 0),this._codeActionOracle.value.trigger({type:1})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.actions.cancel(),this._state=e,t||this._onDidChangeState.fire(e))}}t.CodeActionModel=g})),define(e[564],t([0,1,14,31,21,10,37,45,46,2]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.getCodeLensModel=t.CodeLensModel=void 0;class d{constructor(){this.lenses=[],this._disposables=new c.DisposableStore}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function h(e,t){const n=a.CodeLensProviderRegistry.ordered(e),s=new Map,r=new d,l=n.map(async(i,n)=>{s.set(i,n);try{const n=await Promise.resolve(i.provideCodeLenses(e,t));n&&r.add(n,i)}catch(e){o.onUnexpectedExternalError(e)}});return await Promise.all(l),r.lenses=i.mergeSort(r.lenses,(e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:s.get(e.provider)s.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0),r}t.CodeLensModel=d,t.getCodeLensModel=h,r.registerLanguageCommand("_executeCodeLensProvider",(function(e,t){let{resource:i,itemResolveCount:r}=t ;if(!(i instanceof s.URI))throw o.illegalArgument();const a=e.get(l.IModelService).getModel(i);if(!a)throw o.illegalArgument();const d=[],u=new c.DisposableStore;return h(a,n.CancellationToken.None).then(e=>{u.add(e);let t=[];for(const i of e.lenses)void 0===r||Boolean(i.symbol.command)?d.push(i.symbol):r-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,n.CancellationToken.None)).then(e=>d.push(e||i.symbol)));return Promise.all(t)}).then(()=>d).finally(()=>{setTimeout(()=>u.dispose(),100)})}))})),define(e[1535],t([0,1,5,33,564,67,26,18,15,135]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensCache=t.ICodeLensCache=void 0,t.ICodeLensCache=i.createDecorator("ICodeLensCache");class u{constructor(e,t){this.lineCount=e,this.data=t}}let g=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new a.LRUCache(20,.75) ;d.runWhenIdle(()=>e.remove("codelens/cache",1));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),h.once(e.onWillSaveState)(i=>{i.reason===l.WillSaveStateReason.SHUTDOWN&&e.store(t,this._serialize(),1)})}put(e,t){const i=t.lenses.map(e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}}),n=new s.CodeLensModel;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new u(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({ range:new c.Range(e,1,e,11)});const o=new s.CodeLensModel;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new u(i.lineCount,o))}}catch(e){}}};g=o([r(0,l.IStorageService)],g),t.CodeLensCache=g,n.registerSingleton(t.ICodeLensCache,g)})),define(e[565],t([0,1,31,21,10,37,18,45,46]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColorPresentations=t.getColors=void 0,t.getColors=function(e,t){const i=[],n=a.ColorProviderRegistry.ordered(e).reverse().map(n=>Promise.resolve(n.provideDocumentColors(e,t)).then(e=>{if(Array.isArray(e))for(let t of e)i.push({colorInfo:t,provider:n})}));return Promise.all(n).then(()=>i)},t.getColorPresentations=function(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))},s.registerLanguageCommand("_executeDocumentColorProvider",(function(e,t){const{resource:s}=t;if(!(s instanceof o.URI))throw n.illegalArgument();const r=e.get(l.IModelService).getModel(s);if(!r)throw n.illegalArgument() ;const c=[],d=a.ColorProviderRegistry.ordered(r).reverse().map(e=>Promise.resolve(e.provideDocumentColors(r,i.CancellationToken.None)).then(e=>{if(Array.isArray(e))for(let t of e)c.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}));return Promise.all(d).then(()=>c)})),s.registerLanguageCommand("_executeColorPresentationProvider",(function(e,t){const{resource:s,color:c,range:d}=t;if(!(s instanceof o.URI&&Array.isArray(c)&&4===c.length&&r.Range.isIRange(d)))throw n.illegalArgument();const[h,u,g,p]=c,m=e.get(l.IModelService).getModel(s);if(!m)throw n.illegalArgument();const v={range:d,color:{red:h,green:u,blue:g,alpha:p}},f=[],S=a.ColorProviderRegistry.ordered(m).reverse().map(e=>Promise.resolve(e.provideColorPresentations(m,v,i.CancellationToken.None)).then(e=>{Array.isArray(e)&&f.push(...e)}));return Promise.all(S).then(()=>f)}))})),define(e[429],t([0,1,15,55,21,133,2,37,72,18,75,45,565,9]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorDetector=void 0;let v=class e extends l.Disposable{constructor(e,t,i){super(),this._editor=e,this._codeEditorService=t,this._configurationService=i,this._localToDispose=this._register(new l.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel(e=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(e=>this.onModelChanged())),this._register(g.ColorProviderRegistry.onDidChange(e=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(e=>{let t=this._isEnabled;this._isEnabled=this.isEnabled(),t!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1 ;const t=e.getLanguageIdentifier(),i=this._configurationService.getValue(t.language);if(i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(12)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&g.ColorProviderRegistry.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent(t=>{this._timeoutTimer||(this._timeoutTimer=new i.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},e.RECOMPUTE_TIME))})),this.beginCompute())}beginCompute(){this._computePromise=i.createCancelablePromise(e=>{const t=this._editor.getModel();return t?p.getColors(t,e):Promise.resolve([])}),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},s.onUnexpectedError)}stop(){ this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:u.ModelDecorationOptions.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((t,i)=>this._colorDatas.set(t,e[i]))}updateColorDecorators(e){let t=[],i={};for(let o=0;o{i[e]||this._codeEditorService.removeDecorationType(e)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(e=>{this._codeEditorService.removeDecorationType(e)})}getColorData(e){ const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(h.Range.fromPositions(e,e)).filter(e=>this._colorDatas.has(e.id));return 0===i.length?null:this._colorDatas.get(i[0].id)}};v.ID="editor.contrib.colorDetector",v.RECOMPUTE_TIME=1e3,v=o([r(1,d.ICodeEditorService),r(2,m.IConfigurationService)],v),t.ColorDetector=v,c.registerEditorContribution(v.ID,v)})),define(e[1536],t([0,1,985,79,37,58,541,918,20]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class c extends o.EditorAction{constructor(e,t){super(t),this._type=e}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],o=t.getSelections(),s=i.getOptions(),r=t.getOption(14);for(const e of o)n.push(new a.LineCommentCommand(e,s.tabSize,this._type,r.insertSpace,r.ignoreEmptyLines));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class d extends o.EditorAction{constructor(){super({id:"editor.action.blockComment",label:i.localize(4,null),alias:"Toggle Block Comment", precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:l.MenuId.MenubarEditMenu,group:"5_insert",title:i.localize(5,null),order:2}})}run(e,t){if(!t.hasModel())return;const i=t.getOption(14),n=[],o=t.getSelections();for(const e of o)n.push(new r.BlockCommentCommand(e,i.insertSpace));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}o.registerEditorAction(class extends c{constructor(){super(0,{id:"editor.action.commentLine",label:i.localize(0,null),alias:"Toggle Line Comment",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:l.MenuId.MenubarEditMenu,group:"5_insert",title:i.localize(1,null),order:1}})}}),o.registerEditorAction(class extends c{constructor(){super(1,{id:"editor.action.addCommentLine",label:i.localize(2,null),alias:"Add Line Comment",precondition:s.EditorContextKeys.writable,kbOpts:{ kbExpr:s.EditorContextKeys.editorTextFocus,primary:n.KeyChord(2089,2081),weight:100}})}}),o.registerEditorAction(class extends c{constructor(){super(2,{id:"editor.action.removeCommentLine",label:i.localize(3,null),alias:"Remove Line Comment",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:n.KeyChord(2089,2099),weight:100}})}}),o.registerEditorAction(d)})),define(e[310],t([0,1,986,7,30,2,37,58,20,8,36,35,100]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuController=void 0;let m=class e{constructor(e,t,i,o,s,r){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=o,this._keybindingService=s,this._menuService=r,this._toDispose=new a.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(e=>this._onContextMenu(e))),this._toDispose.add(this._editor.onMouseWheel(e=>{if(this._contextMenuIsBeingShownCount>0){ const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&n.getShadowRoot(t)===i.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())}))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(15))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(e.event.preventDefault(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)} showContextMenu(e){if(!this._editor.getOption(15))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),d.MenuId.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(let t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof d.SubmenuItemAction){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new s.SubmenuAction(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new s.Separator)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(46);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render() ;const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=n.getDomNodePagePosition(this._editor.getDomNode()),o=i.left+e.left,s=i.top+e.top+e.height;t={x:o,y:s}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new p.ActionViewItem(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new p.ActionViewItem(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};m.ID="editor.contrib.contextmenu", m=o([r(1,u.IContextMenuService),r(2,u.IContextViewService),r(3,h.IContextKeyService),r(4,g.IKeybindingService),r(5,d.IMenuService)],m),t.ContextMenuController=m;class v extends l.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:i.localize(0,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(e,t){m.get(t).showContextMenu()}}l.registerEditorContribution(m.ID,m),l.registerEditorAction(v)})),define(e[1537],t([0,1,987,2,37,58]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRedo=t.CursorUndo=t.CursorUndoRedoController=void 0;class r{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(e=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new r(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new a(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(l.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new a(new r(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){ this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new a(new r(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}t.CursorUndoRedoController=l,l.ID="editor.contrib.cursorUndoRedoController";class c extends o.EditorAction{constructor(){super({id:"cursorUndo",label:i.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(e,t,i){l.get(t).cursorUndo()}}t.CursorUndo=c;class d extends o.EditorAction{constructor(){super({id:"cursorRedo",label:i.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){l.get(t).cursorRedo()}}t.CursorRedo=d,o.registerEditorContribution(l.ID,l),o.registerEditorAction(c), o.registerEditorAction(d)})),define(e[1538],t([0,1,2,12,37,47,18,60,919,75,788]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";function d(e){return n.isMacintosh?e.altKey:e.ctrlKey}Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropController=void 0;class h extends i.Disposable{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(e=>this._onEditorMouseDown(e))),this._register(this._editor.onMouseUp(e=>this._onEditorMouseUp(e))),this._register(this._editor.onMouseDrag(e=>this._onEditorMouseDrag(e))),this._register(this._editor.onMouseDrop(e=>this._onEditorMouseDrop(e))),this._register(this._editor.onKeyDown(e=>this.onEditorKeyDown(e))),this._register(this._editor.onKeyUp(e=>this.onEditorKeyUp(e))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}static get(e){ return e.getContribution(h.ID)}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(25)&&!this._editor.getOption(13)&&(d(e)&&(this._modifierPressed=!0),this._mouseDown&&d(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(25)&&!this._editor.getOption(13)&&(d(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===h.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter(e=>t.position&&e.containsPosition(t.position));if(1!==e.length)return;this._dragSelection=e[0]}d(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}), t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new s.Position(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new a.Selection(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(e=>e.containsPosition(t)?new a.Selection(t.lineNumber,t.column,t.lineNumber,t.column):e);this._editor.setSelections(i||[],"mouse")}else(!this._dragSelection.containsPosition(t)||(d(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(h.ID,new l.DragAndDropCommand(this._dragSelection,t,d(e.event)||this._modifierPressed)), this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new r.Range(e.lineNumber,e.column,e.lineNumber,e.column),options:h._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}t.DragAndDropController=h,h.ID="editor.contrib.dragAndDrop",h.TRIGGER_KEY_VALUE=n.isMacintosh?6:5,h._DECORATION_OPTIONS=c.ModelDecorationOptions.register({className:"dnd-target"}),o.registerEditorContribution(h.ID,h)})),define(e[1539],t([0,1,992,37,345]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{ value:!0});class s extends n.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:i.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel()+1)}}class r extends n.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:i.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel()-1)}}class a extends n.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:i.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){o.EditorZoom.setZoomLevel(0)}}n.registerEditorAction(s),n.registerEditorAction(r),n.registerEditorAction(a)})),define(e[311],t([0,1,103,14,31,21,10,177,85,47,18,60,45,155,46,542,993,104,5,194,32,13,96]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";function w(e){if(!(e=e.filter(e=>e.range)).length)return;let{range:t}=e[0] ;for(let i=1;ie.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return t}Object.defineProperty(t,"__esModule",{value:!0}), t.getOnTypeFormattingEdits=t.getDocumentFormattingEditsUntilResult=t.getDocumentRangeFormattingEditsUntilResult=t.formatDocumentWithProvider=t.formatDocumentWithSelectedProvider=t.formatDocumentRangesWithProvider=t.formatDocumentRangesWithSelectedProvider=t.FormattingConflicts=t.FormattingMode=t.getRealAndSyntheticDocumentFormattersOrdered=t.alertFormattingEdits=void 0,t.alertFormattingEdits=w,t.getRealAndSyntheticDocumentFormattersOrdered=E,function(e){e[e.Explicit=1]="Explicit",e[e.Silent=2]="Silent"}(t.FormattingMode||(t.FormattingMode={}));class I{static setFormatterSelector(e){return{dispose:I._selectors.unshift(e)}}static async select(e,t,i){if(0===e.length)return;const n=y.Iterable.first(I._selectors);return n?await n(e,t,i):void 0}}async function x(e,t,i,o,s){const r=e.get(g.IEditorWorkerService);let c,u;l.isCodeEditor(i)?(c=i.getModel(),u=new a.EditorStateCancellationTokenSource(i,5,void 0,s)):(c=i,u=new a.TextModelCancellationTokenSource(i,s));let p=[],v=0 ;for(let e of n.asArray(o).sort(d.Range.compareRangesUsingStarts))v>0&&d.Range.areIntersectingOrTouching(p[v-1],e)?p[v-1]=d.Range.fromPositions(p[v-1].getStartPosition(),e.getEndPosition()):v=p.push(e);const f=[];for(let e of p)try{const i=await t.provideDocumentRangeFormattingEdits(c,e,c.getFormattingOptions(),u.token),n=await r.computeMoreMinimalEdits(c.uri,i);if(n&&f.push(...n),u.token.isCancellationRequested)return!0}finally{u.dispose()}if(0===f.length)return!1;if(l.isCodeEditor(i))m.FormattingEdit.execute(i,f,!0),w(f),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=f,t=new h.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);c.pushEditOperations([t],f.map(e=>({text:e.text,range:d.Range.lift(e.range),forceMoveMarkers:!0})),e=>{for(const{range:i}of e)if(d.Range.areIntersectingOrTouching(i,t))return[new h.Selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null})}return!0}async function k(e,t,i,n,o){ const s=e.get(g.IEditorWorkerService);let r,c,u;l.isCodeEditor(i)?(r=i.getModel(),c=new a.EditorStateCancellationTokenSource(i,5,void 0,o)):(r=i,c=new a.TextModelCancellationTokenSource(i,o));try{const e=await t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),c.token);if(u=await s.computeMoreMinimalEdits(r.uri,e),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||0===u.length)return!1;if(l.isCodeEditor(i))m.FormattingEdit.execute(i,u,2!==n),2!==n&&(w(u),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=u,t=new h.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],u.map(e=>({text:e.text,range:d.Range.lift(e.range),forceMoveMarkers:!0})),e=>{for(const{range:i}of e)if(d.Range.areIntersectingOrTouching(i,t))return[new h.Selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null})}return!0}async function D(e,t,i,o,r){const a=u.DocumentRangeFormattingEditProviderRegistry.ordered(t) ;for(const l of a){let a=await Promise.resolve(l.provideDocumentRangeFormattingEdits(t,i,o,r)).catch(s.onUnexpectedExternalError);if(n.isNonEmptyArray(a))return await e.computeMoreMinimalEdits(t.uri,a)}}async function T(e,t,i,o){const r=E(t);for(const a of r){let r=await Promise.resolve(a.provideDocumentFormattingEdits(t,i,o)).catch(s.onUnexpectedExternalError);if(n.isNonEmptyArray(r))return await e.computeMoreMinimalEdits(t.uri,r)}}function R(e,t,i,n,r){const a=u.OnTypeFormattingEditProviderRegistry.ordered(t);return 0===a.length?Promise.resolve(void 0):a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,r,o.CancellationToken.None)).catch(s.onUnexpectedExternalError).then(i=>e.computeMoreMinimalEdits(t.uri,i))}t.FormattingConflicts=I,I._selectors=new b.LinkedList,t.formatDocumentRangesWithSelectedProvider=async function(e,t,i,n,o,s){ const r=e.get(S.IInstantiationService),a=l.isCodeEditor(t)?t.getModel():t,c=u.DocumentRangeFormattingEditProviderRegistry.ordered(a),d=await I.select(c,a,n);d&&(o.report(d),await r.invokeFunction(x,d,t,i,s))},t.formatDocumentRangesWithProvider=x,t.formatDocumentWithSelectedProvider=async function(e,t,i,n,o){const s=e.get(S.IInstantiationService),r=l.isCodeEditor(t)?t.getModel():t,a=E(r),c=await I.select(a,r,i);c&&(n.report(c),await s.invokeFunction(k,c,t,i,o))},t.formatDocumentWithProvider=k,t.getDocumentRangeFormattingEditsUntilResult=D,t.getDocumentFormattingEditsUntilResult=T,t.getOnTypeFormattingEdits=R,_.CommandsRegistry.registerCommand("_executeFormatRangeProvider",(function(e,...t){const[i,n,a]=t;C.assertType(r.URI.isUri(i)),C.assertType(d.Range.isIRange(n));const l=e.get(p.IModelService).getModel(i);if(!l)throw s.illegalArgument("resource");return D(e.get(g.IEditorWorkerService),l,d.Range.lift(n),a,o.CancellationToken.None)})), _.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[i,n]=t;C.assertType(r.URI.isUri(i));const a=e.get(p.IModelService).getModel(i);if(!a)throw s.illegalArgument("resource");return T(e.get(g.IEditorWorkerService),a,n,o.CancellationToken.None)})),_.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[i,n,o,a]=t;C.assertType(r.URI.isUri(i)),C.assertType(c.Position.isIPosition(n)),C.assertType("string"==typeof o);const l=e.get(p.IModelService).getModel(i);if(!l)throw s.illegalArgument("resource");return R(e.get(g.IEditorWorkerService),l,c.Position.lift(n),o,a)}))})),define(e[1540],t([0,1,14,31,79,2,37,72,258,18,58,45,155,311,542,994,32,8,5,21,68]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let w=class{constructor(e,t){this._workerService=t,this._callOnDispose=new a.DisposableStore,this._callOnModel=new a.DisposableStore,this._editor=e, this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(g.OnTypeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(41))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=g.OnTypeFormattingEditProviderRegistry.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new d.CharacterSet;for(let e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(e=>{let t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))}))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1)return;const t=this._editor.getModel(),n=this._editor.getPosition();let o=!1 ;const s=this._editor.onDidChangeModelContent(e=>{if(e.isFlush)return o=!0,void s.dispose();for(let t=0,i=e.changes.length;t{s.dispose(),o||i.isNonEmptyArray(e)&&(v.FormattingEdit.execute(this._editor,e,!0),m.alertFormattingEdits(e))},e=>{throw s.dispose(),e})}};w.ID="editor.contrib.autoFormat",w=o([r(1,p.IEditorWorkerService)],w);let E=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new a.DisposableStore,this._callOnModel=new a.DisposableStore,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(g.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(), this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(40)&&this.editor.hasModel()&&g.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(m.formatDocumentRangesWithSelectedProvider,this.editor,e,2,y.Progress.None,n.CancellationToken.None).catch(C.onUnexpectedError))}};E.ID="editor.contrib.formatOnPaste",E=o([r(1,_.IInstantiationService)],E);class I extends l.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:f.localize(0,null),alias:"Format Document",precondition:b.ContextKeyExpr.and(u.EditorContextKeys.notInCompositeEditor,u.EditorContextKeys.writable,u.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:b.ContextKeyExpr.and(u.EditorContextKeys.editorTextFocus,u.EditorContextKeys.hasDocumentFormattingProvider),primary:1572,linux:{ primary:3111},weight:100},contextMenuOpts:{when:u.EditorContextKeys.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(_.IInstantiationService),o=e.get(y.IEditorProgressService);await o.showWhile(i.invokeFunction(m.formatDocumentWithSelectedProvider,t,1,y.Progress.None,n.CancellationToken.None),250)}}}class x extends l.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:f.localize(1,null),alias:"Format Selection",precondition:b.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:b.ContextKeyExpr.and(u.EditorContextKeys.editorTextFocus,u.EditorContextKeys.hasDocumentSelectionFormattingProvider),primary:s.KeyChord(2089,2084),weight:100},contextMenuOpts:{when:b.ContextKeyExpr.and(u.EditorContextKeys.hasDocumentSelectionFormattingProvider,u.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return ;const i=e.get(_.IInstantiationService),o=t.getModel(),s=t.getSelections().map(e=>e.isEmpty()?new h.Range(e.startLineNumber,1,e.startLineNumber,o.getLineMaxColumn(e.startLineNumber)):e),r=e.get(y.IEditorProgressService);await r.showWhile(i.invokeFunction(m.formatDocumentRangesWithSelectedProvider,t,s,1,y.Progress.None,n.CancellationToken.None),250)}}l.registerEditorContribution(w.ID,w),l.registerEditorContribution(E.ID,E),l.registerEditorAction(I),l.registerEditorAction(x),S.CommandsRegistry.registerCommand("editor.action.format",async e=>{const t=e.get(c.ICodeEditorService).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(S.ICommandService);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")})})),define(e[566],t([0,1,31,21,37,45]),(function(e,t,i,n,o,s){"use strict";function r(e,t,i,o){const s=i.ordered(e).map(i=>Promise.resolve(o(i,e,t)).then(void 0,e=>{n.onUnexpectedExternalError(e)})) ;return Promise.all(s).then(e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t})}function a(e,t,i){return r(e,t,s.DefinitionProviderRegistry,(e,t,n)=>e.provideDefinition(t,n,i))}function l(e,t,i){return r(e,t,s.DeclarationProviderRegistry,(e,t,n)=>e.provideDeclaration(t,n,i))}function c(e,t,i){return r(e,t,s.ImplementationProviderRegistry,(e,t,n)=>e.provideImplementation(t,n,i))}function d(e,t,i){return r(e,t,s.TypeDefinitionProviderRegistry,(e,t,n)=>e.provideTypeDefinition(t,n,i))}function h(e,t,i,n){return r(e,t,s.ReferenceProviderRegistry,async(e,t,o)=>{const s=await e.provideReferences(t,o,{includeDeclaration:!0},n);if(!i||!s||2!==s.length)return s;const r=await e.provideReferences(t,o,{includeDeclaration:!1},n);return r&&1===r.length?r:s})}Object.defineProperty(t,"__esModule",{value:!0}),t.getReferencesAtPosition=t.getTypeDefinitionsAtPosition=t.getImplementationsAtPosition=t.getDeclarationsAtPosition=t.getDefinitionsAtPosition=void 0,t.getDefinitionsAtPosition=a, t.getDeclarationsAtPosition=l,t.getImplementationsAtPosition=c,t.getTypeDefinitionsAtPosition=d,t.getReferencesAtPosition=h,o.registerModelAndPositionCommand("_executeDefinitionProvider",(e,t)=>a(e,t,i.CancellationToken.None)),o.registerModelAndPositionCommand("_executeDeclarationProvider",(e,t)=>l(e,t,i.CancellationToken.None)),o.registerModelAndPositionCommand("_executeImplementationProvider",(e,t)=>c(e,t,i.CancellationToken.None)),o.registerModelAndPositionCommand("_executeTypeDefinitionProvider",(e,t)=>d(e,t,i.CancellationToken.None)),o.registerModelAndPositionCommand("_executeReferenceProvider",(e,t)=>h(e,t,!1,i.CancellationToken.None))})),define(e[1541],t([0,1,8,5,33,82,37,72,18,2,6,1003,35,28,17]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISymbolNavigationService=t.ctxHasSymbols=void 0,t.ctxHasSymbols=new i.RawContextKey("hasSymbols",!1),t.ISymbolNavigationService=n.createDecorator("ISymbolNavigationService");let f=class{ constructor(e,i,n,o){this._editorService=i,this._notificationService=n,this._keybindingService=o,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=t.ctxHasSymbols.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new S(this._editorService),n=i.onDidChange(e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if(v.isEqual(e.uri,n.uri))s=!0,r=r||d.Range.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()});this._currentState=h.combinedDisposable(i,n)} revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:d.Range.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?g.localize(0,null,this._currentIdx+1,this._currentModel.references.length,t.getLabel()):g.localize(1,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};f=o([r(0,i.IContextKeyService),r(1,c.ICodeEditorService),r(2,m.INotificationService),r(3,p.IKeybindingService)],f),s.registerSingleton(t.ISymbolNavigationService,f,!0), l.registerEditorCommand(new class extends l.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:t.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,i){return e.get(t.ISymbolNavigationService).revealNext(i)}}),a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:t.ctxHasSymbols,primary:9,handler(e){e.get(t.ISymbolNavigationService).reset()}});let S=class{constructor(e){this._listener=new Map,this._disposables=new h.DisposableStore,this._onDidChange=new u.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),h.dispose(this._listener.values())}_onDidAddEditor(e){ this._listener.set(e,h.combinedDisposable(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};S=o([r(0,c.ICodeEditorService)],S)})),define(e[1542],t([0,1,14,31,21,37,45]),(function(e,t,i,n,o,s,r){"use strict";function a(e,t,n){const s=r.HoverProviderRegistry.ordered(e).map(i=>Promise.resolve(i.provideHover(e,t,n)).then(e=>e&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(e)?e:void 0,e=>{o.onUnexpectedExternalError(e)}));return Promise.all(s).then(i.coalesce)}Object.defineProperty(t,"__esModule",{value:!0}),t.getHover=void 0,t.getHover=a,s.registerModelAndPositionCommand("_executeHoverProvider",(e,t)=>a(e,t,n.CancellationToken.None))})),define(e[567],t([0,1,1007,2,24,37,418,115,18,60,58,75,134,46,546,49]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m){"use strict" ;function v(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let s=u.LanguageConfigurationRegistry.getIndentationRules(e.getLanguageIdentifier().id);if(!s)return[];for(i=Math.min(i,e.getLineCount());t<=i&&s.unIndentedLinePattern;){let i=e.getLineContent(t);if(!s.unIndentedLinePattern.test(i))break;t++}if(t>i-1)return[];const{tabSize:l,indentSize:d,insertSpaces:g}=e.getOptions(),p=(e,t)=>(t=t||1,r.ShiftCommand.shiftIndent(e,e.length+t,l,d,g)),m=(e,t)=>(t=t||1,r.ShiftCommand.unshiftIndent(e,e.length+t,l,d,g));let v,f=[],S=e.getLineContent(t),b=S;if(null!=n){v=n;let e=o.getLeadingWhitespace(S);b=v+S.substring(e.length),s.decreaseIndentPattern&&s.decreaseIndentPattern.test(b)&&(b=(v=m(v))+S.substring(e.length)),S!==b&&f.push(a.EditOperation.replace(new c.Selection(t,1,t,e.length+1),h.TextModel.normalizeIndentation(v,d,g)))}else v=o.getLeadingWhitespace(S);let _=v;s.increaseIndentPattern&&s.increaseIndentPattern.test(b)?(_=p(_), v=p(v)):s.indentNextLinePattern&&s.indentNextLinePattern.test(b)&&(_=p(_));for(let n=++t;n<=i;n++){let t=e.getLineContent(n),i=o.getLeadingWhitespace(t),r=_+t.substring(i.length);s.decreaseIndentPattern&&s.decreaseIndentPattern.test(r)&&(_=m(_),v=m(v)),i!==_&&f.push(a.EditOperation.replace(new c.Selection(n,1,n,i.length+1),h.TextModel.normalizeIndentation(_,d,g))),s.unIndentedLinePattern&&s.unIndentedLinePattern.test(t)||(_=s.increaseIndentPattern&&s.increaseIndentPattern.test(r)?v=p(v):s.indentNextLinePattern&&s.indentNextLinePattern.test(r)?p(_):v)}return f}Object.defineProperty(t,"__esModule",{value:!0}),t.IndentationToTabsCommand=t.IndentationToSpacesCommand=t.AutoIndentOnPaste=t.AutoIndentOnPasteCommand=t.ReindentSelectedLinesAction=t.ReindentLinesAction=t.DetectIndentation=t.IndentUsingSpaces=t.IndentUsingTabs=t.ChangeIndentationSizeAction=t.IndentationToTabsAction=t.IndentationToSpacesAction=t.getReindentEditOperations=void 0,t.getReindentEditOperations=v;class f extends s.EditorAction{constructor(){ super({id:f.ID,label:i.localize(0,null),alias:"Convert Indentation to Spaces",precondition:d.EditorContextKeys.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new D(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}t.IndentationToSpacesAction=f,f.ID="editor.action.indentationToSpaces";class S extends s.EditorAction{constructor(){super({id:S.ID,label:i.localize(1,null),alias:"Convert Indentation to Tabs",precondition:d.EditorContextKeys.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new T(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}t.IndentationToTabsAction=S,S.ID="editor.action.indentationToTabs";class b extends s.EditorAction{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const n=e.get(m.IQuickInputService),o=e.get(g.IModelService) ;let s=t.getModel();if(!s)return;let r=o.getCreationOptions(s.getLanguageIdentifier().language,s.uri,s.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map(e=>({id:e.toString(),label:e.toString(),description:e===r.tabSize?i.localize(2,null):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(a,{placeHolder:i.localize(3,null),activeItem:a[l]}).then(e=>{e&&s&&!s.isDisposed()&&s.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})})},50)}}t.ChangeIndentationSizeAction=b;class _ extends b{constructor(){super(!1,{id:_.ID,label:i.localize(4,null),alias:"Indent Using Tabs",precondition:void 0})}}t.IndentUsingTabs=_,_.ID="editor.action.indentUsingTabs";class C extends b{constructor(){super(!0,{id:C.ID,label:i.localize(5,null),alias:"Indent Using Spaces",precondition:void 0})}}t.IndentUsingSpaces=C,C.ID="editor.action.indentUsingSpaces";class y extends s.EditorAction{constructor(){super({id:y.ID,label:i.localize(6,null),alias:"Detect Indentation from Content",precondition:void 0 })}run(e,t){const i=e.get(g.IModelService);let n=t.getModel();if(!n)return;let o=i.getCreationOptions(n.getLanguageIdentifier().language,n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}t.DetectIndentation=y,y.ID="editor.action.detectIndentation";class w extends s.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:i.localize(7,null),alias:"Reindent Lines",precondition:d.EditorContextKeys.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=v(i,1,i.getLineCount());n.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,n),t.pushUndoStop())}}t.ReindentLinesAction=w;class E extends s.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:i.localize(8,null),alias:"Reindent Selected Lines",precondition:d.EditorContextKeys.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=t.getSelections();if(null===n)return;let o=[];for(let e of n){let t=e.startLineNumber,n=e.endLineNumber;if(t!==n&&1===e.endColumn&&n--,1===t){if(t===n)continue }else t--;let s=v(i,t,n);o.push(...s)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}t.ReindentSelectedLinesAction=E;class I{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(l.Range.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){ return t.getTrackedSelection(this._selectionId)}}t.AutoIndentOnPasteCommand=I;class x{constructor(e){this.callOnDispose=new n.DisposableStore,this.callOnModel=new n.DisposableStore,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),this.editor.getOption(8)<4||this.editor.getOption(40)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(8),{tabSize:s,indentSize:a,insertSpaces:c}=i.getOptions();this.editor.pushUndoStop();let d=[],h={shiftIndent:e=>r.ShiftCommand.shiftIndent(e,e.length+1,s,a,c), unshiftIndent:e=>r.ShiftCommand.unshiftIndent(e,e.length+1,s,a,c)},g=e.startLineNumber;for(;g<=e.endLineNumber&&this.shouldIgnoreLine(i,g);)g++;if(g>e.endLineNumber)return;let m=i.getLineContent(g);if(!/\S/.test(m.substring(0,e.startColumn-1))){let e=u.LanguageConfigurationRegistry.getGoodIndentForLine(n,i,i.getLanguageIdentifier().id,g,h);if(null!==e){let t=o.getLeadingWhitespace(m),n=p.getSpaceCnt(e,s);if(n!==p.getSpaceCnt(t,s)){let e=p.generateIndent(n,s,c);d.push({range:new l.Range(g,1,g,t.length+1),text:e}),m=e+m.substr(t.length)}else{let e=u.LanguageConfigurationRegistry.getIndentMetadata(i,g);if(0===e||8===e)return}}}const v=g;for(;gi.getLineTokens(e),getLanguageIdentifier:()=>i.getLanguageIdentifier(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t),getLineContent:e=>e===v?m:i.getLineContent(e) },r=u.LanguageConfigurationRegistry.getGoodIndentForLine(n,t,i.getLanguageIdentifier().id,g+1,h);if(null!==r){let t=p.getSpaceCnt(r,s),n=p.getSpaceCnt(o.getLeadingWhitespace(i.getLineContent(g+1)),s);if(t!==n){let r=t-n;for(let t=g+1;t<=e.endLineNumber;t++){let e=i.getLineContent(t),n=o.getLeadingWhitespace(e),a=p.getSpaceCnt(n,s)+r,h=p.generateIndent(a,s,c);h!==n&&d.push({range:new l.Range(t,1,t,n.length+1),text:h})}}}}let f=new I(d,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function k(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e({selection:e,index:t,ignore:!1}));i.sort((e,t)=>h.Range.compareRangesUsingStarts(e.selection,t.selection));let n=i[0];for(let e=1;enew d.Position(e.positionLineNumber,e.positionColumn)));let o=t.getSelection();if(null===o)return;let s=new a.TrimTrailingWhitespaceCommand(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}t.TrimTrailingWhitespaceAction=E,E.ID="editor.action.trimTrailingWhitespace";class I extends s.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:i.localize(13,null),alias:"Delete Line",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0,s=[],r=[] ;for(let e=0,t=i.length;e1&&(a-=1,d=n.getLineMaxColumn(a)),s.push(c.EditOperation.replace(new u.Selection(a,d,l,h),"")),r.push(new u.Selection(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber);let i=[],n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}t.DeleteLinesAction=I;class x extends s.EditorAction{ constructor(){super({id:"editor.action.indentLines",label:i.localize(14,null),alias:"Indent Line",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l.TypeOperations.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}t.IndentLinesAction=x;class k extends s.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:i.localize(15,null),alias:"Outdent Line",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2135,weight:100}})}run(e,t){o.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class D extends s.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:i.localize(16,null),alias:"Insert Line Above",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(e,t){ const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l.TypeOperations.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}t.InsertLineBeforeAction=D;class T extends s.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:i.localize(17,null),alias:"Insert Line Below",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l.TypeOperations.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}t.InsertLineAfterAction=T;class R extends s.EditorAction{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;ec.EditOperation.replace(e,""));t.pushUndoStop(), t.executeEdits(this.id,r,s),t.pushUndoStop()}}t.AbstractDeleteAllToBoundaryAction=R;class A extends R{constructor(){super({id:"deleteAllLeft",label:i.localize(18,null),alias:"Delete All Left",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],o=0;return t.forEach(t=>{let s;if(1===t.endColumn&&o>0){let e=t.startLineNumber-o;s=new u.Selection(e,t.startColumn,e,t.startColumn)}else s=new u.Selection(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(h.Range.compareRangesUsingStarts),i=i.map(e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new h.Range(t,i,e.startLineNumber,1)} return new h.Range(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new h.Range(e.startLineNumber,1,e.endLineNumber,e.endColumn)}))}}t.DeleteAllLeftAction=A;class M extends R{constructor(){super({id:"deleteAllRight",label:i.localize(19,null),alias:"Delete All Right",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let o=0,s=t.length,r=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new h.Range(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new h.Range(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}) ;return n.sort(h.Range.compareRangesUsingStarts),n}}t.DeleteAllRightAction=M;class L extends s.EditorAction{constructor(){super({id:"editor.action.joinLines",label:i.localize(20,null),alias:"Join Lines",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(h.Range.compareRangesUsingStarts);let o=[],s=i.reduce((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new u.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new u.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn));o.push(s);let r=t.getModel();if(null===r)return;let a=[],l=[],d=n,g=0;for(let e=0,t=o.length;e=1){let e=!0;""===S&&(e=!1),!e||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(e=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);S+=(e?" ":"")+n,v=e?n.length+1:n.length}else v=0}let b=new h.Range(p,m,t,i);if(!b.isEmpty()){let e;s.isEmpty()?(a.push(c.EditOperation.replace(b,S)),e=new u.Selection(b.startLineNumber-g,S.length-v+1,p-g,S.length-v+1)):s.startLineNumber===s.endLineNumber?(a.push(c.EditOperation.replace(b,S)), e=new u.Selection(s.startLineNumber-g,s.startColumn,s.endLineNumber-g,s.endColumn)):(a.push(c.EditOperation.replace(b,S)),e=new u.Selection(s.startLineNumber-g,s.startColumn,s.startLineNumber-g,S.length-f)),null!==h.Range.intersectRanges(b,n)?d=e:l.push(e)}g+=b.endLineNumber-b.startLineNumber}l.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}t.JoinLinesAction=L;class O extends s.EditorAction{constructor(){super({id:"editor.action.transpose",label:i.localize(21,null),alias:"Transpose characters around the cursor",precondition:g.EditorContextKeys.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let o=[];for(let e=0,t=i.length;e=a){if(s.lineNumber===n.getLineCount())continue;let e=new h.Range(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("") ;o.push(new r.ReplaceCommand(new u.Selection(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{let e=new h.Range(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.ReplaceCommandThatPreservesSelection(e,t,new u.Selection(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}t.TransposeAction=O;class N extends s.EditorAction{run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let o=t.getOption(105),s=[];for(let e=0,a=i.length;e=0?(o=!0,n+=s):o?(o=!1, n+=s.toLocaleUpperCase()):n+=s.toLocaleLowerCase()}return n}}t.TitleCaseAction=B,s.registerEditorAction(class extends S{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:i.localize(0,null),alias:"Copy Line Up",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:i.localize(1,null),order:1}})}}),s.registerEditorAction(class extends S{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:i.localize(2,null),alias:"Copy Line Down",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:i.localize(3,null),order:2}})}}),s.registerEditorAction(b),s.registerEditorAction(class extends _{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:i.localize(6,null), alias:"Move Line Up",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:i.localize(7,null),order:3}})}}),s.registerEditorAction(class extends _{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:i.localize(8,null),alias:"Move Line Down",precondition:g.EditorContextKeys.writable,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:i.localize(9,null),order:4}})}}),s.registerEditorAction(y),s.registerEditorAction(w),s.registerEditorAction(E),s.registerEditorAction(I),s.registerEditorAction(x),s.registerEditorAction(k),s.registerEditorAction(D),s.registerEditorAction(T),s.registerEditorAction(A),s.registerEditorAction(M),s.registerEditorAction(L),s.registerEditorAction(O),s.registerEditorAction(P),s.registerEditorAction(F), s.registerEditorAction(B)})),define(e[430],t([0,1,15,21,37,45,8,31]),(function(e,t,i,n,o,s,r,a){"use strict";function l(e,t,o,r){const a=s.SignatureHelpProviderRegistry.ordered(e);return i.first(a.map(i=>()=>Promise.resolve(i.provideSignatureHelp(e,t,r,o)).catch(e=>n.onUnexpectedExternalError(e))))}Object.defineProperty(t,"__esModule",{value:!0}),t.provideSignatureHelp=t.Context=void 0,t.Context={Visible:new r.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new r.RawContextKey("parameterHintsMultipleSignatures",!1)},t.provideSignatureHelp=l,o.registerDefaultLanguageCommand("_executeSignatureHelpProvider",async(e,t,i)=>{const n=await l(e,t,{triggerKind:s.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:i.triggerCharacter},a.CancellationToken.None);if(n)return setTimeout(()=>n.dispose(),0),n.value})})),define(e[1543],t([0,1,15,21,6,2,258,45,430]),(function(e,t,i,n,o,s,r,a,l){"use strict";var c;Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterHintsModel=void 0,function(e){ let t;!function(e){e[e.Default=0]="Default",e[e.Active=1]="Active",e[e.Pending=2]="Pending"}(t=e.Type||(e.Type={})),e.Default={type:0};e.Pending=class{constructor(e){this.request=e,this.type=2}};e.Active=class{constructor(e){this.hints=e,this.type=1}}}(c||(c={}));class d extends s.Disposable{constructor(e,t=d.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new o.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=c.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new s.MutableDisposable),this.triggerChars=new r.CharacterSet,this.retriggerChars=new r.CharacterSet,this.triggerId=0,this.editor=e,this.throttledDelayer=new i.Delayer(t),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(e=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(e=>this.onModelChanged())), this._register(this.editor.onDidChangeCursorSelection(e=>this.onCursorChange(e))),this._register(this.editor.onDidChangeModelContent(e=>this.onModelContentChange())),this._register(a.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(e=>this.onDidType(e))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=c.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!a.SignatureHelpProviderRegistry.has(i))return;const o=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(o),t).catch(n.onUnexpectedError)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(67).cycle ;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(67).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new c.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,o=1===this.state.type?this.state.hints:void 0;if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const s=this._pendingTriggers.reduce(h);this._pendingTriggers=[];const r={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:t,activeSignatureHelp:o};if(!this.editor.hasModel())return!1;const a=this.editor.getModel(),d=this.editor.getPosition();this.state=new c.Pending(i.createCancelablePromise(e=>l.provideSignatureHelp(a,d,r,e)));try{ const t=await this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new c.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=c.Default),n.onUnexpectedError(t),!1}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new r.CharacterSet,this.retriggerChars=new r.CharacterSet;const e=this.editor.getModel();if(e)for(const t of a.SignatureHelpProviderRegistry.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(e.charCodeAt(0)),this.retriggerChars.add(e.charCodeAt(0));for(const e of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return ;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(67).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function h(e,t){switch(t.triggerKind){case a.SignatureHelpTriggerKind.Invoke:return t;case a.SignatureHelpTriggerKind.ContentChange:return e;case a.SignatureHelpTriggerKind.TriggerCharacter:default:return t}}t.ParameterHintsModel=d,d.DEFAULT_DELAY=120})),define(e[1544],t([0,1,14,31,37,47,18,60,58,45,1020,20,928,547,32,21]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.provideSelectionRanges=void 0;class v{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new v(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class f{constructor(e){this._ignoreSelection=!1,this._editor=e}static get(e){return e.getContribution(f.ID)}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),o=this._editor.getModel();if(!c.SelectionRangeRegistry.has(o))return;let s=Promise.resolve(void 0);return this._state||(s=b(o,t.map(e=>e.getPosition()),n.CancellationToken.None).then(e=>{var n;if(i.isNonEmptyArray(e)&&e.length===t.length&&this._editor.hasModel()&&i.equals(this._editor.getSelections(),t,(e,t)=>e.equalsSelection(t))){ for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition())),e[i].unshift(t[i]);this._state=e.map(e=>new v(0,e)),null===(n=this._selectionListener)||void 0===n||n.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)})}})),s.then(()=>{if(!this._state)return;this._state=this._state.map(t=>t.mov(e));const t=this._state.map(e=>a.Selection.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(t)}finally{this._ignoreSelection=!1}})}}f.ID="editor.contrib.smartSelectController";class S extends o.EditorAction{constructor(e,t){super(t),this._forward=e}async run(e,t){let i=f.get(t);i&&await i.run(this._forward)}}p.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand") ;function b(e,t,n){const o=c.SelectionRangeRegistry.all(e);1===o.length&&o.unshift(new g.BracketSelectionRangeProvider);let a=[],l=[];for(const s of o)a.push(Promise.resolve(s.provideSelectionRanges(e,t,n)).then(e=>{if(i.isNonEmptyArray(e)&&e.length===t.length)for(let i=0;il.map(t=>{if(0===t.length)return[];t.sort((e,t)=>s.Position.isBefore(e.getStartPosition(),t.getStartPosition())?1:s.Position.isBefore(t.getStartPosition(),e.getStartPosition())?-1:s.Position.isBefore(e.getEndPosition(),t.getEndPosition())?-1:s.Position.isBefore(t.getEndPosition(),e.getEndPosition())?1:0);let i,n=[];for(const e of t)(!i||r.Range.containsRange(e,i)&&!r.Range.equalsRange(e,i))&&(n.push(e),i=e);let o=[n[0]];for(let t=1;t{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()},e=>{i.isPromiseCanceledError(e)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache}}t.CompletionItem=g,function(e){e[e.Top=0]="Top",e[e.Inline=1]="Inline",e[e.Bottom=2]="Bottom"}(t.SnippetSortOrder||(t.SnippetSortOrder={}));class p{constructor(e=2,t=new Set,i=new Set){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i}}let m;t.CompletionOptions=p,p.default=new p,t.getSnippetSuggestSupport=function(){return m},t.setSnippetSuggestSupport=function(e){const t=m;return m=e,t};class v{constructor(e,t,i){this.items=e,this.needsClipboard=t,this.dispoables=i}}async function f(e,t,n=p.default,s={triggerKind:0},r=a.CancellationToken.None){t=t.clone() ;const c=e.getWordAtPosition(t),h=c?new l.Range(t.lineNumber,c.startColumn,t.lineNumber,c.endColumn):l.Range.fromPositions(t),f={replace:h,insert:h.setEndPosition(t.lineNumber,t.column)},S=[],b=new d.DisposableStore;let C=!1;const y=(e,i)=>{if(i){for(let o of i.suggestions)n.kindFilter.has(o.kind)||(o.range||(o.range=f),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.name),!C&&o.insertTextRules&&4&o.insertTextRules&&(C=u.SnippetParser.guessNeedsClipboard(o.insertText)),S.push(new g(t,o,i,e)));d.isDisposable(i)&&b.add(i)}},w=(async()=>{if(!m||n.kindFilter.has(27))return;if(n.providerFilter.size>0&&!n.providerFilter.has(m))return;const i=await m.provideCompletionItems(e,t,s,r);y(m,i)})();for(let a of o.CompletionProviderRegistry.orderedGroups(e)){let o=S.length;if(await Promise.all(a.map(async o=>{if(!(n.providerFilter.size>0)||n.providerFilter.has(o))try{const i=await o.provideCompletionItems(e,t,s,r);y(o,i)}catch(e){i.onUnexpectedExternalError(e)}})), o!==S.length||r.isCancellationRequested)break}return await w,r.isCancellationRequested?(b.dispose(),Promise.reject(i.canceled())):new v(S.sort(_(n.snippetSortOrder)),C,b)}function S(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}t.provideSuggestionItems=f;const b=new Map;function _(e){return b.get(e)}b.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return S(e,t)})),b.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return S(e,t)})),b.set(1,S),t.getSuggestionComparator=_,n.registerDefaultLanguageCommand("_executeCompletionItemProvider",async(e,t,i)=>{const n={incomplete:!1,suggestions:[]},o=[],s=i.maxItemsToResolve||0,r=await f(e,t) ;for(const e of r.items)o.lengthr.dispoables.dispose(),100)}});const C=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};o.CompletionProviderRegistry.register("*",C),t.showSimpleSuggestions=function(e,t){setTimeout(()=>{C.onlyOnceSuggestions.push(...t),e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(C))},0)}})),define(e[569],t([0,1,1024,103,37,238]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleTabFocusModeAction=void 0;class r extends o.EditorAction{constructor(){super({id:r.ID,label:i.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100} })}run(e,t){const o=!s.TabFocus.getTabFocusMode();s.TabFocus.setTabFocusMode(o),o?n.alert(i.localize(1,null)):n.alert(i.localize(2,null))}}t.ToggleTabFocusModeAction=r,r.ID="editor.action.toggleTabFocusMode",o.registerEditorAction(r)})),define(e[1545],t([0,1,1025,37,232]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends n.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:i.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.resetTokenization();const n=new o.StopWatch(!0);i.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}n.registerEditorAction(s)})),define(e[1546],t([0,1,1026,2,37,72,71]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const c="ignoreUnusualLineTerminators";let d=class extends n.Disposable{constructor(e,t,i){super(),this._editor=e,this._dialogService=t, this._codeEditorService=i,this._config=this._editor.getOption(103),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(103)&&(this._config=this._editor.getOption(103),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();e.mightContainUnusualLineTerminators()&&!0!==function(e,t){return e.getModelProperty(t.uri,c)}(this._codeEditorService,e)&&(this._editor.getOption(72)||("auto"!==this._config?(await this._dialogService.confirm({title:i.localize(0,null),message:i.localize(1,null),detail:i.localize(2,null),primaryButton:i.localize(3,null),secondaryButton:i.localize(4,null)})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){ e.setModelProperty(t.uri,c,i)}(this._codeEditorService,e,!0):e.removeUnusualLineTerminators(this._editor.getSelections())))}};d.ID="editor.contrib.unusualLineTerminatorsDetector",d=o([r(1,l.IDialogService),r(2,a.ICodeEditorService)],d),s.registerEditorContribution(d.ID,d)})),define(e[570],t([0,1,37,259,139,352,295,47,18,60,58,105,8,111,134]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.DeleteWordRight=t.DeleteWordEndRight=t.DeleteWordStartRight=t.DeleteWordLeft=t.DeleteWordEndLeft=t.DeleteWordStartLeft=t.DeleteWordRightCommand=t.DeleteWordLeftCommand=t.DeleteWordCommand=t.CursorWordAccessibilityRightSelect=t.CursorWordAccessibilityRight=t.CursorWordRightSelect=t.CursorWordEndRightSelect=t.CursorWordStartRightSelect=t.CursorWordRight=t.CursorWordEndRight=t.CursorWordStartRight=t.CursorWordAccessibilityLeftSelect=t.CursorWordAccessibilityLeft=t.CursorWordLeftSelect=t.CursorWordEndLeftSelect=t.CursorWordStartLeftSelect=t.CursorWordLeft=t.CursorWordEndLeft=t.CursorWordStartLeft=t.WordRightCommand=t.WordLeftCommand=t.MoveWordCommand=void 0;class m extends i.EditorCommand{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=r.getMapForWordSeparators(t.getOption(105)),s=t.getModel(),l=t.getSelections().map(e=>{ const t=new a.Position(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",0,l.map(e=>o.CursorState.fromModelSelection(e))),1===l.length){const e=new a.Position(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new c.Selection(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new c.Selection(t.lineNumber,t.column,t.lineNumber,t.column)}}t.MoveWordCommand=m;class v extends m{_move(e,t,i,n){return s.WordOperations.moveWordLeft(e,t,i,n)}}t.WordLeftCommand=v;class f extends m{_move(e,t,i,n){return s.WordOperations.moveWordRight(e,t,i,n)}}t.WordRightCommand=f;class S extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}t.CursorWordStartLeft=S;class b extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:2, id:"cursorWordEndLeft",precondition:void 0})}}t.CursorWordEndLeft=b;class _ extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:2063,mac:{primary:527},weight:100}})}}t.CursorWordLeft=_;class C extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}t.CursorWordStartLeftSelect=C;class y extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}t.CursorWordEndLeftSelect=y;class w extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})}}t.CursorWordLeftSelect=w;class E extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0,kbOpts:{ kbExpr:u.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),win:{primary:2063},weight:101}})}_move(e,t,i,n){return super._move(r.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue),t,i,n)}}t.CursorWordAccessibilityLeft=E;class I extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0,kbOpts:{kbExpr:u.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),win:{primary:3087},weight:101}})}_move(e,t,i,n){return super._move(r.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue),t,i,n)}}t.CursorWordAccessibilityLeftSelect=I;class x extends f{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}t.CursorWordStartRight=x;class k extends f{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{ kbExpr:d.EditorContextKeys.textInputFocus,primary:2065,mac:{primary:529},weight:100}})}}t.CursorWordEndRight=k;class D extends f{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}t.CursorWordRight=D;class T extends f{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}t.CursorWordStartRightSelect=T;class R extends f{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})}}t.CursorWordEndRightSelect=R;class A extends f{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}t.CursorWordRightSelect=A;class M extends f{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0,kbOpts:{ kbExpr:u.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),win:{primary:2065},weight:101}})}_move(e,t,i,n){return super._move(r.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue),t,i,n)}}t.CursorWordAccessibilityRight=M;class L extends f{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0,kbOpts:{kbExpr:u.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),win:{primary:3089},weight:101}})}_move(e,t,i,n){return super._move(r.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue),t,i,n)}}t.CursorWordAccessibilityRightSelect=L;class O extends i.EditorCommand{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return ;const o=r.getMapForWordSeparators(t.getOption(105)),s=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(7),d=p.LanguageConfigurationRegistry.getAutoClosingPairs(s.getLanguageIdentifier().id),h=a.map(e=>{const t=this._delete({wordSeparators:o,model:s,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d},this._wordNavigationType);return new n.ReplaceCommand(t,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}t.DeleteWordCommand=O;class N extends O{_delete(e,t){let i=s.WordOperations.deleteWordLeft(e,t);return i||new l.Range(1,1,1,1)}}t.DeleteWordLeftCommand=N;class P extends O{_delete(e,t){let i=s.WordOperations.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new l.Range(n,o,n,o)}}t.DeleteWordRightCommand=P;class F extends N{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:d.EditorContextKeys.writable })}}t.DeleteWordStartLeft=F;class B extends N{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:d.EditorContextKeys.writable})}}t.DeleteWordEndLeft=B;class V extends N{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:d.EditorContextKeys.writable,kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}t.DeleteWordLeft=V;class W extends P{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:d.EditorContextKeys.writable})}}t.DeleteWordStartRight=W;class z extends P{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:d.EditorContextKeys.writable})}}t.DeleteWordEndRight=z;class U extends P{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:d.EditorContextKeys.writable,kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus, primary:2068,mac:{primary:532},weight:100}})}}t.DeleteWordRight=U,i.registerEditorCommand(new S),i.registerEditorCommand(new b),i.registerEditorCommand(new _),i.registerEditorCommand(new C),i.registerEditorCommand(new y),i.registerEditorCommand(new w),i.registerEditorCommand(new x),i.registerEditorCommand(new k),i.registerEditorCommand(new D),i.registerEditorCommand(new T),i.registerEditorCommand(new R),i.registerEditorCommand(new A),i.registerEditorCommand(new E),i.registerEditorCommand(new I),i.registerEditorCommand(new M),i.registerEditorCommand(new L),i.registerEditorCommand(new F),i.registerEditorCommand(new B),i.registerEditorCommand(new V),i.registerEditorCommand(new W),i.registerEditorCommand(new z),i.registerEditorCommand(new U)})),define(e[1547],t([0,1,37,352,18,58,570,32]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.CursorWordPartRightSelect=t.CursorWordPartRight=t.WordPartRightCommand=t.CursorWordPartLeftSelect=t.CursorWordPartLeft=t.WordPartLeftCommand=t.DeleteWordPartRight=t.DeleteWordPartLeft=void 0;class l extends r.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=n.WordPartOperations.deleteWordPartLeft(e);return i||new o.Range(1,1,1,1)}}t.DeleteWordPartLeft=l;class c extends r.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=n.WordPartOperations.deleteWordPartRight(e);if(i)return i;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new o.Range(s,r,s,r)}}t.DeleteWordPartRight=c ;class d extends r.MoveWordCommand{_move(e,t,i,o){return n.WordPartOperations.moveWordPartLeft(e,t,i)}}t.WordPartLeftCommand=d;class h extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}t.CursorWordPartLeft=h,a.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class u extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}t.CursorWordPartLeftSelect=u,a.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class g extends r.MoveWordCommand{_move(e,t,i,o){return n.WordPartOperations.moveWordPartRight(e,t,i)}}t.WordPartRightCommand=g;class p extends g{constructor(){super({inSelectionMode:!1,wordNavigationType:2, id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}t.CursorWordPartRight=p;class m extends g{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}t.CursorWordPartRightSelect=m,i.registerEditorCommand(new l),i.registerEditorCommand(new c),i.registerEditorCommand(new h),i.registerEditorCommand(new u),i.registerEditorCommand(new p),i.registerEditorCommand(new m)})),define(e[1548],t([0,1,21,76,106,41,23,167,1473,84,31,39,25,10,61,26,356,5,17]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";var C,y;Object.defineProperty(t,"__esModule",{value:!0}),t.resolveMarketplaceHeaders=t.ExtensionGalleryService=void 0,function(e){e[e.None=0]="None",e[e.IncludeVersions=1]="IncludeVersions",e[e.IncludeFiles=2]="IncludeFiles", e[e.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",e[e.IncludeSharedAccounts=8]="IncludeSharedAccounts",e[e.IncludeVersionProperties=16]="IncludeVersionProperties",e[e.ExcludeNonValidated=32]="ExcludeNonValidated",e[e.IncludeInstallationTargets=64]="IncludeInstallationTargets",e[e.IncludeAssetUri=128]="IncludeAssetUri",e[e.IncludeStatistics=256]="IncludeStatistics",e[e.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",e[e.Unpublished=4096]="Unpublished"}(C||(C={})),function(e){e[e.Tag=1]="Tag",e[e.ExtensionId=4]="ExtensionId",e[e.Category=5]="Category",e[e.ExtensionName=7]="ExtensionName",e[e.Target=8]="Target",e[e.Featured=9]="Featured",e[e.SearchText=10]="SearchText",e[e.ExcludeWithFlags=12]="ExcludeWithFlags"}(y||(y={}));const w={Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest", VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source"},E={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages",WebExtension:"Microsoft.VisualStudio.Code.WebExtension"},I={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:C.None,criteria:[],assetTypes:[]};class x{constructor(e=I){this.state=e}get pageNumber(){return this.state.pageNumber}get pageSize(){return this.state.pageSize}get sortBy(){return this.state.sortBy}get sortOrder(){return this.state.sortOrder}get flags(){return this.state.flags}withPage(e,t=this.state.pageSize){return new x(Object.assign(Object.assign({},this.state),{pageNumber:e,pageSize:t}))}withFilter(e,...t){const i=[...this.state.criteria,...t.length?t.map(t=>({filterType:e,value:t})):[{filterType:e }]];return new x(Object.assign(Object.assign({},this.state),{criteria:i}))}withSortBy(e){return new x(Object.assign(Object.assign({},this.state),{sortBy:e}))}withSortOrder(e){return new x(Object.assign(Object.assign({},this.state),{sortOrder:e}))}withFlags(...e){return new x(Object.assign(Object.assign({},this.state),{flags:e.reduce((e,t)=>e|t,0)}))}withAssetTypes(...e){return new x(Object.assign(Object.assign({},this.state),{assetTypes:e}))}get raw(){const{criteria:e,pageNumber:t,pageSize:i,sortBy:n,sortOrder:o,flags:s,assetTypes:r}=this.state;return{filters:[{criteria:e,pageNumber:t,pageSize:i,sortBy:n,sortOrder:o}],assetTypes:r,flags:s}}get searchText(){const e=this.state.criteria.filter(e=>e.filterType===y.SearchText)[0];return e&&e.value?e.value:""}}function k(e,t){const i=(e||[]).filter(e=>e.statisticName===t)[0];return i?i.value:0}function D(e){return e.files.filter(e=>0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")).reduce((t,i)=>{const n=M(e,i.assetType) ;return n&&t.push([i.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length),n]),t},[])}function T(e){if(e.properties){const t=e.properties.filter(e=>e.key===w.Repository),i=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?"),n=t.filter(e=>i.test(e.value))[0];return n?{uri:n.value,fallbackUri:n.value}:null}return M(e,w.Repository)}function R(e){return{uri:`${e.fallbackAssetUri}/${w.VSIX}?redirect=true`,fallbackUri:`${e.fallbackAssetUri}/${w.VSIX}`}}function A(e){const t=M(e,w.Icon);if(t)return t;const i=n.DefaultIconPath;return{uri:i,fallbackUri:i}}function M(e,t){return e.files.filter(e=>e.assetType===t)[0]?{uri:`${e.assetUri}/${t}`,fallbackUri:`${e.fallbackAssetUri}/${t}`}:null}function L(e,t){const i=e.properties?e.properties.filter(e=>e.key===t):[],n=i.length>0&&i[0].value;return n?n.split(",").map(e=>s.adoptToGalleryExtensionId(e)):[]}function O(e){const t=e.properties?e.properties.filter(e=>e.key===E.Engine):[];return t.length>0&&t[0].value||""}function N(e){ const t=e.properties?e.properties.filter(e=>e.key===E.LocalizedLanguages):[],i=t.length>0&&t[0].value||"";return i?i.split(","):[]}function P(e){const t=e.properties?e.properties.find(e=>e.key===E.WebExtension):void 0;return!!t&&"true"===t.value}function F(e){return e.files.some(e=>e.assetType.startsWith("Microsoft.VisualStudio.Code.WebResources"))?_.joinPath(m.URI.parse(e.assetUri),"Microsoft.VisualStudio.Code.WebResources","extension"):void 0}function B(e,t,i,n,o){const r={manifest:M(t,w.Manifest),readme:M(t,w.Details),changelog:M(t,w.Changelog),license:M(t,w.License),repository:T(t),download:R(t),icon:A(t),coreTranslations:D(t)};return{identifier:{id:s.getGalleryExtensionId(e.publisher.publisherName,e.extensionName),uuid:e.extensionId},name:e.extensionName,version:t.version,date:t.lastUpdated,displayName:e.displayName,publisherId:e.publisher.publisherId,publisher:e.publisher.publisherName,publisherDisplayName:e.publisher.displayName,description:e.shortDescription||"",installCount:k(e.statistics,"install"), rating:k(e.statistics,"averagerating"),ratingCount:k(e.statistics,"ratingcount"),assetUri:m.URI.parse(t.assetUri),webResource:F(t),assetTypes:t.files.map(({assetType:e})=>e),assets:r,properties:{dependencies:L(t,E.Dependency),extensionPack:L(t,E.ExtensionPack),engine:O(t),localizedLanguages:N(t),webExtension:P(t)},telemetryData:{index:(n.pageNumber-1)*n.pageSize+i,searchText:n.searchText,querySource:o},preview:(a=e.flags,-1!==a.indexOf("preview"))};var a}let V=class{constructor(e,t,i,n,o,s,r){this.requestService=e,this.logService=t,this.environmentService=i,this.telemetryService=n,this.fileService=o,this.productService=s;const a=s.extensionsGallery;this.extensionsGalleryUrl=a&&a.serviceUrl,this.extensionsControlUrl=a&&a.controlUrl,this.commonHeadersPromise=W(s.version,this.environmentService,this.fileService,r)}api(e=""){return`${this.extensionsGalleryUrl}${e}`}isEnabled(){return!!this.extensionsGalleryUrl}async getCompatibleExtension(e,t){const i=await this.getCompatibleExtensionByEngine(e,t) ;return(null==i?void 0:i.properties.webExtension)?i.webResource?i:null:i}async getCompatibleExtensionByEngine(e,t){const i=n.isIExtensionIdentifier(e)?null:e;if(i&&i.properties.engine&&d.isEngineValid(i.properties.engine,this.productService.version))return i;const{id:o,uuid:s}=i?i.identifier:e;let r=(new x).withFlags(C.IncludeAssetUri,C.IncludeStatistics,C.IncludeFiles,C.IncludeVersionProperties).withPage(1,1).withFilter(y.Target,"Microsoft.VisualStudio.Code");r=s?r.withFilter(y.ExtensionId,s):r.withFilter(y.ExtensionName,o);const{galleryExtensions:a}=await this.queryGallery(r,u.CancellationToken.None),[l]=a;if(!l||!l.versions.length)return null;if(t){const e=l.versions.filter(e=>e.version===t)[0];if(e){const t=B(l,e,0,r);if(t.properties.engine&&d.isEngineValid(t.properties.engine,this.productService.version))return t}return null}const c=await this.getLastValidExtensionVersion(l,l.versions);return c?B(l,c,0,r):null}async query(e,t){ const n=u.CancellationToken.isCancellationToken(e)?{}:e,o=u.CancellationToken.isCancellationToken(e)?e:t;if(!this.isEnabled())throw new Error("No extension gallery service configured.");const s=n.names?"ids":n.text?"text":"all";let r=n.text||"";const l=a.getOrDefault(n,e=>e.pageSize,50);this.telemetryService.publicLog2("galleryService:query",{type:s,text:r});let c=(new x).withFlags(C.IncludeLatestVersionOnly,C.IncludeAssetUri,C.IncludeStatistics,C.IncludeFiles,C.IncludeVersionProperties).withPage(1,l).withFilter(y.Target,"Microsoft.VisualStudio.Code");r?((r=(r=(r=(r=r.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,i)=>(c=c.withFilter(y.Category,i||t),""))).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,i)=>(c=c.withFilter(y.Tag,i||t),""))).replace(/\bfeatured(\s+|\b|$)/g,()=>(c=c.withFilter(y.Featured),""))).trim())&&(r=r.length<200?r:r.substring(0,200),c=c.withFilter(y.SearchText,r)), c=c.withSortBy(0)):c=n.ids?c.withFilter(y.ExtensionId,...n.ids):n.names?c.withFilter(y.ExtensionName,...n.names):c.withSortBy(4),"number"==typeof n.sortBy&&(c=c.withSortBy(n.sortBy)),"number"==typeof n.sortOrder&&(c=c.withSortOrder(n.sortOrder));const{galleryExtensions:d,total:h}=await this.queryGallery(c,o);return{firstPage:d.map((e,t)=>B(e,e.versions[0],t,c,n.source)),total:h,pageSize:c.pageSize,getPage:async(e,t)=>{if(t.isCancellationRequested)throw i.canceled();const o=c.withPage(e+1),{galleryExtensions:s}=await this.queryGallery(o,t);return s.map((e,t)=>B(e,e.versions[0],t,o,n.source))}}}async queryGallery(e,t){if(!this.isEnabled())throw new Error("No extension gallery service configured.");e=e.withFlags(e.flags,C.ExcludeNonValidated).withFilter(y.ExcludeWithFlags,function(...e){return String(e.reduce((e,t)=>e|t,0))}(C.Unpublished));const i=await this.commonHeadersPromise,n=JSON.stringify(e.raw),o=Object.assign(Object.assign({},i),{"Content-Type":"application/json", Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":String(n.length)}),s=await this.requestService.request({type:"POST",url:this.api("/extensionquery"),data:n,headers:o},t);if(s.res.statusCode&&s.res.statusCode>=400&&s.res.statusCode<500)return{galleryExtensions:[],total:0};const r=await c.asJson(s);if(r){const e=r.results[0],t=e.extensions,i=e.resultMetadata&&e.resultMetadata.filter(e=>"ResultCount"===e.metadataType)[0];return{galleryExtensions:t,total:i&&i.metadataItems.filter(e=>"TotalCount"===e.name)[0].count||0}}return{galleryExtensions:[],total:0}}async reportStatistic(e,t,i,n){if(!this.isEnabled())return;const o=await this.commonHeadersPromise,s=Object.assign(Object.assign({},o),{Accept:"*/*;api-version=4.0-preview.1"});try{await this.requestService.request({type:"POST",url:this.api(`/publishers/${e}/extensions/${t}/${i}/stats?statType=${n}`),headers:s},u.CancellationToken.None)}catch(e){}}async download(e,t,i){ this.logService.trace("ExtensionGalleryService#download",e.identifier.id);const n=s.getGalleryExtensionTelemetryData(e),o=(new Date).getTime(),r=1===i?"install":2===i?"update":"",a=r?{uri:`${e.assets.download.uri}&${r}=true`,fallbackUri:`${e.assets.download.fallbackUri}?${r}=true`}:e.assets.download,l=await this.getAsset(a);await this.fileService.writeFile(t,l.stream),(e=>this.telemetryService.publicLog("galleryService:downloadVSIX",Object.assign(Object.assign({},n),{duration:e})))((new Date).getTime()-o)}async getReadme(e,t){if(e.assets.readme){const i=await this.getAsset(e.assets.readme,{},t);return await c.asText(i)||""}return""}async getManifest(e,t){if(e.assets.manifest){const i=await this.getAsset(e.assets.manifest,{},t),n=await c.asText(i);return n?JSON.parse(n):null}return null}async getCoreTranslation(e,t){const i=e.assets.coreTranslations.filter(e=>e[0]===t.toUpperCase())[0];if(i){const e=await this.getAsset(i[1]),t=await c.asText(e);return t?JSON.parse(t):null}return null}async getChangelog(e,t){ if(e.assets.changelog){const i=await this.getAsset(e.assets.changelog,{},t);return await c.asText(i)||""}return""}async getAllVersions(e,t){let i=(new x).withFlags(C.IncludeVersions,C.IncludeFiles,C.IncludeVersionProperties).withPage(1,1).withFilter(y.Target,"Microsoft.VisualStudio.Code");i=e.identifier.uuid?i.withFilter(y.ExtensionId,e.identifier.uuid):i.withFilter(y.ExtensionName,e.identifier.id);const n=[],{galleryExtensions:o}=await this.queryGallery(i,u.CancellationToken.None);return o.length&&(t?await Promise.all(o[0].versions.map(async e=>{let t;try{t=await this.getEngine(e)}catch(e){}t&&d.isEngineValid(t,this.productService.version)&&n.push({version:e.version,date:e.lastUpdated})})):n.push(...o[0].versions.map(e=>({version:e.version,date:e.lastUpdated})))),n}async getAsset(e,t={},n=u.CancellationToken.None){const o=await this.commonHeadersPromise,s=Object.assign(Object.assign({},o),t.headers||{});t=Object.assign(Object.assign(Object.assign({},t),{type:"GET"}),{headers:s}) ;const r=e.uri,a=e.fallbackUri,l=Object.assign(Object.assign({},t),{url:r});try{const e=await this.requestService.request(l,n);if(200===e.res.statusCode)return e;const t=await c.asText(e);throw new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`)}catch(e){if(i.isPromiseCanceledError(e))throw e;const o=i.getErrorMessage(e);this.telemetryService.publicLog2("galleryService:cdnFallback",{url:r,message:o});const s=Object.assign(Object.assign({},t),{url:a});return this.requestService.request(s,n)}}async getLastValidExtensionVersion(e,t){const i=this.getLastValidExtensionVersionFromProperties(e,t);return i||this.getLastValidExtensionVersionRecursively(e,t)}getLastValidExtensionVersionFromProperties(e,t){for(const e of t){const t=O(e);if(!t)return null;if(d.isEngineValid(t,this.productService.version))return e}return null}async getEngine(e){const t=O(e);if(t)return t;const i=M(e,w.Manifest);if(!i)throw new Error("Manifest was not found");const n=await this.getAsset(i,{headers:{ "Accept-Encoding":"gzip"}}),o=await c.asJson(n);if(o)return o.engines.vscode;throw new Error("Error while reading manifest")}async getLastValidExtensionVersionRecursively(e,t){if(!t.length)return null;const i=t[0],n=await this.getEngine(i);return d.isEngineValid(n,this.productService.version)?(i.properties=i.properties||[],i.properties.push({key:E.Engine,value:n}),i):this.getLastValidExtensionVersionRecursively(e,t.slice(1))}async getExtensionsReport(){if(!this.isEnabled())throw new Error("No extension gallery service configured.");if(!this.extensionsControlUrl)return[];const e=await this.requestService.request({type:"GET",url:this.extensionsControlUrl},u.CancellationToken.None);if(200!==e.res.statusCode)throw new Error("Could not get extensions report.");const t=await c.asJson(e),i=new Map;if(t)for(const e of t.malicious){const t=i.get(e)||{id:{id:e},malicious:!0,slow:!1};t.malicious=!0,i.set(e,t)}return[...i.values()]}};async function W(e,t,i,n){const o={"X-Market-Client-Id":`VSCode ${e}`, "User-Agent":`VSCode ${e}`},s=await S.getServiceMachineId(t,i,n);return o["X-Market-User-Id"]=s,o}V=o([r(0,c.IRequestService),r(1,g.ILogService),r(2,h.IEnvironmentService),r(3,l.ITelemetryService),r(4,p.IFileService),r(5,v.IProductService),r(6,b.optional(f.IStorageService))],V),t.ExtensionGalleryService=V,t.resolveMarketplaceHeaders=W})),define(e[1549],t([0,1,1043,24,5,9,57,2,41,16]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryService=void 0;let u=class{constructor(e,t){this._configurationService=t,this._experimentProperties={},this._disposables=new c.DisposableStore,this._cleanupPatterns=[],this._appender=e.appender,this._commonProperties=e.commonProperties||Promise.resolve({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._enabled=!0,this.sendErrorTelemetry=!!e.sendErrorTelemetry,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(let e of this._piiPaths)this._cleanupPatterns.push(new RegExp(n.escapeRegExpCharacters(e),"gi")) ;this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog2("optInStatus",{optIn:this._userOptIn}),this._commonProperties.then(e=>{const t=/^[a-f0-9]+$/i.test(e["common.machineId"]);this.publicLog2("machineIdFallback",{usingFallbackGuid:!t})}))}setExperimentProperty(e,t){this._experimentProperties[e]=t}setEnabled(e){this._enabled=e}_updateUserOptIn(){var e;const t=null===(e=this._configurationService)||void 0===e?void 0:e.getValue(g);this._userOptIn=t?t.enableTelemetry:this._userOptIn}get isOptedIn(){return this._userOptIn&&this._enabled}async getTelemetryInfo(){const e=await this._commonProperties;return{sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"],msftInternal:e["common.msftInternal"]}}dispose(){this._disposables.dispose()}publicLog(e,t,i){return this.isOptedIn?this._commonProperties.then(n=>{t=d.mixin(t,n),t=d.mixin(t,this._experimentProperties), t=d.cloneAndChange(t,e=>{if("string"==typeof e)return this._cleanupInfo(e,i)}),this._appender.log(e,t)},e=>{console.error(e)}):Promise.resolve(void 0)}publicLog2(e,t,i){return this.publicLog(e,t,i)}publicLogError(e,t){return this.sendErrorTelemetry?this.publicLog(e,t,!0):Promise.resolve(void 0)}publicLogError2(e,t){return this.publicLogError(e,t)}_cleanupInfo(e,t){let i=e;if(t){const t=[];for(let i of this._cleanupPatterns)for(;;){const n=i.exec(e);if(!n)break;t.push([n.index,i.lastIndex])}const n=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,o=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let s=0;for(i="";;){const r=o.exec(e);if(!r)break;!n.test(r[0])&&t.every(([e,t])=>r.index=t)&&(i+=e.substring(s,r.index)+"",s=o.lastIndex)}se.forEach(e=>e.log(t,i)),flush:()=>Promise.all(e.map(e=>e.flush()))}},t.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};let l=class{constructor(e){this._logService=e,this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}flush(){return Promise.resolve(void 0)}log(e,t){const i={};Object.keys(t).forEach(e=>{this.commonPropertiesRegex.test(e)||(i[e]=t[e])}),this._logService.trace(`telemetry/${e}`,i)}};function c(e){if(!e)return[];const t=[];return function e(t,i,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(o=>e(t,i?`${i}.${o}`:o,n[o])):t.push(i)}(t,"",e),t}l=o([r(0,n.ILogService)],l),t.LogAppender=l,t.configurationTelemetry=function(e,t){return t.onDidChangeConfiguration(t=>{6!==t.source&&e.publicLog2("updateConfiguration",{configurationSource:i.ConfigurationTargetToString(t.source),configurationKeys:c(t.sourceConfig)})})}, t.validateTelemetryData=function(e){const t=Object.create(null),i=Object.create(null),n=Object.create(null);!function e(t,i,n=0,o){if(!t)return;for(let r of Object.getOwnPropertyNames(t)){const l=t[r],c=o?o+r:r;Array.isArray(l)?i[c]=s.safeStringify(l):l instanceof Date?i[c]=l.toISOString():a.isObject(l)?n<2?e(l,i,n+1,c+"."):i[c]=s.safeStringify(l):i[c]=l}}(e,n);for(let e in n){const o=n[e=e.length>150?e.substr(e.length-149):e];"number"==typeof o?i[e]=o:"boolean"==typeof o?i[e]=o?1:0:"string"==typeof o?t[e]=o.substring(0,1023):null!=o&&(t[e]=o)}return{properties:t,measurements:i}},t.cleanRemoteAuthority=function(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl"].forEach(i=>{0===e.indexOf(`${i}+`)&&(t=i)}),t}})),define(e[27],t([0,1,16,55,6,1044,126,15]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.workbenchColorsSchemaId=t.resolveColorValue=t.oneOf=t.transparent=t.lighten=t.darken=t.chartsPurple=t.chartsGreen=t.chartsOrange=t.chartsYellow=t.chartsBlue=t.chartsRed=t.chartsLines=t.chartsForeground=t.problemsInfoIconForeground=t.problemsWarningIconForeground=t.problemsErrorIconForeground=t.minimapSliderActiveBackground=t.minimapSliderHoverBackground=t.minimapSliderBackground=t.minimapBackground=t.minimapWarning=t.minimapError=t.minimapSelection=t.minimapFindMatch=t.overviewRulerSelectionHighlightForeground=t.overviewRulerFindMatchForeground=t.overviewRulerCommonContentForeground=t.overviewRulerIncomingContentForeground=t.overviewRulerCurrentContentForeground=t.mergeBorder=t.mergeCommonContentBackground=t.mergeCommonHeaderBackground=t.mergeIncomingContentBackground=t.mergeIncomingHeaderBackground=t.mergeCurrentContentBackground=t.mergeCurrentHeaderBackground=t.breadcrumbsPickerBackground=t.breadcrumbsActiveSelectionForeground=t.breadcrumbsFocusForeground=t.breadcrumbsBackground=t.breadcrumbsForeground=t.snippetFinalTabstopHighlightBorder=t.snippetFinalTabstopHighlightBackground=t.snippetTabstopHighlightBorder=t.snippetTabstopHighlightBackground=t.menuSeparatorBackground=t.menuSelectionBorder=t.menuSelectionBackground=t.menuSelectionForeground=t.menuBackground=t.menuForeground=t.menuBorder=t.listDeemphasizedForeground=t.treeIndentGuidesStroke=t.listFilterMatchHighlightBorder=t.listFilterMatchHighlight=t.listFilterWidgetNoMatchesOutline=t.listFilterWidgetOutline=t.listFilterWidgetBackground=t.listWarningForeground=t.listErrorForeground=t.listInvalidItemForeground=t.listHighlightForeground=t.listDropBackground=t.listHoverForeground=t.listHoverBackground=t.listInactiveFocusBackground=t.listInactiveSelectionForeground=t.listInactiveSelectionBackground=t.listActiveSelectionForeground=t.listActiveSelectionBackground=t.listFocusForeground=t.listFocusBackground=t.diffDiagonalFill=t.diffBorder=t.diffRemovedOutline=t.diffInsertedOutline=t.diffRemoved=t.diffInserted=t.defaultRemoveColor=t.defaultInsertColor=t.editorLightBulbAutoFixForeground=t.editorLightBulbForeground=t.editorActiveLinkForeground=t.editorHoverStatusBarBackground=t.editorHoverBorder=t.editorHoverForeground=t.editorHoverBackground=t.editorHoverHighlight=t.searchEditorFindMatchBorder=t.searchEditorFindMatch=t.editorFindRangeHighlightBorder=t.editorFindMatchHighlightBorder=t.editorFindMatchBorder=t.editorFindRangeHighlight=t.editorFindMatchHighlight=t.editorFindMatch=t.editorSelectionHighlightBorder=t.editorSelectionHighlight=t.editorInactiveSelection=t.editorSelectionForeground=t.editorSelectionBackground=t.pickerGroupBorder=t.pickerGroupForeground=t.quickInputTitleBackground=t.quickInputForeground=t.quickInputBackground=t.editorWidgetResizeBorder=t.editorWidgetBorder=t.editorWidgetForeground=t.editorWidgetBackground=t.editorForeground=t.editorBackground=t.editorHintBorder=t.editorHintForeground=t.editorInfoBorder=t.editorInfoForeground=t.editorWarningBorder=t.editorWarningForeground=t.editorErrorBorder=t.editorErrorForeground=t.progressBarBackground=t.scrollbarSliderActiveBackground=t.scrollbarSliderHoverBackground=t.scrollbarSliderBackground=t.scrollbarShadow=t.badgeForeground=t.badgeBackground=t.buttonSecondaryHoverBackground=t.buttonSecondaryBackground=t.buttonSecondaryForeground=t.buttonHoverBackground=t.buttonBackground=t.buttonForeground=t.simpleCheckboxBorder=t.simpleCheckboxForeground=t.simpleCheckboxBackground=t.selectBorder=t.selectForeground=t.selectListBackground=t.selectBackground=t.inputValidationErrorBorder=t.inputValidationErrorForeground=t.inputValidationErrorBackground=t.inputValidationWarningBorder=t.inputValidationWarningForeground=t.inputValidationWarningBackground=t.inputValidationInfoBorder=t.inputValidationInfoForeground=t.inputValidationInfoBackground=t.inputPlaceholderForeground=t.inputActiveOptionForeground=t.inputActiveOptionBackground=t.inputActiveOptionBorder=t.inputBorder=t.inputForeground=t.inputBackground=t.widgetShadow=t.textCodeBlockBackground=t.textBlockQuoteBorder=t.textBlockQuoteBackground=t.textPreformatForeground=t.textLinkActiveForeground=t.textLinkForeground=t.textSeparatorForeground=t.selectionBackground=t.activeContrastBorder=t.contrastBorder=t.focusBorder=t.iconForeground=t.descriptionForeground=t.errorForeground=t.foreground=t.getColorRegistry=t.registerColor=t.Extensions=void 0, t.Extensions={ColorContribution:"base.contributions.colors"};const l=new class{constructor(){this._onDidChangeSchema=new o.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){let s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}deregisterColor(e){delete this.colorsById[e],delete this.colorSchema.properties[e];const t=this.colorReferenceSchema.enum.indexOf(e);-1!==t&&(this.colorReferenceSchema.enum.splice(t,1),this.colorReferenceSchema.enumDescriptions.splice(t,1)),this._onDidChangeSchema.fire()}getColors(){ return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){return f(i.defaults[t.type],t)}}getColorSchema(){return this.colorSchema}getColorReferenceSchema(){return this.colorReferenceSchema}toString(){return Object.keys(this.colorsById).sort((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}};function c(e,t,i,n,o){return l.registerColor(e,t,i,n,o)}i.Registry.add(t.Extensions.ColorContribution,l),t.registerColor=c,t.getColorRegistry=function(){return l},t.foreground=c("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},s.localize(0,null)),t.errorForeground=c("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},s.localize(1,null)),t.descriptionForeground=c("descriptionForeground",{light:"#717171",dark:m(t.foreground,.7),hc:m(t.foreground,.7)},s.localize(2,null)),t.iconForeground=c("icon.foreground",{ dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},s.localize(3,null)),t.focusBorder=c("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},s.localize(4,null)),t.contrastBorder=c("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},s.localize(5,null)),t.activeContrastBorder=c("contrastActiveBorder",{light:null,dark:null,hc:t.focusBorder},s.localize(6,null)),t.selectionBackground=c("selection.background",{light:null,dark:null,hc:null},s.localize(7,null)),t.textSeparatorForeground=c("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:n.Color.black},s.localize(8,null)),t.textLinkForeground=c("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.localize(9,null)),t.textLinkActiveForeground=c("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.localize(10,null)),t.textPreformatForeground=c("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},s.localize(11,null)),t.textBlockQuoteBackground=c("textBlockQuote.background",{light:"#7f7f7f1a", dark:"#7f7f7f1a",hc:null},s.localize(12,null)),t.textBlockQuoteBorder=c("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:n.Color.white},s.localize(13,null)),t.textCodeBlockBackground=c("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:n.Color.black},s.localize(14,null)),t.widgetShadow=c("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},s.localize(15,null)),t.inputBackground=c("input.background",{dark:"#3C3C3C",light:n.Color.white,hc:n.Color.black},s.localize(16,null)),t.inputForeground=c("input.foreground",{dark:t.foreground,light:t.foreground,hc:t.foreground},s.localize(17,null)),t.inputBorder=c("input.border",{dark:null,light:null,hc:t.contrastBorder},s.localize(18,null)),t.inputActiveOptionBorder=c("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:t.contrastBorder},s.localize(19,null)),t.inputActiveOptionBackground=c("inputOption.activeBackground",{dark:m(t.focusBorder,.4),light:m(t.focusBorder,.2),hc:n.Color.transparent},s.localize(20,null)), t.inputActiveOptionForeground=c("inputOption.activeForeground",{dark:n.Color.white,light:n.Color.black,hc:null},s.localize(21,null)),t.inputPlaceholderForeground=c("input.placeholderForeground",{light:m(t.foreground,.5),dark:m(t.foreground,.5),hc:m(t.foreground,.7)},s.localize(22,null)),t.inputValidationInfoBackground=c("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:n.Color.black},s.localize(23,null)),t.inputValidationInfoForeground=c("inputValidation.infoForeground",{dark:null,light:null,hc:null},s.localize(24,null)),t.inputValidationInfoBorder=c("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:t.contrastBorder},s.localize(25,null)),t.inputValidationWarningBackground=c("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:n.Color.black},s.localize(26,null)),t.inputValidationWarningForeground=c("inputValidation.warningForeground",{dark:null,light:null,hc:null},s.localize(27,null)),t.inputValidationWarningBorder=c("inputValidation.warningBorder",{ dark:"#B89500",light:"#B89500",hc:t.contrastBorder},s.localize(28,null)),t.inputValidationErrorBackground=c("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:n.Color.black},s.localize(29,null)),t.inputValidationErrorForeground=c("inputValidation.errorForeground",{dark:null,light:null,hc:null},s.localize(30,null)),t.inputValidationErrorBorder=c("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:t.contrastBorder},s.localize(31,null)),t.selectBackground=c("dropdown.background",{dark:"#3C3C3C",light:n.Color.white,hc:n.Color.black},s.localize(32,null)),t.selectListBackground=c("dropdown.listBackground",{dark:null,light:null,hc:n.Color.black},s.localize(33,null)),t.selectForeground=c("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:n.Color.white},s.localize(34,null)),t.selectBorder=c("dropdown.border",{dark:t.selectBackground,light:"#CECECE",hc:t.contrastBorder},s.localize(35,null)),t.simpleCheckboxBackground=c("checkbox.background",{dark:t.selectBackground, light:t.selectBackground,hc:t.selectBackground},s.localize(36,null)),t.simpleCheckboxForeground=c("checkbox.foreground",{dark:t.selectForeground,light:t.selectForeground,hc:t.selectForeground},s.localize(37,null)),t.simpleCheckboxBorder=c("checkbox.border",{dark:t.selectBorder,light:t.selectBorder,hc:t.selectBorder},s.localize(38,null)),t.buttonForeground=c("button.foreground",{dark:n.Color.white,light:n.Color.white,hc:n.Color.white},s.localize(39,null)),t.buttonBackground=c("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},s.localize(40,null)),t.buttonHoverBackground=c("button.hoverBackground",{dark:p(t.buttonBackground,.2),light:g(t.buttonBackground,.2),hc:null},s.localize(41,null)),t.buttonSecondaryForeground=c("button.secondaryForeground",{dark:n.Color.white,light:n.Color.white,hc:n.Color.white},s.localize(42,null)),t.buttonSecondaryBackground=c("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},s.localize(43,null)), t.buttonSecondaryHoverBackground=c("button.secondaryHoverBackground",{dark:p(t.buttonSecondaryBackground,.2),light:g(t.buttonSecondaryBackground,.2),hc:null},s.localize(44,null)),t.badgeBackground=c("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:n.Color.black},s.localize(45,null)),t.badgeForeground=c("badge.foreground",{dark:n.Color.white,light:"#333",hc:n.Color.white},s.localize(46,null)),t.scrollbarShadow=c("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},s.localize(47,null)),t.scrollbarSliderBackground=c("scrollbarSlider.background",{dark:n.Color.fromHex("#797979").transparent(.4),light:n.Color.fromHex("#646464").transparent(.4),hc:m(t.contrastBorder,.6)},s.localize(48,null)),t.scrollbarSliderHoverBackground=c("scrollbarSlider.hoverBackground",{dark:n.Color.fromHex("#646464").transparent(.7),light:n.Color.fromHex("#646464").transparent(.7),hc:m(t.contrastBorder,.8)},s.localize(49,null)),t.scrollbarSliderActiveBackground=c("scrollbarSlider.activeBackground",{ dark:n.Color.fromHex("#BFBFBF").transparent(.4),light:n.Color.fromHex("#000000").transparent(.6),hc:t.contrastBorder},s.localize(50,null)),t.progressBarBackground=c("progressBar.background",{dark:n.Color.fromHex("#0E70C0"),light:n.Color.fromHex("#0E70C0"),hc:t.contrastBorder},s.localize(51,null)),t.editorErrorForeground=c("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},s.localize(52,null)),t.editorErrorBorder=c("editorError.border",{dark:null,light:null,hc:n.Color.fromHex("#E47777").transparent(.8)},s.localize(53,null)),t.editorWarningForeground=c("editorWarning.foreground",{dark:"#CCA700",light:"#E9A700",hc:null},s.localize(54,null)),t.editorWarningBorder=c("editorWarning.border",{dark:null,light:null,hc:n.Color.fromHex("#FFCC00").transparent(.8)},s.localize(55,null)),t.editorInfoForeground=c("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},s.localize(56,null)),t.editorInfoBorder=c("editorInfo.border",{dark:null,light:null,hc:n.Color.fromHex("#75BEFF").transparent(.8) },s.localize(57,null)),t.editorHintForeground=c("editorHint.foreground",{dark:n.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},s.localize(58,null)),t.editorHintBorder=c("editorHint.border",{dark:null,light:null,hc:n.Color.fromHex("#eeeeee").transparent(.8)},s.localize(59,null)),t.editorBackground=c("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:n.Color.black},s.localize(60,null)),t.editorForeground=c("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:n.Color.white},s.localize(61,null)),t.editorWidgetBackground=c("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},s.localize(62,null)),t.editorWidgetForeground=c("editorWidget.foreground",{dark:t.foreground,light:t.foreground,hc:t.foreground},s.localize(63,null)),t.editorWidgetBorder=c("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:t.contrastBorder},s.localize(64,null)),t.editorWidgetResizeBorder=c("editorWidget.resizeBorder",{light:null,dark:null,hc:null},s.localize(65,null)), t.quickInputBackground=c("quickInput.background",{dark:t.editorWidgetBackground,light:t.editorWidgetBackground,hc:t.editorWidgetBackground},s.localize(66,null)),t.quickInputForeground=c("quickInput.foreground",{dark:t.editorWidgetForeground,light:t.editorWidgetForeground,hc:t.editorWidgetForeground},s.localize(67,null)),t.quickInputTitleBackground=c("quickInputTitle.background",{dark:new n.Color(new n.RGBA(255,255,255,.105)),light:new n.Color(new n.RGBA(0,0,0,.06)),hc:"#000000"},s.localize(68,null)),t.pickerGroupForeground=c("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:n.Color.white},s.localize(69,null)),t.pickerGroupBorder=c("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:n.Color.white},s.localize(70,null)),t.editorSelectionBackground=c("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},s.localize(71,null)),t.editorSelectionForeground=c("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},s.localize(72,null)), t.editorInactiveSelection=c("editor.inactiveSelectionBackground",{light:m(t.editorSelectionBackground,.5),dark:m(t.editorSelectionBackground,.5),hc:m(t.editorSelectionBackground,.5)},s.localize(73,null),!0),t.editorSelectionHighlight=c("editor.selectionHighlightBackground",{light:v(t.editorSelectionBackground,t.editorBackground,.3,.6),dark:v(t.editorSelectionBackground,t.editorBackground,.3,.6),hc:null},s.localize(74,null),!0),t.editorSelectionHighlightBorder=c("editor.selectionHighlightBorder",{light:null,dark:null,hc:t.activeContrastBorder},s.localize(75,null)),t.editorFindMatch=c("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},s.localize(76,null)),t.editorFindMatchHighlight=c("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},s.localize(77,null),!0),t.editorFindRangeHighlight=c("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},s.localize(78,null),!0),t.editorFindMatchBorder=c("editor.findMatchBorder",{light:null, dark:null,hc:t.activeContrastBorder},s.localize(79,null)),t.editorFindMatchHighlightBorder=c("editor.findMatchHighlightBorder",{light:null,dark:null,hc:t.activeContrastBorder},s.localize(80,null)),t.editorFindRangeHighlightBorder=c("editor.findRangeHighlightBorder",{dark:null,light:null,hc:m(t.activeContrastBorder,.4)},s.localize(81,null),!0),t.searchEditorFindMatch=c("searchEditor.findMatchBackground",{light:m(t.editorFindMatchHighlight,.66),dark:m(t.editorFindMatchHighlight,.66),hc:t.editorFindMatchHighlight},s.localize(82,null)),t.searchEditorFindMatchBorder=c("searchEditor.findMatchBorder",{light:m(t.editorFindMatchHighlightBorder,.66),dark:m(t.editorFindMatchHighlightBorder,.66),hc:t.editorFindMatchHighlightBorder},s.localize(83,null)),t.editorHoverHighlight=c("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},s.localize(84,null),!0),t.editorHoverBackground=c("editorHoverWidget.background",{light:t.editorWidgetBackground,dark:t.editorWidgetBackground, hc:t.editorWidgetBackground},s.localize(85,null)),t.editorHoverForeground=c("editorHoverWidget.foreground",{light:t.editorWidgetForeground,dark:t.editorWidgetForeground,hc:t.editorWidgetForeground},s.localize(86,null)),t.editorHoverBorder=c("editorHoverWidget.border",{light:t.editorWidgetBorder,dark:t.editorWidgetBorder,hc:t.editorWidgetBorder},s.localize(87,null)),t.editorHoverStatusBarBackground=c("editorHoverWidget.statusBarBackground",{dark:p(t.editorHoverBackground,.2),light:g(t.editorHoverBackground,.05),hc:t.editorWidgetBackground},s.localize(88,null)),t.editorActiveLinkForeground=c("editorLink.activeForeground",{dark:"#4E94CE",light:n.Color.blue,hc:n.Color.cyan},s.localize(89,null)),t.editorLightBulbForeground=c("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},s.localize(90,null)),t.editorLightBulbAutoFixForeground=c("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},s.localize(91,null)), t.defaultInsertColor=new n.Color(new n.RGBA(155,185,85,.2)),t.defaultRemoveColor=new n.Color(new n.RGBA(255,0,0,.2)),t.diffInserted=c("diffEditor.insertedTextBackground",{dark:t.defaultInsertColor,light:t.defaultInsertColor,hc:null},s.localize(92,null),!0),t.diffRemoved=c("diffEditor.removedTextBackground",{dark:t.defaultRemoveColor,light:t.defaultRemoveColor,hc:null},s.localize(93,null),!0),t.diffInsertedOutline=c("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},s.localize(94,null)),t.diffRemovedOutline=c("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},s.localize(95,null)),t.diffBorder=c("diffEditor.border",{dark:null,light:null,hc:t.contrastBorder},s.localize(96,null)),t.diffDiagonalFill=c("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},s.localize(97,null)),t.listFocusBackground=c("list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},s.localize(98,null)),t.listFocusForeground=c("list.focusForeground",{dark:null,light:null,hc:null },s.localize(99,null)),t.listActiveSelectionBackground=c("list.activeSelectionBackground",{dark:"#094771",light:"#0074E8",hc:null},s.localize(100,null)),t.listActiveSelectionForeground=c("list.activeSelectionForeground",{dark:n.Color.white,light:n.Color.white,hc:null},s.localize(101,null)),t.listInactiveSelectionBackground=c("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},s.localize(102,null)),t.listInactiveSelectionForeground=c("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},s.localize(103,null)),t.listInactiveFocusBackground=c("list.inactiveFocusBackground",{dark:null,light:null,hc:null},s.localize(104,null)),t.listHoverBackground=c("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},s.localize(105,null)),t.listHoverForeground=c("list.hoverForeground",{dark:null,light:null,hc:null},s.localize(106,null)),t.listDropBackground=c("list.dropBackground",{dark:t.listFocusBackground,light:t.listFocusBackground,hc:null},s.localize(107,null)), t.listHighlightForeground=c("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:t.focusBorder},s.localize(108,null)),t.listInvalidItemForeground=c("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},s.localize(109,null)),t.listErrorForeground=c("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},s.localize(110,null)),t.listWarningForeground=c("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},s.localize(111,null)),t.listFilterWidgetBackground=c("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:n.Color.black},s.localize(112,null)),t.listFilterWidgetOutline=c("listFilterWidget.outline",{dark:n.Color.transparent,light:n.Color.transparent,hc:"#f38518"},s.localize(113,null)),t.listFilterWidgetNoMatchesOutline=c("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:t.contrastBorder},s.localize(114,null)),t.listFilterMatchHighlight=c("list.filterMatchBackground",{dark:t.editorFindMatchHighlight, light:t.editorFindMatchHighlight,hc:null},s.localize(115,null)),t.listFilterMatchHighlightBorder=c("list.filterMatchBorder",{dark:t.editorFindMatchHighlightBorder,light:t.editorFindMatchHighlightBorder,hc:t.contrastBorder},s.localize(116,null)),t.treeIndentGuidesStroke=c("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},s.localize(117,null)),t.listDeemphasizedForeground=c("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},s.localize(118,null)),t.menuBorder=c("menu.border",{dark:null,light:null,hc:t.contrastBorder},s.localize(119,null)),t.menuForeground=c("menu.foreground",{dark:t.selectForeground,light:t.foreground,hc:t.selectForeground},s.localize(120,null)),t.menuBackground=c("menu.background",{dark:t.selectBackground,light:t.selectBackground,hc:t.selectBackground},s.localize(121,null)),t.menuSelectionForeground=c("menu.selectionForeground",{dark:t.listActiveSelectionForeground,light:t.listActiveSelectionForeground,hc:t.listActiveSelectionForeground },s.localize(122,null)),t.menuSelectionBackground=c("menu.selectionBackground",{dark:t.listActiveSelectionBackground,light:t.listActiveSelectionBackground,hc:t.listActiveSelectionBackground},s.localize(123,null)),t.menuSelectionBorder=c("menu.selectionBorder",{dark:null,light:null,hc:t.activeContrastBorder},s.localize(124,null)),t.menuSeparatorBackground=c("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:t.contrastBorder},s.localize(125,null)),t.snippetTabstopHighlightBackground=c("editor.snippetTabstopHighlightBackground",{dark:new n.Color(new n.RGBA(124,124,124,.3)),light:new n.Color(new n.RGBA(10,50,100,.2)),hc:new n.Color(new n.RGBA(124,124,124,.3))},s.localize(126,null)),t.snippetTabstopHighlightBorder=c("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},s.localize(127,null)),t.snippetFinalTabstopHighlightBackground=c("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},s.localize(128,null)), t.snippetFinalTabstopHighlightBorder=c("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new n.Color(new n.RGBA(10,50,100,.5)),hc:"#525252"},s.localize(129,null)),t.breadcrumbsForeground=c("breadcrumb.foreground",{light:m(t.foreground,.8),dark:m(t.foreground,.8),hc:m(t.foreground,.8)},s.localize(130,null)),t.breadcrumbsBackground=c("breadcrumb.background",{light:t.editorBackground,dark:t.editorBackground,hc:t.editorBackground},s.localize(131,null)),t.breadcrumbsFocusForeground=c("breadcrumb.focusForeground",{light:g(t.foreground,.2),dark:p(t.foreground,.1),hc:p(t.foreground,.1)},s.localize(132,null)),t.breadcrumbsActiveSelectionForeground=c("breadcrumb.activeSelectionForeground",{light:g(t.foreground,.2),dark:p(t.foreground,.1),hc:p(t.foreground,.1)},s.localize(133,null)),t.breadcrumbsPickerBackground=c("breadcrumbPicker.background",{light:t.editorWidgetBackground,dark:t.editorWidgetBackground,hc:t.editorWidgetBackground},s.localize(134,null)) ;const d=n.Color.fromHex("#40C8AE").transparent(.5),h=n.Color.fromHex("#40A6FF").transparent(.5),u=n.Color.fromHex("#606060").transparent(.4);function g(e,t){return i=>{let n=f(e,i);if(n)return n.darken(t)}}function p(e,t){return i=>{let n=f(e,i);if(n)return n.lighten(t)}}function m(e,t){return i=>{let n=f(e,i);if(n)return n.transparent(t)}}function v(e,t,i,o){return s=>{let r=f(e,s);if(r){let e=f(t,s);return e?r.isDarkerThan(e)?n.Color.getLighterColor(r,e,i).transparent(o):n.Color.getDarkerColor(r,e,i).transparent(o):r.transparent(i*o)}}}function f(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?n.Color.fromHex(e):t.getColor(e):e instanceof n.Color?e:"function"==typeof e?e(t):void 0}t.mergeCurrentHeaderBackground=c("merge.currentHeaderBackground",{dark:d,light:d,hc:null},s.localize(135,null),!0),t.mergeCurrentContentBackground=c("merge.currentContentBackground",{dark:m(t.mergeCurrentHeaderBackground,.4),light:m(t.mergeCurrentHeaderBackground,.4),hc:m(t.mergeCurrentHeaderBackground,.4) },s.localize(136,null),!0),t.mergeIncomingHeaderBackground=c("merge.incomingHeaderBackground",{dark:h,light:h,hc:null},s.localize(137,null),!0),t.mergeIncomingContentBackground=c("merge.incomingContentBackground",{dark:m(t.mergeIncomingHeaderBackground,.4),light:m(t.mergeIncomingHeaderBackground,.4),hc:m(t.mergeIncomingHeaderBackground,.4)},s.localize(138,null),!0),t.mergeCommonHeaderBackground=c("merge.commonHeaderBackground",{dark:u,light:u,hc:null},s.localize(139,null),!0),t.mergeCommonContentBackground=c("merge.commonContentBackground",{dark:m(t.mergeCommonHeaderBackground,.4),light:m(t.mergeCommonHeaderBackground,.4),hc:m(t.mergeCommonHeaderBackground,.4)},s.localize(140,null),!0),t.mergeBorder=c("merge.border",{dark:null,light:null,hc:"#C3DF6F"},s.localize(141,null)),t.overviewRulerCurrentContentForeground=c("editorOverviewRuler.currentContentForeground",{dark:m(t.mergeCurrentHeaderBackground,1),light:m(t.mergeCurrentHeaderBackground,1),hc:t.mergeBorder},s.localize(142,null)), t.overviewRulerIncomingContentForeground=c("editorOverviewRuler.incomingContentForeground",{dark:m(t.mergeIncomingHeaderBackground,1),light:m(t.mergeIncomingHeaderBackground,1),hc:t.mergeBorder},s.localize(143,null)),t.overviewRulerCommonContentForeground=c("editorOverviewRuler.commonContentForeground",{dark:m(t.mergeCommonHeaderBackground,1),light:m(t.mergeCommonHeaderBackground,1),hc:t.mergeBorder},s.localize(144,null)),t.overviewRulerFindMatchForeground=c("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},s.localize(145,null),!0),t.overviewRulerSelectionHighlightForeground=c("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},s.localize(146,null),!0),t.minimapFindMatch=c("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},s.localize(147,null),!0),t.minimapSelection=c("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},s.localize(148,null),!0), t.minimapError=c("minimap.errorHighlight",{dark:new n.Color(new n.RGBA(255,18,18,.7)),light:new n.Color(new n.RGBA(255,18,18,.7)),hc:new n.Color(new n.RGBA(255,50,50,1))},s.localize(149,null)),t.minimapWarning=c("minimap.warningHighlight",{dark:t.editorWarningForeground,light:t.editorWarningForeground,hc:t.editorWarningBorder},s.localize(150,null)),t.minimapBackground=c("minimap.background",{dark:null,light:null,hc:null},s.localize(151,null)),t.minimapSliderBackground=c("minimapSlider.background",{light:m(t.scrollbarSliderBackground,.5),dark:m(t.scrollbarSliderBackground,.5),hc:m(t.scrollbarSliderBackground,.5)},s.localize(152,null)),t.minimapSliderHoverBackground=c("minimapSlider.hoverBackground",{light:m(t.scrollbarSliderHoverBackground,.5),dark:m(t.scrollbarSliderHoverBackground,.5),hc:m(t.scrollbarSliderHoverBackground,.5)},s.localize(153,null)),t.minimapSliderActiveBackground=c("minimapSlider.activeBackground",{light:m(t.scrollbarSliderActiveBackground,.5),dark:m(t.scrollbarSliderActiveBackground,.5), hc:m(t.scrollbarSliderActiveBackground,.5)},s.localize(154,null)),t.problemsErrorIconForeground=c("problemsErrorIcon.foreground",{dark:t.editorErrorForeground,light:t.editorErrorForeground,hc:t.editorErrorForeground},s.localize(155,null)),t.problemsWarningIconForeground=c("problemsWarningIcon.foreground",{dark:t.editorWarningForeground,light:t.editorWarningForeground,hc:t.editorWarningForeground},s.localize(156,null)),t.problemsInfoIconForeground=c("problemsInfoIcon.foreground",{dark:t.editorInfoForeground,light:t.editorInfoForeground,hc:t.editorInfoForeground},s.localize(157,null)),t.chartsForeground=c("charts.foreground",{dark:t.foreground,light:t.foreground,hc:t.foreground},s.localize(158,null)),t.chartsLines=c("charts.lines",{dark:m(t.foreground,.5),light:m(t.foreground,.5),hc:m(t.foreground,.5)},s.localize(159,null)),t.chartsRed=c("charts.red",{dark:t.editorErrorForeground,light:t.editorErrorForeground,hc:t.editorErrorForeground},s.localize(160,null)),t.chartsBlue=c("charts.blue",{ dark:t.editorInfoForeground,light:t.editorInfoForeground,hc:t.editorInfoForeground},s.localize(161,null)),t.chartsYellow=c("charts.yellow",{dark:t.editorWarningForeground,light:t.editorWarningForeground,hc:t.editorWarningForeground},s.localize(162,null)),t.chartsOrange=c("charts.orange",{dark:t.minimapFindMatch,light:t.minimapFindMatch,hc:t.minimapFindMatch},s.localize(163,null)),t.chartsGreen=c("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},s.localize(164,null)),t.chartsPurple=c("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},s.localize(165,null)),t.darken=g,t.lighten=p,t.transparent=m,t.oneOf=function(...e){return t=>{for(let i of e){let e=f(i,t);if(e)return e}}},t.resolveColorValue=f,t.workbenchColorsSchemaId="vscode://schemas/workbench-colors";let S=i.Registry.as(r.Extensions.JSONContribution);S.registerSchema(t.workbenchColorsSchemaId,l.getColorSchema());const b=new a.RunOnceScheduler(()=>S.notifySchemaChanged(t.workbenchColorsSchemaId),200);l.onDidChangeSchema(()=>{ b.isScheduled()||b.schedule()})})),define(e[59],t([0,1,27]),(function(e,t,i){"use strict";function n(e,t){const n=Object.create(null);for(let o in t){const s=t[o];s&&(n[o]=i.resolveColorValue(s,e))}return n}function o(e,t,i){function o(o){const s=n(e.getColorTheme(),t);"function"==typeof i?i(s):i.style(s)}return o(e.getColorTheme()),e.onDidColorThemeChange(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.attachDialogStyler=t.defaultDialogStyles=t.attachMenuStyler=t.defaultMenuStyles=t.attachBreadcrumbsStyler=t.defaultBreadcrumbsStyles=t.attachStylerCallback=t.attachProgressBarStyler=t.attachLinkStyler=t.attachButtonStyler=t.defaultListStyles=t.attachListStyler=t.attachQuickInputStyler=t.attachFindReplaceInputBoxStyler=t.attachSelectBoxStyler=t.attachInputBoxStyler=t.attachBadgeStyler=t.attachCheckboxStyler=t.attachStyler=t.computeStyles=void 0,t.computeStyles=n,t.attachStyler=o,t.attachCheckboxStyler=function(e,t,n){return o(t,{ inputActiveOptionBorder:n&&n.inputActiveOptionBorderColor||i.inputActiveOptionBorder,inputActiveOptionForeground:n&&n.inputActiveOptionForegroundColor||i.inputActiveOptionForeground,inputActiveOptionBackground:n&&n.inputActiveOptionBackgroundColor||i.inputActiveOptionBackground},e)},t.attachBadgeStyler=function(e,t,n){return o(t,{badgeBackground:n&&n.badgeBackground||i.badgeBackground,badgeForeground:n&&n.badgeForeground||i.badgeForeground,badgeBorder:i.contrastBorder},e)},t.attachInputBoxStyler=function(e,t,n){return o(t,{inputBackground:n&&n.inputBackground||i.inputBackground,inputForeground:n&&n.inputForeground||i.inputForeground,inputBorder:n&&n.inputBorder||i.inputBorder,inputValidationInfoBorder:n&&n.inputValidationInfoBorder||i.inputValidationInfoBorder,inputValidationInfoBackground:n&&n.inputValidationInfoBackground||i.inputValidationInfoBackground,inputValidationInfoForeground:n&&n.inputValidationInfoForeground||i.inputValidationInfoForeground, inputValidationWarningBorder:n&&n.inputValidationWarningBorder||i.inputValidationWarningBorder,inputValidationWarningBackground:n&&n.inputValidationWarningBackground||i.inputValidationWarningBackground,inputValidationWarningForeground:n&&n.inputValidationWarningForeground||i.inputValidationWarningForeground,inputValidationErrorBorder:n&&n.inputValidationErrorBorder||i.inputValidationErrorBorder,inputValidationErrorBackground:n&&n.inputValidationErrorBackground||i.inputValidationErrorBackground,inputValidationErrorForeground:n&&n.inputValidationErrorForeground||i.inputValidationErrorForeground},e)},t.attachSelectBoxStyler=function(e,t,n){return o(t,{selectBackground:n&&n.selectBackground||i.selectBackground,selectListBackground:n&&n.selectListBackground||i.selectListBackground,selectForeground:n&&n.selectForeground||i.selectForeground,decoratorRightForeground:n&&n.pickerGroupForeground||i.pickerGroupForeground,selectBorder:n&&n.selectBorder||i.selectBorder,focusBorder:n&&n.focusBorder||i.focusBorder, listFocusBackground:n&&n.listFocusBackground||i.listFocusBackground,listFocusForeground:n&&n.listFocusForeground||i.listFocusForeground,listFocusOutline:n&&n.listFocusOutline||i.activeContrastBorder,listHoverBackground:n&&n.listHoverBackground||i.listHoverBackground,listHoverForeground:n&&n.listHoverForeground||i.listHoverForeground,listHoverOutline:n&&n.listFocusOutline||i.activeContrastBorder,selectListBorder:n&&n.selectListBorder||i.editorWidgetBorder},e)},t.attachFindReplaceInputBoxStyler=function(e,t,n){return o(t,{inputBackground:n&&n.inputBackground||i.inputBackground,inputForeground:n&&n.inputForeground||i.inputForeground,inputBorder:n&&n.inputBorder||i.inputBorder,inputActiveOptionBorder:n&&n.inputActiveOptionBorder||i.inputActiveOptionBorder,inputActiveOptionForeground:n&&n.inputActiveOptionForeground||i.inputActiveOptionForeground,inputActiveOptionBackground:n&&n.inputActiveOptionBackground||i.inputActiveOptionBackground, inputValidationInfoBorder:n&&n.inputValidationInfoBorder||i.inputValidationInfoBorder,inputValidationInfoBackground:n&&n.inputValidationInfoBackground||i.inputValidationInfoBackground,inputValidationInfoForeground:n&&n.inputValidationInfoForeground||i.inputValidationInfoForeground,inputValidationWarningBorder:n&&n.inputValidationWarningBorder||i.inputValidationWarningBorder,inputValidationWarningBackground:n&&n.inputValidationWarningBackground||i.inputValidationWarningBackground,inputValidationWarningForeground:n&&n.inputValidationWarningForeground||i.inputValidationWarningForeground,inputValidationErrorBorder:n&&n.inputValidationErrorBorder||i.inputValidationErrorBorder,inputValidationErrorBackground:n&&n.inputValidationErrorBackground||i.inputValidationErrorBackground,inputValidationErrorForeground:n&&n.inputValidationErrorForeground||i.inputValidationErrorForeground},e)},t.attachQuickInputStyler=function(e,t,n){return o(t,{foreground:n&&n.foreground||i.foreground, background:n&&n.background||i.editorBackground,borderColor:n&&n.borderColor||i.contrastBorder,widgetShadow:n&&n.widgetShadow||i.widgetShadow,progressBarBackground:n&&n.progressBarBackground||i.progressBarBackground,pickerGroupForeground:n&&n.pickerGroupForeground||i.pickerGroupForeground,pickerGroupBorder:n&&n.pickerGroupBorder||i.pickerGroupBorder,inputBackground:n&&n.inputBackground||i.inputBackground,inputForeground:n&&n.inputForeground||i.inputForeground,inputBorder:n&&n.inputBorder||i.inputBorder,inputValidationInfoBorder:n&&n.inputValidationInfoBorder||i.inputValidationInfoBorder,inputValidationInfoBackground:n&&n.inputValidationInfoBackground||i.inputValidationInfoBackground,inputValidationInfoForeground:n&&n.inputValidationInfoForeground||i.inputValidationInfoForeground,inputValidationWarningBorder:n&&n.inputValidationWarningBorder||i.inputValidationWarningBorder,inputValidationWarningBackground:n&&n.inputValidationWarningBackground||i.inputValidationWarningBackground, inputValidationWarningForeground:n&&n.inputValidationWarningForeground||i.inputValidationWarningForeground,inputValidationErrorBorder:n&&n.inputValidationErrorBorder||i.inputValidationErrorBorder,inputValidationErrorBackground:n&&n.inputValidationErrorBackground||i.inputValidationErrorBackground,inputValidationErrorForeground:n&&n.inputValidationErrorForeground||i.inputValidationErrorForeground,listFocusBackground:n&&n.listFocusBackground||i.listFocusBackground,listFocusForeground:n&&n.listFocusForeground||i.listFocusForeground,listActiveSelectionBackground:n&&n.listActiveSelectionBackground||i.darken(i.listActiveSelectionBackground,.1),listActiveSelectionForeground:n&&n.listActiveSelectionForeground||i.listActiveSelectionForeground,listFocusAndSelectionBackground:n&&n.listFocusAndSelectionBackground||i.listActiveSelectionBackground,listFocusAndSelectionForeground:n&&n.listFocusAndSelectionForeground||i.listActiveSelectionForeground, listInactiveSelectionBackground:n&&n.listInactiveSelectionBackground||i.listInactiveSelectionBackground,listInactiveSelectionForeground:n&&n.listInactiveSelectionForeground||i.listInactiveSelectionForeground,listInactiveFocusBackground:n&&n.listInactiveFocusBackground||i.listInactiveFocusBackground,listHoverBackground:n&&n.listHoverBackground||i.listHoverBackground,listHoverForeground:n&&n.listHoverForeground||i.listHoverForeground,listDropBackground:n&&n.listDropBackground||i.listDropBackground,listFocusOutline:n&&n.listFocusOutline||i.activeContrastBorder,listSelectionOutline:n&&n.listSelectionOutline||i.activeContrastBorder,listHoverOutline:n&&n.listHoverOutline||i.activeContrastBorder},e)},t.attachListStyler=function(e,i,n){return o(i,Object.assign(Object.assign({},t.defaultListStyles),n||{}),e)},t.defaultListStyles={listFocusBackground:i.listFocusBackground,listFocusForeground:i.listFocusForeground,listActiveSelectionBackground:i.darken(i.listActiveSelectionBackground,.1), listActiveSelectionForeground:i.listActiveSelectionForeground,listFocusAndSelectionBackground:i.listActiveSelectionBackground,listFocusAndSelectionForeground:i.listActiveSelectionForeground,listInactiveSelectionBackground:i.listInactiveSelectionBackground,listInactiveSelectionForeground:i.listInactiveSelectionForeground,listInactiveFocusBackground:i.listInactiveFocusBackground,listHoverBackground:i.listHoverBackground,listHoverForeground:i.listHoverForeground,listDropBackground:i.listDropBackground,listFocusOutline:i.activeContrastBorder,listSelectionOutline:i.activeContrastBorder,listHoverOutline:i.activeContrastBorder,listFilterWidgetBackground:i.listFilterWidgetBackground,listFilterWidgetOutline:i.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:i.listFilterWidgetNoMatchesOutline,listMatchesShadow:i.widgetShadow,treeIndentGuidesStroke:i.treeIndentGuidesStroke},t.attachButtonStyler=function(e,t,n){return o(t,{buttonForeground:n&&n.buttonForeground||i.buttonForeground, buttonBackground:n&&n.buttonBackground||i.buttonBackground,buttonHoverBackground:n&&n.buttonHoverBackground||i.buttonHoverBackground,buttonSecondaryForeground:n&&n.buttonSecondaryForeground||i.buttonSecondaryForeground,buttonSecondaryBackground:n&&n.buttonSecondaryBackground||i.buttonSecondaryBackground,buttonSecondaryHoverBackground:n&&n.buttonSecondaryHoverBackground||i.buttonSecondaryHoverBackground,buttonBorder:i.contrastBorder},e)},t.attachLinkStyler=function(e,t,n){return o(t,{textLinkForeground:n&&n.textLinkForeground||i.textLinkForeground},e)},t.attachProgressBarStyler=function(e,t,n){return o(t,{progressBarBackground:n&&n.progressBarBackground||i.progressBarBackground},e)},t.attachStylerCallback=function(e,t,i){return o(e,t,i)},t.defaultBreadcrumbsStyles={breadcrumbsBackground:i.breadcrumbsBackground,breadcrumbsForeground:i.breadcrumbsForeground,breadcrumbsHoverForeground:i.breadcrumbsFocusForeground,breadcrumbsFocusForeground:i.breadcrumbsFocusForeground, breadcrumbsFocusAndSelectionForeground:i.breadcrumbsActiveSelectionForeground},t.attachBreadcrumbsStyler=function(e,i,n){return o(i,Object.assign(Object.assign({},t.defaultBreadcrumbsStyles),n),e)},t.defaultMenuStyles={shadowColor:i.widgetShadow,borderColor:i.menuBorder,foregroundColor:i.menuForeground,backgroundColor:i.menuBackground,selectionForegroundColor:i.menuSelectionForeground,selectionBackgroundColor:i.menuSelectionBackground,selectionBorderColor:i.menuSelectionBorder,separatorColor:i.menuSeparatorBackground},t.attachMenuStyler=function(e,i,n){return o(i,Object.assign(Object.assign({},t.defaultMenuStyles),n),e)},t.defaultDialogStyles={dialogBackground:i.editorWidgetBackground,dialogForeground:i.editorWidgetForeground,dialogShadow:i.widgetShadow,dialogBorder:i.contrastBorder,buttonForeground:i.buttonForeground,buttonBackground:i.buttonBackground,buttonHoverBackground:i.buttonHoverBackground,buttonBorder:i.contrastBorder,checkboxBorder:i.simpleCheckboxBorder, checkboxBackground:i.simpleCheckboxBackground,checkboxForeground:i.simpleCheckboxForeground,errorIconForeground:i.problemsErrorIconForeground,warningIconForeground:i.problemsWarningIconForeground,infoIconForeground:i.problemsInfoIconForeground},t.attachDialogStyler=function(e,i,n){return o(i,Object.assign(Object.assign({},t.defaultDialogStyles),n),e)}})),define(e[1550],t([0,1,30,2,413,7,59,99,101,806]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuHandler=void 0;t.ContextMenuHandler=class{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let c;this.focusToReturn=document.activeElement;let d=s.isHTMLElement(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({ getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,render:d=>{let h=e.getMenuClassName?e.getMenuClassName():"";h&&(d.className+=" "+h),this.options.blockMouse&&(this.block=d.appendChild(s.$(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",a.domEvent(this.block,s.EventType.MOUSE_DOWN)(e=>e.stopPropagation()));const u=new n.DisposableStore,g=e.actionRunner||new i.ActionRunner;return g.onDidBeforeRun(this.onActionRun,this,u),g.onDidRun(this.onDidActionRun,this,u),c=new o.Menu(d,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:g,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),u.add(r.attachMenuStyler(c,this.themeService)),c.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,u), c.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,u),a.domEvent(window,s.EventType.BLUR)(()=>{this.contextViewService.hideContextView(!0)},null,u),a.domEvent(window,s.EventType.MOUSE_DOWN)(e=>{if(e.defaultPrevented)return;let t=new l.StandardMouseEvent(e),i=t.target;if(!t.rightButton){for(;i;){if(i===d)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}},null,u),n.combinedDisposable(u,c)},focus:()=>{c&&c.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},d,!!d)}onActionRun(e){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&this.notificationService&&this.notificationService.error(e.error)}}})),define(e[1551],t([0,1,216,59]),(function(e,t,i,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.ThemableCheckboxActionViewItem=void 0;class o extends i.CheckboxActionViewItem{constructor(e,t,i,n){super(e,t,i),this.themeService=n}render(e){super.render(e),this.checkbox&&this.disposables.add(n.attachCheckboxStyler(this.checkbox,this.themeService))}}t.ThemableCheckboxActionViewItem=o})),define(e[144],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorScheme=void 0,function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST="hc"}(t.ColorScheme||(t.ColorScheme={}))})),define(e[571],t([0,1,80,109,12,902,298,408,409,144,111]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewLine=t.ViewLineOptions=t.DomReadingContext=void 0;const h=!!o.isNative||!(o.isLinux||i.isFirefox||i.isSafari);let u=!0;const g=i.isEdge;t.DomReadingContext=class{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){ return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}};t.ViewLineOptions=class{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(36);this.renderWhitespace=i.get(80),this.renderControlCharacters=i.get(74),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(24),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(51),this.stopRenderingLineAfter=i.get(95),this.fontLigatures=i.get(37)}equals(e){ return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}};class p{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=n.createFastDomNode(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0} onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!g&&this._options.themeType!==c.ColorScheme.HIGH_CONTRAST&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=a.LineDecoration.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let v=null;if(g||s.themeType===c.ColorScheme.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const b=l.renderViewLine(f,n);n.appendASCIIString("");let _=null;return u&&h&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===b.containsForeignElements&&o.content.length<300&&f.lineTokens.getCount()<100&&(_=new m(this._renderedViewLine?this._renderedViewLine.domNode:null,f,b.characterMapping)), _||(_=S(this._renderedViewLine?this._renderedViewLine.domNode:null,f,b.characterMapping,b.containsRTL,b.containsForeignElements)),this._renderedViewLine=_,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof m}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof m?this._renderedViewLine.monospaceAssumptionsAreValid():u}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof m&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i){if(!this._renderedViewLine)return null;e|=0,t|=0, e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const n=0|this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;-1!==n&&e>n+1&&t>n+1&&(o=!0),-1!==n&&e>n+1&&(e=n+1),-1!==n&&t>n+1&&(t=n+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i);return s&&s.length>0?new r.VisibleRanges(o,s):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}t.ViewLine=p,p.CLASS_NAME="view-line";class m{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return u;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth ;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),u=!1),u}toSlowRenderedLine(){return S(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i){const n=this._getCharPosition(e),o=this._getCharPosition(t);return[new r.HorizontalRange(n,o-n)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,n,i)+1}}class v{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1)) ;for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const n=this._readPixelOffset(this.domNode,e,i);if(-1===n)return null;const o=this._readPixelOffset(this.domNode,t,i);return-1===o?null:[new r.HorizontalRange(n,o-n)]}return this._readVisibleRangesForRange(this.domNode,e,t,i)}_readVisibleRangesForRange(e,t,i,n){if(t===i){const i=this._readPixelOffset(e,t,n);return-1===i?null:[new r.HorizontalRange(i,0)]}return this._readRawVisibleRangesForRange(e,t,i,n)}_readPixelOffset(e,t,i){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0 ;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const n=this._pixelOffsetCache[t];if(-1!==n)return n;const o=this._actualReadPixelOffset(e,t,i);return this._pixelOffsetCache[t]=o,o}return this._actualReadPixelOffset(e,t,i)}_actualReadPixelOffset(e,t,i){if(0===this._characterMapping.length){const t=s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i.clientRectDeltaLeft,i.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const n=this._characterMapping.charOffsetToPartData(t-1),o=l.CharacterMapping.getPartIndex(n),r=l.CharacterMapping.getCharIndex(n),a=s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e),o,r,o,r,i.clientRectDeltaLeft,i.endNode);if(!a||0===a.length)return-1;const c=a[0].left;if(this.input.isBasicASCII){ const e=this._characterMapping.getAbsoluteOffsets(),i=Math.round(this.input.spaceWidth*e[t-1]);if(Math.abs(i-c)<=1)return i}return c}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.HorizontalRange(0,this.getWidth())];const o=this._characterMapping.charOffsetToPartData(t-1),a=l.CharacterMapping.getPartIndex(o),c=l.CharacterMapping.getCharIndex(o),d=this._characterMapping.charOffsetToPartData(i-1),h=l.CharacterMapping.getPartIndex(d),u=l.CharacterMapping.getCharIndex(d);return s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e),a,c,h,u,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,n,i)+1}}class f extends v{_readVisibleRangesForRange(e,t,i,n){const o=super._readVisibleRangesForRange(e,t,i,n);if(!o||0===o.length||t===i||1===t&&i===this._characterMapping.length)return o;if(!this.input.containsRTL){ const t=this._readPixelOffset(e,i,n);if(-1!==t){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){ return e.length>=2&&3===e[0]&&4===e[1]}}class u{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(117),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(51),this.typicalHalfwidthCharacterWidth=n.get(36).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return u.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){let n,o=i.verticalOffset+i.height/2,s=e.model.getLineCount(),a=null,l=null;return i.afterLineNumber!==s&&(l=new r.Position(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(a=new r.Position(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),n=null===l?a:null===a?l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,f._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class p extends g{constructor(e,t,i,n){super(e,t,i),this._ctx=e,n?(this.target=n,this.targetPath=o.PartFingerprints.collect(n,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){ return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let o=this.mouseColumn;return t&&t.columns.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfill(6,s.position)}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfill(e,i.position,null,i)}return null}static _hitTestTextArea(e,t){ return h.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,n,i.range,s):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,s))}return null}static _hitTestViewLines(e,t,i){if(!h.isChildOfViewLines(t.targetPath))return null;if(e.isAfterLines(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i) ;return t.fulfill(7,new r.Position(i,n),void 0,m)}if(i){if(h.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),o=v(t.mouseContentHorizontalOffset-n);return t.fulfill(7,new r.Position(i,1),void 0,o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=v(t.mouseContentHorizontalOffset-n),s=new r.Position(i,e.model.getLineMaxColumn(i));return t.fulfill(7,s,void 0,o)}}return t.fulfill(0)}const n=f._doHitTest(e,t);return n.position?f.createMouseTargetFromHitTestPosition(e,t,n.position.lineNumber,n.position.column):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(h.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new r.Position(i,n))}return null}static _hitTestScrollbarSlider(e,t){ if(h.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new r.Position(i,n))}}return null}static _hitTestScrollbar(e,t){if(h.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new r.Position(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(117),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return f._getMouseColumn(o,i.get(36).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;return Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,o){const s=new r.Position(n,o),l=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>l){if(i.isEdge&&1===s.column){const i=v(t.mouseContentHorizontalOffset-l) ;return t.fulfill(7,new r.Position(n,e.model.getLineMaxColumn(n)),void 0,i)}const o=v(t.mouseContentHorizontalOffset-l);return t.fulfill(7,s,void 0,o)}const c=e.visibleRangeForPosition(n,o);if(!c)return t.fulfill(0,s);const d=c.left;if(t.mouseContentHorizontalOffset===d)return t.fulfill(6,s);const h=[];if(h.push({offset:c.left,column:o}),o>1){const t=e.visibleRangeForPosition(n,o-1);t&&h.push({offset:t.left,column:o-1})}if(oe.offset-t.offset);for(let e=1;e=t.editorPos.y+e.layoutInfo.height&&(s=t.editorPos.y+e.layoutInfo.height-1);const r=new n.PageCoordinates(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=c.getShadowRoot(e.viewDomNode);let n;if(!(n=i?void 0===i.caretRangeFromPoint?S(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY))||!n.startContainer)return{position:null,hitTarget:null};const o=n.startContainer;let r=null;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,a=i?i.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===s.ViewLine.CLASS_NAME){return{position:e.getPositionFromDOMInfo(t,n.startOffset),hitTarget:null}}r=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null ;if((i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===s.ViewLine.CLASS_NAME){return{position:e.getPositionFromDOMInfo(o,o.textContent.length),hitTarget:null}}r=o}return{position:null,hitTarget:r}}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;if((o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===s.ViewLine.CLASS_NAME){return{position:e.getPositionFromDOMInfo(i.offsetNode.parentNode,i.offset),hitTarget:null}}return{position:null,hitTarget:i.offsetNode.parentNode}}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode;if((t&&t.nodeType===t.ELEMENT_NODE?t.className:null)===s.ViewLine.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t){return{position:e.getPositionFromDOMInfo(t,0),hitTarget:null}}}}return{position:null,hitTarget:i.offsetNode}} static _doHitTestWithMoveToPoint(e,t){let i=null,n=null;const o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}o.collapse(!0);const r=o?o.parentElement():null,a=r?r.parentNode:null,l=a?a.parentNode:null;if((l&&l.nodeType===l.ELEMENT_NODE?l.className:"")===s.ViewLine.CLASS_NAME){const t=o.duplicate();t.moveToElementText(r),t.setEndPoint("EndToStart",o),i=e.getPositionFromDOMInfo(r,t.text.length),t.moveToElementText(e.viewDomNode)}else n=r;return o.moveToElementText(e.viewDomNode),{position:i,hitTarget:n}}static _doHitTest(e,t){return"function"==typeof document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}}}function S(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){ for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=b.getInstance();for(let n=0;nthis._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1;const s=new l.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(s.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(s.onMouseMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),g(this.mouseTargetFactory),p.MOUSE_MOVE_MINIMUM_TIME)),this._register(s.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(s.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))), this._register(s.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)));this._register(i.addDisposableListener(this.viewHelper.viewDomNode,i.EventType.MOUSE_WHEEL,e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(59))return;const t=new n.StandardWheelEvent(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){const e=c.EditorZoom.getZoomLevel(),i=t.deltaY>0?1:-1;c.EditorZoom.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}},{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new l.ClientCoordinates(e,t).toPageCoordinates(),n=l.createEditorPagePosition(this.viewHelper.viewDomNode) ;return i.yn.y+n.height||i.xn.x+n.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this._mouseDownOperation.isActive())return;e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(i||o&&s))d(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(a){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(d(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}_onMouseWheel(e){this.viewController.emitMouseWheel(e)}}t.MouseHandler=p,p.MOUSE_MOVE_MINIMUM_TIME=100;class m extends s.Disposable{constructor(e,t,i,n,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=s, this._mouseMoveMonitor=this._register(new l.GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new o.TimeoutTimer),this._mouseState=new v,this._currentSelection=new h.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options ;if(!n.get(72)&&n.get(25)&&!n.get(13)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,g(null),e=>this._onMouseDownThenMove(e),()=>{const e=this._findMousePosition(this._lastMouseEvent,!0);this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:e?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,g(null),e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1) ;e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const s=n.getCurrentScrollTop()+(e.posy-t.y),r=a.HitTestContext.getZoneAtCoord(this._context,s);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return new a.MouseTarget(null,13,o,e)}const l=n.getLineNumberAtVerticalOffset(s);return new a.MouseTarget(null,13,o,new d.Position(l,i.getLineMaxColumn(l)))}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y)) ;return e.posxt.x+t.width?new a.MouseTarget(null,13,o,new d.Position(s,i.getLineMaxColumn(s))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return new a.MouseTarget(n.element,n.type,n.mouseColumn,e,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new d.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey, shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class v{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e} trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>v.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}v.CLEAR_MOUSE_DOWN_COUNT_TIME=400})),define(e[1553],t([0,1,7,12,128,2,1552,401,165]),(function(e,t,i,n,o,s,r,a,l){"use strict";function c(e,t){const i={translationY:t.translationY,translationX:t.translationX};return e&&(i.translationY+=e.translationY,i.translationX+=e.translationX),i}Object.defineProperty(t,"__esModule",{value:!0}),t.PointerHandler=t.PointerEventHandler=void 0;class d extends r.MouseHandler{constructor(e,t,n){super(e,t,n),this.viewHelper.linesContentDomNode.style.touchAction="proxy.php?url=https%3A%2F%2Fvscode.glenstack.workers.dev%2Fnone", this._installGestureHandlerTimeout=window.setTimeout(()=>{if(this._installGestureHandlerTimeout=-1,window.MSGesture){const e=new MSGesture,t=new MSGesture;e.target=this.viewHelper.linesContentDomNode,t.target=this.viewHelper.linesContentDomNode,this.viewHelper.linesContentDomNode.addEventListener("pointerdown",i=>{const n=i.pointerType;"mouse"!==n?"touch"===n?(this._lastPointerType="touch",e.addPointer(i.pointerId)):(this._lastPointerType="pen",t.addPointer(i.pointerId)):this._lastPointerType="mouse"}),this._register(i.addDisposableThrottledListener(this.viewHelper.linesContentDomNode,"MSGestureChange",e=>this._onGestureChange(e),c)),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,"MSGestureTap",e=>this._onCaptureGestureTap(e),!0))}},100),this._lastPointerType="mouse"}_onMouseDown(e){"mouse"===this._lastPointerType&&super._onMouseDown(e)}_onCaptureGestureTap(e){const t=new a.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(t,!1) ;i.position&&this.viewController.moveTo(i.position),t.browserEvent.fromElement?(t.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(()=>{this.viewHelper.focusTextArea()})}_onGestureChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}dispose(){window.clearTimeout(this._installGestureHandlerTimeout),super.dispose()}}class h extends r.MouseHandler{constructor(e,t,n){super(e,t,n),this._register(o.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,o.EventType.Tap,e=>this.onTap(e))),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,o.EventType.Change,e=>this.onChange(e))),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,o.EventType.Contextmenu,e=>this._onContextMenu(new a.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",e=>{ const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"}));const s=new a.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(s.onPointerMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),r.createMouseMoveEventMerger(this.mouseTargetFactory),r.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)),this._register(s.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(s.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(s.onPointerDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new a.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1, ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){e.target&&this.viewHelper.linesContentDomNode.contains(e.target)&&"touch"===this._lastPointerType||super._onMouseDown(e)}}t.PointerEventHandler=h;class u extends r.MouseHandler{constructor(e,t,n){super(e,t,n),this._register(o.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,o.EventType.Tap,e=>this.onTap(e))),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,o.EventType.Change,e=>this.onChange(e))),this._register(i.addDisposableListener(this.viewHelper.linesContentDomNode,o.EventType.Contextmenu,e=>this._onContextMenu(new a.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea() ;const t=this._createMouseTarget(new a.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class g extends s.Disposable{constructor(e,t,i){super(),n.isIOS&&l.BrowserFeatures.pointerEvents?this.handler=this._register(new h(e,t,i)):window.TouchEvent?this.handler=this._register(new u(e,t,i)):window.navigator.pointerEnabled||window.PointerEvent?this.handler=this._register(new d(e,t,i)):this.handler=this._register(new r.MouseHandler(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}t.PointerHandler=g})),define(e[572],t([0,1,432]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewUserInputEvents=void 0;class n{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.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){ return n.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new o(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}t.ViewUserInputEvents=n;class o{constructor(e,t,i,n,o,s){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=o,this.detail=s}toString(){return i.MouseTarget.toString(this)}}})),define(e[1554],t([0,1,12,15,201,402,142,571,47,18,298,233,771]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewLines=void 0;class u{constructor(){this._currentVisibleRange=new c.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class g{constructor(e,t,i,n,o,s){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=s,this.type="range", this.minLineNumber=e,this.maxLineNumber=e}}class p{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let o=e[0].startLineNumber,s=e[0].endLineNumber;for(let t=1,i=e.length;t{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new n.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new u,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new a.ViewLine(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(118)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(36),n=t.get(118);return this._lineHeight=t.get(51), this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(81),this._cursorSurroundingLines=t.get(20),this._cursorSurroundingLinesStyle=t.get(21),this._canUseLayerHinting=!t.get(23),o.Configuration.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(117)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new a.ViewLineOptions(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{ const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0 }:e.range?this._horizontalRevealRequest=new g(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new p(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth), this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new l.Position(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return ri?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=c.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],s=0;const r=new a.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let h=0;t&&(h=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(n.startLineNumber,1)).lineNumber);const u=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(eg)continue ;const a=e===n.startLineNumber?n.startColumn:1,c=e===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(e),p=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(a,c,r);if(p){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,i,new a.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new d.HorizontalPosition(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)} _updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++){this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){ if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),i.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}} this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=n[0].startLineNumber,t=n[0].endLineNumber;for(let i=1,o=n.length;ir){if(!l)return-1;h=c}else if(5===o||6===o)if(6===o&&s<=c&&d<=a)h=s;else{const e=c-Math.max(5*this._lineHeight,.2*r),t=d-r;h=Math.max(t,e)}else if(1===o||2===o)if(2===o&&s<=c&&d<=a)h=s;else{const e=(c+d)/2;h=Math.max(0,e-r/2)}else h=this._computeMinimumScrolling(s,a,c,d,3===o,4===o);return h}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,s=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,e.left),s=Math.max(s,e.left+e.width)}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn) ;if(!e)return null;for(const t of e.ranges)o=Math.min(o,t.left),s=Math.max(s,t.left+t.width)}if(o=Math.max(0,o-m.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding,"selections"===e.type&&s-o>t.width)return null;return{scrollLeft:this._computeMinimumScrolling(i,n,o,s),maxHorizontalOffset:s}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}t.ViewLines=m,m.HORIZONTAL_EXTRA_PX=30})),define(e[11],t([0,1,5,2,16,6,144]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Themable=t.registerThemingParticipant=t.Extensions=t.getThemeTypeSelector=t.FolderThemeIcon=t.FileThemeIcon=t.ThemeIcon=t.themeColorFromId=t.IThemeService=void 0,t.IThemeService=i.createDecorator("themeService"),t.themeColorFromId=function(e){return{id:e}},function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id};const t=/^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i ;e.fromString=function(e){const i=t.exec(e);if(!i)return;let[,n,o]=i;return n||(n="codicon/"),{id:n+o}};const i=/^(codicon\/)?([a-z-]+)(~[a-z]+)?$/i;e.asClassName=function(e){const t=i.exec(e.id);if(!t)return;let[,,n,o]=t,s=`codicon codicon-${n}`;return o&&(s+=` ${o.substr(1)}`),s}}(t.ThemeIcon||(t.ThemeIcon={})),t.FileThemeIcon={id:"file"},t.FolderThemeIcon={id:"folder"},t.getThemeTypeSelector=function(e){switch(e){case r.ColorScheme.DARK:return"vs-dark";case r.ColorScheme.HIGH_CONTRAST:return"hc-black";default:return"vs"}},t.Extensions={ThemingContribution:"base.contributions.theming"};let a=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.Emitter}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),n.toDisposable(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}get onThemingParticipantAdded(){ return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}};o.Registry.add(t.Extensions.ThemingContribution,a),t.registerThemingParticipant=function(e){return a.onColorThemeChange(e)};class l extends n.Disposable{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}getColor(e,t){let i=this.theme.getColor(e);return i&&t&&(i=t(i,this.theme)),i?i.toString():null}}t.Themable=l})),define(e[1555],t([0,1,7,2,24,10,882,261,129,11]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditorServiceImpl=t.GlobalStyleSheet=t.RefCountedStyleSheet=void 0;class u{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--, 0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){i.removeCSSRulesContainingSelector(e,this._styleSheet)}}t.RefCountedStyleSheet=u;class g{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){i.removeCSSRulesContainingSelector(e,this._styleSheet)}}t.GlobalStyleSheet=g;let p=class extends l.AbstractCodeEditorService{constructor(e,t=null){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=t||null,this._themeService=e}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new g(i.createStyleSheet())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode() ;if(!i.isInShadowDOM(t))return this._getOrCreateGlobalStyleSheet();const n=e.getId();if(!this._editorStyleSheets.has(n)){const e=new u(this,n,i.createStyleSheet(t));this._editorStyleSheets.set(n,e)}return this._editorStyleSheets.get(n)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n){let o=this._decorationOptionProviders.get(e);if(!o){const s=this._getOrCreateStyleSheet(n),r={styleSheet:s,key:e,parentTypeKey:i,options:t||Object.create(null)};o=i?new m(this._themeService,s,r):new v(this._themeService,s,r),this._decorationOptionProviders.set(e,o)}o.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(t=>t.removeDecorations(e))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};p=o([r(0,h.IThemeService)],p), t.CodeEditorServiceImpl=p;class m{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new S(3,i,e),this._afterContentRules=new S(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class v{constructor(e,t,i){this._disposables=new n.DisposableStore,this._styleSheet=t,this._styleSheet.ref(),this.refCount=0;const o=t=>{const n=new S(t,i,e);if(this._disposables.add(n),n.hasContent)return n.className};this.className=o(0);const s=(t=>{const n=new S(t,i,e);return this._disposables.add(n),n.hasContent?{ className:n.className,hasLetterSpacing:n.hasLetterSpacing}:null})(1);s&&(this.inlineClassName=s.className,this.inlineClassNameAffectsLetterSpacing=s.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),this.glyphMarginClassName=o(2);const r=i.options;this.isWholeLine=Boolean(r.isWholeLine),this.stickiness=r.rangeBehavior;const a=r.light&&r.light.overviewRulerColor||r.overviewRulerColor,l=r.dark&&r.dark.overviewRulerColor||r.overviewRulerColor;void 0===a&&void 0===l||(this.overviewRuler={color:a||l,darkColor:l||a,position:r.overviewRulerLane||d.OverviewRulerLane.Center})}getOptions(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const f={ color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"};class S{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=_.getClassName(this._providerArgs.key,e) ;this._providerArgs.parentTypeKey&&(n=n+" "+_.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=_.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange(e=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e), i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let s=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),s=!0),i.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${i}}`,0), s=!0),n.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),s=!0),this._hasContent=s}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&t.push(s.format(f.contentIconPath,i.asCSSUrl(a.URI.revive(e.contentIconPath)))),"string"==typeof e.contentText){ const i=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(s.format(f.contentText,i))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return void 0!==e.gutterIconPath&&(t.push(s.format(f.gutterIconPath,i.asCSSUrl(a.URI.revive(e.gutterIconPath)))),void 0!==e.gutterIconSize&&t.push(s.format(f.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(s.format("box-sizing: border-box;")),!0)}collectCSSText(e,t,i){const n=i.length;for(let n of t){const t=this.resolveValue(e[n]);"string"==typeof t&&i.push(s.format(f[n],t))}return i.length!==n}resolveValue(e){if(c.isThemeColor(e)){this._usesThemeColors=!0 ;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}var b;!function(e){e[e.ClassName=0]="ClassName",e[e.InlineClassName=1]="InlineClassName",e[e.GlyphMarginClassName=2]="GlyphMarginClassName",e[e.BeforeContentClassName=3]="BeforeContentClassName",e[e.AfterContentClassName=4]="AfterContentClassName"}(b||(b={}));class _{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),3===i?n+="::before":4===i&&(n+="::after"),n}}})),define(e[1556],t([0,1,7,109,138,142,11]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorScrollbar=void 0;class a extends s.ViewPart{constructor(e,t,a,l){super(e);const c=this._context.configuration.options,d=c.get(84),h=c.get(58),u=c.get(28),g=c.get(87),p={listenOnDomNode:a.domNode,className:"editor-scrollable "+r.getThemeTypeSelector(e.theme.type),useShadows:!1,lazyRender:!0,vertical:d.vertical, horizontal:d.horizontal,verticalHasArrows:d.verticalHasArrows,horizontalHasArrows:d.horizontalHasArrows,verticalScrollbarSize:d.verticalScrollbarSize,verticalSliderSize:d.verticalSliderSize,horizontalScrollbarSize:d.horizontalScrollbarSize,horizontalSliderSize:d.horizontalSliderSize,handleMouseWheel:d.handleMouseWheel,alwaysConsumeMouseWheel:d.alwaysConsumeMouseWheel,arrowSize:d.arrowSize,mouseWheelScrollSensitivity:h,fastScrollSensitivity:u,scrollPredominantAxis:g};this.scrollbar=this._register(new o.SmoothScrollableElement(t.domNode,p,this._context.viewLayout.getScrollable())),s.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=n.createFastDomNode(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const m=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)} this._context.model.setScrollPosition(n,1)};this._register(i.addDisposableListener(a.domNode,"scroll",e=>m(a.domNode,!0,!0))),this._register(i.addDisposableListener(t.domNode,"scroll",e=>m(t.domNode,!0,!1))),this._register(i.addDisposableListener(l.domNode,"scroll",e=>m(l.domNode,!0,!1))),this._register(i.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",e=>m(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(117);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(56).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){ if(e.hasChanged(84)||e.hasChanged(58)||e.hasChanged(28)){const e=this._context.configuration.options,t=e.get(84),i=e.get(58),n=e.get(28),o=e.get(87),s={handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(117)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+r.getThemeTypeSelector(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}t.EditorScrollbar=a})),define(e[1557],t([0,1,7,109,255,2,12,24,402,142,111,18,533,556,235,27,11,60,128,885,129,135,774]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Minimap=void 0;const y=140,w=2;class E{constructor(e,t,i){const n=e.options,o=n.get(115),s=n.get(117),r=s.minimap,a=n.get(36),l=n.get(56);this.renderMinimap=r.renderMinimap,this.size=l.size, this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(86),this.showSlider=l.showSlider,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(51),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=s.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=C.once(()=>b.MinimapCharRendererFactory.create(this.fontScale,a.fontFamily)),this.backgroundColor=E._getMinimapBackground(t,i)}static _getMinimapBackground(e,t){const i=e.getColor(m.minimapBackground);return i?new u.RGBA8(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a):t.getColor(2)}equals(e){ return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class I{constructor(e,t,i,n,o,s,r,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n, this.sliderTop=o,this.sliderHeight=s,this.startLineNumber=r,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){const t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,s,r,a,l,c){const d=e.pixelRatio,h=e.minimapLineHeight,u=Math.floor(e.canvasInnerHeight/h),g=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=r*e.lineHeight+(e.scrollBeyondLastLine?n-e.lineHeight:0),i=Math.max(1,Math.floor(n*n/t)),o=Math.max(0,e.minimapHeight-i),c=o/(l-n),d=a*c,h=o>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new I(a,l,h,c,d,i,1,Math.min(s,u))}let p,m;if(o&&i!==s){const e=i-t+1;p=Math.floor(e*h/d)}else{const e=n/g;p=Math.floor(e*h/d)}m=e.scrollBeyondLastLine?(s-1)*h/d:Math.max(0,s*h/d-p);const v=(m=Math.min(e.minimapHeight-p,m))/(l-n),f=a*v;let S=0;if(e.scrollBeyondLastLine){S=n/g-1}if(u>=s+S){return new I(a,l,m>0,v,f,p,1,s)}{ let e=Math.max(1,Math.floor(t-f*d/h));c&&c.scrollHeight===l&&(c.scrollTop>a&&(e=Math.min(e,c.startLineNumber)),c.scrollTopx.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=r-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight, viewportStartLineNumber:t,viewportEndLineNumber:i,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=T.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)} getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let o=0,s=t-e+1;o{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=i.getDomNodePagePosition(this._slider.domNode),n=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,n,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let o=Math.floor(n/t)+this._lastRenderData.renderedLayout.startLineNumber;o=Math.min(o,this._model.getLineCount()),this._model.revealLineNumber(o)}), this._sliderMouseMoveMonitor=new o.GlobalMouseMoveMonitor,this._sliderMouseDownListener=i.addStandardDisposableListener(this._slider.domNode,"mousedown",e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=S.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=i.addDisposableListener(this._domNode.domNode,S.EventType.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=i.addDisposableListener(this._domNode.domNode,S.EventType.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=i.addStandardDisposableListener(this._domNode.domNode,S.EventType.End,e=>{e.preventDefault(), e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i,n,s){this._slider.toggleClassName("active",!0);const a=(e,n)=>{const o=Math.abs(n-t);if(r.isWindows&&o>y)return void this._model.setScrollTop(s.scrollTop);const a=e-i;this._model.setScrollTop(s.getDesiredScrollTopFromDelta(a))};n!==i&&a(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,o.standardMouseMoveMerger,e=>a(e.posy,e.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()} _getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){ return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new D(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(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){ return this._selectionColor=this._theme.getColor(m.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=I.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"), this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);const i=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,n=Math.min(this._model.options.minimapWidth,Math.round(i*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(n),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-n),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new Map;for(let i=0;ithis._model.options.canvasInnerHeight)return;let g=t.get(s);const p=!g;if(!g){const e=this._model.getLineContent(s);g=[d.MINIMAP_GUTTER_WIDTH];for(let t=1;ts?g.length-1:v-1;if(_>0){const t=g[_]-b||2;this.renderDecoration(e,n,b,u,t,r)}p&&this.renderLineHighlight(e,n,u,r)}renderLineHighlight(e,t,i,n){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(d.MINIMAP_GUTTER_WIDTH,i,e.canvas.width,n)}renderDecoration(e,t,i,n,o,s){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,s)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new k(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[s,r,a]=A._renderUntouchedLines(o,t,i,n,this._lastRenderData) ;const l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,d=this._model.options.backgroundColor,h=this._model.tokensColorTracker,u=h.backgroundIsLight(),g=this._model.options.renderMinimap,p=this._model.options.charRenderer(),m=this._model.options.fontScale,v=this._model.options.minimapCharWidth,f=(1===g?2:3)*m,S=n>f?Math.floor((n-f)/2):0;let b=0;const _=[];for(let e=0,s=i-t+1;e=0&&of)return;const s=m.charCodeAt(_);if(9===s){const e=h-(_+C)%h;C+=e-1,b+=e*o}else if(32===s)b+=o;else{const d=a.isFullWidthCharacter(s)?2:1;for(let a=0;af)return}}}}}v.registerThemingParticipant((e,t)=>{const i=e.getColor(m.minimapBackground);i&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${i.rgba.a}; will-change: opacity; }`) ;const n=e.getColor(m.minimapSliderBackground);n&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(m.minimapSliderHoverBackground);o&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${o}; }`);const s=e.getColor(m.minimapSliderActiveBackground);s&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${s}; }`);const r=e.getColor(m.scrollbarShadow);r&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${r} -6px 0 6px -6px inset; }`)})})),define(e[1558],t([0,1,109,142,27,11,777]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollDecorationViewPart=void 0;class r extends n.ViewPart{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(84);this._useShadows=t.useShadows,this._domNode=i.createFastDomNode(document.createElement("div")), this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(117);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(84);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}t.ScrollDecorationViewPart=r,s.registerThemingParticipant((e,t)=>{const i=e.getColor(o.scrollbarShadow) ;i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)})})),define(e[1559],t([0,1,80,263,27,11,778]),(function(e,t,i,n,o,s){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionsOverlay=void 0,function(e){e[e.EXTERN=0]="EXTERN",e[e.INTERN=1]="INTERN",e[e.FLAT=2]="FLAT"}(r||(r={}));class a{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class l{constructor(e,t){this.lineNumber=e,this.ranges=t}}function c(e){return new a(e)}function d(e){return new l(e.lineNumber,e.ranges.map(c))}const h=i.isEdge;class u extends n.DynamicViewOverlay{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){ this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!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}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;g(a-i)i&&(c.top=1),g(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,d=n.length;c1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function g(e){return e<0?-e:e}t.SelectionsOverlay=u,u.SELECTION_CLASS_NAME="selected-text",u.SELECTION_TOP_LEFT="top-left-radius",u.SELECTION_BOTTOM_LEFT="bottom-left-radius",u.SELECTION_TOP_RIGHT="top-right-radius",u.SELECTION_BOTTOM_RIGHT="bottom-right-radius",u.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",u.ROUNDED_PIECE_WIDTH=10,s.registerThemingParticipant((e,t)=>{const i=e.getColor(o.editorSelectionBackground);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(o.editorInactiveSelection);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const s=e.getColor(o.editorSelectionForeground) ;s&&!s.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${s}; }`)})})),define(e[145],t([0,1,976,55,27,11]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overviewRulerInfo=t.overviewRulerWarning=t.overviewRulerError=t.overviewRulerRangeHighlight=t.editorUnnecessaryCodeOpacity=t.editorUnnecessaryCodeBorder=t.editorGutter=t.editorOverviewRulerBackground=t.editorOverviewRulerBorder=t.editorBracketMatchBorder=t.editorBracketMatchBackground=t.editorCodeLensForeground=t.editorRuler=t.editorActiveLineNumber=t.editorLineNumbers=t.editorActiveIndentGuides=t.editorIndentGuides=t.editorWhitespaces=t.editorCursorBackground=t.editorCursorForeground=t.editorSymbolHighlightBorder=t.editorSymbolHighlight=t.editorRangeHighlightBorder=t.editorRangeHighlight=t.editorLineHighlightBorder=t.editorLineHighlight=void 0,t.editorLineHighlight=o.registerColor("editor.lineHighlightBackground",{dark:null,light:null,hc:null},i.localize(0,null)), t.editorLineHighlightBorder=o.registerColor("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},i.localize(1,null)),t.editorRangeHighlight=o.registerColor("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},i.localize(2,null),!0),t.editorRangeHighlightBorder=o.registerColor("editor.rangeHighlightBorder",{dark:null,light:null,hc:o.activeContrastBorder},i.localize(3,null),!0),t.editorSymbolHighlight=o.registerColor("editor.symbolHighlightBackground",{dark:o.editorFindMatchHighlight,light:o.editorFindMatchHighlight,hc:null},i.localize(4,null),!0),t.editorSymbolHighlightBorder=o.registerColor("editor.symbolHighlightBorder",{dark:null,light:null,hc:o.activeContrastBorder},i.localize(5,null),!0),t.editorCursorForeground=o.registerColor("editorCursor.foreground",{dark:"#AEAFAD",light:n.Color.black,hc:n.Color.white},i.localize(6,null)),t.editorCursorBackground=o.registerColor("editorCursor.background",null,i.localize(7,null)), t.editorWhitespaces=o.registerColor("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},i.localize(8,null)),t.editorIndentGuides=o.registerColor("editorIndentGuide.background",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},i.localize(9,null)),t.editorActiveIndentGuides=o.registerColor("editorIndentGuide.activeBackground",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},i.localize(10,null)),t.editorLineNumbers=o.registerColor("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:n.Color.white},i.localize(11,null));const r=o.registerColor("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:o.activeContrastBorder},i.localize(12,null),!1,i.localize(13,null));t.editorActiveLineNumber=o.registerColor("editorLineNumber.activeForeground",{dark:r,light:r,hc:r},i.localize(14,null)),t.editorRuler=o.registerColor("editorRuler.foreground",{dark:"#5A5A5A",light:n.Color.lightgrey,hc:n.Color.white },i.localize(15,null)),t.editorCodeLensForeground=o.registerColor("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},i.localize(16,null)),t.editorBracketMatchBackground=o.registerColor("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},i.localize(17,null)),t.editorBracketMatchBorder=o.registerColor("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:o.contrastBorder},i.localize(18,null)),t.editorOverviewRulerBorder=o.registerColor("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},i.localize(19,null)),t.editorOverviewRulerBackground=o.registerColor("editorOverviewRuler.background",null,i.localize(20,null)),t.editorGutter=o.registerColor("editorGutter.background",{dark:o.editorBackground,light:o.editorBackground,hc:o.editorBackground},i.localize(21,null)),t.editorUnnecessaryCodeBorder=o.registerColor("editorUnnecessaryCode.border",{dark:null,light:null,hc:n.Color.fromHex("#fff").transparent(.8)},i.localize(22,null)), t.editorUnnecessaryCodeOpacity=o.registerColor("editorUnnecessaryCode.opacity",{dark:n.Color.fromHex("#000a"),light:n.Color.fromHex("#0007"),hc:null},i.localize(23,null));const a=new n.Color(new n.RGBA(0,122,204,.6));t.overviewRulerRangeHighlight=o.registerColor("editorOverviewRuler.rangeHighlightForeground",{dark:a,light:a,hc:a},i.localize(24,null),!0),t.overviewRulerError=o.registerColor("editorOverviewRuler.errorForeground",{dark:new n.Color(new n.RGBA(255,18,18,.7)),light:new n.Color(new n.RGBA(255,18,18,.7)),hc:new n.Color(new n.RGBA(255,50,50,1))},i.localize(25,null)),t.overviewRulerWarning=o.registerColor("editorOverviewRuler.warningForeground",{dark:o.editorWarningForeground,light:o.editorWarningForeground,hc:o.editorWarningBorder},i.localize(26,null)),t.overviewRulerInfo=o.registerColor("editorOverviewRuler.infoForeground",{dark:o.editorInfoForeground,light:o.editorInfoForeground,hc:o.editorInfoBorder},i.localize(27,null)),s.registerThemingParticipant((e,i)=>{const n=e.getColor(o.editorBackground) ;n&&i.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${n}; }`);const s=e.getColor(o.editorForeground);s&&i.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${s}; }`);const r=e.getColor(t.editorGutter);r&&i.addRule(`.monaco-editor .margin { background-color: ${r}; }`);const a=e.getColor(t.editorRangeHighlight);a&&i.addRule(`.monaco-editor .rangeHighlight { background-color: ${a}; }`);const l=e.getColor(t.editorRangeHighlightBorder);l&&i.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const c=e.getColor(t.editorSymbolHighlight);c&&i.addRule(`.monaco-editor .symbolHighlight { background-color: ${c}; }`);const d=e.getColor(t.editorSymbolHighlightBorder);d&&i.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${d}; }`);const h=e.getColor(t.editorWhitespaces);h&&(i.addRule(`.monaco-editor .mtkw { color: ${h} !important; }`), i.addRule(`.monaco-editor .mtkz { color: ${h} !important; }`))})})),define(e[1560],t([0,1,263,145,14,11,766]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CurrentLineMarginHighlightOverlay=t.CurrentLineHighlightOverlay=t.AbstractLineHighlightOverlay=void 0;let r=!0;class a extends i.DynamicViewOverlay{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(117);this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[],this._selections=[],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=r?this._selections.slice(0,1):this._selections,i=t.map(e=>e.positionLineNumber);i.sort((e,t)=>e-t), o.equals(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every(e=>e.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHightlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null) ;const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let e=i;e<=n;e++){const n=e-i;for(;s=this._renderData.length?"":this._renderData[i]}}t.AbstractLineHighlightOverlay=a;t.CurrentLineHighlightOverlay=class extends a{_renderOne(e){return`
    `}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){ return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}};t.CurrentLineMarginHighlightOverlay=class extends a{_renderOne(e){return`
    `}_shouldRenderThis(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}},s.registerThemingParticipant((e,t)=>{r=!1;const i=e.getColor(n.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()||e.defines(n.editorLineHighlightBorder)){const i=e.getColor(n.editorLineHighlightBorder);i&&(r=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.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(e[1561],t([0,1,263,47,145,11,769]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentGuidesOverlay=void 0;class r extends i.DynamicViewOverlay{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,i=t.get(118),n=t.get(36);this._lineHeight=t.get(51),this._spaceWidth=n.spaceWidth,this._enabled=t.get(75), this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(118),n=t.get(36);return this._lineHeight=t.get(51),this._spaceWidth=n.spaceWidth,this._enabled=t.get(75),this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],i=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==i&&(this._primaryLineNumber=i,!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}onLanguageConfigurationChanged(e){return!0}prepareRender(e){ if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,{indentSize:o}=this._context.model.getTextModelOptions(),s=o*this._spaceWidth,r=e.scrollWidth,a=this._lineHeight,l=this._context.model.getLinesIndentGuides(t,i);let c=0,d=0,h=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,i);c=e.startLineNumber,d=e.endLineNumber,h=e.indent}const u=[];for(let o=t;o<=i;o++){const i=c<=o&&o<=d,g=o-t,p=l[g];let m="";if(p>=1){const t=e.visibleRangeForPosition(new n.Position(o,1));let l=t?t.left:0;for(let e=1;e<=p;e++){if(m+=`
    `,(l+=s)>r||this._maxIndentLeft>0&&l>this._maxIndentLeft)break}}u[g]=m}this._renderResult=u}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}t.IndentGuidesOverlay=r, s.registerThemingParticipant((e,t)=>{const i=e.getColor(o.editorIndentGuides);i&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(o.editorActiveIndentGuides)||i;n&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${n} inset; }`)})})),define(e[573],t([0,1,12,263,47,145,11,770]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineNumbersOverlay=void 0;class a extends n.DynamicViewOverlay{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new o.Position(1,1),this._renderResult=null,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(51);const t=e.get(52);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(76);const i=e.get(117);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){ this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers}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}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)} return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i?String(i):i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=i.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,s='
    ',r=this._context.model.getLineCount(),l=[];for(let e=n;e<=o;e++){const t=e-n;if(!this._renderFinalNewline&&e===r&&0===this._context.model.getLineLength(e)){l[t]="";continue}const i=this._getLineRenderLineNumber(e);l[t]=i?s+i+"
    ":""}this._renderResult=l}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}t.LineNumbersOverlay=a,a.CLASS_NAME="line-numbers",r.registerThemingParticipant((e,t)=>{const i=e.getColor(s.editorLineNumbers) ;i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(s.editorActiveLineNumber);n&&t.addRule(`.monaco-editor .current-line ~ .line-numbers { color: ${n}; }`)})})),define(e[1562],t([0,1,962,80,109,12,24,201,534,530,142,573,540,111,295,47,18,60,233,765]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextAreaHandler=void 0;class b{constructor(e,t,i){this.top=e,this.left=t,this.width=i}setWidth(e){return new b(this.top,this.left,e)}}const _=n.isEdge||n.isFirefox;class C extends d.ViewPart{constructor(e,t,r){super(e),this._primaryCursorPosition=new m.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=r,this._scrollLeft=0,this._scrollTop=0;const a=this._context.configuration.options,h=a.get(117);this._setAccessibilityOptions(a),this._contentLeft=h.contentLeft,this._contentWidth=h.contentWidth,this._contentHeight=h.height,this._fontInfo=a.get(36),this._lineHeight=a.get(51), this._emptySelectionClipboard=a.get(26),this._copyWithSyntaxHighlighting=a.get(16),this._visibleTextArea=null,this._selections=[new f.Selection(1,1,1,1)],this._modelSelections=[new f.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=o.createFastDomNode(document.createElement("textarea")),d.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${S.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(a)),this.textArea.setAttribute("tabindex",String(a.get(102))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",i.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"), this.textArea.setAttribute("aria-autocomplete","both"),s.isWeb&&a.get(72)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=o.createFastDomNode(document.createElement("div")),this.textAreaCover.setPosition("absolute");const u={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},g={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,s.isWindows),i=this._context.model.getEOL(),n=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,r=Array.isArray(t)?t.join(i):t;let a=void 0,c=null;if(e&&(l.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&r.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(a=e.html,c=e.mode)}return{isFromEmptySelection:n, multicursorText:o,text:r,html:a,mode:c}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(s.isMacintosh){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new c.TextAreaState(i,i.length,i.length,t,t)}}return c.TextAreaState.EMPTY}return c.PagedScreenReaderStrategy.fromEditorSelection(e,u,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)};this._textAreaInput=this._register(new l.TextAreaInput(g,this.textArea)),this._register(this._textAreaInput.onKeyDown(e=>{this._viewController.emitKeyDown(e)})),this._register(this._textAreaInput.onKeyUp(e=>{this._viewController.emitKeyUp(e)})),this._register(this._textAreaInput.onPaste(e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection, i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(e=>{e.replaceCharCnt?this._viewController.replacePreviousChar(e.text,e.replaceCharCnt):this._viewController.type(e.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(e=>{this._viewController.setSelection(e)})),this._register(this._textAreaInput.onCompositionStart(e=>{const t=this._selections[0].startLineNumber,i=this._selections[0].startColumn-(e.moveOneCharacterLeft?1:0);this._context.model.revealRange("keyboard",!0,new v.Range(t,i,t,i),0,1);const n=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,i);n&&(this._visibleTextArea=new b(this._context.viewLayout.getVerticalOffsetForLineNumber(t),n.left,_?0:1),this._render()),this.textArea.setClassName(`inputarea ${S.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`), this._viewController.compositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(e=>{n.isEdge?this._visibleTextArea=this._visibleTextArea.setWidth(0):this._visibleTextArea=this._visibleTextArea.setWidth(function(e,t){const i=document.createElement("canvas").getContext("2d");i.font=(o=t,s="normal",r=o.fontWeight,a=o.fontSize,l=o.lineHeight,c=o.fontFamily,`${s} normal ${r} ${a}px / ${l}px ${c}`);var o,s,r,a,l,c;const d=i.measureText(e);return n.isFirefox?d.width+2:d.width}(e.data,this._fontInfo)),this._render()})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${S.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getWordBeforePosition(e){ const t=this._context.model.getLineContent(e.lineNumber),i=p.getMapForWordSeparators(this._context.configuration.options.get(105));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!r.isHighSurrogate(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?i.localize(1,null,s.isLinux?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===g.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height, this._fontInfo=t.get(36),this._lineHeight=t.get(51),this._emptySelectionClipboard=t.get(26),this._copyWithSyntaxHighlighting=t.get(16),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(102))),s.isWeb&&e.hasChanged(72)&&(t.get(72)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()} refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new m.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){ if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():s.isMacintosh?this._renderInsideEditor(this._primaryCursorPosition,t,e,_?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,_?0:1,_?0:1)}_renderInsideEditor(e,t,i,n,o){this._lastRenderPosition=e;const s=this.textArea,r=this.textAreaCover;a.Configuration.applyFontInfo(s,this._fontInfo),s.setTop(t),s.setLeft(i),s.setWidth(n),s.setHeight(o),r.setTop(0), r.setLeft(0),r.setWidth(0),r.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(a.Configuration.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),_)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(42)?t.setClassName("monaco-editor-background textAreaCover "+u.Margin.OUTER_CLASS_NAME):0!==i.get(52).renderType?t.setClassName("monaco-editor-background textAreaCover "+h.LineNumbersOverlay.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}t.TextAreaHandler=C})),define(e[1563],t([0,1,109,55,142,47,45,145]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsOverviewRuler=void 0;class l{constructor(e,t){const i=e.options;this.lineHeight=i.get(51),this.pixelRatio=i.get(115),this.overviewRulerLanes=i.get(65),this.renderBorder=i.get(64) ;const o=t.getColor(a.editorOverviewRulerBorder);this.borderColor=o?o.toString():null,this.hideCursor=i.get(44);const s=t.getColor(a.editorCursorForeground);this.cursorColor=s?s.transparent(.7).toString():null,this.themeType=t.type;const l=i.get(56),c=l.enabled,d=l.side,h=c?t.getColor(a.editorOverviewRulerBackground)||r.TokenizationRegistry.getDefaultBackground():null;this.backgroundColor=null===h||"left"===d?null:n.Color.Format.CSS.formatHex(h);const u=i.get(117).overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[g,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=g,this.w=p}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t ;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}var c,d;!function(e){e[e.MIN_DECORATION_HEIGHT=6]="MIN_DECORATION_HEIGHT"}(c||(c={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(d||(d={}));class h extends o.ViewPart{constructor(e){super(e),this._domNode=i.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=r.TokenizationRegistry.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new l(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[] ;for(let t=0,i=e.selections.length;tt&&(e=t-a),f=e-a,S=e+a}f>v+1||s!==p?(0!==e&&l.fillRect(c[p],m,d[p],v-m),p=s,m=f,v=S):S>v&&(v=S)}l.fillRect(c[p],m,d[p],v-m)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,s=this._settings.x[7],r=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let d=0,h=this._cursorPositions.length;dt&&(u=t-i);const g=u-i,p=g+e ;g>c+1?(0!==d&&l.fillRect(s,a,r,c-a),a=g,c=p):p>c&&(c=p)}l.fillRect(s,a,r,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}t.DecorationsOverviewRuler=h})),define(e[1564],t([0,1,109,142,145,11,776]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rulers=void 0;class r extends n.ViewPart{constructor(e){super(e),this.domNode=i.createFastDomNode(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options ;return this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=i.createFastDomNode(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(o),this.domNode.appendChild(e),this._renderedRulers.push(e),s--}return}let n=e-t;for(;n>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),n--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const i=e.getColor(o.editorRuler) ;i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)})})),define(e[1565],t([0,1,109,15,142,1507,111,145,11,779]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewCursors=void 0;class c extends o.ViewPart{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(72),this._cursorBlinking=t.get(17),this._cursorStyle=t.get(19),this._cursorSmoothCaretAnimation=t.get(18),this._selectionIsEmpty=!0,this._isVisible=!1,this._primaryCursor=new s.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=i.createFastDomNode(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new n.TimeoutTimer,this._cursorFlatBlinkInterval=new n.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1, this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(72),this._cursorBlinking=t.get(17),this._cursorStyle=t.get(19),this._cursorSmoothCaretAnimation=t.get(18),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){ const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()},c.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},c.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case r.TextEditorCursorStyle.Line:e+=" cursor-line-style";break;case r.TextEditorCursorStyle.Block:e+=" cursor-block-style";break;case r.TextEditorCursorStyle.Underline: e+=" cursor-underline-style";break;case r.TextEditorCursorStyle.LineThin:e+=" cursor-line-thin-style";break;case r.TextEditorCursorStyle.BlockOutline:e+=" cursor-block-outline-style";break;case r.TextEditorCursorStyle.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(a.editorCursorForeground);if(i){let n=e.getColor(a.editorCursorBackground);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}})})), define(e[1566],t([0,1,7,60,109,21,1553,1562,1529,572,1506,142,908,1560,909,1556,410,1561,573,1554,910,540,911,1557,912,1563,913,1564,1558,1559,1565,914,47,18,298,903,905,300,11,432]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x,k,D,T,R,A,M,L,O,N,P,F,B,V){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.View=void 0;class W extends F.ViewEventHandler{constructor(e,t,i,s,c,x){super(),this._selections=[new n.Selection(1,1,1,1)],this._renderAnimationFrame=null;const M=new l.ViewController(t,s,c,e);this._context=new N.ViewContext(t,i.getColorTheme(),s),this._context.addEventHandler(this),this._register(i.onDidColorThemeChange(e=>{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new a.TextAreaHandler(this._context,M,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=o.createFastDomNode(document.createElement("div")), this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=o.createFastDomNode(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=o.createFastDomNode(document.createElement("div")),h.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new m.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new b.ViewLines(this._context,this._linesContent),this._viewZones=new A.ViewZones(this._context),this._viewParts.push(this._viewZones);const L=new I.DecorationsOverviewRuler(this._context);this._viewParts.push(L);const O=new D.ScrollDecorationViewPart(this._context);this._viewParts.push(O);const P=new d.ContentViewOverlays(this._context);this._viewParts.push(P), P.addDynamicOverlay(new g.CurrentLineHighlightOverlay(this._context)),P.addDynamicOverlay(new T.SelectionsOverlay(this._context)),P.addDynamicOverlay(new f.IndentGuidesOverlay(this._context)),P.addDynamicOverlay(new p.DecorationsOverlay(this._context));const F=new d.MarginViewOverlays(this._context);this._viewParts.push(F),F.addDynamicOverlay(new g.CurrentLineMarginHighlightOverlay(this._context)),F.addDynamicOverlay(new v.GlyphMarginOverlay(this._context)),F.addDynamicOverlay(new y.MarginViewLineDecorationsOverlay(this._context)),F.addDynamicOverlay(new _.LinesDecorationsOverlay(this._context)),F.addDynamicOverlay(new S.LineNumbersOverlay(this._context));const B=new C.Margin(this._context);B.getDomNode().appendChild(this._viewZones.marginDomNode),B.getDomNode().appendChild(F.getDomNode()),this._viewParts.push(B),this._contentWidgets=new u.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new R.ViewCursors(this._context), this._viewParts.push(this._viewCursors),this._overlayWidgets=new E.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const V=new k.Rulers(this._context);this._viewParts.push(V);const W=new w.Minimap(this._context);if(this._viewParts.push(W),L){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(L.getDomNode(),e.insertBefore)}this._linesContent.appendChild(P.getDomNode()),this._linesContent.appendChild(V.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(B.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(O.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea), this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(W.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),x?x.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new r.PointerHandler(this._context,M,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new V.PointerHandlerLastRenderData(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e), shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new M.Position(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new M.Position(e,t)))}}_applyLayout(){const e=this._context.configuration.options.get(117);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"" ;return this._context.configuration.options.get(114)+" "+B.getThemeTypeSelector(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e=0,t=this._viewParts.length;ethis._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(let i=0,n=this._viewParts.length;i{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(117)){const e=t.get(117);this._onDidLayoutChange.fire(e)}})),this._contextKeyService=this._register(l.createScoped(this._domElement)),this._notificationService=d,this._codeEditorService=o,this._commandService=r,this._themeService=c,this._register(new $(this,this._contextKeyService)),this._register(new j(this,this._contextKeyService)),this._instantiationService=n.createChild(new L.ServiceCollection([A.IContextKeyService,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new q(e),this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}),this._contentWidgets={},this._overlayWidgets={},g=Array.isArray(i.contributions)?i.contributions:u.EditorExtensionsRegistry.getEditorContributions();for(const e of g)try{ const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){s.onUnexpectedError(e)}u.EditorExtensionsRegistry.getEditorActions().forEach(e=>{const t=new y.InternalEditorAction(e.id,e.label,e.alias,F.withNullAsUndefined(e.precondition),()=>this._instantiationService.invokeFunction(t=>Promise.resolve(e.runEditorCommand(t,this,null))),this._contextKeyService);this._actions[t.id]=t}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new h.Configuration(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return w.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t_.Range.lift(e)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return S.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getStatusbarColumn(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return S.CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!b.Position.isIPosition(e))throw new Error("Invalid arguments") ;this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!_.Range.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new _.Range(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)} revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!b.Position.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new _.Range(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=C.Selection.isISelection(e),i=_.Range.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new C.Selection(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)} revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new _.Range(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!_.Range.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(_.Range.lift(e),t,i,n)}setSelections(e,t="api"){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments") ;for(let t=0,i=e.length;te.isSupported())}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._replacePreviousChar(e,t.text||"",t.replaceCharCnt||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut": return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,s.onUnexpectedError):this._modelData&&this._triggerEditorCommand(e,t,i)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_replacePreviousChar(e,t,i){this._modelData&&this._modelData.viewModel.replacePreviousChar(t,i,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const r=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new _.Range(s.lineNumber,s.column,r.lineNumber,r.column),mode:o})}_cut(e){ this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=u.EditorExtensionsRegistry.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction(e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,s.onUnexpectedError)}),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(72)&&(this._modelData.model.pushStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(72))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){ return this._modelData?this._modelData.model.getLineDecorations(e,this._id,v.filterValidationDecorations(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}setDecorations(e,t){const i={},n=this._decorationTypeSubtypes[e]||{};this._decorationTypeSubtypes[e]=i;const o=[];for(let s of t){let t=e;if(s.renderOptions){const o=l.hash(s.renderOptions).toString(16);t=e+"-"+o,n[o]||i[o]||this._registerDecorationType(t,s.renderOptions,e),i[o]=!0}const r=this._resolveDecorationOptions(t,!!s.hoverMessage);s.hoverMessage&&(r.hoverMessage=s.hoverMessage),o.push({range:s.range,options:r})}for(let t in n)i[t]||this._removeDecorationType(e+"-"+t);const s=this._decorationTypeKeysToIds[e]||[];this._decorationTypeKeysToIds[e]=this.deltaDecorations(s,o)}setDecorationsFast(e,t){const i=this._decorationTypeSubtypes[e]||{};for(let t in i)this._removeDecorationType(e+"-"+t);this._decorationTypeSubtypes[e]={} ;const n=I.ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(e,!1)),o=new Array(t.length);for(let e=0,i=t.length;en.scheduleAtNextAnimationFrame(e));t.push(e.onDidChangeDecorations(e=>this._onDidChangeModelDecorations.fire(e))),t.push(e.onDidChangeLanguage(t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)})),t.push(e.onDidChangeLanguageConfiguration(e=>this._onDidChangeModelLanguageConfiguration.fire(e))),t.push(e.onDidChangeContent(e=>this._onDidChangeModelContent.fire(e))),t.push(e.onDidChangeOptions(e=>this._onDidChangeModelOptions.fire(e))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(o.onEvent(e=>{switch(e.kind){case 0: this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(i.localize(0,null,f.Cursor.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},replacePreviousChar:(e,t)=>{this._replacePreviousChar("keyboard",e,t)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},replacePreviousChar:(e,t)=>{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})}, endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new m.ViewUserInputEvents(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new p.View(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null, this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_registerDecorationType(e,t,i){this._codeEditorService.registerDecorationType(e,t,i,this)}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}_resolveDecorationOptions(e,t){return this._codeEditorService.resolveDecorationOptions(e,t)}getTelemetryData(){return this._telemetryData}hasModel(){return null!==this._modelData}};var H;K=o([r(3,M.IInstantiationService),r(4,g.ICodeEditorService),r(5,R.ICommandService),r(6,A.IContextKeyService),r(7,N.IThemeService),r(8,O.INotificationService),r(9,P.IAccessibilityService)],K),t.CodeEditorWidget=K,function(e){e[e.NotSet=0]="NotSet",e[e.False=1]="False",e[e.True=2]="True"}(H||(H={}));class G extends c.Disposable{constructor(){super(),this._onDidChangeToTrue=this._register(new a.Emitter),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new a.Emitter), this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}t.BooleanEventEmitter=G;class $ extends c.Disposable{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=E.EditorContextKeys.editorSimpleInput.bindTo(t),this._editorFocus=E.EditorContextKeys.focus.bindTo(t),this._textInputFocus=E.EditorContextKeys.textInputFocus.bindTo(t),this._editorTextFocus=E.EditorContextKeys.editorTextFocus.bindTo(t),this._editorTabMovesFocus=E.EditorContextKeys.tabMovesFocus.bindTo(t),this._editorReadonly=E.EditorContextKeys.readOnly.bindTo(t),this._editorColumnSelection=E.EditorContextKeys.columnSelection.bindTo(t),this._hasMultipleSelections=E.EditorContextKeys.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=E.EditorContextKeys.hasNonEmptySelection.bindTo(t), this._canUndo=E.EditorContextKeys.canUndo.bindTo(t),this._canRedo=E.EditorContextKeys.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(116)), this._editorReadonly.set(e.get(72)),this._editorColumnSelection.set(e.get(13))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(e=>!e.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 e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class j extends c.Disposable{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=E.EditorContextKeys.languageId.bindTo(t),this._hasCompletionItemProvider=E.EditorContextKeys.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=E.EditorContextKeys.hasCodeActionsProvider.bindTo(t), this._hasCodeLensProvider=E.EditorContextKeys.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=E.EditorContextKeys.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=E.EditorContextKeys.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=E.EditorContextKeys.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=E.EditorContextKeys.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=E.EditorContextKeys.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=E.EditorContextKeys.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=E.EditorContextKeys.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=E.EditorContextKeys.hasReferenceProvider.bindTo(t),this._hasRenameProvider=E.EditorContextKeys.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=E.EditorContextKeys.hasSignatureHelpProvider.bindTo(t),this._hasDocumentFormattingProvider=E.EditorContextKeys.hasDocumentFormattingProvider.bindTo(t), this._hasDocumentSelectionFormattingProvider=E.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=E.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=E.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=E.EditorContextKeys.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(x.CompletionProviderRegistry.onDidChange(i)),this._register(x.CodeActionProviderRegistry.onDidChange(i)),this._register(x.CodeLensProviderRegistry.onDidChange(i)),this._register(x.DefinitionProviderRegistry.onDidChange(i)),this._register(x.DeclarationProviderRegistry.onDidChange(i)),this._register(x.ImplementationProviderRegistry.onDidChange(i)),this._register(x.TypeDefinitionProviderRegistry.onDidChange(i)),this._register(x.HoverProviderRegistry.onDidChange(i)), this._register(x.DocumentHighlightProviderRegistry.onDidChange(i)),this._register(x.DocumentSymbolProviderRegistry.onDidChange(i)),this._register(x.ReferenceProviderRegistry.onDidChange(i)),this._register(x.RenameProviderRegistry.onDidChange(i)),this._register(x.DocumentFormattingEditProviderRegistry.onDidChange(i)),this._register(x.DocumentRangeFormattingEditProviderRegistry.onDidChange(i)),this._register(x.SignatureHelpProviderRegistry.onDidChange(i)),i()}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 e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(x.CompletionProviderRegistry.has(e)),this._hasCodeActionsProvider.set(x.CodeActionProviderRegistry.has(e)),this._hasCodeLensProvider.set(x.CodeLensProviderRegistry.has(e)),this._hasDefinitionProvider.set(x.DefinitionProviderRegistry.has(e)),this._hasDeclarationProvider.set(x.DeclarationProviderRegistry.has(e)),this._hasImplementationProvider.set(x.ImplementationProviderRegistry.has(e)),this._hasTypeDefinitionProvider.set(x.TypeDefinitionProviderRegistry.has(e)),this._hasHoverProvider.set(x.HoverProviderRegistry.has(e)),this._hasDocumentHighlightProvider.set(x.DocumentHighlightProviderRegistry.has(e)), this._hasDocumentSymbolProvider.set(x.DocumentSymbolProviderRegistry.has(e)),this._hasReferenceProvider.set(x.ReferenceProviderRegistry.has(e)),this._hasRenameProvider.set(x.RenameProviderRegistry.has(e)),this._hasSignatureHelpProvider.set(x.SignatureHelpProviderRegistry.has(e)),this._hasDocumentFormattingProvider.set(x.DocumentFormattingEditProviderRegistry.has(e)||x.DocumentRangeFormattingEditProviderRegistry.has(e)),this._hasDocumentSelectionFormattingProvider.set(x.DocumentRangeFormattingEditProviderRegistry.has(e)),this._hasMultipleDocumentFormattingProvider.set(x.DocumentFormattingEditProviderRegistry.all(e).length+x.DocumentRangeFormattingEditProviderRegistry.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(x.DocumentRangeFormattingEditProviderRegistry.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===d.Schemas.walkThroughSnippet)}):this.reset()}}t.EditorModeContext=j;class q extends c.Disposable{constructor(e){super(),this._onChange=this._register(new a.Emitter), this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(n.trackFocus(e)),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}refreshState(){this._domFocusTracker.refreshState&&this._domFocusTracker.refreshState()}}const Y=encodeURIComponent("");function Q(e){return Y+encodeURIComponent(e.toString())+X}const J=encodeURIComponent('') ;N.registerThemingParticipant((e,t)=>{const i=e.getColor(D.editorErrorBorder);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(D.editorErrorForeground);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Q(n)}") repeat-x bottom left; }`);const o=e.getColor(D.editorWarningBorder);o&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${o}; }`);const s=e.getColor(D.editorWarningForeground);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Q(s)}") repeat-x bottom left; }`);const r=e.getColor(D.editorInfoBorder);r&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${r}; }`);const a=e.getColor(D.editorInfoForeground);a&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Q(a)}") repeat-x bottom left; }`);const l=e.getColor(D.editorHintBorder);l&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${l}; }`) ;const c=e.getColor(D.editorHintForeground);c&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return J+encodeURIComponent(e.toString())+Z}(c)}") no-repeat bottom left; }`);const d=e.getColor(k.editorUnnecessaryCodeOpacity);d&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${d.rgba.a}; }`);const h=e.getColor(k.editorUnnecessaryCodeBorder);h&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${h}; }`);const u=e.getColor(D.editorForeground)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${u}}`)})})),define(e[1567],t([0,1,966,7,109,78,138,30,2,201,37,72,111,350,47,145,409,235,8,27,11,44,781]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffReview=void 0;const y=3;var w;!function(e){e[e.Equal=0]="Equal",e[e.Insert=1]="Insert", e[e.Delete=2]="Delete"}(w||(w={}));class E{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class I{constructor(e){this.entries=e}}const x=C.registerIcon("diff-review-insert",C.Codicon.add),k=C.registerIcon("diff-review-remove",C.Codicon.remove),D=C.registerIcon("diff-review-close",C.Codicon.close);class T extends l.Disposable{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=o.createFastDomNode(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=o.createFastDomNode(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new s.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new a.Action("diffreview.close",i.localize(0,null),"close-diff-review "+D.classNames,!0,()=>(this.hide(), Promise.resolve(null))),{label:!1,icon:!0}),this.domNode=o.createFastDomNode(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=o.createFastDomNode(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new r.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(n.addStandardDisposableListener(this.domNode.domNode,"click",e=>{e.preventDefault();let t=n.findParentWithClass(e.target,"diff-review-row");t&&this._goToRow(t)})),this._register(n.addStandardDisposableListener(this.domNode.domNode,"keydown",e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(), this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[s-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-y+1,a=i-y+1;if(ra){const e=a-m;m+=e,v+=e}if(v>p){const e=p-v;m+=e,v+=e}u[g++]=new E(n,m,o,v)}n[o++]=new I(u)}let s=n[0].entries,r=[],a=0;for(let e=1,t=n.length;eg)&&(g=n),0!==o&&(0===p||om)&&(m=s)}let v=document.createElement("div");v.className="diff-review-row";let f=document.createElement("div");f.className="diff-review-cell diff-review-summary";const S=g-u+1,b=m-p+1;f.appendChild(document.createTextNode(`${l+1}/${this._diffs.length}: @@ -${u},${S} +${p},${b} @@`)),v.setAttribute("data-line",String(p));const _=e=>0===e?i.localize(1,null):1===e?i.localize(2,null):i.localize(3,null,e),C=_(S),y=_(b);v.setAttribute("aria-label",i.localize(4,null,l+1,this._diffs.length,u,C,p,y)),v.appendChild(f),v.setAttribute("role","listitem"),h.appendChild(v);const w=t.get(51);let E=p;for(let i=0,n=d.length;i{const i=e.getColor(m.editorLineNumbers);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(b.scrollbarShadow);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)});class R extends d.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:i.localize(10,null),alias:"Go to Next Difference",precondition:S.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=M(e);i&&i.diffReviewNext()}} class A extends d.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:i.localize(11,null),alias:"Go to Previous Difference",precondition:S.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=M(e);i&&i.diffReviewPrev()}}function M(e){const t=e.get(h.ICodeEditorService),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;e!this._zonesMap[String(e.id)])}clean(e){this._zones.length>0&&e.changeViewZones(e=>{for(let t=0,i=this._zones.length;t{for(let e=0,i=this._zones.length;ethis._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=s.createFastDomNode(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(n.addStandardDisposableListener(this._overviewDomElement,"mousedown",e=>{this.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})), 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 U(p,o),this._modifiedEditorState=new U(p,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new V.ElementSizeObserver(this._containerDomElement,void 0,()=>this._onDidContainerSizeChanged())),i.automaticLayout&&this._elementSizeObserver.startObserving(), this._diffComputationResult=null;const f=this._contextKeyService.createScoped(),S=new T.ServiceCollection;S.set(k.IContextKeyService,f);const b=d.createChild(S),_=this._contextKeyService.createScoped(),C=new T.ServiceCollection;C.set(k.IContextKeyService,_);const y=d.createChild(C);this.originalEditor=this._createLeftHandSideEditor(i,b,f),this.modifiedEditor=this._createRightHandSideEditor(i,y,_),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new v.DiffReview(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,void 0!==i.enableSplitViewResizing&&(this._enableSplitViewResizing=i.enableSplitViewResizing), this._renderSideBySide?this._setStrategy(new Q(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Z(this._createDataSource(),this._enableSplitViewResizing)),this._register(u.onDidColorThemeChange(t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)}));const w=P.EditorExtensionsRegistry.getDiffEditorContributions();for(const e of w)try{this._register(d.createInstance(e.ctor,this))}catch(e){F.onUnexpectedError(e)}this._codeEditorService.addDiffEditor(this)}get ignoreTrimWhitespace(){return this._ignoreTrimWhitespace}get renderSideBySide(){return this._renderSideBySide}get maxComputationTime(){return this._maxComputationTime}get renderIndicators(){return this._renderIndicators}getContentHeight(){return this.modifiedEditor.getContentHeight()}_setState(e){this._state!==e&&(this._state=e, this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}hasWidgetFocus(){return n.isAncestor(document.activeElement,this._domElement)}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=M.getThemeTypeSelector(e.type)}_recreateOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this.originalEditor.hasModel()&&(this._originalOverviewRuler=this.originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()), this.modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this.modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers()}_createLeftHandSideEditor(t,i,n){const o=this._createInnerEditor(i,this._originalDomNode,this._adjustOptionsForLeftHandSide(t,this._originalIsEditable,this._originalCodeLens));this._register(o.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this.modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(o.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(o.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const s=n.createKey("isInDiffLeftEditor",void 0);return this._register(o.onDidFocusEditorWidget(()=>s.set(!0))), this._register(o.onDidBlurEditorWidget(()=>s.set(!1))),this._register(o.onDidContentSizeChange(t=>{const i=this.originalEditor.getContentWidth()+this.modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this.modifiedEditor.getContentHeight(),this.originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),o}_createRightHandSideEditor(t,i,n){const o=this._createInnerEditor(i,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t,this._modifiedCodeLens));this._register(o.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this.originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(o.onDidChangeViewZones(()=>{this._onViewZonesChanged()})), this._register(o.onDidChangeConfiguration(e=>{e.hasChanged(36)&&o.getModel()&&this._onViewZonesChanged()})),this._register(o.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(o.onDidChangeModelOptions(e=>{e.tabSize&&this._updateDecorationsRunner.schedule()}));const s=n.createKey("isInDiffRightEditor",void 0);return this._register(o.onDidFocusEditorWidget(()=>s.set(!0))),this._register(o.onDidBlurEditorWidget(()=>s.set(!1))),this._register(o.onDidContentSizeChange(t=>{const i=this.originalEditor.getContentWidth()+this.modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this.modifiedEditor.getContentHeight(),this.originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),o}_createInnerEditor(e,t,i){return e.createInstance(m.CodeEditorWidget,t,i,{})}dispose(){this._codeEditorService.removeDiffEditor(this), -1!==this._beginUpdateDecorationsTimeout&&(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._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 _.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getDiffComputationResult(){return this._diffComputationResult}getOriginalEditor(){return this.originalEditor}getModifiedEditor(){return this.modifiedEditor}updateOptions(t){let i=!1;void 0!==t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,i=!0),void 0!==t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let n=!1;void 0!==t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,n=!0), void 0!==t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,n=!0),n&&this._beginUpdateDecorations(),void 0!==t.originalEditable&&(this._originalIsEditable=Boolean(t.originalEditable)),void 0!==t.originalCodeLens&&(this._originalCodeLens=Boolean(t.originalCodeLens)),void 0!==t.modifiedCodeLens&&(this._modifiedCodeLens=Boolean(t.modifiedCodeLens)),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t,this._modifiedCodeLens)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t,this._originalIsEditable,this._originalCodeLens)),void 0!==t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),i&&(this._renderSideBySide?this._setStrategy(new Q(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Z(this._createDataSource(),this._enableSplitViewResizing)), this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide))}getModel(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this.originalEditor.setModel(e?e.original:null),this.modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this.originalEditor.setScrollTop(0),this.modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)}getStatusbarColumn(e){return this.modifiedEditor.getStatusbarColumn(e)} getPosition(){return this.modifiedEditor.getPosition()}setPosition(e){this.modifiedEditor.setPosition(e)}revealLine(e,t=0){this.modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this.modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this.modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this.modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this.modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this.modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this.modifiedEditor.getSelection()}getSelections(){return this.modifiedEditor.getSelections()}setSelection(e){this.modifiedEditor.setSelection(e)}setSelections(e){this.modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this.modifiedEditor.revealLines(e,t,i)} revealLinesInCenter(e,t,i=0){this.modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this.modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this.modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this.modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this.modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this.modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this.modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this.modifiedEditor.getSupportedActions()}saveViewState(){return{original:this.originalEditor.saveViewState(),modified:this.modifiedEditor.saveViewState()}}restoreViewState(e){if(e.original&&e.modified){let t=e ;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this.modifiedEditor.focus()}hasTextFocus(){return this.originalEditor.hasTextFocus()||this.modifiedEditor.hasTextFocus()}onVisible(){this._isVisible=!0,this.originalEditor.onVisible(),this.modifiedEditor.onVisible(),this._beginUpdateDecorations()}onHide(){this._isVisible=!1,this.originalEditor.onHide(),this.modifiedEditor.onHide(),this._cleanViewZonesAndDecorations()}trigger(e,t,i){this.modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this.modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight();let n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH ;this.modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this.originalEditor.getModel(),n=this.modifiedEditor.getModel();if(!t||!n)return;this._diffComputationToken++;let o=this._diffComputationToken;this._setState(1), this._editorWorkerService.canComputeDiff(t.uri,n.uri)?this._editorWorkerService.computeDiff(t.uri,n.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then(e=>{o===this._diffComputationToken&&t===this.originalEditor.getModel()&&n===this.modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},e=>{o===this._diffComputationToken&&t===this.originalEditor.getModel()&&n===this.modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(n.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=n.uri,this._notificationService.warn(i.localize(0,null)))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)}_updateDecorations(){ if(!(this.originalEditor.getModel()&&this.modifiedEditor.getModel()&&this._originalOverviewRuler&&this._modifiedOverviewRuler))return;const e=this._diffComputationResult?this._diffComputationResult.changes:[];let t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,i,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){let t=h.deepClone(e||{});return t.inDiffEditor=!0,t.wordWrap="off",t.wordWrapMinified=!1,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1, t.codeLens=!1,t.fixedOverflowWidgets=!0,t.overflowWidgetsDomNode=e.overflowWidgetsDomNode,t.minimap||(t.minimap={}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e,t,i){let n=this._adjustOptionsForSubEditor(e);return i&&(n.codeLens=!0),n.readOnly=!t,n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(t,i){let n=this._adjustOptionsForSubEditor(t);return i&&(n.codeLens=!0),n.revealHorizontalRightPadding=f.EditorOptions.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight();let o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px", this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this.originalEditor.layout({width:o,height:i-n}),this.modifiedEditor.layout({width:t-o-e.ENTIRE_DIFF_OVERVIEW_WIDTH,height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){let e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){let e=this.modifiedEditor.getLayoutInfo();if(!e)return null ;let t=this.modifiedEditor.getScrollTop(),i=this.modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this.originalEditor,getModifiedEditor:()=>this.modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=s+1:(n=s,o=s)}return i[n]} _getEquivalentLineForOriginalLineNumber(e){let t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.originalStartLineNumber);if(!t)return e;let i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=o?n+Math.min(r,s):n+s-o+r}_getEquivalentLineForModifiedLineNumber(e){let t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.modifiedStartLineNumber);if(!t)return e;let i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=s?i+Math.min(r,o):i+o-s+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{ equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};$.ONE_OVERVIEW_WIDTH=15,$.ENTIRE_DIFF_OVERVIEW_WIDTH=30,$.UPDATE_DIFF_DECORATIONS_DELAY=200,$=o([r(2,N.IClipboardService),r(3,y.IEditorWorkerService),r(4,k.IContextKeyService),r(5,D.IInstantiationService),r(6,p.ICodeEditorService),r(7,M.IThemeService),r(8,R.INotificationService),r(9,L.IContextMenuService),r(10,B.IEditorProgressService)],$),t.DiffEditorWidget=$;class j extends d.Disposable{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){let t=(e.getColor(A.diffInserted)||A.defaultInsertColor).transparent(2),i=(e.getColor(A.diffRemoved)||A.defaultRemoveColor).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o,s,r){ o=o.sort((e,t)=>e.afterLineNumber-t.afterLineNumber),n=n.sort((e,t)=>e.afterLineNumber-t.afterLineNumber);let a=this._getViewZones(e,n,o,s,r,i),l=this._getOriginalEditorDecorations(e,t,i,s,r),c=this._getModifiedEditorDecorations(e,t,i,s,r);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:c.decorations,overviewZones:c.overviewZones,zones:a.modified}}}}class q{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,c=(e,t)=>{if(null===t.domNode&&e.length>0){let i=e[e.length-1] ;if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},d=new q(this.modifiedForeignVZ),h=new q(this.originalForeignVZ);for(let u=0,g=this.lineChanges.length;u<=g;u++){let p=u0?-1:0),s=p.modifiedStartLineNumber+(p.modifiedEndLineNumber>0?-1:0),n=p.originalEndLineNumber>0?p.originalEndLineNumber-p.originalStartLineNumber+1:0,i=p.modifiedEndLineNumber>0?p.modifiedEndLineNumber-p.modifiedStartLineNumber+1:0,r=Math.max(p.originalStartLineNumber,p.originalEndLineNumber),a=Math.max(p.modifiedStartLineNumber,p.modifiedEndLineNumber)):(r=o+=1e7+n,a=s+=1e7+i);let m=[],v=[];for(;d.current&&d.current.afterLineNumber<=a;){let e;e=d.current.afterLineNumber<=s?o-s+d.current.afterLineNumber:r;let t=null ;p&&p.modifiedStartLineNumber<=d.current.afterLineNumber&&d.current.afterLineNumber<=p.modifiedEndLineNumber&&(t=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),m.push({afterLineNumber:e,heightInLines:d.current.height/this.modifiedLineHeight,domNode:null,marginDomNode:t}),d.advance()}for(;h.current&&h.current.afterLineNumber<=r;){let e;e=h.current.afterLineNumber<=o?s-o+h.current.afterLineNumber:a,v.push({afterLineNumber:e,heightInLines:h.current.height/this.originalLineHeight,domNode:null}),h.advance()}if(null!==p&&te(p)){let e=this._produceOriginalFromDiff(p,n,i);e&&m.push(e)}if(null!==p&&ie(p)){let e=this._produceModifiedFromDiff(p,n,i);e&&v.push(e)}let f=0,S=0;for(m=m.sort(l),v=v.sort(l);f=n.heightInLines?(i.heightInLines-=n.heightInLines,S++):(n.heightInLines-=i.heightInLines,f++)} for(;f(e.domNode||(e.domNode=function(){let e=document.createElement("div");return e.className="diagonal-fill",e}()),e))}}function X(e,t,i,n,o){return{range:new S.Range(e,t,i,n),options:o}}t.createDecoration=X,t.DECORATIONS={charDelete:C.ModelDecorationOptions.register({className:"char-delete"}),charDeleteWholeLine:C.ModelDecorationOptions.register({className:"char-delete",isWholeLine:!0}),charInsert:C.ModelDecorationOptions.register({className:"char-insert"}),charInsertWholeLine:C.ModelDecorationOptions.register({className:"char-insert",isWholeLine:!0}),lineInsert:C.ModelDecorationOptions.register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:C.ModelDecorationOptions.register({className:"line-insert",linesDecorationsClassName:"insert-sign "+H.classNames,marginClassName:"line-insert",isWholeLine:!0}), lineDelete:C.ModelDecorationOptions.register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:C.ModelDecorationOptions.register({className:"line-delete",linesDecorationsClassName:"delete-sign "+G.classNames,marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:C.ModelDecorationOptions.register({marginClassName:"line-delete"})};class Q extends j{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new a.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this.onSashDragStart()),this._sash.onDidChange(e=>this.onSashDrag(e)),this._sash.onDidEnd(()=>this.onSashDragEnd()),this._sash.onDidReset(()=>this.onSashReset())}setEnableSplitViewResizing(e){let t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){ let t=this._dataSource.getWidth()-$.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.floor((e||.5)*t),n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*Q.MINIMUM_EDITOR_WIDTH?(it-Q.MINIMUM_EDITOR_WIDTH&&(i=t-Q.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}onSashDragStart(){this._startSashPosition=this._sashPosition}onSashDrag(e){let t=this._dataSource.getWidth()-$.ENTIRE_DIFF_OVERVIEW_WIDTH,i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}onSashDragEnd(){this._sash.layout()}onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i,n,o){return new J(e,t,n.getOption(51),i,o.getOption(51)).getViewZones()} _getOriginalEditorDecorations(e,i,n,o,s){const r=String(this._removeColor);let a={decorations:[],overviewZones:[]},l=o.getModel();for(let o=0,s=e.length;ot?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Z extends j{constructor(e,t){super(e),this.decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(t=>{ this.decorationsLeft!==t.decorationsLeft&&(this.decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n,o,s){return new ee(e,t,i,n,o,s).getViewZones()}_getOriginalEditorDecorations(e,i,n,o,s){const r=String(this._removeColor);let a={decorations:[],overviewZones:[]};for(let i=0,n=e.length;i`])}h+=this.modifiedEditorOptions.get(85);let p=document.createElement("div");p.className=`view-lines line-delete ${z.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`,p.innerHTML=o.build(),u.Configuration.applyFontInfoSlow(p,a);let m=document.createElement("div");return m.className="inline-deleted-margin-view-zone",m.innerHTML=s.join(""),u.Configuration.applyFontInfoSlow(m,a),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:h*d,domNode:p,marginDomNode:m,diff:{ originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalContent:g}}}_renderOriginalLine(e,t,i,n,o,s,r){const a=t.getLineTokens(o),l=a.getLineContent(),c=i.get(36),d=E.LineDecoration.filter(s,o,1,l.length+1);r.appendASCIIString('
    ');const h=x.ViewLineRenderingData.isBasicASCII(l,t.mightContainNonBasicASCII()),u=x.ViewLineRenderingData.containsRTL(l,h,t.mightContainRTL()),g=I.renderViewLine(new I.RenderLineInput(c.isMonospace&&!i.get(24),c.canUseHalfwidthRightwardsArrow,l,!1,h,u,0,a,d,n,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,i.get(95),i.get(80),i.get(74),i.get(37)!==f.EditorFontLigatures.OFF,null),r);r.appendASCIIString("
    ") ;const p=g.characterMapping.getAbsoluteOffsets();return p.length>0?p[p.length-1]:0}}function te(e){return e.modifiedEndLineNumber>0}function ie(e){return e.originalEndLineNumber>0}t.isChangeOrInsert=te,t.isChangeOrDelete=ie,M.registerThemingParticipant((e,t)=>{const i=e.getColor(A.diffInserted);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(A.diffRemoved);n&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }`));const o=e.getColor(A.diffInsertedOutline) ;o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const s=e.getColor(A.diffRemovedOutline);s&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const r=e.getColor(A.scrollbarShadow);r&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${r}; }`);const a=e.getColor(A.diffBorder);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(A.scrollbarSliderBackground);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(A.scrollbarSliderHoverBackground);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const d=e.getColor(A.scrollbarSliderActiveBackground) ;d&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${d};\n\t\t\t}\n\t\t`);const h=e.getColor(A.diffDiagonalFill);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${h} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${h} 50%, ${h} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)})})),define(e[241],t([0,1,41,72,140,312,155,32,8,5,28,11,105,36,88,68]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbeddedDiffEditorWidget=t.EmbeddedCodeEditorWidget=void 0;let S=class extends s.CodeEditorWidget{constructor(e,t,i,n,o,s,r,a,l,c){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,s,r,a,l,c),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions), this._register(i.onDidChangeConfiguration(e=>this._onParentConfigurationChanged(e)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){i.mixin(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};S=o([r(3,h.IInstantiationService),r(4,n.ICodeEditorService),r(5,c.ICommandService),r(6,d.IContextKeyService),r(7,g.IThemeService),r(8,u.INotificationService),r(9,p.IAccessibilityService)],S),t.EmbeddedCodeEditorWidget=S;let b=class extends a.DiffEditorWidget{constructor(e,t,i,n,o,s,r,a,l,c,d,h){super(e,i.getRawOptions(),d,n,o,s,r,a,l,c,h),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(e=>this._onParentConfigurationChanged(e)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()), super.updateOptions(this._overwriteOptions)}updateOptions(e){i.mixin(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};b=o([r(3,l.IEditorWorkerService),r(4,d.IContextKeyService),r(5,h.IInstantiationService),r(6,n.ICodeEditorService),r(7,g.IThemeService),r(8,u.INotificationService),r(9,m.IContextMenuService),r(10,v.IClipboardService),r(11,f.IEditorProgressService)],b),t.EmbeddedDiffEditorWidget=b})),define(e[1568],t([0,1,107,2,129,11,145,46,18,29,6,27]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";function p(e){return e.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerDecorationsService=void 0;class m extends n.Disposable{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(n.toDisposable(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t) ;for(let t=0;t{let n=this.model.getDecorationRange(i);n&&e.push([n,t])}),e}}let v=class extends n.Disposable{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new u.Emitter),this.onDidChangeMarker=this._onDidChangeMarker.event,this._markerDecorations=new Map,e.getModels().forEach(e=>this._onModelAdded(e)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(p(e.uri));return i&&i.getMarker(t)||null}getLiveMarkers(e){const t=this._markerDecorations.get(p(e.uri));return t?t.getMarkers():[]} _handleMarkerChange(e){e.forEach(e=>{const t=this._markerDecorations.get(p(e));t&&this._updateDecorations(t)})}_onModelAdded(e){const t=new m(e);this._markerDecorations.set(p(e.uri),t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(p(e.uri));t&&(t.dispose(),this._markerDecorations.delete(p(e.uri))),e.uri.scheme!==h.Schemas.inMemory&&e.uri.scheme!==h.Schemas.internal&&e.uri.scheme!==h.Schemas.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(e=>e.owner).forEach(t=>this._markerService.remove(t,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map(t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let n=d.Range.lift(t);if(t.severity!==i.MarkerSeverity.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)), (n=e.validateRange(n)).isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());if(t)n=new d.Range(n.startLineNumber,t.startColumn,n.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===t||(n=n.endColumn>=t?new d.Range(n.startLineNumber,t-1,n.endLineNumber,t):new d.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){let i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}};v=o([r(0,c.IModelService),r(1,i.IMarkerService)],v),t.MarkerDecorationsService=v})),define(e[1569],t([0,1,978,15,2,37,47,18,60,58,129,75,145,27,11,20,784]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BracketMatchingController=void 0 ;const v=g.registerColor("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.localize(0,null));class f extends s.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:i.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=_.get(t);i&&i.jumpToBracket()}}class S extends s.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:i.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(e,t,i){const n=_.get(t);if(!n)return;let o=!0;i&&!1===i.selectBrackets&&(o=!1),n.selectToBracket(o)}}class b{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class _ extends o.Disposable{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0, this._decorations=[],this._updateBracketsSoon=this._register(new n.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(55),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(e=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(55)&&(this._matchBrackets=this._editor.getOption(55),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))}static get(e){return e.getContribution(_.ID)}jumpToBracket(){if(!this._editor.hasModel())return ;const e=this._editor.getModel(),t=this._editor.getSelections().map(t=>{const i=t.getStartPosition(),n=e.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new l.Selection(o.lineNumber,o.column,o.lineNumber,o.column):new l.Selection(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const o=n.getStartPosition();let s=t.matchBracket(o);if(!s&&!(s=t.findEnclosingBrackets(o))){const e=t.findNextBracket(o);e&&e.range&&(s=t.matchBracket(e.range.getStartPosition()))}let r=null,c=null;if(s){s.sort(a.Range.compareRangesUsingStarts);const[t,i]=s;r=e?t.getStartPosition():t.getEndPosition(), c=e?i.getEndPosition():i.getStartPosition()}r&&c&&i.push(new l.Selection(r.lineNumber,r.column,c.lineNumber,c.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],s=0;for(let t=0,i=e.length;t1&&o.sort(r.Position.compare);let a=[],l=0,c=0,d=n.length ;for(let e=0,i=o.length;e{const i=e.getColor(u.editorBracketMatchBackground) ;i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(u.editorBracketMatchBorder);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)}),m.MenuRegistry.appendMenuItem(m.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:i.localize(3,null)},order:2})})),define(e[1570],t([0,1,7,255,6,2,75,983,35,11,27,128,44,785]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";var m;Object.defineProperty(t,"__esModule",{value:!0}),t.LightBulbWidget=void 0,function(e){let t;!function(e){e[e.Hidden=0]="Hidden",e[e.Showing=1]="Showing"}(t=e.Type||(e.Type={})),e.Hidden={type:0};e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(m||(m={}));let v=class e extends a.Disposable{constructor(e,t,o,r){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=o,this._keybindingService=r,this._onClick=this._register(new s.Emitter), this.onClick=this._onClick.event,this._state=m.Hidden,this._domNode=document.createElement("div"),this._domNode.className=p.Codicon.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()})),g.Gesture.ignoreTarget(this._domNode),this._register(i.addStandardDisposableGenericMouseDownListner(this._domNode,e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:n}=i.getDomNodePagePosition(this._domNode),o=this._editor.getOption(51);let s=Math.floor(o/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide() ;const t=new n.GlobalMouseMoveMonitor;t.startMonitoring(e.target,e.buttons,n.standardMouseMoveMerger,()=>{},()=>{t.dispose()})})),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(49)&&!this._editor.getOption(49).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(49).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide() ;const{lineNumber:r,column:a}=s.validatePosition(n),c=s.getOptions().tabSize,d=o.get(36),h=s.getLineContent(r),u=l.TextModel.computeIndentLevel(h,c),g=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let p=r;if(!(d.spaceWidth*u>22))if(r>1&&!g(r-1))p-=1;else if(g(r+1)){if(a*d.spaceWidth<22)return this.hide()}else p+=1;this.state=new m.Showing(t,i,n,{position:{lineNumber:p,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=m.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){i.removeClasses(this._domNode,p.Codicon.lightBulb.classNames),i.addClasses(this._domNode,p.Codicon.lightbulbAutofix.classNames);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=c.localize(0,null,e.getLabel()))} i.removeClasses(this._domNode,p.Codicon.lightbulbAutofix.classNames),i.addClasses(this._domNode,p.Codicon.lightBulb.classNames);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?c.localize(1,null,e.getLabel()):c.localize(2,null)}set title(e){this._domNode.title=e}};v._posPref=[0],v=o([r(3,d.IKeybindingService)],v),t.LightBulbWidget=v,h.registerThemingParticipant((e,t)=>{const i=e.getColor(u.editorLightBulbForeground);i&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${p.Codicon.lightBulb.cssSelector} {\n\t\t\tcolor: ${i};\n\t\t}`);const n=e.getColor(u.editorLightBulbAutoFixForeground);n&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${p.Codicon.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${n};\n\t\t}`)})})),define(e[1571],t([0,1,7,18,75,145,27,11,183,786]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensWidget=t.CodeLensHelper=void 0;class c{constructor(e,t){this.afterLineNumber=e,this._onHeight=t, this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class d{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${d._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let n=[],o=!1;for(let t=0;t{e.symbol.command&&d.push(e.symbol),s.addDecoration({range:e.symbol.range, options:o.ModelDecorationOptions.EMPTY},e=>this._decorationIds[t]=e),l=l?n.Range.plusRange(l,e.symbol.range):n.Range.lift(e.symbol.range)}),this._viewZone=new c(l.startLineNumber-1,a),this._viewZoneId=r.addZone(this._viewZone),d.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(d,!1))}_createContentWidgetIfNecessary(){this._contentWidget||(this._contentWidget=new d(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.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((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),o=this._data[t].symbol;return!(!i||n.Range.isEmpty(o.range)!==i.isEmpty())})}updateCodeLensSymbols(e,t){ this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((e,i)=>{t.addDecoration({range:e.symbol.range,options:o.ModelDecorationOptions.EMPTY},e=>this._decorationIds[i]=e)})}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t{const i=e.getColor(s.editorCodeLensForeground);i&&(t.addRule(`.monaco-editor .codelens-decoration { color: ${i}; }`),t.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${i}; }`));const n=e.getColor(r.editorActiveLinkForeground);n&&(t.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${n} !important; }`),t.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${n} !important; }`))})})),define(e[1572],t([0,1,15,21,2,177,37,45,564,1571,32,28,1535,7,133,49,984,58,349]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensContribution=void 0;let C=class{constructor(e,t,n,o){this._editor=e,this._commandService=t, this._notificationService=n,this._codeLensCache=o,this._disposables=new s.DisposableStore,this._localToDispose=new s.DisposableStore,this._lenses=[],this._getCodeLensModelDelays=new _.LanguageFeatureRequestDelays(c.CodeLensProviderRegistry,250,2500),this._oldCodeLensModels=new s.DisposableStore,this._resolveCodeLensesDelays=new _.LanguageFeatureRequestDelays(c.CodeLensProviderRegistry,250,2500),this._resolveCodeLensesScheduler=new i.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this._updateLensStyle(),e.hasChanged(11)&&this._onModelChange()})),this._disposables.add(c.CodeLensProviderRegistry.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+v.hash(this._editor.getId()).toString(16), this._styleElement=m.createStyleSheet(m.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_updateLensStyle(){const e=this._editor.getOptions(),t=e.get(36),i=e.get(51),n=Math.round(1.1*i),o=Math.round(.9*t.fontSize),s=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { height: ${n}px; line-height: ${i}px; font-size: ${o}px; padding-right: ${Math.round(.45*t.fontSize)}px;}\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} > a > .codicon { line-height: ${i}px; font-size: ${o}px; }\n\t\t`;this._styleElement.textContent=s}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0, this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(11))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!c.CodeLensProviderRegistry.has(e))return void(t&&this._localToDispose.add(i.disposableTimeout(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},3e4)));for(const t of c.CodeLensProviderRegistry.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange(()=>o.schedule());this._localToDispose.add(e)}const o=new i.RunOnceScheduler(()=>{var t;const s=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=i.createCancelablePromise(t=>d.getCodeLensModel(e,t)),this._getCodeLensModelPromise.then(t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel), this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const i=this._getCodeLensModelDelays.update(e,Date.now()-s);o.delay=i,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()},n.onUnexpectedError)},this._getCodeLensModelDelays.get(e));this._localToDispose.add(o),this._localToDispose.add(s.toDisposable(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{let i=[],n=-1;this._lenses.forEach(e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)});let o=new h.CodeLensHelper;i.forEach(e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)}),o.commit(e)})}),this._resolveCodeLensesInViewportSoon(),o.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{ this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(s.toDisposable(()=>{if(this._editor.getModel()){const e=a.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{this._disposeAllLenses(e,t)})}),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseUp(e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch(e=>this._notificationService.error(e));break}}})),o.schedule()}_disposeAllLenses(e,t){const i=new h.CodeLensHelper;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,i=this._editor.getModel().getLineCount(),n=[];for(let o of e.lenses){ let e=o.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],n.push(t)))}const o=a.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{const i=new h.CodeLensHelper;let o=0,s=0;for(;sthis._resolveCodeLensesInViewportSoon())),o++,s++)}for(;othis._resolveCodeLensesInViewportSoon())),s++;i.commit(e)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){ this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const o=[],s=[];if(this._lenses.forEach(e=>{const i=e.computeIfNecessary(t);i&&(o.push(i),s.push(e))}),0===o.length)return;const r=Date.now(),a=i.createCancelablePromise(e=>{const i=o.map((i,o)=>{const r=new Array(i.length),a=i.map((i,o)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(r[o]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then(e=>{r[o]=e},n.onUnexpectedExternalError));return Promise.all(a).then(()=>{e.isCancellationRequested||s[o].isDisposed()||s[o].updateCommands(r)})});return Promise.all(i)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const e=this._resolveCodeLensesDelays.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=e, this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},e=>{n.onUnexpectedError(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getLenses(){return this._lenses}};C.ID="css.editor.codeLens",C=o([r(1,u.ICommandService),r(2,g.INotificationService),r(3,p.ICodeLensCache)],C),t.CodeLensContribution=C,l.registerEditorContribution(C.ID,C),l.registerEditorAction(class extends l.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:b.EditorContextKeys.hasCodeLensProvider,label:S.localize(0,null),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(f.IQuickInputService),n=e.get(u.ICommandService),o=e.get(g.INotificationService),s=t.getSelection().positionLineNumber,r=t.getContribution(C.ID),a=[];for(let e of r.getLenses())if(e.getLineNumber()===s)for(let t of e.getItems()){ const{command:e}=t.symbol;e&&a.push({label:e.title,command:e})}if(0===a.length)return;const l=await i.pick(a,{canPickMany:!1});if(l)try{await n.executeCommand(l.command.id,...l.command.arguments||[])}catch(e){o.error(e)}}})})),define(e[1573],t([0,1,80,7,255,102,55,6,2,27,11,787]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPickerWidget=t.ColorPickerBody=t.ColorPickerHeader=void 0;const h=n.$;class u extends l.Disposable{constructor(e,t,i){super(),this.model=t,this.domNode=h(".colorpicker-header"),n.append(e,this.domNode),this.pickedColorNode=n.append(this.domNode,h(".picked-color"));const o=n.append(this.domNode,h(".original-color"));o.style.backgroundColor=r.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(c.editorHoverBackground)||r.Color.white,this._register(d.registerThemingParticipant((e,t)=>{this.backgroundColor=e.getColor(c.editorHoverBackground)||r.Color.white})), this._register(n.addDisposableListener(this.pickedColorNode,n.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(n.addDisposableListener(o,n.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=r.Color.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=r.Color.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}t.ColorPickerHeader=u;class g extends l.Disposable{constructor(e,t,i){ super(),this.model=t,this.pixelRatio=i,this.domNode=h(".colorpicker-body"),n.append(e,this.domNode),this.saturationBox=new p(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 v(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new f(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new r.Color(new r.HSVA(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva ;this.model.color=new r.Color(new r.HSVA(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new r.Color(new r.HSVA(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}t.ColorPickerBody=g;class p extends l.Disposable{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new a.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=h(".saturation-wrap"),n.append(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",n.append(this.domNode,this.canvas),this.selection=h(".saturation-selection"),n.append(this.domNode,this.selection),this.layout(),this._register(n.addDisposableGenericMouseDownListner(this.domNode,e=>this.onMouseDown(e))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){ this.monitor=this._register(new o.GlobalMouseMoveMonitor);const t=n.getDomNodePagePosition(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,o.standardMouseMoveMerger,e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top),()=>null);const i=n.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}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 e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){ const e=this.model.color.hsva,t=new r.Color(new r.HSVA(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=r.Color.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class m extends l.Disposable{constructor(e,t){super(),this.model=t,this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new a.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=n.append(e,h(".strip")), this.overlay=n.append(this.domNode,h(".overlay")),this.slider=n.append(this.domNode,h(".slider")),this.slider.style.top="0px",this._register(n.addDisposableGenericMouseDownListner(this.domNode,e=>this.onMouseDown(e))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new o.GlobalMouseMoveMonitor),i=n.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,o.standardMouseMoveMerger,e=>this.onDidChangeTop(e.posy-i.top),()=>null);const s=n.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),s.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){ this.slider.style.top=`${(1-e)*this.height}px`}}class v extends m{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new r.Color(new r.RGBA(t,i,n,1)),s=new r.Color(new r.RGBA(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class f extends m{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class S extends s.Widget{constructor(e,t,n,o){super(),this.model=t,this.pixelRatio=n,this._register(i.onDidChangeZoomLevel(()=>this.layout()));const s=h(".colorpicker-widget");e.appendChild(s);const r=new u(s,this.model,o);this.body=new g(s,this.model,this.pixelRatio),this._register(r),this._register(this.body)}getId(){return S.ID}layout(){this.body.layout()}}t.ColorPickerWidget=S,S.ID="editor.contrib.colorPickerWidget"})), define(e[359],t([0,1,7,173,87,18,45,237,988,185,9,107,11,27,15,112,96,44,789,790]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.SYMBOL_ICON_VARIABLE_FOREGROUND=t.SYMBOL_ICON_UNIT_FOREGROUND=t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=t.SYMBOL_ICON_TEXT_FOREGROUND=t.SYMBOL_ICON_STRUCT_FOREGROUND=t.SYMBOL_ICON_STRING_FOREGROUND=t.SYMBOL_ICON_SNIPPET_FOREGROUND=t.SYMBOL_ICON_REFERENCE_FOREGROUND=t.SYMBOL_ICON_PROPERTY_FOREGROUND=t.SYMBOL_ICON_PACKAGE_FOREGROUND=t.SYMBOL_ICON_OPERATOR_FOREGROUND=t.SYMBOL_ICON_OBJECT_FOREGROUND=t.SYMBOL_ICON_NUMBER_FOREGROUND=t.SYMBOL_ICON_NULL_FOREGROUND=t.SYMBOL_ICON_NAMESPACE_FOREGROUND=t.SYMBOL_ICON_MODULE_FOREGROUND=t.SYMBOL_ICON_METHOD_FOREGROUND=t.SYMBOL_ICON_KEYWORD_FOREGROUND=t.SYMBOL_ICON_KEY_FOREGROUND=t.SYMBOL_ICON_INTERFACE_FOREGROUND=t.SYMBOL_ICON_FUNCTION_FOREGROUND=t.SYMBOL_ICON_FOLDER_FOREGROUND=t.SYMBOL_ICON_FILE_FOREGROUND=t.SYMBOL_ICON_FIELD_FOREGROUND=t.SYMBOL_ICON_EVENT_FOREGROUND=t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=t.SYMBOL_ICON_ENUMERATOR_FOREGROUND=t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=t.SYMBOL_ICON_CONSTANT_FOREGROUND=t.SYMBOL_ICON_COLOR_FOREGROUND=t.SYMBOL_ICON_CLASS_FOREGROUND=t.SYMBOL_ICON_BOOLEAN_FOREGROUND=t.SYMBOL_ICON_ARRAY_FOREGROUND=t.OutlineDataSource=t.OutlineItemComparator=t.OutlineFilter=t.OutlineSortOrder=t.OutlineElementRenderer=t.OutlineGroupRenderer=t.OutlineVirtualDelegate=t.OutlineElementTemplate=t.OutlineGroupTemplate=t.OutlineIdentityProvider=t.OutlineAccessibilityProvider=t.OutlineNavigationLabelProvider=void 0 ;t.OutlineNavigationLabelProvider=class{getKeyboardNavigationLabel(e){return e instanceof c.OutlineGroup?e.label:e.symbol.name}};t.OutlineAccessibilityProvider=class{constructor(e){this.ariaLabel=e}getWidgetAriaLabel(){return this.ariaLabel}getAriaLabel(e){return e instanceof c.OutlineGroup?e.label:e.symbol.name}};t.OutlineIdentityProvider=class{getId(e){return e.id}};class _{constructor(e,t){this.labelContainer=e,this.label=t}}t.OutlineGroupTemplate=_,_.id="OutlineGroupTemplate";class C{constructor(e,t,i,n){this.container=e,this.iconLabel=t,this.iconClass=i,this.decoration=n}}t.OutlineElementTemplate=C,C.id="OutlineElementTemplate";t.OutlineVirtualDelegate=class{getHeight(e){return 22}getTemplateId(e){return e instanceof c.OutlineGroup?_.id:C.id}};t.OutlineGroupRenderer=class{constructor(){this.templateId=_.id}renderTemplate(e){const t=i.$(".outline-element-label");return e.classList.add("outline-element"),i.append(e,t),new _(t,new n.HighlightedLabel(t,!0))}renderElement(e,t,i){ i.label.set(e.element.label,s.createMatches(e.filterData))}disposeTemplate(e){}};let y=class e{constructor(e,t){this._configurationService=e,this._themeService=t,this.templateId=C.id}renderTemplate(e){e.classList.add("outline-element");const t=new h.IconLabel(e,{supportHighlights:!0}),n=i.$(".outline-element-icon"),o=i.$(".outline-element-decoration");return e.prepend(n),e.appendChild(o),new C(e,t,n,o)}renderElement(t,i,n){const{element:o}=t,r={matches:s.createMatches(t.filterData),labelEscapeNewLines:!0,extraClasses:[],title:d.localize(0,null,o.symbol.name,e._symbolKindNames[o.symbol.kind])};this._configurationService.getValue("outline.icons")&&(n.iconClass.className="",n.iconClass.classList.add("outline-element-icon",...l.SymbolKinds.toCssClassName(o.symbol.kind,!0).split(" "))),o.symbol.tags.indexOf(1)>=0&&(r.extraClasses.push("deprecated"),r.matches=[]),n.iconLabel.setLabel(o.symbol.name,o.symbol.detail,r),this._renderMarkerInfo(o,n)}_renderMarkerInfo(e,t){if(!e.marker)return i.hide(t.decoration), void t.container.style.removeProperty("--outline-element-color");const{count:n,topSev:o}=e.marker,s=this._themeService.getColorTheme().getColor(o===g.MarkerSeverity.Error?m.listErrorForeground:m.listWarningForeground),r=s?s.toString():"inherit";this._configurationService.getValue("outline.problems.colors")?t.container.style.setProperty("--outline-element-color",r):t.container.style.removeProperty("--outline-element-color"),this._configurationService.getValue("outline.problems.badges")?n>0?(i.show(t.decoration),t.decoration.classList.remove("bubble"),t.decoration.innerText=n<10?n.toString():"+9",t.decoration.title=1===n?d.localize(1,null):d.localize(2,null,n),t.decoration.style.setProperty("--outline-element-color",r)):(i.show(t.decoration),t.decoration.classList.add("bubble"),t.decoration.innerText="",t.decoration.title=d.localize(3,null),t.decoration.style.setProperty("--outline-element-color",r)):i.hide(t.decoration)}disposeTemplate(e){e.iconLabel.dispose()}};y._symbolKindNames={17:d.localize(4,null), 16:d.localize(5,null),4:d.localize(6,null),13:d.localize(7,null),8:d.localize(8,null),9:d.localize(9,null),21:d.localize(10,null),23:d.localize(11,null),7:d.localize(12,null),0:d.localize(13,null),11:d.localize(14,null),10:d.localize(15,null),19:d.localize(16,null),5:d.localize(17,null),1:d.localize(18,null),2:d.localize(19,null),20:d.localize(20,null),15:d.localize(21,null),18:d.localize(22,null),24:d.localize(23,null),3:d.localize(24,null),6:d.localize(25,null),14:d.localize(26,null),22:d.localize(27,null),25:d.localize(28,null),12:d.localize(29,null)},y=o([r(0,u.IConfigurationService),r(1,p.IThemeService)],y),t.OutlineElementRenderer=y,function(e){e[e.ByPosition=0]="ByPosition",e[e.ByName=1]="ByName",e[e.ByKind=2]="ByKind"}(t.OutlineSortOrder||(t.OutlineSortOrder={}));let w=class e{constructor(e,t){this._prefix=e,this._textResourceConfigService=t}filter(t){const i=c.OutlineModel.get(t);let n;if(i&&(n=i.uri),!(t instanceof c.OutlineElement))return!0 ;const o=e.kindToConfigName[t.symbol.kind],s=`${this._prefix}.${o}`;return this._textResourceConfigService.getValue(n,s)}};w.configNameToKind=Object.freeze({showFiles:0,showModules:1,showNamespaces:2,showPackages:3,showClasses:4,showMethods:5,showProperties:6,showFields:7,showConstructors:8,showEnums:9,showInterfaces:10,showFunctions:11,showVariables:12,showConstants:13,showStrings:14,showNumbers:15,showBooleans:16,showArrays:17,showObjects:18,showKeys:19,showNull:20,showEnumMembers:21,showStructs:22,showEvents:23,showOperators:24,showTypeParameters:25}),w.kindToConfigName=Object.freeze({0:"showFiles",1:"showModules",2:"showNamespaces",3:"showPackages",4:"showClasses",5:"showMethods",6:"showProperties",7:"showFields",8:"showConstructors",9:"showEnums",10:"showInterfaces",11:"showFunctions",12:"showVariables",13:"showConstants",14:"showStrings",15:"showNumbers",16:"showBooleans",17:"showArrays",18:"showObjects",19:"showKeys",20:"showNull",21:"showEnumMembers",22:"showStructs",23:"showEvents", 24:"showOperators",25:"showTypeParameters"}),w=o([r(1,f.ITextResourceConfigurationService)],w),t.OutlineFilter=w;t.OutlineItemComparator=class{constructor(e=0){this.type=e,this._collator=new v.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0}))}compare(e,t){if(e instanceof c.OutlineGroup&&t instanceof c.OutlineGroup)return e.order-t.order;if(e instanceof c.OutlineElement&&t instanceof c.OutlineElement){if(2===this.type)return e.symbol.kind-t.symbol.kind||this._collator.value.compare(e.symbol.name,t.symbol.name);if(1===this.type)return this._collator.value.compare(e.symbol.name,t.symbol.name)||a.Range.compareRangesUsingStarts(e.symbol.range,t.symbol.range);if(0===this.type)return a.Range.compareRangesUsingStarts(e.symbol.range,t.symbol.range)||this._collator.value.compare(e.symbol.name,t.symbol.name)}return 0}};t.OutlineDataSource=class{getChildren(e){return e?e.children.values():S.Iterable.empty()}},t.SYMBOL_ICON_ARRAY_FOREGROUND=m.registerColor("symbolIcon.arrayForeground",{dark:m.foreground, light:m.foreground,hc:m.foreground},d.localize(30,null)),t.SYMBOL_ICON_BOOLEAN_FOREGROUND=m.registerColor("symbolIcon.booleanForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(31,null)),t.SYMBOL_ICON_CLASS_FOREGROUND=m.registerColor("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},d.localize(32,null)),t.SYMBOL_ICON_COLOR_FOREGROUND=m.registerColor("symbolIcon.colorForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(33,null)),t.SYMBOL_ICON_CONSTANT_FOREGROUND=m.registerColor("symbolIcon.constantForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(34,null)),t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=m.registerColor("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},d.localize(35,null)),t.SYMBOL_ICON_ENUMERATOR_FOREGROUND=m.registerColor("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},d.localize(36,null)), t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=m.registerColor("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},d.localize(37,null)),t.SYMBOL_ICON_EVENT_FOREGROUND=m.registerColor("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},d.localize(38,null)),t.SYMBOL_ICON_FIELD_FOREGROUND=m.registerColor("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},d.localize(39,null)),t.SYMBOL_ICON_FILE_FOREGROUND=m.registerColor("symbolIcon.fileForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(40,null)),t.SYMBOL_ICON_FOLDER_FOREGROUND=m.registerColor("symbolIcon.folderForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(41,null)),t.SYMBOL_ICON_FUNCTION_FOREGROUND=m.registerColor("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},d.localize(42,null)),t.SYMBOL_ICON_INTERFACE_FOREGROUND=m.registerColor("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC", hc:"#75BEFF"},d.localize(43,null)),t.SYMBOL_ICON_KEY_FOREGROUND=m.registerColor("symbolIcon.keyForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(44,null)),t.SYMBOL_ICON_KEYWORD_FOREGROUND=m.registerColor("symbolIcon.keywordForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(45,null)),t.SYMBOL_ICON_METHOD_FOREGROUND=m.registerColor("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},d.localize(46,null)),t.SYMBOL_ICON_MODULE_FOREGROUND=m.registerColor("symbolIcon.moduleForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(47,null)),t.SYMBOL_ICON_NAMESPACE_FOREGROUND=m.registerColor("symbolIcon.namespaceForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(48,null)),t.SYMBOL_ICON_NULL_FOREGROUND=m.registerColor("symbolIcon.nullForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(49,null)), t.SYMBOL_ICON_NUMBER_FOREGROUND=m.registerColor("symbolIcon.numberForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(50,null)),t.SYMBOL_ICON_OBJECT_FOREGROUND=m.registerColor("symbolIcon.objectForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(51,null)),t.SYMBOL_ICON_OPERATOR_FOREGROUND=m.registerColor("symbolIcon.operatorForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(52,null)),t.SYMBOL_ICON_PACKAGE_FOREGROUND=m.registerColor("symbolIcon.packageForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(53,null)),t.SYMBOL_ICON_PROPERTY_FOREGROUND=m.registerColor("symbolIcon.propertyForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(54,null)),t.SYMBOL_ICON_REFERENCE_FOREGROUND=m.registerColor("symbolIcon.referenceForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(55,null)),t.SYMBOL_ICON_SNIPPET_FOREGROUND=m.registerColor("symbolIcon.snippetForeground",{ dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(56,null)),t.SYMBOL_ICON_STRING_FOREGROUND=m.registerColor("symbolIcon.stringForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(57,null)),t.SYMBOL_ICON_STRUCT_FOREGROUND=m.registerColor("symbolIcon.structForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(58,null)),t.SYMBOL_ICON_TEXT_FOREGROUND=m.registerColor("symbolIcon.textForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(59,null)),t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=m.registerColor("symbolIcon.typeParameterForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(60,null)),t.SYMBOL_ICON_UNIT_FOREGROUND=m.registerColor("symbolIcon.unitForeground",{dark:m.foreground,light:m.foreground,hc:m.foreground},d.localize(61,null)),t.SYMBOL_ICON_VARIABLE_FOREGROUND=m.registerColor("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},d.localize(62,null)), p.registerThemingParticipant((e,i)=>{const n=e.getColor(t.SYMBOL_ICON_ARRAY_FOREGROUND);n&&i.addRule(`${b.Codicon.symbolArray.cssSelector} { color: ${n}; }`);const o=e.getColor(t.SYMBOL_ICON_BOOLEAN_FOREGROUND);o&&i.addRule(`${b.Codicon.symbolBoolean.cssSelector} { color: ${o}; }`);const s=e.getColor(t.SYMBOL_ICON_CLASS_FOREGROUND);s&&i.addRule(`${b.Codicon.symbolClass.cssSelector} { color: ${s}; }`);const r=e.getColor(t.SYMBOL_ICON_METHOD_FOREGROUND);r&&i.addRule(`${b.Codicon.symbolMethod.cssSelector} { color: ${r}; }`);const a=e.getColor(t.SYMBOL_ICON_COLOR_FOREGROUND);a&&i.addRule(`${b.Codicon.symbolColor.cssSelector} { color: ${a}; }`);const l=e.getColor(t.SYMBOL_ICON_CONSTANT_FOREGROUND);l&&i.addRule(`${b.Codicon.symbolConstant.cssSelector} { color: ${l}; }`);const c=e.getColor(t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);c&&i.addRule(`${b.Codicon.symbolConstructor.cssSelector} { color: ${c}; }`);const d=e.getColor(t.SYMBOL_ICON_ENUMERATOR_FOREGROUND) ;d&&i.addRule(`\n\t\t\t${b.Codicon.symbolValue.cssSelector},${b.Codicon.symbolEnum.cssSelector} { color: ${d}; }`);const h=e.getColor(t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);h&&i.addRule(`${b.Codicon.symbolEnumMember.cssSelector} { color: ${h}; }`);const u=e.getColor(t.SYMBOL_ICON_EVENT_FOREGROUND);u&&i.addRule(`${b.Codicon.symbolEvent.cssSelector} { color: ${u}; }`);const g=e.getColor(t.SYMBOL_ICON_FIELD_FOREGROUND);g&&i.addRule(`${b.Codicon.symbolField.cssSelector} { color: ${g}; }`);const p=e.getColor(t.SYMBOL_ICON_FILE_FOREGROUND);p&&i.addRule(`${b.Codicon.symbolFile.cssSelector} { color: ${p}; }`);const m=e.getColor(t.SYMBOL_ICON_FOLDER_FOREGROUND);m&&i.addRule(`${b.Codicon.symbolFolder.cssSelector} { color: ${m}; }`);const v=e.getColor(t.SYMBOL_ICON_FUNCTION_FOREGROUND);v&&i.addRule(`${b.Codicon.symbolFunction.cssSelector} { color: ${v}; }`);const f=e.getColor(t.SYMBOL_ICON_INTERFACE_FOREGROUND);f&&i.addRule(`${b.Codicon.symbolInterface.cssSelector} { color: ${f}; }`) ;const S=e.getColor(t.SYMBOL_ICON_KEY_FOREGROUND);S&&i.addRule(`${b.Codicon.symbolKey.cssSelector} { color: ${S}; }`);const _=e.getColor(t.SYMBOL_ICON_KEYWORD_FOREGROUND);_&&i.addRule(`${b.Codicon.symbolKeyword.cssSelector} { color: ${_}; }`);const C=e.getColor(t.SYMBOL_ICON_MODULE_FOREGROUND);C&&i.addRule(`${b.Codicon.symbolModule.cssSelector} { color: ${C}; }`);const y=e.getColor(t.SYMBOL_ICON_NAMESPACE_FOREGROUND);y&&i.addRule(`${b.Codicon.symbolNamespace.cssSelector} { color: ${y}; }`);const w=e.getColor(t.SYMBOL_ICON_NULL_FOREGROUND);w&&i.addRule(`${b.Codicon.symbolNull.cssSelector} { color: ${w}; }`);const E=e.getColor(t.SYMBOL_ICON_NUMBER_FOREGROUND);E&&i.addRule(`${b.Codicon.symbolNumber.cssSelector} { color: ${E}; }`);const I=e.getColor(t.SYMBOL_ICON_OBJECT_FOREGROUND);I&&i.addRule(`${b.Codicon.symbolObject.cssSelector} { color: ${I}; }`);const x=e.getColor(t.SYMBOL_ICON_OPERATOR_FOREGROUND);x&&i.addRule(`${b.Codicon.symbolOperator.cssSelector} { color: ${x}; }`) ;const k=e.getColor(t.SYMBOL_ICON_PACKAGE_FOREGROUND);k&&i.addRule(`${b.Codicon.symbolPackage.cssSelector} { color: ${k}; }`);const D=e.getColor(t.SYMBOL_ICON_PROPERTY_FOREGROUND);D&&i.addRule(`${b.Codicon.symbolProperty.cssSelector} { color: ${D}; }`);const T=e.getColor(t.SYMBOL_ICON_REFERENCE_FOREGROUND);T&&i.addRule(`${b.Codicon.symbolReference.cssSelector} { color: ${T}; }`);const R=e.getColor(t.SYMBOL_ICON_SNIPPET_FOREGROUND);R&&i.addRule(`${b.Codicon.symbolSnippet.cssSelector} { color: ${R}; }`);const A=e.getColor(t.SYMBOL_ICON_STRING_FOREGROUND);A&&i.addRule(`${b.Codicon.symbolString.cssSelector} { color: ${A}; }`);const M=e.getColor(t.SYMBOL_ICON_STRUCT_FOREGROUND);M&&i.addRule(`${b.Codicon.symbolStruct.cssSelector} { color: ${M}; }`);const L=e.getColor(t.SYMBOL_ICON_TEXT_FOREGROUND);L&&i.addRule(`${b.Codicon.symbolText.cssSelector} { color: ${L}; }`);const O=e.getColor(t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);O&&i.addRule(`${b.Codicon.symbolTypeParameter.cssSelector} { color: ${O}; }`) ;const N=e.getColor(t.SYMBOL_ICON_UNIT_FOREGROUND);N&&i.addRule(`${b.Codicon.symbolUnit.cssSelector} { color: ${N}; }`);const P=e.getColor(t.SYMBOL_ICON_VARIABLE_FOREGROUND);P&&i.addRule(`${b.Codicon.symbolVariable.cssSelector} { color: ${P}; }`)})})),define(e[574],t([0,1,18,129,75,27,11]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindDecorations=void 0;class a{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[], this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(e=>this._editor.getModel().getDecorationRange(e)).filter(e=>!!e);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===a._FIND_MATCH_DECORATION||t===a._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,n=0;if(e)for(let i=0,o=this._decorations.length;i{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,a._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,a._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let n=this._editor.getModel().getDecorationRange(t);if(n.startLineNumber!==n.endLineNumber&&1===n.endColumn){let e=n.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);n=new i.Range(n.startLineNumber,n.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(n,a._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{ let o=a._FIND_MATCH_DECORATION,s=[];if(e.length>1e3){o=a._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),n=this._editor.getLayoutInfo().height/t,r=Math.max(2,Math.ceil(3/n));let l=e[0].range.startLineNumber,c=e[0].range.endLineNumber;for(let t=1,n=e.length;t=n.startLineNumber?n.endLineNumber>c&&(c=n.endLineNumber):(s.push({range:new i.Range(l,1,c,1),options:a._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),l=n.startLineNumber,c=n.endLineNumber)}s.push({range:new i.Range(l,1,c,1),options:a._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let r=new Array(e.length);for(let t=0,i=e.length;tn.removeDecoration(e)),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map(e=>n.addDecoration(e,a._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumnthis.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1, this._toDispose.add(this._editor.onDidChangeModelContent(e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,n.dispose(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},p)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,i){ let n=null;void 0!==i?null!==i&&(n=Array.isArray(i)?i:[i]):n=this._decorations.getFindScopes(),null!==n&&(n=n.map(e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new r.Range(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e}));let o=this._findMatches(n,!1,t.MATCHES_LIMIT);this._decorations.set(o,n);const s=this._editor.getSelection();let a=this._decorations.getCurrentMatchesPosition(s);if(0===a&&o.length>0){const e=g.findFirstInSorted(o.map(e=>e.range),e=>r.Range.compareRangesUsingStarts(e,s)>=0);a=e>0?e-1+1:a}this._state.changeMatchInfo(a,this._decorations.getCount(),void 0),e&&this._editor.getOption(29).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){ let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new s.Position(i,n)}_moveToPrevMatch(e,i=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel() ;return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new s.Position(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()m._getSearchRange(this._editor.getModel(),e));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=t.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new l.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null).parseSearchRequest();if(!e)return ;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),s=i.getFullModelRange(),r=this._getReplacePattern();let a;const c=this._state.preserveCase;a=r.hasReplacementPatterns||c?n.replace(t,(function(){return r.buildReplaceString(arguments,c)})):n.replace(t,r.buildReplaceString(null,c));let d=new o.ReplaceCommandThatPreservesSelection(s,a,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;ee.range),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return ;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map(e=>new a.Selection(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)),i=this._editor.getSelection();for(let e=0,n=t.length;ethis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=o,this._domNode=document.createElement("div"), this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const c=l.getColorTheme().getColor(a.inputActiveOptionBorder),d=l.getColorTheme().getColor(a.inputActiveOptionForeground),h=l.getColorTheme().getColor(a.inputActiveOptionBackground);this.caseSensitive=this._register(new n.CaseSensitiveCheckbox({appendTitle:this._keybindingLabelFor(r.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:c,inputActiveOptionForeground:d,inputActiveOptionBackground:h})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new n.WholeWordsCheckbox({appendTitle:this._keybindingLabelFor(r.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:c, inputActiveOptionForeground:d,inputActiveOptionBackground:h})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new n.RegexCheckbox({appendTitle:this._keybindingLabelFor(r.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:c,inputActiveOptionForeground:d,inputActiveOptionBackground:h})),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(e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()})), this._register(i.addDisposableNonBubblingMouseOutListener(this._domNode,e=>this._onMouseOut())),this._register(i.addDisposableListener(this._domNode,"mouseover",e=>this._onMouseOver())),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return c.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(a.inputActiveOptionBorder), inputActiveOptionForeground:e.getColor(a.inputActiveOptionForeground),inputActiveOptionBackground:e.getColor(a.inputActiveOptionBackground)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}t.FindOptionsWidget=c,c.ID="editor.contrib.findOptionsWidget",l.registerThemingParticipant((e,t)=>{const i=e.getColor(a.editorWidgetBackground);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=e.getColor(a.editorWidgetForeground);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const o=e.getColor(a.widgetShadow);o&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px ${o}; }`);const s=e.getColor(a.contrastBorder);s&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${s}; }`)})})),define(e[313],t([0,1,6,2,18,242]),(function(e,t,i,n,o,s){"use strict";function r(e,t){return 1===e||2!==e&&t}Object.defineProperty(t,"__esModule",{value:!0}),t.FindReplaceState=t.FindOptionOverride=void 0,function(e){ e[e.NotSet=0]="NotSet",e[e.True=1]="True",e[e.False=2]="False"}(t.FindOptionOverride||(t.FindOptionOverride={}));class a extends n.Disposable{constructor(){super(),this._onFindReplaceStateChange=this._register(new i.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return r(this._isRegexOverride,this._isRegex)}get wholeWord(){return r(this._wholeWordOverride,this._wholeWord)}get matchCase(){ return r(this._matchCaseOverride,this._matchCase)}get preserveCase(){return r(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){let n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},s=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),void 0!==i&&(o.Range.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0, s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let s={moveCursor:t,updateHistory:i,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},r=!1;const a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord), void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every(e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some(t=>!o.Range.equalsRange(t,e))}))||(this._searchScope=e.searchScope,s.searchScope=!0,r=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,r=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,a!==this.isRegex&&(r=!0,s.isRegex=!0),l!==this.wholeWord&&(r=!0,s.wholeWord=!0),c!==this.matchCase&&(r=!0,s.matchCase=!0),d!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition} canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=s.MATCHES_LIMIT}}t.FindReplaceState=a})),define(e[433],t([0,1,990,7,103,216,234,102,15,21,2,12,24,18,242,27,11,219,44,791]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleButton=t.FindWidget=t.FindWidgetViewZone=t.findNextMatchIcon=t.findPreviousMatchIcon=t.findReplaceAllIcon=t.findReplaceIcon=t.findCloseIcon=void 0;const b=S.registerIcon("find-selection",S.Codicon.selection),_=S.registerIcon("find-collapsed",S.Codicon.chevronRight),C=S.registerIcon("find-expanded",S.Codicon.chevronDown);t.findCloseIcon=S.registerIcon("find-close",S.Codicon.close),t.findReplaceIcon=S.registerIcon("find-replace",S.Codicon.replace),t.findReplaceAllIcon=S.registerIcon("find-replace-all",S.Codicon.replaceAll),t.findPreviousMatchIcon=S.registerIcon("find-previous-match",S.Codicon.arrowUp), t.findNextMatchIcon=S.registerIcon("find-next-match",S.Codicon.arrowDown);const y=i.localize(0,null),w=i.localize(1,null),E=i.localize(2,null),I=i.localize(3,null),x=i.localize(4,null),k=i.localize(5,null),D=i.localize(6,null),T=i.localize(7,null),R=i.localize(8,null),A=i.localize(9,null),M=i.localize(10,null),L=i.localize(11,null,p.MATCHES_LIMIT),O=i.localize(12,null),N=i.localize(13,null),P=419,F=221;let B=69;const V=33,W="ctrlEnterReplaceAll.windows.donotask",z=h.isMacintosh?256:2048;class U{constructor(e){this.afterLineNumber=e,this.heightInPx=V,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function K(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function H(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(e=>{if(e.hasChanged(72)&&(this._codeEditor.getOption(72)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(117)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(29)){const e=this._codeEditor.getOption(29).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new U(0), this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){let e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!0),this._findInput.select())}})),this._findInputFocused=p.CONTEXT_FIND_INPUT_FOCUSED.bindTo(r),this._findFocusTracker=this._register(n.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=p.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(r),this._replaceFocusTracker=this._register(n.trackFocus(this._replaceInput.inputBox.inputElement)), this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(29).addExtraSpaceOnTop&&(this._viewZone=new U(0)),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return G.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()} if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(72)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=n.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()), e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=B+"px",this._state.matchesCount>=p.MATCHES_LIMIT?this._matchesCount.title=L:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=p.MATCHES_LIMIT&&(t+="+");let i=String(this._state.matchesPosition) ;"0"===i&&(i="?"),e=u.format(O,i,t)}else e=N;this._matchesCount.appendChild(document.createTextNode(e)),o.alert(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),B=Math.max(B,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===N)return""===n?i.localize(14,null,e):i.localize(15,null,e,n);if(t){const o=i.localize(16,null,e,n,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();if(s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1){return`${s.getLineContent(t.startLineNumber)}, ${o}`}return o}return i.localize(17,null,e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible), this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let i=!this._codeEditor.getOption(72);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(29).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber ;this._toggleSelectionFind.checked=t}this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0),setTimeout(()=>{this._findInput.validate()},200),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(29).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const o=n.getDomNodePagePosition(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=o.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);const i=n.getTopLeftOffset(this._domNode).left;r>i&&(t=!1);const s=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());o.left+(s?s.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(), e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(){if(!this._codeEditor.getOption(29).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const e=this._viewZone;void 0===this._viewZoneId&&e&&this._codeEditor.changeViewZones(t=>{e.heightInPx=this._getHeight(),this._viewZoneId=t.addZone(e),this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+e.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(29).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new U(0));const t=this._viewZone;this._codeEditor.changeViewZones(i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;let o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if((n-=this._codeEditor.getOption(66).top)<=0)return;t.heightInPx=n, this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.inputActiveOptionBorder),inputActiveOptionBackground:e.getColor(m.inputActiveOptionBackground),inputActiveOptionForeground:e.getColor(m.inputActiveOptionForeground),inputBackground:e.getColor(m.inputBackground),inputForeground:e.getColor(m.inputForeground),inputBorder:e.getColor(m.inputBorder),inputValidationInfoBackground:e.getColor(m.inputValidationInfoBackground),inputValidationInfoForeground:e.getColor(m.inputValidationInfoForeground),inputValidationInfoBorder:e.getColor(m.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(m.inputValidationWarningBackground), inputValidationWarningForeground:e.getColor(m.inputValidationWarningForeground),inputValidationWarningBorder:e.getColor(m.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(m.inputValidationErrorBackground),inputValidationErrorForeground:e.getColor(m.inputValidationErrorForeground),inputValidationErrorBorder:e.getColor(m.inputValidationErrorBorder)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!n.isInDOM(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let o=!1,s=!1,r=!1;if(this._resized){if(n.getTotalWidth(this._domNode)>P)return this._domNode.style.maxWidth=`${t-28-i-15}px`,void(this._replaceInput.width=n.getTotalWidth(this._findInput.domNode))}if(P+28+i>=t&&(s=!0), P+28+i-B>=t&&(r=!0),P+28+i-B>=t+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",s),r||o||(this._domNode.style.maxWidth=`${t-28-i-15}px`),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=n.getTotalWidth(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()} _updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.Range.equalsRange(e,t)?null:e}).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|z)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(), void e.preventDefault()):e.equals(16)?K(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?H(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|z)?(h.isWindows&&h.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(i.localize(18,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(W,!0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?K(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?H(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0} _keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new f.ContextScopedFindInput(null,this._contextViewProvider,{width:F,label:y,placeholder:w,appendCaseSensitiveLabel:this._keybindingLabelFor(p.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(p.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(p.FIND_IDS.ToggleRegexCommand),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(e=>this._onFindInputKeyDown(e))),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(e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())})),this._register(this._findInput.onRegexKeyDown(e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(e=>{this._tryUpdateHeight()&&this._showViewZone()})),h.isLinux&&this._register(this._findInput.onMouseDown(e=>this._onFindInputMouseDown(e))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new $({label:E+this._keybindingLabelFor(p.FIND_IDS.PreviousMatchFindAction), className:t.findPreviousMatchIcon.classNames,onTrigger:()=>{this._codeEditor.getAction(p.FIND_IDS.PreviousMatchFindAction).run().then(void 0,c.onUnexpectedError)}})),this._nextBtn=this._register(new $({label:I+this._keybindingLabelFor(p.FIND_IDS.NextMatchFindAction),className:t.findNextMatchIcon.classNames,onTrigger:()=>{this._codeEditor.getAction(p.FIND_IDS.NextMatchFindAction).run().then(void 0,c.onUnexpectedError)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const i=document.createElement("div");i.className="find-actions",e.appendChild(i),i.appendChild(this._matchesCount),i.appendChild(this._prevBtn.domNode),i.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new s.Checkbox({icon:b,title:x+this._keybindingLabelFor(p.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){ let e=this._codeEditor.getSelections();e.map(e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e)).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)})),i.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new $({label:k+this._keybindingLabelFor(p.FIND_IDS.CloseFindWidgetCommand),className:t.findCloseIcon.classNames,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),i.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new f.ContextScopedReplaceInput(null,void 0,{label:D,placeholder:T,history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)), this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(e=>this._onReplaceInputKeyDown(e))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(e=>{e.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(),e.preventDefault())})),this._replaceBtn=this._register(new $({label:R+this._keybindingLabelFor(p.FIND_IDS.ReplaceOneAction),className:t.findReplaceIcon.classNames,onTrigger:()=>{ this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new $({label:A+this._keybindingLabelFor(p.FIND_IDS.ReplaceAllAction),className:t.findReplaceAllIcon.classNames,onTrigger:()=>{this._controller.replaceAll()}}));let o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);const a=document.createElement("div");a.className="replace-actions",o.appendChild(a),a.appendChild(this._replaceBtn.domNode),a.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new $({label:M,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=n.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"), this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${P}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(o),this._resizeSash=new r.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let l=P;this._register(this._resizeSash.onDidStart(()=>{l=n.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(e=>{this._resized=!0;let t=l+e.startX-e.currentX;if(t(parseFloat(n.getComputedStyle(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=n.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const e=n.getTotalWidth(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()}),this.onkeydown(this._domNode,e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){ this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._.classNames.split(" ")),this._domNode.classList.add(...C.classNames.split(" "))):(this._domNode.classList.remove(...C.classNames.split(" ")),this._domNode.classList.add(..._.classNames.split(" ")))}}t.SimpleButton=$,v.registerThemingParticipant((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(m.editorFindMatchHighlight)),i(".currentFindMatch",e.getColor(m.editorFindMatch)),i(".findScope",e.getColor(m.editorFindRangeHighlight)),i(".find-widget",e.getColor(m.editorWidgetBackground));const n=e.getColor(m.widgetShadow);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 2px 8px ${n}; }`);const o=e.getColor(m.editorFindMatchHighlightBorder) ;o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const s=e.getColor(m.editorFindMatchBorder);s&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${s}; padding: 1px; box-sizing: border-box; }`);const r=e.getColor(m.editorFindRangeHighlightBorder);r&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const a=e.getColor(m.contrastBorder);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(m.editorWidgetForeground);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const c=e.getColor(m.errorForeground);c&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${c}; }`);const d=e.getColor(m.editorWidgetResizeBorder);if(d)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${d}; }`);else{const i=e.getColor(m.editorWidgetBorder) ;i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const h=e.getColor(m.focusBorder);h&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${h}; }`)})})),define(e[575],t([0,1,991,13,24,15,79,2,37,922,1481,58,923,134,1482,45,412,924,21,8,11,27,792]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorFoldForeground=t.foldBackgroundBackground=t.FoldingController=void 0;const E=new C.RawContextKey("foldingEnabled",!1);let I=class e extends c.Disposable{constructor(e,t){super(),this.contextKeyService=t,this.localToDispose=this._register(new c.DisposableStore),this.editor=e;const i=this.editor.getOptions();this._isEnabled=i.get(31),this._useFoldingProviders="indentation"!==i.get(32),this._unfoldOnClickAfterEndOfLine=i.get(34),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null, this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new u.FoldingDecorationProvider(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===i.get(91),this.foldingDecorationProvider.showFoldingHighlights=i.get(33),this.foldingEnabled=E.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(e=>{if(e.hasChanged(31)&&(this._isEnabled=this.editor.getOptions().get(31),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(91)||e.hasChanged(33)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(91),this.foldingDecorationProvider.showFoldingHighlights=e.get(33),this.onModelContentChanged()}e.hasChanged(32)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(32), this.onFoldingStrategyChanged()),e.hasChanged(34)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(34))})),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||!e.collapsedRegions||e.lineCount!==t.getLineCount())return;e.provider!==S.ID_SYNTAX_PROVIDER&&e.provider!==b.ID_INIT_PROVIDER||(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const e=this.getFoldingModel();e&&e.then(e=>{e&&e.applyMemento(i)}).then(void 0,_.onUnexpectedError)}} onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this.foldingModel=new h.FoldingModel(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new p.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(e=>this.onHiddenRangesChanges(e))),this.updateScheduler=new a.Delayer(200),this.cursorChangedScheduler=new a.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(f.FoldingRangeProviderRegistry.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())), this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(e=>this.onEditorMouseDown(e))),this.localToDispose.add(this.editor.onMouseUp(e=>this.onEditorMouseUp(e))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new v.IndentRangeProvider(e),this._useFoldingProviders&&this.foldingModel){ let t=f.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions){return this.rangeProvider=new b.InitializingRangeProvider(e,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4)}t.length>0&&(this.rangeProvider=new S.SyntaxRangeProvider(e,t))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;let t=this.foldingRegionPromise=a.createCancelablePromise(t=>this.getRangeProvider(e.textModel).compute(t));return t.then(i=>{if(i&&t===this.foldingRegionPromise){let t=this.editor.getSelections(),n=t?t.map(e=>e.startLineNumber):[];e.update(i,n)}return e}) }).then(void 0,e=>(_.onUnexpectedError(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let i=[];for(let n of t){let t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,e=>e.isCollapsed&&t>e.startLineNumber))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}}).then(void 0,_.onUnexpectedError)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4: const n=e.target.detail,o=e.target.element.offsetLeft;if(n.offsetX-o<5)return;i=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){if(!e.target.detail.isAfterLines)break}return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===i){if(n){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}t.then(t=>{if(t){let o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){let s=o.isCollapsed;if(n||s){let n=[],r=e.event.middleButton||e.event.shiftKey;if(r)for(const e of t.getRegionsInside(o))e.isCollapsed===s&&n.push(e) ;!s&&r&&0!==n.length||n.push(o),t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}}).then(void 0,_.onUnexpectedError)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};I.ID="editor.contrib.folding",I.MAX_FOLDING_REGIONS=5e3,I=o([r(1,C.IContextKeyService)],I),t.FoldingController=I;class x extends d.EditorAction{runEditorCommand(e,t,i){let n=I.get(t);if(!n)return;let o=n.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then(e=>{if(e){this.invoke(n,e,t,i);const o=t.getSelection();o&&n.reveal(o.getStartPosition())}})):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map(e=>e.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(e=>e+1):this.getSelectedLines(t)}run(e,t){}}function k(e){if(!n.isUndefined(e)){if(!n.isObject(e))return!1;const t=e;if(!n.isUndefined(t.levels)&&!n.isNumber(t.levels))return!1;if(!n.isUndefined(t.direction)&&!n.isString(t.direction))return!1 ;if(!(n.isUndefined(t.selectionLines)||n.isArray(t.selectionLines)&&t.selectionLines.every(n.isNumber)))return!1}return!0}class D extends x{getFoldingLevel(){return parseInt(this.id.substr(D.ID_PREFIX.length))}invoke(e,t,i){h.setCollapseStateAtLevel(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}D.ID_PREFIX="editor.foldLevel",D.ID=e=>D.ID_PREFIX+e,d.registerEditorContribution(I.ID,I),d.registerEditorAction(class extends x{constructor(){super({id:"editor.unfold",label:i.localize(0,null),alias:"Unfold",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument", description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:k,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?h.setCollapseStateLevelsUp(t,!1,o,s):h.setCollapseStateLevelsDown(t,!1,o,s)}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.unfoldRecursively",label:i.localize(1,null),alias:"Unfold Recursively",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus, primary:l.KeyChord(2089,2137),weight:100}})}invoke(e,t,i,n){h.setCollapseStateLevelsDown(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.fold",label:i.localize(2,null),alias:"Fold",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:k, schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=this.getLineNumbers(n,i);const s=n&&n.levels,r=n&&n.direction;"number"!=typeof s&&"string"!=typeof r?h.setCollapseStateUp(t,!0,o):"up"===r?h.setCollapseStateLevelsUp(t,!0,s||1,o):h.setCollapseStateLevelsDown(t,!0,s||1,o)}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.foldRecursively",label:i.localize(4,null),alias:"Fold Recursively",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2135),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);h.setCollapseStateLevelsDown(t,!0,Number.MAX_VALUE,n)}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.foldAll",label:i.localize(8,null),alias:"Fold All",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2069),weight:100}})}invoke(e,t,i){ h.setCollapseStateLevelsDown(t,!0)}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.unfoldAll",label:i.localize(9,null),alias:"Unfold All",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2088),weight:100}})}invoke(e,t,i){h.setCollapseStateLevelsDown(t,!1)}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.foldAllBlockComments",label:i.localize(5,null),alias:"Fold All Block Comments",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2133),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())h.setCollapseStateForType(t,f.FoldingRangeKind.Comment.value,!0);else{const e=i.getModel();if(!e)return;let n=m.LanguageConfigurationRegistry.getComments(e.getLanguageIdentifier().id);if(n&&n.blockCommentStartToken){let e=new RegExp("^\\s*"+s.escapeRegExpCharacters(n.blockCommentStartToken));h.setCollapseStateForMatchingLines(t,e,!0)}}}}),d.registerEditorAction(class extends x{constructor(){ super({id:"editor.foldAllMarkerRegions",label:i.localize(6,null),alias:"Fold All Regions",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2077),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())h.setCollapseStateForType(t,f.FoldingRangeKind.Region.value,!0);else{const e=i.getModel();if(!e)return;let n=m.LanguageConfigurationRegistry.getFoldingRules(e.getLanguageIdentifier().id);if(n&&n.markers&&n.markers.start){let e=new RegExp(n.markers.start);h.setCollapseStateForMatchingLines(t,e,!0)}}}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:i.localize(7,null),alias:"Unfold All Regions",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2078),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())h.setCollapseStateForType(t,f.FoldingRangeKind.Region.value,!1);else{const e=i.getModel();if(!e)return;let n=m.LanguageConfigurationRegistry.getFoldingRules(e.getLanguageIdentifier().id) ;if(n&&n.markers&&n.markers.start){let e=new RegExp(n.markers.start);h.setCollapseStateForMatchingLines(t,e,!1)}}}}),d.registerEditorAction(class extends x{constructor(){super({id:"editor.toggleFold",label:i.localize(3,null),alias:"Toggle Fold",precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2090),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);h.toggleCollapseState(t,1,n)}});for(let e=1;e<=7;e++)d.registerInstantiatedEditorAction(new D({id:D.ID(e),label:i.localize(10,null,e),alias:`Fold Level ${e}`,precondition:E,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:l.KeyChord(2089,2048|21+e),weight:100}}));t.foldBackgroundBackground=w.registerColor("editor.foldBackground",{light:w.transparent(w.editorSelectionBackground,.3),dark:w.transparent(w.editorSelectionBackground,.3),hc:null},i.localize(11,null),!0),t.editorFoldForeground=w.registerColor("editorGutter.foldingControlForeground",{dark:w.iconForeground,light:w.iconForeground,hc:w.iconForeground },i.localize(12,null)),y.registerThemingParticipant((e,i)=>{const n=e.getColor(t.foldBackgroundBackground);n&&i.addRule(`.monaco-editor .folded-background { background-color: ${n}; }`);const o=e.getColor(t.editorFoldForeground);o&&i.addRule(`\n\t\t.monaco-editor .cldr${u.foldingExpandedIcon.cssSelector},\n\t\t.monaco-editor .cldr${u.foldingCollapsedIcon.cssSelector} {\n\t\t\tcolor: ${o} !important;\n\t\t}\n\t\t`)})})),define(e[1575],t([0,1,348,64,185,213,52,11,59,7,1e3,110,17,2,5,35,87,173]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityProvider=t.OneReferenceRenderer=t.FileReferencesRenderer=t.IdentityProvider=t.StringRepresentationProvider=t.Delegate=t.DataSource=void 0;let _=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof i.ReferencesModel||e instanceof i.FileReferences}getChildren(e){if(e instanceof i.ReferencesModel)return e.groups ;if(e instanceof i.FileReferences)return e.resolve(this._resolverService).then(e=>e.children);throw new Error("bad tree")}};_=o([r(0,n.ITextModelService)],_),t.DataSource=_;t.Delegate=class{getHeight(){return 23}getTemplateId(e){return e instanceof i.FileReferences?w.id:I.id}};let C=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof i.OneReference){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return p.basename(e.uri)}mightProducePrintableCharacter(e){return this._keybindingService.mightProducePrintableCharacter(e)}};C=o([r(0,f.IKeybindingService)],C),t.StringRepresentationProvider=C;t.IdentityProvider=class{getId(e){return e instanceof i.OneReference?e.id:e.uri}};let y=class extends m.Disposable{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new s.IconLabel(n,{supportHighlights:!0})), this.badge=new a.CountBadge(h.append(n,h.$(".count"))),this._register(d.attachBadgeStyler(this.badge,i)),e.appendChild(n)}set(e,t){let i=p.dirname(e.uri);this.file.setLabel(g.getBaseLabel(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(u.localize(0,null,n)):this.badge.setTitleFormat(u.localize(1,null,n))}};y=o([r(1,l.ILabelService),r(2,c.IThemeService)],y);let w=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(y,e)}renderElement(e,t,i){i.set(e.element,S.createMatches(e.filterData))}disposeTemplate(e){e.dispose()}};w.id="FileReferencesRenderer",w=o([r(0,v.IInstantiationService)],w),t.FileReferencesRenderer=w;class E{constructor(e){this.label=new b.HighlightedLabel(e,!1)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){ const{value:e,highlight:i}=n;t&&!S.FuzzyScore.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,S.createMatches(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${p.basename(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class I{constructor(){this.templateId=I.id}renderTemplate(e){return new E(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}t.OneReferenceRenderer=I,I.id="OneReferenceRenderer";t.AccessibilityProvider=class{getWidgetAriaLabel(){return u.localize(2,null)}getAriaLabel(e){return e.ariaMessage}}})),define(e[1576],t([0,1,1006,18,60,58,37,155,925,177,11,145,75,15,21]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let f=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,i){ this.currentRequest&&this.currentRequest.cancel();const o=this.editor.getSelection(),r=this.editor.getModel();if(!r||!o)return;let a=o;if(a.startLineNumber!==a.endLineNumber)return;const l=new h.EditorState(this.editor,5),c=r.uri;return this.editorWorkerService.canNavigateValueSet(c)?(this.currentRequest=m.createCancelablePromise(e=>this.editorWorkerService.navigateValueSet(c,a,i)),this.currentRequest.then(i=>{if(!i||!i.range||!i.value)return;if(!l.validate(this.editor))return;let o=n.Range.lift(i.range),r=i.range,c=i.value.length-(a.endColumn-a.startColumn);r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.startColumn+i.value.length},c>1&&(a=new s.Selection(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+c-1));const h=new d.InPlaceReplaceCommand(o,a,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,h),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:r,options:e.DECORATION}]), this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=m.timeout(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(v.onUnexpectedError)}).catch(v.onUnexpectedError)):Promise.resolve(void 0)}};f.ID="editor.contrib.inPlaceReplaceController",f.DECORATION=p.ModelDecorationOptions.register({className:"valueSetReplacement"}),f=o([r(1,c.IEditorWorkerService)],f);class S extends l.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:i.localize(0,null),alias:"Replace with Previous Value",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=f.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class b extends l.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:i.localize(1,null),alias:"Replace with Next Value",precondition:a.EditorContextKeys.writable,kbOpts:{ kbExpr:a.EditorContextKeys.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=f.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}l.registerEditorContribution(f.ID,f),l.registerEditorAction(S),l.registerEditorAction(b),u.registerThemingParticipant((e,t)=>{const i=e.getColor(g.editorBracketMatchBorder);i&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }`)})})),define(e[576],t([0,1,1009,15,31,21,137,2,12,37,75,45,543,1485,28,42,27,11,10,29,17,796]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkDetector=void 0;const w={general:u.ModelDecorationOptions.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:u.ModelDecorationOptions.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class E{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:E._getOptions(e,t,!1)}} static _getOptions(e,t,n){const o=Object.assign({},n?w.active:w.general);return o.hoverMessage=function(e,t){const n=e.url&&/^command:/i.test(e.url.toString()),o=e.tooltip?e.tooltip:n?i.localize(0,null):i.localize(1,null),s=t?d.isMacintosh?i.localize(2,null):i.localize(3,null):d.isMacintosh?i.localize(4,null):i.localize(5,null);if(e.url){return new l.MarkdownString("",!0).appendMarkdown(`[${o}](${e.url.toString()}) (${s})`)}return(new l.MarkdownString).appendText(`${o} (${s})`)}(e,t),o}activate(e,t){e.changeDecorationOptions(this.decorationId,E._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,E._getOptions(this.link,t,!1))}}let I=class e{constructor(e,t,i){this.listenersToRemove=new c.DisposableStore,this.editor=e,this.openerService=t,this.notificationService=i;let o=new p.ClickLinkGesture(e);this.listenersToRemove.add(o),this.listenersToRemove.add(o.onMouseMoveOrRelevantKeyDown(([e,t])=>{this._onEditorMouseMove(e,t)})),this.listenersToRemove.add(o.onExecute(e=>{ this.onEditorMouseUp(e)})),this.listenersToRemove.add(o.onCancel(e=>{this.cleanUpActiveLinkDecoration()})),this.enabled=e.getOption(54),this.listenersToRemove.add(e.onDidChangeConfiguration(t=>{const i=e.getOption(54);this.enabled!==i&&(this.enabled=i,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(e.onDidChangeModelContent(e=>this.onChange())),this.listenersToRemove.add(e.onDidChangeModel(e=>this.onModelChanged())),this.listenersToRemove.add(e.onDidChangeModelLanguage(e=>this.onModelModeChanged())),this.listenersToRemove.add(g.LinkProviderRegistry.onDidChange(e=>this.onModelModeChanged())),this.timeout=new n.TimeoutTimer,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(t){return t.getContribution(e.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){ this.timeout.setIfNotSet(()=>this.beginCompute(),e.RECOMPUTE_TIME)}async beginCompute(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(g.LinkProviderRegistry.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=n.createCancelablePromise(t=>m.getLinks(e,t));try{this.activeLinksList=await this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(e){a.onUnexpectedError(e)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(61);let i=[],n=Object.keys(this.currentOccurrences);for(let e=0,t=n.length;e{t.activate(e,i),this.activeLinkDecorationId=t.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(61);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;const{link:o}=e;o.resolve(s.CancellationToken.None).then(e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===C.Schemas.file&&e.startsWith(`${C.Schemas.file}:`)){const i=_.URI.parse(e) ;if(i.scheme===C.Schemas.file){const n=y.originalFSPath(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=y.joinPath(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:n})},e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(i.localize(6,null,o.url.toString())):"missing"===t?this.notificationService.warn(i.localize(7,null)):a.onUnexpectedError(e)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.timeout.cancel(),this.activeLinksList&&this.activeLinksList.dispose(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)} dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};I.ID="editor.linkDetector",I.RECOMPUTE_TIME=1e3,I=o([r(1,f.IOpenerService),r(2,v.INotificationService)],I),t.LinkDetector=I;class x extends h.EditorAction{constructor(){super({id:"editor.action.openLink",label:i.localize(8,null),alias:"Open Link",precondition:void 0})}run(e,t){let i=I.get(t);if(!i)return;if(!t.hasModel())return;let n=t.getSelections();for(let e of n){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}h.registerEditorContribution(I.ID,I),h.registerEditorAction(x),b.registerThemingParticipant((e,t)=>{const i=e.getColor(S.editorActiveLinkForeground);i&&t.addRule(`.monaco-editor .detected-link-active { color: ${i} !important; }`)})})),define(e[314],t([0,1,1010,15,2,103,18,37,8,11,27,144,797]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageController=void 0;let p=class e extends s.Disposable{constructor(t,i){super(), this._messageWidget=this._register(new s.MutableDisposable),this._messageListeners=this._register(new s.DisposableStore),this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i),this._register(this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){super.dispose(),this._visible.reset()}isVisible(){return this._visible.get()}showMessage(e,t){let i;a.alert(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new v(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new n.TimeoutTimer(()=>this.closeMessage(),3e3)), this._messageListeners.add(this._editor.onMouseMove(e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new l.Range(t.lineNumber-3,1,e.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(v.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(i.localize(0,null),this._editor.getPosition())}};p.ID="editor.contrib.messageController",p.MESSAGE_VISIBLE=new d.RawContextKey("messageVisible",!1),p=o([r(1,d.IContextKeyService)],p),t.MessageController=p;const m=c.EditorCommand.bindToContribution(p.get);c.registerEditorCommand(new m({id:"leaveEditorMessage",precondition:p.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class v{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0), this._position={lineNumber:t,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("message"),o.textContent=n,this._domNode.appendChild(o);const s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}}c.registerEditorContribution(p.ID,p),h.registerThemingParticipant((e,t)=>{const i=e.getColor(u.inputValidationInfoBorder);if(i){let n=e.type===g.ColorScheme.HIGH_CONTRAST?2:1 ;t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${n}px solid ${i}; }`)}const n=e.getColor(u.inputValidationInfoBackground);n&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${n}; }`);const o=e.getColor(u.inputValidationInfoForeground);o&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${o}; }`)})})),define(e[1577],t([0,1,21,230,2,314,5,1533,1570]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionUi=void 0;let h=class extends s.Disposable{constructor(e,t,i,o,r){super(),this._editor=e,this.delegate=o,this._activeCodeActions=this._register(new s.MutableDisposable),this._codeActionWidget=new n.Lazy(()=>this._register(r.createInstance(c.CodeActionMenu,this._editor,{onSelectCodeAction:async e=>{this.delegate.applyCodeAction(e,!0)}}))),this._lightBulbWidget=new n.Lazy(()=>{ const e=this._register(r.createInstance(d.LightBulbWidget,this._editor,t,i));return this._register(e.onClick(e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1}))),e})}async update(e){var t,n,o;if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let s;try{s=await e.actions}catch(e){return void i.onUnexpectedError(e)}if(this._lightBulbWidget.getValue().update(s,e.trigger,e.position),2===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,s);if(t){try{await this.delegate.applyCodeAction(t,!1)}finally{s.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,s);if(t&&t.action.disabled)return a.MessageController.get(this._editor).showMessage(t.action.disabled,e.trigger.context.position),void s.dispose()}}const t=!!(null===(o=e.trigger.filter)||void 0===o?void 0:o.include) ;if(e.trigger.context&&(!s.allActions.length||!t&&!s.validActions.length))return a.MessageController.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=s,void s.dispose();this._activeCodeActions.value=s,this._codeActionWidget.getValue().show(e.trigger,s,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?s.dispose():this._activeCodeActions.value=s}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find(({action:e})=>e.disabled):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}async showCodeActionList(e,t,i,n){this._codeActionWidget.getValue().show(e,t,i,n)}};h=o([r(4,l.IInstantiationService)],h),t.CodeActionUi=h})), define(e[360],t([0,1,31,230,2,24,37,143,58,240,1577,314,982,32,8,5,107,28,68,23,1534,215]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict";function E(e){return v.ContextKeyExpr.regex(y.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+a.escapeRegExpCharacters(e.value)+"\\b"))}Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFixAction=t.FixAllAction=t.OrganizeImportsAction=t.SourceAction=t.RefactorAction=t.CodeActionCommand=t.QuickFixAction=t.applyCodeAction=t.QuickFixController=void 0;const I={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:p.localize(0,null)},apply:{type:"string",description:p.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[p.localize(2,null),p.localize(3,null),p.localize(4,null)]},preferred:{type:"boolean",default:!1,description:p.localize(5,null)}}};let x=class e extends s.Disposable{constructor(e,t,i,o,s){super(),this._instantiationService=s,this._editor=e, this._model=this._register(new y.CodeActionModel(this._editor,t,i,o)),this._register(this._model.onDidChangeState(e=>this.update(e))),this._ui=new n.Lazy(()=>this._register(new u.CodeActionUi(e,T.Id,N.Id,{applyCodeAction:async(e,t)=>{try{await this._applyCodeAction(e)}finally{t&&this._trigger({type:1,filter:{}})}}},this._instantiationService)))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){if(!this._editor.hasModel())return;g.MessageController.get(this._editor).closeMessage();const n=this._editor.getPosition();this._trigger({type:2,filter:t,autoApply:i,context:{notAvailableMessage:e,position:n}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(k,e,this._editor)}};async function k(e,t,n){ const o=e.get(c.IBulkEditService),s=e.get(m.ICommandService),r=e.get(C.ITelemetryService),a=e.get(b.INotificationService);if(r.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),await t.resolve(i.CancellationToken.None),t.action.edit&&await o.apply(c.ResourceEdit.convert(t.action.edit),{editor:n,label:t.action.title}),t.action.command)try{await s.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);a.error("string"==typeof t?t:p.localize(6,null))}}function D(e,t,i,n){if(e.hasModel()){const o=x.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}x.ID="editor.contrib.quickFixController",x=o([r(1,S.IMarkerService),r(2,v.IContextKeyService),r(3,_.IEditorProgressService),r(4,f.IInstantiationService)],x),t.QuickFixController=x,t.applyCodeAction=k;class T extends l.EditorAction{ constructor(){super({id:T.Id,label:p.localize(7,null),alias:"Quick Fix...",precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:2132,weight:100}})}run(e,t){return D(t,p.localize(8,null),void 0,void 0)}}t.QuickFixAction=T,T.Id="editor.action.quickFix";class R extends l.EditorCommand{constructor(){super({id:h.codeActionCommandId,precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:I}]}})}runEditorCommand(e,t,i){const n=w.CodeActionCommandArgs.fromUser(i,{kind:w.CodeActionKind.Empty,apply:"ifSingle"});return D(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?p.localize(9,null,i.kind):p.localize(10,null,i.kind):n.preferred?p.localize(11,null):p.localize(12,null),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}} t.CodeActionCommand=R;class A extends l.EditorAction{constructor(){super({id:h.refactorCommandId,label:p.localize(13,null),alias:"Refactor...",precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:v.ContextKeyExpr.and(d.EditorContextKeys.writable,E(w.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:I}]}})}run(e,t,i){const n=w.CodeActionCommandArgs.fromUser(i,{kind:w.CodeActionKind.Refactor,apply:"never"});return D(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?p.localize(14,null,i.kind):p.localize(15,null,i.kind):n.preferred?p.localize(16,null):p.localize(17,null),{include:w.CodeActionKind.Refactor.contains(n.kind)?n.kind:w.CodeActionKind.None,onlyIncludePreferredActions:n.preferred},n.apply)}}t.RefactorAction=A;class M extends l.EditorAction{constructor(){ super({id:h.sourceActionCommandId,label:p.localize(18,null),alias:"Source Action...",precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:v.ContextKeyExpr.and(d.EditorContextKeys.writable,E(w.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:I}]}})}run(e,t,i){const n=w.CodeActionCommandArgs.fromUser(i,{kind:w.CodeActionKind.Source,apply:"never"});return D(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?p.localize(19,null,i.kind):p.localize(20,null,i.kind):n.preferred?p.localize(21,null):p.localize(22,null),{include:w.CodeActionKind.Source.contains(n.kind)?n.kind:w.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}t.SourceAction=M;class L extends l.EditorAction{constructor(){super({id:h.organizeImportsCommandId,label:p.localize(23,null),alias:"Organize Imports", precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,E(w.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1581,weight:100}})}run(e,t){return D(t,p.localize(24,null),{include:w.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}t.OrganizeImportsAction=L;class O extends l.EditorAction{constructor(){super({id:h.fixAllCommandId,label:p.localize(25,null),alias:"Fix All",precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,E(w.CodeActionKind.SourceFixAll))})}run(e,t){return D(t,p.localize(26,null),{include:w.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle")}}t.FixAllAction=O;class N extends l.EditorAction{constructor(){super({id:N.Id,label:p.localize(27,null),alias:"Auto Fix...",precondition:v.ContextKeyExpr.and(d.EditorContextKeys.writable,E(w.CodeActionKind.QuickFix)),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return D(t,p.localize(28,null),{ include:w.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}t.AutoFixAction=N,N.Id="editor.action.autoFix"})),define(e[1578],t([0,1,37,360]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i.registerEditorContribution(n.QuickFixController.ID,n.QuickFixController),i.registerEditorAction(n.QuickFixAction),i.registerEditorAction(n.RefactorAction),i.registerEditorAction(n.SourceAction),i.registerEditorAction(n.OrganizeImportsAction),i.registerEditorAction(n.AutoFixAction),i.registerEditorAction(n.FixAllAction),i.registerEditorCommand(new n.CodeActionCommand)})),define(e[1579],t([0,1,7,99,103,138,6,2,50,308,430,1013,8,42,27,11,1543,24,44,13,144,798]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterHintsWidget=void 0;const w=i.$,E=_.registerIcon("parameter-hints-next",_.Codicon.chevronDown),I=_.registerIcon("parameter-hints-previous",_.Codicon.chevronUp) ;let x=class e extends c.Disposable{constructor(e,t,i,n){super(),this.editor=e,this.renderDisposeables=this._register(new c.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new h.MarkdownRenderer(e,n,i)),this.model=this._register(new S.ParameterHintsModel(e)),this.keyVisible=u.Context.Visible.bindTo(t),this.keyMultipleSignatures=u.Context.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints(e=>{e?(this.show(),this.render(e)):this.hide()}))}createParamaterHintDOMNodes(){const e=w(".editor-widget.parameter-hints-widget"),t=i.append(e,w(".wrapper"));t.tabIndex=-1;const o=i.append(t,w(".controls")),s=i.append(o,w(".button"+I.cssSelector)),r=i.append(o,w(".overloads")),c=i.append(o,w(".button"+E.cssSelector)),d=n.stop(n.domEvent(s,"click"));this._register(d(this.previous,this));const h=n.stop(n.domEvent(c,"click"));this._register(h(this.next,this));const u=w(".body"),g=new a.DomScrollableElement(u,{});this._register(g), t.appendChild(g.getDomNode());const p=i.append(u,w(".signature")),m=i.append(u,w(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:p,overloads:r,docs:m,scrollbar:g},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(e=>{this.visible&&this.editor.layoutContentWidget(this)}));const v=()=>{if(!this.domNodes)return;const e=this.editor.getOption(36);this.domNodes.element.style.fontSize=`${e.fontSize}px`};v(),this._register(l.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(e=>e.hasChanged(36)).on(v,null)),this._register(this.editor.onDidLayoutChange(e=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(), this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;i.toggleClass(this.domNodes.element,"multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const o=e.signatures[e.activeSignature];if(!o)return;const r=i.append(this.domNodes.signature,w(".code")),a=this.editor.getOption(36);r.style.fontSize=`${a.fontSize}px`,r.style.fontFamily=a.fontFamily;const l=o.parameters.length>0,c=null!==(t=o.activeParameter)&&void 0!==t?t:e.activeParameter;if(l)this.renderParameters(r,o,c);else{i.append(r,w("span")).textContent=o.label}const d=o.parameters[c];if(null==d?void 0:d.documentation){const e=w("span.documentation") ;if("string"==typeof d.documentation)e.textContent=d.documentation;else{const t=this.renderDisposeables.add(this.markdownRenderer.render(d.documentation));t.element.classList.add("markdown-docs"),e.appendChild(t.element)}i.append(this.domNodes.docs,w("p",{},e))}if(void 0===o.documentation);else if("string"==typeof o.documentation)i.append(this.domNodes.docs,w("p",{},o.documentation));else{const e=this.renderDisposeables.add(this.markdownRenderer.render(o.documentation));e.element.classList.add("markdown-docs"),i.append(this.domNodes.docs,e.element)}const h=this.hasDocs(o,d);if(i.toggleClass(this.domNodes.signature,"has-docs",h),i.toggleClass(this.domNodes.docs,"empty",!h),this.domNodes.overloads.textContent=b.pad(e.activeSignature+1,e.signatures.length.toString().length)+"/"+e.signatures.length,d){const e=this.getParameterLabel(o,c);this.announcedLabel!==e&&(s.alert(g.localize(0,null,e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}hasDocs(e,t){ return!!(t&&"string"==typeof t.documentation&&C.assertIsDefined(t.documentation).length>0)||(!!(t&&"object"==typeof t.documentation&&C.assertIsDefined(t.documentation).value.length>0)||(!!(e.documentation&&"string"==typeof e.documentation&&C.assertIsDefined(e.documentation).length>0)||!!(e.documentation&&"object"==typeof e.documentation&&C.assertIsDefined(e.documentation.value).length>0)))}renderParameters(e,t,n){const[o,s]=this.getParameterLabelOffsets(t,n),r=document.createElement("span");r.textContent=t.label.substring(0,o);const a=document.createElement("span");a.textContent=t.label.substring(o,s),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(s),i.append(e,r,a,l)}getParameterLabel(e,t){const i=e.parameters[t];return Array.isArray(i.label)?e.label.substring(i.label[0],i.label[1]):i.label}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;{ const t=new RegExp(`\\b${b.escapeRegExpCharacters(i.label)}\\b`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("wrapper");t.length&&(t[0].style.maxHeight=e)}};x.ID="editor.widget.parameterHintsWidget",x=o([r(1,p.IContextKeyService),r(2,m.IOpenerService),r(3,d.IModeService)],x),t.ParameterHintsWidget=x,f.registerThemingParticipant((e,t)=>{const i=e.getColor(v.editorHoverBorder);if(i){const n=e.type===y.ColorScheme.HIGH_CONTRAST?2:1 ;t.addRule(`.monaco-editor .parameter-hints-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${i.transparent(.5)}; }`)}const n=e.getColor(v.editorHoverBackground);n&&t.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${n}; }`);const o=e.getColor(v.textLinkForeground);o&&t.addRule(`.monaco-editor .parameter-hints-widget a { color: ${o}; }`);const s=e.getColor(v.editorHoverForeground);s&&t.addRule(`.monaco-editor .parameter-hints-widget { color: ${s}; }`);const r=e.getColor(v.textCodeBlockBackground);r&&t.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${r}; }`)})})),define(e[1580],t([0,1,1012,2,5,58,8,37,1579,430,45]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggerParameterHintsAction=void 0 ;let g=class e extends n.Disposable{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance(d.ParameterHintsWidget,this.editor))}static get(t){return t.getContribution(e.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};g.ID="editor.controller.parameterHints",g=o([r(1,s.IInstantiationService)],g);class p extends c.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:i.localize(0,null),alias:"Trigger Parameter Hints",precondition:a.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=g.get(t);i&&i.trigger({triggerKind:u.SignatureHelpTriggerKind.Invoke})}}t.TriggerParameterHintsAction=p,c.registerEditorContribution(g.ID,g),c.registerEditorAction(p);const m=c.EditorCommand.bindToContribution(g.get);c.registerEditorCommand(new m({id:"closeParameterHints",precondition:h.Context.Visible, handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:a.EditorContextKeys.focus,primary:9,secondary:[1033]}})),c.registerEditorCommand(new m({id:"showPrevParameterHint",precondition:l.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:a.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),c.registerEditorCommand(new m({id:"showNextParameterHint",precondition:l.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:a.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))})),define(e[577],t([0,1,129,11,145,2,85,13,135]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractEditorNavigationQuickAccessProvider=void 0;t.AbstractEditorNavigationQuickAccessProvider=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i ;const n=new s.DisposableStore;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new s.MutableDisposable);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),n}doProvide(e,t){const i=new s.DisposableStore,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const o=r.getCodeEditor(n);if(o){let e=a.withNullAsUndefined(n.saveViewState());i.add(o.onDidChangeCursorPosition(()=>{e=a.withNullAsUndefined(n.saveViewState())})),i.add(l.once(t.onCancellationRequested)(()=>{e&&n===this.activeTextEditorControl&&n.restoreViewState(e)}))}i.add(s.toDisposable(()=>this.clearDecorations(n))),i.add(this.provideWithTextEditor(n,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation(e,t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0), t.preserveFocus||e.focus()}getModel(e){var t;return r.isDiffEditor(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(e=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{overviewRuler:{color:n.themeColorFromId(o.overviewRulerRangeHighlight),position:i.OverviewRulerLane.Full}}}],[a,l]=e.deltaDecorations(s,r);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:l}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}})),define(e[578],t([0,1,1015,2,577,85]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{ value:!0}),t.AbstractGotoLineQuickAccessProvider=void 0;class r extends o.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=i.localize(0,null);return e.items=[{label:t}],e.ariaLabel=t,n.Disposable.None}provideWithTextEditor(e,t,i){const o=new n.DisposableStore;o.add(t.onDidAccept(i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(e,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}}));const a=()=>{const i=this.parsePosition(e,t.value.trim().substr(r.PREFIX.length)),n=this.getPickLabel(e,i.lineNumber,i.column);if(t.items=[{lineNumber:i.lineNumber,column:i.column,label:n}],t.ariaLabel=n,!this.isValidLineNumber(e,i.lineNumber))return void this.clearDecorations(e);const o=this.toRange(i.lineNumber,i.column);e.revealRangeInCenter(o,0),this.addDecorations(e,o)};a(),o.add(t.onDidChangeValue(()=>a())) ;const l=s.getCodeEditor(e);if(l){2===l.getOptions().get(52).renderType&&(l.updateOptions({lineNumbers:"on"}),o.add(n.toDisposable(()=>l.updateOptions({lineNumbers:"relative"}))))}return o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(e=>parseInt(e,10)).filter(e=>!isNaN(e)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?i.localize(1,null,t,n):i.localize(2,null,t);const o=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?i.localize(3,null,o.lineNumber,o.column,s):i.localize(4,null,o.lineNumber,o.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&(t>0&&t<=this.lineCount(e))}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i ;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}t.AbstractGotoLineQuickAccessProvider=r,r.PREFIX=":"})),define(e[1581],t([0,1,1016,31,2,18,577,45,237,24,292,96,44]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractGotoSymbolQuickAccessProvider=void 0;class g extends r.AbstractEditorNavigationQuickAccessProvider{constructor(e=Object.create(null)){super(e),this.options=e,e.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,i.localize(0,null)),o.Disposable.None}provideWithTextEditor(e,t,i){const n=this.getModel(e);return n?a.DocumentSymbolProviderRegistry.has(n)?this.doProvideWithEditorSymbols(e,n,t,i):this.doProvideWithoutEditorSymbols(e,n,t,i):o.Disposable.None}doProvideWithoutEditorSymbols(e,t,n,s){const r=new o.DisposableStore;return this.provideLabelPick(n,i.localize(1,null)),(async()=>{ await this.waitForLanguageSymbolRegistry(t,r)&&!s.isCancellationRequested&&r.add(this.doProvideWithEditorSymbols(e,t,n,s))})(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(a.DocumentSymbolProviderRegistry.has(e))return!0;let i;const n=new Promise(e=>i=e),s=t.add(a.DocumentSymbolProviderRegistry.onDidChange(()=>{a.DocumentSymbolProviderRegistry.has(e)&&(s.dispose(),i(!0))}));return t.add(o.toDisposable(()=>i(!1))),n}doProvideWithEditorSymbols(e,t,s,r){const a=new o.DisposableStore;a.add(s.onDidAccept(t=>{const[i]=s.selectedItems;i&&i.range&&(this.gotoLocation(e,{range:i.range.selection,keyMods:s.keyMods,preserveFocus:t.inBackground}),t.inBackground||s.hide())})),a.add(s.onDidTriggerItemButton(({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:s.keyMods,forceSideBySide:!0}),s.hide())}));const l=this.getDocumentSymbols(t,!0,r);let c=void 0;const h=async()=>{null==c||c.dispose(!0),s.busy=!1, c=new n.CancellationTokenSource(r),s.busy=!0;try{const e=d.prepareQuery(s.value.substr(g.PREFIX.length).trim()),t=await this.doGetSymbolPicks(l,e,void 0,c.token);if(r.isCancellationRequested)return;t.length>0?s.items=t:e.original.length>0?this.provideLabelPick(s,i.localize(2,null)):this.provideLabelPick(s,i.localize(3,null))}finally{r.isCancellationRequested||(s.busy=!1)}};a.add(s.onDidChangeValue(()=>h())),h();let u=!0;return a.add(s.onDidChangeActive(()=>{const[t]=s.activeItems;if(t&&t.range){if(u)return void(u=!1);e.revealRangeInCenter(t.range.selection,0),this.addDecorations(e,t.range.decoration)}})),a}async doGetSymbolPicks(e,t,n,o){const r=await e;if(o.isCancellationRequested)return[];const l=0===t.original.indexOf(g.SCOPE_PREFIX),h=l?1:0;let v,f;t.values&&t.values.length>1?(v=d.pieceToQuery(t.values[0]),f=d.pieceToQuery(t.values.slice(1))):v=t;const S=[];for(let e=0;eh){let e=!1;if(v!==t&&([b,_]=d.scoreFuzzy2(g,Object.assign(Object.assign({},t),{values:void 0}),h,p),"number"==typeof b&&(e=!0)),"number"!=typeof b&&([b,_]=d.scoreFuzzy2(g,v,h,p),"number"!=typeof b))continue;if(!e&&f){if(m&&f.original.length>0&&([C,y]=d.scoreFuzzy2(m,f)),"number"!=typeof C)continue;"number"==typeof b&&(b+=C)}}const w=o.tags&&o.tags.indexOf(1)>=0;S.push({index:e,kind:o.kind,score:b,label:g,ariaLabel:l,description:m,highlights:w?void 0:{label:_,description:y},range:{selection:s.Range.collapseToStart(o.selectionRange),decoration:o.range},strikethrough:w,buttons:(()=>{var e,t;const n=(null===(e=this.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=this.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(n)return[{ iconClass:"right"===n?u.Codicon.splitHorizontal.classNames:u.Codicon.splitVertical.classNames,tooltip:"right"===n?i.localize(4,null):i.localize(5,null)}]})()})}const b=S.sort((e,t)=>l?this.compareByKindAndScore(e,t):this.compareByScore(e,t));let _=[];if(l){let e=void 0,t=void 0,i=0;function C(){t&&"number"==typeof e&&i>0&&(t.label=c.format(m[e]||p,i))}for(const n of b)e!==n.kind?(C(),e=n.kind,i=1,t={type:"separator"},_.push(t)):i++,_.push(n);C()}else b.length>0&&(_=[{label:i.localize(6,null,S.length),type:"separator"},...b]);return _}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=m[e.kind]||p,n=m[t.kind]||p,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}async getDocumentSymbols(e,t,i){ const n=await l.OutlineModel.create(e,i);if(i.isCancellationRequested)return[];const o=[];for(const e of n.children.values())e instanceof l.OutlineElement?o.push(e.symbol):o.push(...h.Iterable.map(e.children.values(),e=>e.symbol));let r=[];return t?this.flattenDocumentSymbols(r,o,""):r=o,r.sort((e,t)=>s.Range.compareRangesUsingStarts(e.range,t.range))}flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&this.flattenDocumentSymbols(e,n.children,n.name)}}t.AbstractGotoSymbolQuickAccessProvider=g,g.PREFIX="@",g.SCOPE_PREFIX=":",g.PREFIX_BY_CATEGORY=`${g.PREFIX}${g.SCOPE_PREFIX}`;const p=i.localize(7,null),m={5:i.localize(8,null),11:i.localize(9,null),8:i.localize(10,null),12:i.localize(11,null),4:i.localize(12,null),22:i.localize(13,null),23:i.localize(14,null),24:i.localize(15,null),10:i.localize(16,null),2:i.localize(17,null),3:i.localize(18,null), 25:i.localize(19,null),1:i.localize(20,null),6:i.localize(21,null),9:i.localize(22,null),21:i.localize(23,null),14:i.localize(24,null),0:i.localize(25,null),17:i.localize(26,null),15:i.localize(27,null),16:i.localize(28,null),18:i.localize(29,null),19:i.localize(30,null),7:i.localize(31,null),13:i.localize(32,null)}})),define(e[1582],t([0,1,1017,37,14,2,47,31,18,45,15,75,8,58,10,72,21,24,27,11,55,134,800]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorOnTypeRenameBackground=t.getOnTypeRenameRanges=t.OnTypeRenameAction=t.OnTypeRenameContribution=t.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,t.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new p.RawContextKey("onTypeRenameInputVisible",!1);let E=class e extends a.Disposable{constructor(e,i){super(),this._debounceDuration=200,this._localToDispose=this._register(new a.DisposableStore),this._editor=e,this._enabled=!1,this._visibleContextKey=t.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(i), this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new a.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize())),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(73)&&this.reinitialize()})),this._register(h.OnTypeRenameProviderRegistry.onDidChange(()=>this.reinitialize())),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize())),this.reinitialize()}static get(t){return t.getContribution(e.ID)}reinitialize(){const e=this._editor.getModel(),t=null!==e&&this._editor.getOption(73)&&h.OnTypeRenameProviderRegistry.has(e);if(t===this._enabled)return;if(this._enabled=t,this.clearRanges(),this._localToDispose.clear(),!t||null===e)return ;this._languageWordPattern=w.LanguageConfigurationRegistry.getWordDefinition(e.getLanguageIdentifier().id),this._localToDispose.add(e.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=w.LanguageConfigurationRegistry.getWordDefinition(e.getLanguageIdentifier().id)}));const i=new u.Delayer(this._debounceDuration),n=()=>{this._rangeUpdateTriggerPromise=i.trigger(()=>this.updateRanges(),this._debounceDuration)},o=new u.Delayer(0),s=e=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(e))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{n()})),this._localToDispose.add(this._editor.onDidChangeModelContent(t=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const i=e.getDecorationRange(this._currentDecorations[0]);if(i&&t.changes.every(e=>i.intersectRanges(e.range)))return void s(this._currentDecorations)}n()})),this._localToDispose.add({dispose:()=>{i.cancel(),o.cancel()}}),this.updateRanges()}_syncRanges(e){ if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let o=[];for(let i=1,s=e.length;i1)return void this.clearRanges();const n=this._editor.getModel(),o=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){ const e=n.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=o;const s=u.createCancelablePromise(async t=>{try{const r=await k(n,i,t);if(s!==this._currentRequest)return;if(this._currentRequest=null,o!==n.getVersionId())return;let a=[];(null==r?void 0:r.ranges)&&(a=r.ranges),this._currentWordPattern=(null==r?void 0:r.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,t=a.length;e({range:t,options:e.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,c)}catch(e){S.isPromiseCanceledError(e)||S.onUnexpectedError(e),this._currentRequest!==s&&this._currentRequest||this.clearRanges()}});return this._currentRequest=s,s}setDebounceDuration(e){this._debounceDuration=e}} ;E.ID="editor.contrib.onTypeRename",E.DECORATION=g.ModelDecorationOptions.register({stickiness:0,className:"on-type-rename-decoration"}),E=o([r(1,p.IContextKeyService)],E),t.OnTypeRenameContribution=E;class I extends n.EditorAction{constructor(){super({id:"editor.action.onTypeRename",label:i.localize(0,null),alias:"On Type Rename Symbol",precondition:p.ContextKeyExpr.and(m.EditorContextKeys.writable,m.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(f.ICodeEditorService),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return v.URI.isUri(n)&&l.Position.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(o),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},S.onUnexpectedError):super.runCommand(e,t)}run(e,t){const i=E.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}t.OnTypeRenameAction=I;const x=n.EditorCommand.bindToContribution(E.get) ;function k(e,t,i){const n=h.OnTypeRenameProviderRegistry.ordered(e);return u.first(n.map(n=>()=>Promise.resolve(n.provideOnTypeRenameRanges(e,t,i)).then(e=>{if(e)return{ranges:e.ranges,wordPattern:e.wordPattern||n.wordPattern}},e=>{S.onUnexpectedExternalError(e)})),e=>!!e&&s.isNonEmptyArray(null==e?void 0:e.ranges))}n.registerEditorCommand(new x({id:"cancelOnTypeRenameInput",precondition:t.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:e=>e.clearRanges(),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),t.getOnTypeRenameRanges=k,t.editorOnTypeRenameBackground=_.registerColor("editor.onTypeRenameBackground",{dark:y.Color.fromHex("#f00").transparent(.3),light:y.Color.fromHex("#f00").transparent(.3),hc:y.Color.fromHex("#f00").transparent(.3)},i.localize(1,null)),C.registerThemingParticipant((e,i)=>{const n=e.getColor(t.editorOnTypeRenameBackground);n&&i.addRule(`.monaco-editor .on-type-rename-decoration { background: ${n}; border-left-color: ${n}; }`)}), n.registerModelAndPositionCommand("_executeRenameOnTypeProvider",(e,t)=>k(e,t,c.CancellationToken.None)),n.registerEditorContribution(E.ID,E),n.registerEditorAction(I)})),define(e[1583],t([0,1,2,47,1019,8,27,11,35,801]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameInputField=t.CONTEXT_RENAME_INPUT_VISIBLE=void 0,t.CONTEXT_RENAME_INPUT_VISIBLE=new a.RawContextKey("renameInputVisible",!1);let h=class{constructor(e,n,o,s,r){this._editor=e,this._acceptKeybindings=n,this._themeService=o,this._keybindingService=s,this._disposables=new i.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=t.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this._updateFont()})),this._disposables.add(o.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget" }getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",s.localize(0,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[i,n]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(i),this._label.innerText=s.localize(1,null,null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return ;const s=e.getColor(l.widgetShadow);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(l.editorWidgetBackground))&&void 0!==t?t:""),this._domNode.style.boxShadow=s?` 0 2px 8px ${s}`:"",this._domNode.style.color=String(null!==(i=e.getColor(l.inputForeground))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(l.inputBackground))&&void 0!==n?n:"");const r=e.getColor(l.inputBorder);this._input.style.borderWidth=r?"1px":"0px",this._input.style.borderStyle=r?"solid":"none",this._input.style.borderColor=null!==(o=null==r?void 0:r.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(36);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${.8*e.fontSize}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)} cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,o,s,r,a){this._domNode.classList.toggle("preview",r),this._position=new n.Position(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",o.toString()),this._input.setAttribute("selectionEnd",s.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const l=new i.DisposableStore;return new Promise(e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:r&&i})):this.cancelInput(!0)},a.onCancellationRequested(()=>this.cancelInput(!0)),l.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{l.dispose(),this._hide()})}_show(){ this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};h=o([r(2,c.IThemeService),r(3,d.IKeybindingService),r(4,a.IContextKeyService)],h),t.RenameInputField=h})),define(e[1584],t([0,1,1018,21,8,68,37,58,1583,45,47,103,18,314,177,28,143,10,72,31,2,15,39,5,16,57,112,13]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x,k,D,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameAction=t.rename=void 0;class R{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=h.RenameProviderRegistry.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){ const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:p.Range.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,n,o){const s=this._providers[t];if(!s)return{edits:[],rejectReason:n.join("\n")};const r=await s.provideRenameEdits(this.model,this.position,e,o) ;return r?r.rejectReason?this._provideRenameEdits(e,t+1,n.concat(r.rejectReason),o):r:this._provideRenameEdits(e,t+1,n.concat(i.localize(0,null)),o)}}async function A(e,t,i){const n=new R(e,t),o=await n.resolveRenameLocation(C.CancellationToken.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(i,C.CancellationToken.None)}t.rename=A;let M=class e{constructor(e,t,i,n,o,s,r){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=s,this._configService=r,this._dispoableStore=new y.DisposableStore,this._cts=new C.CancellationTokenSource,this._renameInputField=this._dispoableStore.add(new w.IdleValue(()=>this._dispoableStore.add(this._instaService.createInstance(d.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(t){return t.getContribution(e.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}async run(){if(this._cts.dispose(!0), !this.editor.hasModel())return;const e=this.editor.getPosition(),t=new R(this.editor.getModel(),e);if(!t.hasProvider())return;let n;this._cts=new v.EditorStateCancellationTokenSource(this.editor,5);try{const e=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),n=await e}catch(t){return void m.MessageController.get(this.editor).showMessage(t||i.localize(1,null),e)}if(!n)return;if(n.rejectReason)return void m.MessageController.get(this.editor).showMessage(n.rejectReason,e);if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new v.EditorStateCancellationTokenSource(this.editor,5,n.range);let o=this.editor.getSelection(),s=0,r=n.text.length;p.Range.isEmpty(o)||p.Range.spansMultipleLines(o)||!p.Range.containsRange(n.range,o)||(s=Math.max(0,o.startColumn-n.range.startColumn),r=Math.min(n.range.endColumn,o.endColumn)-n.range.startColumn) ;const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=await this._renameInputField.value.getInput(n.range,n.text,s,r,a,this._cts.token);if("boolean"==typeof l)return void(l&&this.editor.focus());this.editor.focus();const c=w.raceCancellation(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then(async e=>{e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):this._bulkEditService.apply(S.ResourceEdit.convert(e),{editor:this.editor,showPreview:l.wantsPreview,label:i.localize(2,null,null==n?void 0:n.text),quotableLabel:i.localize(3,null,null==n?void 0:n.text)}).then(e=>{e.ariaSummary&&g.alert(i.localize(4,null,n.text,l.newName,e.ariaSummary))}).catch(e=>{this._notificationService.error(i.localize(5,null)),this._logService.error(e)}))},e=>{this._notificationService.error(i.localize(6,null)),this._logService.error(e)});return this._progressService.showWhile(c,250),c} acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};M.ID="editor.contrib.renameController",M=o([r(1,I.IInstantiationService),r(2,f.INotificationService),r(3,S.IBulkEditService),r(4,a.IEditorProgressService),r(5,E.ILogService),r(6,D.ITextResourceConfigurationService)],M);class L extends l.EditorAction{constructor(){super({id:"editor.action.rename",label:i.localize(7,null),alias:"Rename Symbol",precondition:s.ContextKeyExpr.and(c.EditorContextKeys.writable,c.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(_.ICodeEditorService),[o,s]=Array.isArray(t)&&t||[void 0,void 0];return b.URI.isUri(o)&&u.Position.isIPosition(s)?i.openCodeEditor({resource:o},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e)))) },n.onUnexpectedError):super.runCommand(e,t)}run(e,t){const i=M.get(t);return i?i.run():Promise.resolve()}}t.RenameAction=L,l.registerEditorContribution(M.ID,M),l.registerEditorAction(L);const O=l.EditorCommand.bindToContribution(M.get);l.registerEditorCommand(new O({id:"acceptRenameInput",precondition:d.CONTEXT_RENAME_INPUT_VISIBLE,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:c.EditorContextKeys.focus,primary:3}})),l.registerEditorCommand(new O({id:"acceptRenameInputWithPreview",precondition:s.ContextKeyExpr.and(d.CONTEXT_RENAME_INPUT_VISIBLE,s.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:c.EditorContextKeys.focus,primary:1027}})),l.registerEditorCommand(new O({id:"cancelRenameInput",precondition:d.CONTEXT_RENAME_INPUT_VISIBLE,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:c.EditorContextKeys.focus,primary:9,secondary:[1033]}})), l.registerModelAndPositionCommand("_executeDocumentRenameProvider",(function(e,t,...i){const[n]=i;return T.assertType("string"==typeof n),A(e,t,n)})),x.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:i.localize(8,null),default:!0,type:"boolean"}}})})),define(e[1585],t([0,1,1023,87,24,6,21,2,7,175,138,35,8,220,23,59,11,27,26,308,50,42,15,45,185,187,46,10,5,25,137,14,20,78,44,100,803,804,342,359]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x,k,D,T,R,A,M,L,O,N,P,F){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestWidget=t.editorSuggestWidgetHighlightForeground=t.editorSuggestWidgetSelectedBackground=t.editorSuggestWidgetForeground=t.editorSuggestWidgetBorder=t.editorSuggestWidgetBackground=void 0;const B=P.registerIcon("suggest-more-info",P.Codicon.chevronRight);t.editorSuggestWidgetBackground=b.registerColor("editorSuggestWidget.background",{dark:b.editorWidgetBackground, light:b.editorWidgetBackground,hc:b.editorWidgetBackground},i.localize(0,null)),t.editorSuggestWidgetBorder=b.registerColor("editorSuggestWidget.border",{dark:b.editorWidgetBorder,light:b.editorWidgetBorder,hc:b.editorWidgetBorder},i.localize(1,null)),t.editorSuggestWidgetForeground=b.registerColor("editorSuggestWidget.foreground",{dark:b.editorForeground,light:b.editorForeground,hc:b.editorForeground},i.localize(2,null)),t.editorSuggestWidgetSelectedBackground=b.registerColor("editorSuggestWidget.selectedBackground",{dark:b.listFocusBackground,light:b.listFocusBackground,hc:b.listFocusBackground},i.localize(3,null)),t.editorSuggestWidgetHighlightForeground=b.registerColor("editorSuggestWidget.highlightForeground",{dark:b.listHighlightForeground,light:b.listHighlightForeground,hc:b.listHighlightForeground},i.localize(4,null));const V=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;function W(e){if(!e)return!1;const t=e.completion ;return!!t.documentation||t.detail&&t.detail!==t.label}function z(e){return`suggest-aria-id:${e}`}let U=class{constructor(e,t,i,n,o,s){this.widget=e,this.editor=t,this.triggerKeybindingLabel=i,this._modelService=n,this._modeService=o,this._themeService=s}get templateId(){return"suggestion"}renderTemplate(e){const t=Object.create(null);t.disposables=new c.DisposableStore,t.root=e,t.root.classList.add("show-file-icons"),t.icon=d.append(e,d.$(".icon")),t.colorspan=d.append(t.icon,d.$("span.colorspan"));const n=d.append(e,d.$(".contents")),o=d.append(n,d.$(".main"));t.iconContainer=d.append(o,d.$(".icon-label.codicon")),t.left=d.append(o,d.$("span.left")),t.right=d.append(o,d.$("span.right")),t.iconLabel=new x.IconLabel(t.left,{supportHighlights:!0,supportCodicons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=d.append(t.left,d.$("span.signature-label")),t.qualifierLabel=d.append(t.left,d.$("span.qualifier-label")),t.detailsLabel=d.append(t.right,d.$("span.details-label")), t.readMore=d.append(t.right,d.$("span.readMore"+B.cssSelector)),t.readMore.title=i.localize(5,null,this.triggerKeybindingLabel);const s=()=>{const e=this.editor.getOptions(),i=e.get(36),n=i.fontFamily,s=i.fontFeatureSettings,r=e.get(97)||i.fontSize,a=e.get(98)||i.lineHeight,l=i.fontWeight,c=`${r}px`,d=`${a}px`;t.root.style.fontSize=c,t.root.style.fontWeight=l,o.style.fontFamily=n,o.style.fontFeatureSettings=s,o.style.lineHeight=d,t.icon.style.height=d,t.icon.style.width=d,t.readMore.style.height=d,t.readMore.style.width=d};return s(),t.disposables.add(a.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(e=>e.hasChanged(36)||e.hasChanged(97)||e.hasChanged(98)).on(s,null)),t}renderElement(e,t,i){const o=i,s=e.completion,r="string"==typeof s.label?s.label:s.label.name;o.root.id=z(t),o.colorspan.style.backgroundColor="";const a={labelEscapeNewLines:!0,matches:n.createMatches(e.score)};let l=[];if(19===s.kind&&function(e,t){ const i="string"==typeof e.completion.label?e.completion.label:e.completion.label.name;return i.match(V)?(t[0]=i,!0):!("string"!=typeof e.completion.documentation||!e.completion.documentation.match(V))&&(t[0]=e.completion.documentation,!0)}(e,l))o.icon.className="icon customcolor",o.iconContainer.className="icon hide",o.colorspan.style.backgroundColor=l[0];else if(20===s.kind&&this._themeService.getFileIconTheme().hasFileIcons){o.icon.className="icon hide",o.iconContainer.className="icon hide";const e=k.getIconClasses(this._modelService,this._modeService,T.URI.from({scheme:"fake",path:r}),A.FileKind.FILE),t=k.getIconClasses(this._modelService,this._modeService,T.URI.from({scheme:"fake",path:s.detail}),A.FileKind.FILE);a.extraClasses=e.length>t.length?e:t}else 23===s.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(o.icon.className="icon hide",o.iconContainer.className="icon hide",a.extraClasses=L.flatten([k.getIconClasses(this._modelService,this._modeService,T.URI.from({scheme:"fake",path:r }),A.FileKind.FOLDER),k.getIconClasses(this._modelService,this._modeService,T.URI.from({scheme:"fake",path:s.detail}),A.FileKind.FOLDER)])):(o.icon.className="icon hide",o.iconContainer.className="",o.iconContainer.classList.add("suggest-icon",...I.completionKindToCssClass(s.kind).split(" ")));s.tags&&s.tags.indexOf(1)>=0&&(a.extraClasses=(a.extraClasses||[]).concat(["deprecated"]),a.matches=[]),o.iconLabel.setLabel(r,void 0,a),"string"==typeof s.label?(o.parametersLabel.textContent="",o.qualifierLabel.textContent="",o.detailsLabel.textContent=(s.detail||"").replace(/\n.*$/m,""),o.root.classList.add("string-label")):(o.parametersLabel.textContent=(s.label.parameters||"").replace(/\n.*$/m,""),o.qualifierLabel.textContent=(s.label.qualifier||"").replace(/\n.*$/m,""),o.detailsLabel.textContent=(s.label.type||"").replace(/\n.*$/m,""),o.root.classList.remove("string-label")),W(e)?(o.right.classList.add("can-expand-details"),d.show(o.readMore),o.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()}, o.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this.widget.toggleDetails()}):(o.right.classList.remove("can-expand-details"),d.hide(o.readMore),o.readMore.onmousedown=null,o.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};var K;U=o([r(3,D.IModelService),r(4,y.IModeService),r(5,S.IThemeService)],U),function(e){e[e.Hidden=0]="Hidden",e[e.Loading=1]="Loading",e[e.Empty=2]="Empty",e[e.Open=3]="Open",e[e.Frozen=4]="Frozen",e[e.Details=5]="Details"}(K||(K={}));class H{constructor(e,t,n,o,s){this.widget=t,this.editor=n,this.markdownRenderer=o,this.kbToggleDetails=s,this.borderWidth=1,this.disposables=new c.DisposableStore,this.el=d.append(e,d.$(".details")),this.disposables.add(c.toDisposable(()=>e.removeChild(this.el))),this.body=d.$(".body"),this.scrollbar=new u.DomScrollableElement(this.body,{}),d.append(this.el,this.scrollbar.getDomNode()),this.disposables.add(this.scrollbar),this.header=d.append(this.body,d.$(".header")), this.close=d.append(this.header,d.$("span"+P.Codicon.close.cssSelector)),this.close.title=i.localize(6,null,this.kbToggleDetails),this.type=d.append(this.header,d.$("p.type")),this.docs=d.append(this.body,d.$("p.docs")),this.configureFont(),a.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(e=>e.hasChanged(36)).on(this.configureFont,this,this.disposables),o.onDidRenderCodeBlock(()=>this.scrollbar.scanDomNode(),this,this.disposables)}get element(){return this.el}renderLoading(){this.type.textContent=i.localize(7,null),this.docs.textContent=""}renderItem(e,t){c.dispose(this.renderDisposeable),this.renderDisposeable=void 0;let{documentation:i,detail:n}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}${e.word?`, compared '${e.completion.filterText&&e.completion.filterText+" (filterText)"||e.completion.label}' with '${e.word}'`:" (no prefix)"}\n`,t+=`distance: ${e.distance}, see localityBonus-setting\n`, t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,i=(new M.MarkdownString).appendCodeblock("empty",t),n=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!W(e))return this.type.textContent="",this.docs.textContent="",void this.el.classList.add("no-docs");if(this.el.classList.remove("no-docs"),"string"==typeof i)this.docs.classList.remove("markdown-docs"),this.docs.textContent=i;else{this.docs.classList.add("markdown-docs"),this.docs.innerText="";const e=this.markdownRenderer.render(i);this.renderDisposeable=e,this.docs.appendChild(e.element)}n?(this.type.innerText=n.length>1e5?`${n.substr(0,1e5)}…`:n,d.show(this.type)):(this.type.innerText="",d.hide(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.el.style.userSelect="text",this.el.tabIndex=-1,this.close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this.close.onclick=e=>{e.preventDefault(),e.stopPropagation(), this.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode()}scrollDown(e=8){this.body.scrollTop+=e}scrollUp(e=8){this.body.scrollTop-=e}scrollTop(){this.body.scrollTop=0}scrollBottom(){this.body.scrollTop=this.body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}setBorderWidth(e){this.borderWidth=e}configureFont(){const e=this.editor.getOptions(),t=e.get(36),i=t.fontFamily,n=e.get(97)||t.fontSize,o=e.get(98)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.el.style.fontSize=r,this.el.style.fontWeight=s,this.el.style.fontFeatureSettings=t.fontFeatureSettings,this.type.style.fontFamily=i,this.close.style.height=a,this.close.style.width=a}dispose(){this.disposables.dispose(),c.dispose(this.renderDisposeable),this.renderDisposeable=void 0}}let G=class e{constructor(e,n,o,r,l,u,g,p,v,S){var _,y;this.editor=e,this.telemetryService=n,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.state=0,this.isAddedAsContentWidget=!1,this.isAuto=!1, this.loadingTimeout=c.Disposable.None,this.currentSuggestionDetails=null,this.ignoreFocusEvents=!1,this.completionModel=null,this.showTimeout=new E.TimeoutTimer,this.toDispose=new c.DisposableStore,this.onDidSelectEmitter=new a.Emitter,this.onDidFocusEmitter=new a.Emitter,this.onDidHideEmitter=new a.Emitter,this.onDidShowEmitter=new a.Emitter,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.firstFocusInCurrentList=!1,this.preferDocPositionTop=!1,this.docsPositionPreviousWidgetY=null,this.explainMode=!1,this._onDetailsKeydown=new a.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event;const w=this.toDispose.add(new C.MarkdownRenderer(e,g,p)),I=null!==(y=null===(_=o.lookupKeybinding("toggleSuggestionDetails"))||void 0===_?void 0:_.getLabel())&&void 0!==y?y:"";this.isAuto=!1,this.focusedItem=null,this.storageService=u, this.element=d.$(".editor-widget.suggest-widget"),this.toDispose.add(d.addDisposableListener(this.element,"click",e=>{e.target===this.element&&this.hideWidget()})),this.messageElement=d.append(this.element,d.$(".message")),this.listElement=d.append(this.element,d.$(".tree"));const x=()=>this.element.classList.toggle("with-status-bar",this.editor.getOption(96).statusBar.visible);x(),this.statusBarElement=d.append(this.element,d.$(".suggest-status-bar"));const k=e=>{const t=o.lookupKeybindings(e.id);return new class extends F.ActionViewItem{constructor(){super(void 0,e,{label:!0,icon:!1})}updateLabel(){if(L.isFalsyOrEmpty(t)||!this.label)return super.updateLabel();const{label:e}=this.getAction();this.label.textContent=/{\d}/.test(e)?s.format(this.getAction().label,t[0].getLabel()):`${this.getAction().label} (${t[0].getLabel()})`}}},D=new N.ActionBar(this.statusBarElement,{actionViewItemProvider:k}),T=new N.ActionBar(this.statusBarElement,{actionViewItemProvider:k}),R=v.createMenu(m.suggestWidgetStatusbarMenu,r) ;this.toDispose.add(R.onDidChange(()=>(()=>{const e=[],t=[];for(let[i,n]of R.getActions())"left"===i?e.push(...n):t.push(...n);D.clear(),D.push(e),T.clear(),T.push(t)})())),this.toDispose.add(R),this.details=S.createInstance(H,this.element,this,this.editor,w,I);const A=()=>this.element.classList.toggle("no-icons",!this.editor.getOption(96).showIcons);A();let M=S.createInstance(U,this,this.editor,I);this.list=new h.List("SuggestWidget",this.listElement,this,[M],{useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{const t="string"==typeof e.completion.label?e.completion.label:e.completion.label.name;if(e.isResolved&&this.expandDocsSettingFromStorage()){const{documentation:n,detail:o}=e.completion,r=s.format("{0}{1}",o||"",n?"string"==typeof n?n:n.value:"");return i.localize(10,null,t,r)}return t},getWidgetAriaLabel:()=>i.localize(11,null),getWidgetRole:()=>"listbox"}}),this.toDispose.add(f.attachListStyler(this.list,l,{ listInactiveFocusBackground:t.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:b.activeContrastBorder})),this.toDispose.add(l.onDidColorThemeChange(e=>this.onThemeChange(e))),this.toDispose.add(e.onDidLayoutChange(()=>this.onEditorLayoutChange())),this.toDispose.add(this.list.onMouseDown(e=>this.onListMouseDownOrTap(e))),this.toDispose.add(this.list.onTap(e=>this.onListMouseDownOrTap(e))),this.toDispose.add(this.list.onDidChangeSelection(e=>this.onListSelection(e))),this.toDispose.add(this.list.onDidChangeFocus(e=>this.onListFocus(e))),this.toDispose.add(this.editor.onDidChangeCursorSelection(()=>this.onCursorSelectionChanged())),this.toDispose.add(this.editor.onDidChangeConfiguration(e=>{e.hasChanged(96)&&(x(),A())})),this.ctxSuggestWidgetVisible=m.Context.Visible.bindTo(r),this.ctxSuggestWidgetDetailsVisible=m.Context.DetailsVisible.bindTo(r),this.ctxSuggestWidgetMultipleSuggestions=m.Context.MultipleSuggestions.bindTo(r),this.onThemeChange(l.getColorTheme()), this.toDispose.add(d.addStandardDisposableListener(this.details.element,"keydown",e=>{this._onDetailsKeydown.fire(e)})),this.toDispose.add(this.editor.onMouseDown(e=>this.onEditorMouseDown(e)))}onEditorMouseDown(e){this.details.element.contains(e.target.element)?this.details.element.focus():this.element.contains(e.target.element)&&this.editor.focus()}onCursorSelectionChanged(){0!==this.state&&this.editor.layoutContentWidget(this)}onEditorLayoutChange(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()}onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this.select(e.element,e.index))}onListSelection(e){e.elements.length&&this.select(e.elements[0],e.indexes[0])}select(e,t){const i=this.completionModel;i&&(this.onDidSelectEmitter.fire({item:e,index:t,model:i}),this.editor.focus())}onThemeChange(e){const i=e.getColor(t.editorSuggestWidgetBackground) ;i&&(this.listElement.style.backgroundColor=i.toString(),this.statusBarElement.style.backgroundColor=i.toString(),this.details.element.style.backgroundColor=i.toString(),this.messageElement.style.backgroundColor=i.toString());const n=e.getColor(t.editorSuggestWidgetBorder);n&&(this.listElement.style.borderColor=n.toString(),this.statusBarElement.style.borderColor=n.toString(),this.details.element.style.borderColor=n.toString(),this.messageElement.style.borderColor=n.toString(),this.detailsBorderColor=n.toString());const o=e.getColor(b.focusBorder);o&&(this.detailsFocusBorderColor=o.toString()),this.details.setBorderWidth("hc"===e.type?2:1)}onListFocus(e){if(this.ignoreFocusEvents)return;if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this.completionModel)return;const t=e.elements[0],i=e.indexes[0] ;this.firstFocusInCurrentList=!this.focusedItem,t!==this.focusedItem&&(this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null),this.focusedItem=t,this.list.reveal(i),this.currentSuggestionDetails=E.createCancelablePromise(async e=>{const i=E.disposableTimeout(()=>this.showDetails(!0),250);e.onCancellationRequested(()=>i.dispose());const n=await t.resolve(e);return i.dispose(),n}),this.currentSuggestionDetails.then(()=>{i>=this.list.length||t!==this.list.element(i)||(this.ignoreFocusEvents=!0,this.list.splice(i,1,[t]),this.list.setFocus([i]),this.ignoreFocusEvents=!1,this.expandDocsSettingFromStorage()?this.showDetails(!1):this.element.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:z(i)}))}).catch(l.onUnexpectedError)),this.onDidFocusEmitter.fire({item:t,index:i,model:this.completionModel})}setState(t){if(!this.element)return;this.isAddedAsContentWidget||0===t||(this.isAddedAsContentWidget=!0,this.editor.addContentWidget(this)) ;const i=this.state!==t;switch(this.state=t,this.element.classList.toggle("frozen",4===t),t){case 0:d.hide(this.messageElement,this.details.element,this.listElement,this.statusBarElement),this.hide(),this.listHeight=0,i&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,d.hide(this.listElement,this.details.element,this.statusBarElement),d.show(this.messageElement),this.element.classList.remove("docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,d.hide(this.listElement,this.details.element,this.statusBarElement),d.show(this.messageElement),this.element.classList.remove("docs-side"),this.show(),this.focusedItem=null;break;case 3:d.hide(this.messageElement),d.show(this.listElement,this.statusBarElement),this.show();break;case 4:d.hide(this.messageElement),d.show(this.listElement),this.show();break;case 5:d.hide(this.messageElement), d.show(this.details.element,this.listElement,this.statusBarElement),this.show()}}showTriggered(e,t){0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=E.disposableTimeout(()=>this.setState(1),t)))}showSuggestions(e,t,i,n){if(this.preferDocPositionTop=!1,this.docsPositionPreviousWidgetY=null,this.loadingTimeout.dispose(),this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null),this.completionModel!==e&&(this.completionModel=e),i&&2!==this.state&&0!==this.state)return void this.setState(4);let o=this.completionModel.items.length;const s=0===o;if(this.ctxSuggestWidgetMultipleSuggestions.set(o>1),s)n?this.setState(0):this.setState(2),this.completionModel=null;else{if(3!==this.state){const{stats:e}=this.completionModel;e.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",Object.assign({},e))}this.focusedItem=null,this.list.splice(0,this.list.length,this.completionModel.items),i?this.setState(4):this.setState(3), this.list.reveal(t,0),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}selectNextPage(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}}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.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.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.scrollTop(),!0;case 1:return!this.isAuto;default: return this.list.focusFirst(),!0}}getFocusedItem(){if(0!==this.state&&2!==this.state&&1!==this.state&&this.completionModel)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}}toggleDetailsFocus(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog2("suggestWidget:toggleDetailsFocus")}toggleDetails(){if(W(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.ctxSuggestWidgetDetailsVisible.set(!1),this.updateExpandDocsSetting(!1),d.hide(this.details.element),this.element.classList.remove("docs-side","doc-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog2("suggestWidget:collapseDetails");else{ if(3!==this.state&&5!==this.state&&4!==this.state)return;this.ctxSuggestWidgetDetailsVisible.set(!0),this.updateExpandDocsSetting(!0),this.showDetails(!1),this.telemetryService.publicLog2("suggestWidget:expandDetails")}}showDetails(e){e||this.expandSideOrBelow(),d.show(this.details.element),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",e?this.details.renderLoading():this.details.renderItem(this.list.getFocusedElements()[0],this.explainMode),this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus()}toggleExplainMode(){this.list.getFocusedElements()[0]&&this.expandDocsSettingFromStorage()&&(this.explainMode=!this.explainMode,this.showDetails(!1))}show(){const e=this.updateListHeight();e!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=e),this.ctxSuggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet(()=>{this.element.classList.add("visible"),this.onDidShowEmitter.fire(this)},100)}hide(){ this.editor.layoutContentWidget(this),this.ctxSuggestWidgetVisible.reset(),this.ctxSuggestWidgetMultipleSuggestions.reset(),this.element.classList.remove("visible")}hideWidget(){this.loadingTimeout.dispose(),this.setState(0),this.onDidHideEmitter.fire(this)}getPosition(){if(0===this.state)return null;let e=[2,1];return this.preferDocPositionTop&&(e=[1]),{position:this.editor.getPosition(),preference:e}}getDomNode(){return this.element}getId(){return e.ID}isFrozen(){return 4===this.state}updateListHeight(){let e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{const t=this.list.contentHeight/this.unfocusedHeight,{maxVisibleSuggestions:i}=this.editor.getOption(96);e=Math.min(t,i)*this.unfocusedHeight}return this.element.style.lineHeight=`${this.unfocusedHeight}px`,this.listElement.style.height=`${e}px`,this.statusBarElement.style.top=`${e}px`,this.list.layout(e),e}adjustDocsPosition(){if(!this.editor.hasModel())return ;const e=this.editor.getOption(51),t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),i=d.getDomNodePagePosition(this.editor.getDomNode()),n=i.left+t.left,o=i.top+t.top+t.height,s=d.getDomNodePagePosition(this.element),r=s.left,a=s.top;if(this.docsPositionPreviousWidgetY&&this.docsPositionPreviousWidgetYa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=`${this.details.element.offsetHeight-this.listElement.offsetHeight}px`)}expandSideOrBelow(){if(!W(this.focusedItem)&&this.firstFocusInCurrentList)return void this.element.classList.remove("docs-side","docs-below");let e=this.element.style.maxWidth.match(/(\d+)px/) ;!e||Number(e[1]){const n=e.getColor(t.editorSuggestWidgetHighlightForeground);n&&i.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${n}; }`);const o=e.getColor(t.editorSuggestWidgetForeground);o&&i.addRule(`.monaco-editor .suggest-widget { color: ${o}; }`);const s=e.getColor(b.textLinkForeground);s&&i.addRule(`.monaco-editor .suggest-widget a { color: ${s}; }`);const r=e.getColor(b.textCodeBlockBackground);r&&i.addRule(`.monaco-editor .suggest-widget code { background-color: ${r}; }`)})})),define(e[1586],t([0,1,1027,14,15,31,21,2,37,18,58,129,75,45,8,27,11,103]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.getOccurrencesAtPosition=void 0;const _=f.registerColor("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},i.localize(0,null),!0),C=f.registerColor("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.localize(1,null),!0),y=f.registerColor("editor.wordHighlightBorder",{light:null,dark:null,hc:f.activeContrastBorder},i.localize(2,null)),w=f.registerColor("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:f.activeContrastBorder},i.localize(3,null)),E=f.registerColor("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.localize(4,null),!0),I=f.registerColor("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.localize(5,null),!0),x=new v.RawContextKey("hasWordHighlights",!1);function k(e,t,i){const o=m.DocumentHighlightProviderRegistry.ordered(e) ;return s.first(o.map(n=>()=>Promise.resolve(n.provideDocumentHighlights(e,t,i)).then(void 0,l.onUnexpectedExternalError)),n.isNonEmptyArray)}t.getOccurrencesAtPosition=k;class D{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=s.createCancelablePromise(n=>this._compute(e,t,i,n))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new h.Range(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let t=0,r=i.length;!a&&t=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class T extends D{_compute(e,t,i,n){return k(e,t.getPosition(),n).then(e=>e||[])}}class R extends D{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){ return s.timeout(250,n).then(()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());return!n||n.word.length>1e3?[]:e.findMatches(n.word,!0,!1,!0,i,!1).map(e=>({range:e.range,kind:m.DocumentHighlightKind.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}d.registerModelAndPositionCommand("_executeDocumentHighlights",(e,t)=>k(e,t,a.CancellationToken.None));class A{constructor(e,t){this.toUnhook=new c.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=x.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(63),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)})),this.toUnhook.add(e.onDidChangeModelContent(e=>{this._stopAll()})), this.toUnhook.add(e.onDidChangeConfiguration(e=>{let t=this.editor.getOption(63);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return n.coalesce(this._decorationIds.map(e=>this.model.getDecorationRange(e)).sort(h.Range.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);b.alert(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{ this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);b.alert(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){ this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())},l.onUnexpectedError)}var s,r,a}_beginRenderDecorations(){let e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:A._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===m.DocumentHighlightKind.Write?this._WRITE_OPTIONS:e===m.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}A._WRITE_OPTIONS=p.ModelDecorationOptions.register({stickiness:1, className:"wordHighlightStrong",overviewRuler:{color:S.themeColorFromId(I),position:g.OverviewRulerLane.Center}}),A._TEXT_OPTIONS=p.ModelDecorationOptions.register({stickiness:1,className:"selectionHighlight",overviewRuler:{color:S.themeColorFromId(f.overviewRulerSelectionHighlightForeground),position:g.OverviewRulerLane.Center}}),A._REGULAR_OPTIONS=p.ModelDecorationOptions.register({stickiness:1,className:"wordHighlight",overviewRuler:{color:S.themeColorFromId(E),position:g.OverviewRulerLane.Center}});let M=class e extends c.Disposable{constructor(e,t){super(),this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new A(e,t))};this._register(e.onDidChangeModel(e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}static get(t){return t.getContribution(e.ID)}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){ this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};M.ID="editor.contrib.wordHighlighter",M=o([r(1,v.IContextKeyService)],M);class L extends d.EditorAction{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=M.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class O extends d.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:i.localize(8,null),alias:"Trigger Symbol Highlight",precondition:x.toNegated(),kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=M.get(t);n&&n.restoreViewState(!0)}}d.registerEditorContribution(M.ID,M),d.registerEditorAction(class extends L{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:i.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:x,kbOpts:{ kbExpr:u.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}),d.registerEditorAction(class extends L{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:i.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:x,kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}),d.registerEditorAction(O),S.registerThemingParticipant((e,t)=>{const i=e.getColor(f.editorSelectionHighlight);i&&(t.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${i}; }`),t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`));const n=e.getColor(_);n&&t.addRule(`.monaco-editor .wordHighlight { background-color: ${n}; }`);const o=e.getColor(C);o&&t.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${o}; }`);const s=e.getColor(f.editorSelectionHighlightBorder);s&&t.addRule(`.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${s}; box-sizing: border-box; }`) ;const r=e.getColor(y);r&&t.addRule(`.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; box-sizing: border-box; }`);const a=e.getColor(w);a&&t.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }`)})})),define(e[94],t([0,1,7,99,30,6,212,2,12,1028,20,36,35,28,11,100,302]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubmenuEntryActionViewItem=t.MenuEntryActionViewItem=t.createAndFillInActionBarActions=t.createAndFillInContextMenuActions=void 0;class b extends a.Emitter{constructor(e){super(),this._subscriptions=new c.DisposableStore,this._isPressed=!1,this._suppressAltKeyUp=!1,this._subscriptions.add(n.domEvent(document.body,"keydown")(e=>{this.isPressed=e.altKey||(d.isWindows||d.isLinux)&&e.shiftKey})),this._subscriptions.add(n.domEvent(document.body,"keyup")(e=>{this.isPressed&&this._suppressAltKeyUp&&e.preventDefault(), this._suppressAltKeyUp=!1,this.isPressed=!1})),this._subscriptions.add(n.domEvent(document.body,"mouseleave")(e=>this.isPressed=!1)),this._subscriptions.add(n.domEvent(document.body,"blur")(e=>this.isPressed=!1)),this._subscriptions.add(e.onDidContextMenu(()=>this.isPressed=!1))}get isPressed(){return this._isPressed}set isPressed(e){this._isPressed=e,this.fire(this._isPressed)}suppressAltKeyUp(){this._suppressAltKeyUp=!0}static getInstance(e){return b.instance||(b.instance=new b(e)),b.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function _(e){const t=new c.DisposableStore;for(const[,i]of e)for(const e of i)t.add(e);return t}function C(e,t,i,n=(e=>"navigation"===e)){for(let o of e){let[e,r]=o;if(i&&(r=r.map(e=>e instanceof u.MenuItemAction&&e.alt?e.alt:e)),n(e)){(Array.isArray(t)?t:t.primary).unshift(...r)}else{const e=Array.isArray(t)?t:t.secondary;e.length>0&&e.push(new s.Separator),e.push(...r)}}}t.createAndFillInContextMenuActions=function(e,t,i,n,o){const s=e.getActions(t) ;return C(s,i,b.getInstance(n).isPressed,o),_(s)},t.createAndFillInActionBarActions=function(e,t,i,n){const o=e.getActions(t);return C(o,i,!1,n),_(o)};const y=new l.IdGenerator("menu-item-action-item-icon-"),w=new Map;let E=class extends f.ActionViewItem{constructor(e,t,i,n){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}),this._action=e,this._keybindingService=t,this._notificationService=i,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new c.MutableDisposable),this._altKey=b.getInstance(n)}get _commandAction(){return this._wantsAltCommand&&this._action.alt||this._action}onClick(e){e.preventDefault(),e.stopPropagation(),this._altKey.isPressed&&this._altKey.suppressAltKeyUp(),this.actionRunner.run(this._commandAction,this._context).then(void 0,e=>this._notificationService.error(e))}render(e){super.render(e),this._updateItemClass(this._action.item);let t=!1,i=this._altKey.isPressed;const o=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e, this.updateLabel(),this.updateTooltip(),this.updateClass())};this._action.alt&&this._register(this._altKey.event(e=>{i=e,o()})),this._register(n.domEvent(e,"mouseleave")(e=>{t=!1,o()})),this._register(n.domEvent(e,"mouseenter")(e=>{t=!0,o()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;this.label.title=t?h.localize(0,null,i,t):i}}updateClass(){this.options.icon&&(this._commandAction!==this._action?this._action.alt&&this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))}_updateItemClass(e){var t,n;this._itemClassDispose.value=void 0;const o=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(v.ThemeIcon.isThemeIcon(o)){const e=v.ThemeIcon.asClassName(o) ;this.label&&e&&(this.label.classList.add(...e.split(" ")),this._itemClassDispose.value=c.toDisposable(()=>{this.label&&this.label.classList.remove(...e.split(" "))}))}else if(o){let e;if(null===(n=o.dark)||void 0===n?void 0:n.scheme){const t=o.dark.toString();w.has(t)?e=w.get(t):(e=y.nextId(),i.createCSSRule(`.icon.${e}`,`background-image: ${i.asCSSUrl(o.light||o.dark)}`),i.createCSSRule(`.vs-dark .icon.${e}, .hc-black .icon.${e}`,`background-image: ${i.asCSSUrl(o.dark)}`),w.set(t,e)),this.label&&(this.label.classList.add("icon",...e.split(" ")),this._itemClassDispose.value=c.toDisposable(()=>{this.label&&this.label.classList.remove("icon",...e.split(" "))}))}}}};E=o([r(1,p.IKeybindingService),r(2,m.INotificationService),r(3,g.IContextMenuService)],E),t.MenuEntryActionViewItem=E;let I=class extends S.DropdownMenuActionViewItem{constructor(e,t,n){var o;let s ;if(e.item.icon)if(v.ThemeIcon.isThemeIcon(e.item.icon))s=v.ThemeIcon.asClassName(e.item.icon);else if(null===(o=e.item.icon.dark)||void 0===o?void 0:o.scheme){const t=e.item.icon.dark.toString();if(w.has(t))s=["icon",w.get(t)];else{const n=y.nextId();s=["icon",n],i.createCSSRule(`.icon.${n}`,`background-image: ${i.asCSSUrl(e.item.icon.light||e.item.icon.dark)}`),i.createCSSRule(`.vs-dark .icon.${n}, .hc-black .icon.${n}`,`background-image: ${i.asCSSUrl(e.item.icon.dark)}`),w.set(t,n)}}super(e,e.actions,n,{classNames:s})}};I=o([r(1,m.INotificationService),r(2,g.IContextMenuService)],I),t.SubmenuEntryActionViewItem=I})),define(e[188],t([0,1,7,78,30,55,6,41,72,241,353,1014,8,5,33,37,27,44,20,94,799]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C){"use strict";var y;Object.defineProperty(t,"__esModule",{value:!0}), t.peekViewEditorMatchHighlightBorder=t.peekViewEditorMatchHighlight=t.peekViewResultsMatchHighlight=t.peekViewEditorGutterBackground=t.peekViewEditorBackground=t.peekViewResultsSelectionForeground=t.peekViewResultsSelectionBackground=t.peekViewResultsFileForeground=t.peekViewResultsMatchForeground=t.peekViewResultsBackground=t.peekViewBorder=t.peekViewTitleInfoForeground=t.peekViewTitleForeground=t.peekViewTitleBackground=t.PeekViewWidget=t.getOuterEditor=t.PeekContext=t.IPeekViewService=void 0,t.IPeekViewService=m.createDecorator("IPeekViewService"),v.registerSingleton(t.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose(()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))})})}}),function(e){e.inPeekEditor=new p.RawContextKey("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated() }(y=t.PeekContext||(t.PeekContext={}));let w=class{constructor(e,t){e instanceof h.EmbeddedCodeEditorWidget&&y.inPeekEditor.bindTo(t)}dispose(){}};w.ID="editor.contrib.referenceController",w=o([r(1,p.IContextKeyService)],w),f.registerEditorContribution(w.ID,w),t.getOuterEditor=function(e){let t=e.get(d.ICodeEditorService).getFocusedCodeEditor();return t instanceof h.EmbeddedCodeEditorWidget?t.getParentEditor():t};const E={headerBackgroundColor:a.Color.white,primaryHeadingColor:a.Color.fromHex("#333333"),secondaryHeadingColor:a.Color.fromHex("#6c6c6cb3")};let I=class extends u.ZoneWidget{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new l.Emitter,this.onDidClose=this._onDidClose.event,c.mixin(this.options,E,!1)}dispose(){super.dispose(),this._onDidClose.fire(this)}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor), e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=i.$(".head"),this._bodyElement=i.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const o=i.$(".peekview-title");i.append(this._headElement,o),i.addStandardDisposableListener(o,"click",e=>this._onTitleClick(e)),this._fillTitleIcon(o), this._primaryHeading=i.$("span.filename"),this._secondaryHeading=i.$("span.dirname"),this._metaHeading=i.$("span.meta"),i.append(o,this._primaryHeading,this._secondaryHeading,this._metaHeading);const r=i.$(".peekview-actions");i.append(this._headElement,r);const a=this._getActionBarOptions();this._actionbarWidget=new n.ActionBar(r,a),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new s.Action("peekview.close",g.localize(0,null),b.Codicon.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:e=>e instanceof _.MenuItemAction?this.instantiationService.createInstance(C.MenuEntryActionViewItem,e):e instanceof _.SubmenuItemAction?this.instantiationService.createInstance(C.SubmenuEntryActionViewItem,e):void 0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("aria-label",e), t?this._secondaryHeading.innerText=t:i.clearNode(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,i.show(this._metaHeading)):i.hide(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(51)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};I=o([r(2,m.IInstantiationService)],I),t.PeekViewWidget=I,t.peekViewTitleBackground=S.registerColor("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},g.localize(1,null)),t.peekViewTitleForeground=S.registerColor("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},g.localize(2,null)), t.peekViewTitleInfoForeground=S.registerColor("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},g.localize(3,null)),t.peekViewBorder=S.registerColor("peekView.border",{dark:"#007acc",light:"#007acc",hc:S.contrastBorder},g.localize(4,null)),t.peekViewResultsBackground=S.registerColor("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:a.Color.black},g.localize(5,null)),t.peekViewResultsMatchForeground=S.registerColor("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:a.Color.white},g.localize(6,null)),t.peekViewResultsFileForeground=S.registerColor("peekViewResult.fileForeground",{dark:a.Color.white,light:"#1E1E1E",hc:a.Color.white},g.localize(7,null)),t.peekViewResultsSelectionBackground=S.registerColor("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},g.localize(8,null)),t.peekViewResultsSelectionForeground=S.registerColor("peekViewResult.selectionForeground",{dark:a.Color.white,light:"#6C6C6C",hc:a.Color.white },g.localize(9,null)),t.peekViewEditorBackground=S.registerColor("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:a.Color.black},g.localize(10,null)),t.peekViewEditorGutterBackground=S.registerColor("peekViewEditorGutter.background",{dark:t.peekViewEditorBackground,light:t.peekViewEditorBackground,hc:t.peekViewEditorBackground},g.localize(11,null)),t.peekViewResultsMatchHighlight=S.registerColor("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},g.localize(12,null)),t.peekViewEditorMatchHighlight=S.registerColor("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},g.localize(13,null)),t.peekViewEditorMatchHighlightBorder=S.registerColor("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:S.activeContrastBorder},g.localize(14,null))})),define(e[1587],t([0,1,1550,36,23,6,28,11,35,2]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuService=void 0 ;let u=class extends h.Disposable{constructor(e,t,n,o,s){super(),this._onDidContextMenu=this._register(new a.Emitter),this.onDidContextMenu=this._onDidContextMenu.event,this.contextMenuHandler=new i.ContextMenuHandler(n,e,t,o,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()}};u=o([r(0,s.ITelemetryService),r(1,l.INotificationService),r(2,n.IContextViewService),r(3,d.IKeybindingService),r(4,c.IThemeService)],u),t.ContextMenuService=u})),define(e[69],t([0,1,7,521,175,6,2,1038,9,57,8,5,35,16,59,11,156,415,416,550,105]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.WorkbenchCompressibleAsyncDataTree=t.WorkbenchAsyncDataTree=t.WorkbenchDataTree=t.WorkbenchCompressibleObjectTree=t.WorkbenchObjectTree=t.ListResourceNavigator=t.getSelectionKeyboardEvent=t.WorkbenchPagedList=t.WorkbenchList=t.automaticKeyboardNavigationSettingKey=t.keyboardNavigationSettingKey=t.horizontalScrollingKey=t.openModeSettingKey=t.multiSelectModifierSettingKey=t.didBindWorkbenchListAutomaticKeyboardNavigation=t.WorkbenchListAutomaticKeyboardNavigation=t.WorkbenchListAutomaticKeyboardNavigationKey=t.WorkbenchListSupportsKeyboardNavigation=t.WorkbenchListMultiSelection=t.WorkbenchListDoubleSelection=t.WorkbenchListHasSelectionOrFocus=t.WorkbenchListFocusContextKey=t.WorkbenchListSupportsMultiSelectContextKey=t.ListService=t.IListService=void 0,t.IListService=g.createDecorator("listService");let w=class{constructor(e){this._themeService=e,this.disposables=new l.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){ return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new s.DefaultStyleController(i.createStyleSheet(),"");this.disposables.add(v.attachListStyler(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),l.combinedDisposable(e.onDidFocus(()=>this._lastFocusedWidget=e),l.toDisposable(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==n),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};w=o([r(0,f.IThemeService)],w),t.ListService=w;const E=new u.RawContextKey("listFocus",!0);function I(e,t){const i=e.createScoped(t.getHTMLElement());return E.bindTo(i),i} t.WorkbenchListSupportsMultiSelectContextKey=new u.RawContextKey("listSupportsMultiselect",!0),t.WorkbenchListFocusContextKey=u.ContextKeyExpr.and(E,u.ContextKeyExpr.not(S.InputFocusedContextKey)),t.WorkbenchListHasSelectionOrFocus=new u.RawContextKey("listHasSelectionOrFocus",!1),t.WorkbenchListDoubleSelection=new u.RawContextKey("listDoubleSelection",!1),t.WorkbenchListMultiSelection=new u.RawContextKey("listMultiSelection",!1),t.WorkbenchListSupportsKeyboardNavigation=new u.RawContextKey("listSupportsKeyboardNavigation",!0),t.WorkbenchListAutomaticKeyboardNavigationKey="listAutomaticKeyboardNavigation",t.WorkbenchListAutomaticKeyboardNavigation=new u.RawContextKey(t.WorkbenchListAutomaticKeyboardNavigationKey,!0),t.didBindWorkbenchListAutomaticKeyboardNavigation=!1,t.multiSelectModifierSettingKey="workbench.list.multiSelectModifier",t.openModeSettingKey="workbench.list.openMode",t.horizontalScrollingKey="workbench.list.horizontalScrolling",t.keyboardNavigationSettingKey="workbench.list.keyboardNavigation", t.automaticKeyboardNavigationSettingKey="workbench.list.automaticKeyboardNavigation";const x="workbench.tree.indent",k="workbench.tree.renderIndentGuides",D="workbench.list.smoothScrolling";function T(e){return"alt"===e.getValue(t.multiSelectModifierSettingKey)}class R extends l.Disposable{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=T(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(t.multiSelectModifierSettingKey)&&(this.useAltAsMultipleSelectionModifier=T(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:s.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return s.isSelectionRangeChangeEvent(e)}}function A(e,t,i){const n=new l.DisposableStore,o=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){const e=new R(t);o.multipleSelectionController=e, n.add(e)}return o.keyboardNavigationDelegate={mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},o.smoothScrolling=t.getValue(D),[o,n]}let M=class extends s.List{constructor(e,i,n,o,s,r,a,l,c,d){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:c.getValue(t.horizontalScrollingKey),[u,g]=A(s,c,d);super(e,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},v.computeStyles(l.getColorTheme(),v.defaultListStyles)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=I(r,this),this.themeService=l,t.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(!(!1===s.multipleSelectionSupport)),this.listHasSelectionOrFocus=t.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=t.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=t.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling, this._useAltAsMultipleSelectionModifier=T(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(c.onDidChangeConfiguration(e=>{e.affectsConfiguration(t.multiSelectModifierSettingKey)&&(this._useAltAsMultipleSelectionModifier=T(c));let i={};if(e.affectsConfiguration(t.horizontalScrollingKey)&&void 0===this.horizontalScrolling){const e=c.getValue(t.horizontalScrollingKey);i=Object.assign(Object.assign({},i),{horizontalScrolling:e})}if(e.affectsConfiguration(D)){ const e=c.getValue(D);i=Object.assign(Object.assign({},i),{smoothScrolling:e})}Object.keys(i).length>0&&this.updateOptions(i)}))}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}dispose(){super.dispose(),this._styler&&this._styler.dispose()}updateStyles(e){this._styler&&this._styler.dispose(),this._styler=v.attachListStyler(this,this.themeService,e)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}};M=o([r(5,u.IContextKeyService),r(6,t.IListService),r(7,f.IThemeService),r(8,d.IConfigurationService),r(9,p.IKeybindingService)],M),t.WorkbenchList=M;let L=class extends n.PagedList{constructor(e,i,n,o,s,r,a,c,d,h){const u=void 0!==s.horizontalScrolling?s.horizontalScrolling:d.getValue(t.horizontalScrollingKey),[g,p]=A(s,d,h);super(e,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},v.computeStyles(c.getColorTheme(),v.defaultListStyles)),g),{horizontalScrolling:u})),this.disposables=new l.DisposableStore, this.disposables.add(p),this.contextKeyService=I(r,this),this.horizontalScrolling=s.horizontalScrolling,t.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(!(!1===s.multipleSelectionSupport)),this._useAltAsMultipleSelectionModifier=T(d),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.disposables.add(v.attachListStyler(this,c,s.overrideStyles)),this.disposables.add(d.onDidChangeConfiguration(e=>{e.affectsConfiguration(t.multiSelectModifierSettingKey)&&(this._useAltAsMultipleSelectionModifier=T(d));let i={};if(e.affectsConfiguration(t.horizontalScrollingKey)&&void 0===this.horizontalScrolling){const e=d.getValue(t.horizontalScrollingKey);i=Object.assign(Object.assign({},i),{horizontalScrolling:e})}if(e.affectsConfiguration(D)){const e=d.getValue(D);i=Object.assign(Object.assign({},i),{smoothScrolling:e})}Object.keys(i).length>0&&this.updateOptions(i)}))}get useAltAsMultipleSelectionModifier(){ return this._useAltAsMultipleSelectionModifier}dispose(){super.dispose(),this.disposables.dispose()}};L=o([r(5,u.IContextKeyService),r(6,t.IListService),r(7,f.IThemeService),r(8,d.IConfigurationService),r(9,p.IKeybindingService)],L),t.WorkbenchPagedList=L,t.getSelectionKeyboardEvent=function(e="keydown",t){const i=new KeyboardEvent(e);return i.preserveFocus=t,i};class O extends l.Disposable{constructor(e,i){var n,o;super(),this.widget=e,this._onDidOpen=new a.Emitter,this.onDidOpen=this._onDidOpen.event,this.openOnFocus=null!==(n=null==i?void 0:i.openOnFocus)&&void 0!==n&&n,this._register(a.Event.filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.browserEvent))), this.openOnFocus&&this._register(a.Event.filter(this.widget.onDidChangeFocus,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onFocusFromKeyboard(e))),"boolean"!=typeof(null==i?void 0:i.openOnSingleClick)&&(null==i?void 0:i.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==i?void 0:i.configurationService.getValue(t.openModeSettingKey)),this._register(null==i?void 0:i.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick="doubleClick"!==(null==i?void 0:i.configurationService.getValue(t.openModeSettingKey))}))):this.openOnSingleClick=null===(o=null==i?void 0:i.openOnSingleClick)||void 0===o||o}onFocusFromKeyboard(e){const t=this.widget.getFocus();this.widget.setSelection(t,e.browserEvent);const i="boolean"!=typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus;this._open(i,!1,!1,e.browserEvent)}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t="boolean"!=typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus ;this._open(t,!1,!1,e.browserEvent)}onPointer(e){if(!this.openOnSingleClick)return;if(2===e.detail)return;const t=1===e.button,i=e.ctrlKey||e.metaKey||e.altKey;this._open(!0,t,i,e)}onMouseDblClick(e){if(!e)return;const t=e.ctrlKey||e.metaKey||e.altKey;this._open(!1,!0,t,e)}_open(e,t,i,n){this._onDidOpen.fire({editorOptions:{preserveFocus:e,pinned:t,revealIfVisible:!0},sideBySide:i,element:this.widget.getSelection()[0],browserEvent:n})}}t.ListResourceNavigator=class extends O{constructor(e,t){super(e,t)}};class N extends O{constructor(e,t){super(e,t)}}function P(e,t){let i=!1;return n=>{if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let F=class extends b.ObjectTree{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=U(t,o,s,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new K(this,o,u,o.overrideStyles,s,r,a,l,d),this.disposables.add(this.internals)}get contextKeyService(){ return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}};F=o([r(5,u.IContextKeyService),r(6,t.IListService),r(7,f.IThemeService),r(8,d.IConfigurationService),r(9,p.IKeybindingService),r(10,y.IAccessibilityService)],F),t.WorkbenchObjectTree=F;let B=class extends b.CompressibleObjectTree{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=U(t,o,s,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new K(this,o,u,o.overrideStyles,s,r,a,l,d),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}} ;B=o([r(5,u.IContextKeyService),r(6,t.IListService),r(7,f.IThemeService),r(8,d.IConfigurationService),r(9,p.IKeybindingService),r(10,y.IAccessibilityService)],B),t.WorkbenchCompressibleObjectTree=B;let V=class extends C.DataTree{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=U(t,s,r,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new K(this,s,g,s.overrideStyles,r,a,l,c,h),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};V=o([r(6,u.IContextKeyService),r(7,t.IListService),r(8,f.IThemeService),r(9,d.IConfigurationService),r(10,p.IKeybindingService),r(11,y.IAccessibilityService)],V),t.WorkbenchDataTree=V ;let W=class extends _.AsyncDataTree{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=U(t,s,r,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new K(this,s,g,s.overrideStyles,r,a,l,c,h),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};W=o([r(6,u.IContextKeyService),r(7,t.IListService),r(8,f.IThemeService),r(9,d.IConfigurationService),r(10,p.IKeybindingService),r(11,y.IAccessibilityService)],W),t.WorkbenchAsyncDataTree=W;let z=class extends _.CompressibleAsyncDataTree{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=U(t,r,a,d,h,u);super(e,t,i,n,o,s,g),this.disposables.add(m), this.internals=new K(this,r,p,r.overrideStyles,a,l,c,d,u),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}};function U(e,i,n,o,s,r){t.WorkbenchListSupportsKeyboardNavigation.bindTo(n),t.didBindWorkbenchListAutomaticKeyboardNavigation||(t.WorkbenchListAutomaticKeyboardNavigation.bindTo(n),t.didBindWorkbenchListAutomaticKeyboardNavigation=!0);const a=()=>{let e=n.getContextKeyValue(t.WorkbenchListAutomaticKeyboardNavigationKey);return e&&(e=o.getValue(t.automaticKeyboardNavigationSettingKey)),e},l=r.isScreenReaderOptimized()?"simple":o.getValue(t.keyboardNavigationSettingKey),c=void 0!==i.horizontalScrolling?i.horizontalScrolling:o.getValue(t.horizontalScrollingKey),[d,h]=A(i,o,s),u=i.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1 },d),{indent:o.getValue(x),renderIndentGuides:o.getValue(k),smoothScrolling:o.getValue(D),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===l,filterOnType:"filter"===l,horizontalScrolling:c,keyboardNavigationEventFilter:P(e,s),additionalScrollHeight:u,hideTwistiesOfChildlessElements:i.hideTwistiesOfChildlessElements,expandOnlyOnDoubleClick:"doubleClick"===o.getValue(t.openModeSettingKey)})}}z=o([r(7,u.IContextKeyService),r(8,t.IListService),r(9,f.IThemeService),r(10,d.IConfigurationService),r(11,p.IKeybindingService),r(12,y.IAccessibilityService)],z),t.WorkbenchCompressibleAsyncDataTree=z;let K=class{constructor(e,i,n,o,s,r,a,l,c){this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=I(s,e),t.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(!(!1===i.multipleSelectionSupport)),this.hasSelectionOrFocus=t.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService), this.hasDoubleSelection=t.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=t.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=T(l);const d=new Set;d.add(t.WorkbenchListAutomaticKeyboardNavigationKey);const h=()=>{const i=c.isScreenReaderOptimized()?"simple":l.getValue(t.keyboardNavigationSettingKey);e.updateOptions({simpleKeyboardNavigation:"simple"===i,filterOnType:"filter"===i})};this.updateStyleOverrides(o),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0)}),l.onDidChangeConfiguration(o=>{let s={} ;if(o.affectsConfiguration(t.multiSelectModifierSettingKey)&&(this._useAltAsMultipleSelectionModifier=T(l)),o.affectsConfiguration(x)){const e=l.getValue(x);s=Object.assign(Object.assign({},s),{indent:e})}if(o.affectsConfiguration(k)){const e=l.getValue(k);s=Object.assign(Object.assign({},s),{renderIndentGuides:e})}if(o.affectsConfiguration(D)){const e=l.getValue(D);s=Object.assign(Object.assign({},s),{smoothScrolling:e})}if(o.affectsConfiguration(t.keyboardNavigationSettingKey)&&h(),o.affectsConfiguration(t.automaticKeyboardNavigationSettingKey)&&(s=Object.assign(Object.assign({},s),{automaticKeyboardNavigation:n()})),o.affectsConfiguration(t.horizontalScrollingKey)&&void 0===i.horizontalScrolling){const e=l.getValue(t.horizontalScrollingKey);s=Object.assign(Object.assign({},s),{horizontalScrolling:e})}o.affectsConfiguration(t.openModeSettingKey)&&(s=Object.assign(Object.assign({},s),{expandOnlyOnDoubleClick:"doubleClick"===l.getValue(t.openModeSettingKey)})),Object.keys(s).length>0&&e.updateOptions(s) }),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(d)&&e.updateOptions({automaticKeyboardNavigation:n()})}),c.onDidChangeScreenReaderOptimized(()=>h())),this.navigator=new N(e,Object.assign({configurationService:l},i)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}updateStyleOverrides(e){l.dispose(this.styler),this.styler=e?v.attachListStyler(this.tree,this.themeService,e):l.Disposable.None}dispose(){this.disposables=l.dispose(this.disposables),l.dispose(this.styler),this.styler=void 0}};K=o([r(4,u.IContextKeyService),r(5,t.IListService),r(6,f.IThemeService),r(7,d.IConfigurationService),r(8,y.IAccessibilityService)],K),m.Registry.as(h.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:c.localize(0,null),type:"object",properties:{[t.multiSelectModifierSettingKey]:{type:"string",enum:["ctrlCmd","alt"], enumDescriptions:[c.localize(1,null),c.localize(2,null)],default:"ctrlCmd",description:c.localize(3,null)},[t.openModeSettingKey]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:c.localize(4,null)},[t.horizontalScrollingKey]:{type:"boolean",default:!1,description:c.localize(5,null)},[x]:{type:"number",default:8,minimum:0,maximum:40,description:c.localize(6,null)},[k]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:c.localize(7,null)},[D]:{type:"boolean",default:!1,description:c.localize(8,null)},[t.keyboardNavigationSettingKey]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[c.localize(9,null),c.localize(10,null),c.localize(11,null)],default:"highlight",description:c.localize(12,null)},[t.automaticKeyboardNavigationSettingKey]:{type:"boolean",default:!0,markdownDescription:c.localize(13,null)}}})})),define(e[1588],t([0,1,186,5,11,27,31,59,8,105,960,69,1515]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.QuickInputService=void 0;let m=class extends s.Themable{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get backButton(){return this.controller.backButton}get onShow(){return this.controller.onShow}get onHide(){return this.controller.onHide}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(p.QuickAccessController))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>void 0,setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(), createList:(e,t,i,n,o)=>this.instantiationService.createInstance(g.WorkbenchList,e,t,i,n,o),styles:this.computeStyles()},s=this._register(new u.QuickInputController(Object.assign(Object.assign({},o),t)));return s.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onLayout(t=>{var i,n;return s.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)})),this._register(s.onShow(()=>this.resetContextKeys())),this._register(s.onHide(()=>this.resetContextKeys())),s}setContextKey(e){let t;e&&((t=this.contexts.get(e))||(t=new d.RawContextKey(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=l.CancellationToken.None){return this.controller.pick(e,t,i)}input(e={},t=l.CancellationToken.None){return this.controller.input(e,t)}createQuickPick(){return this.controller.createQuickPick()} createInputBox(){return this.controller.createInputBox()}focus(){this.controller.focus()}toggle(){this.controller.toggle()}navigate(e,t){this.controller.navigate(e,t)}accept(e){return this.controller.accept(e)}back(){return this.controller.back()}cancel(){return this.controller.cancel()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},c.computeStyles(this.theme,{quickInputBackground:a.quickInputBackground,quickInputForeground:a.quickInputForeground,quickInputTitleBackground:a.quickInputTitleBackground,contrastBorder:a.contrastBorder,widgetShadow:a.widgetShadow})),inputBox:c.computeStyles(this.theme,{inputForeground:a.inputForeground,inputBackground:a.inputBackground,inputBorder:a.inputBorder,inputValidationInfoBackground:a.inputValidationInfoBackground,inputValidationInfoForeground:a.inputValidationInfoForeground,inputValidationInfoBorder:a.inputValidationInfoBorder,inputValidationWarningBackground:a.inputValidationWarningBackground, inputValidationWarningForeground:a.inputValidationWarningForeground,inputValidationWarningBorder:a.inputValidationWarningBorder,inputValidationErrorBackground:a.inputValidationErrorBackground,inputValidationErrorForeground:a.inputValidationErrorForeground,inputValidationErrorBorder:a.inputValidationErrorBorder}),countBadge:c.computeStyles(this.theme,{badgeBackground:a.badgeBackground,badgeForeground:a.badgeForeground,badgeBorder:a.contrastBorder}),button:c.computeStyles(this.theme,{buttonForeground:a.buttonForeground,buttonBackground:a.buttonBackground,buttonHoverBackground:a.buttonHoverBackground,buttonBorder:a.contrastBorder}),progressBar:c.computeStyles(this.theme,{progressBarBackground:a.progressBarBackground}),list:c.computeStyles(this.theme,{listBackground:a.quickInputBackground,listInactiveFocusForeground:a.listFocusForeground,listInactiveFocusBackground:a.listFocusBackground,listFocusOutline:a.activeContrastBorder,listInactiveFocusOutline:a.activeContrastBorder,pickerGroupBorder:a.pickerGroupBorder, pickerGroupForeground:a.pickerGroupForeground})}}};m=o([r(0,n.IInstantiationService),r(1,d.IContextKeyService),r(2,s.IThemeService),r(3,h.IAccessibilityService),r(4,i.ILayoutService)],m),t.QuickInputService=m})),define(e[434],t([0,1,97,11,27,44]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeverityIcon=void 0,function(e){e.className=function(e){switch(e){case i.default.Ignore:return"severity-ignore "+s.Codicon.info.classNames;case i.default.Info:return s.Codicon.info.classNames;case i.default.Warning:return s.Codicon.warning.classNames;case i.default.Error:return s.Codicon.error.classNames;default:return""}}}(t.SeverityIcon||(t.SeverityIcon={})),n.registerThemingParticipant((e,t)=>{const i=e.getColor(o.problemsErrorIconForeground);if(i){const e=s.Codicon.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)} const n=e.getColor(o.problemsWarningIconForeground);if(n){const e=s.Codicon.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t`)}const r=e.getColor(o.problemsInfoIconForeground);if(r){const e=s.Codicon.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${r};\n\t\t\t}\n\t\t`)}})})),define(e[1589],t([0,1,996,7,2,107,18,27,11,55,138,110,14,6,188,17,434,42,20,8,94,5,793]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorMarkerNavigationBackground=t.editorMarkerNavigationInfo=t.editorMarkerNavigationWarning=t.editorMarkerNavigationError=t.MarkerNavigationWidget=void 0;class E{constructor(e,t,i,o){ this._openerService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new s.DisposableStore,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(n.addStandardDisposableListener(this._relatedBlock,"click",e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)})),this._scrollable=new u.ScrollableElement(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`})), this._disposables.add(this._scrollable)}dispose(){s.dispose(this._disposables)}update(e){const{source:t,message:i,relatedInformation:o,code:s}=e;let r=((null==t?void 0:t.length)||0)+"()".length;s&&(r+="string"==typeof s?s.length:s.value.length);const a=i.split(/\r\n|\r|\n/g);this._lines=a.length,this._longestLineLength=0;for(const e of a)this._longestLineLength=Math.max(e.length+r,this._longestLineLength);n.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const e of a)(l=document.createElement("div")).innerText=e,""===e&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const e=document.createElement("span");if(e.classList.add("details"),l.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){const t=document.createElement("span");t.innerText=`(${s})`, t.classList.add("code"),e.appendChild(t)}else{this._codeLink=n.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target),e.preventDefault(),e.stopPropagation()},n.append(this._codeLink,n.$("span")).innerText=s.value,e.appendChild(this._codeLink)}}if(n.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),p.isNonEmptyArray(o)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(51))}px`,this._lines+=1;for(const t of o){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${g.getBaseLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=g.getPathLabel(t.resource,void 0),this._relatedDiagnostics.set(n,t);let o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}} const c=this._editor.getOption(36),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case a.MarkerSeverity.Error:t=i.localize(0,null);break;case a.MarkerSeverity.Warning:t=i.localize(1,null);break;case a.MarkerSeverity.Info:t=i.localize(2,null);break;case a.MarkerSeverity.Hint:t=i.localize(3,null)}let n=i.localize(4,null,t,e.startLineNumber+":"+e.startColumn);const o=this._editor.getModel();if(o&&e.startLineNumber<=o.getLineCount()&&e.startLineNumber>=1){n=`${o.getLineContent(e.startLineNumber)}, ${n}`}return n}}let I=class e extends v.PeekViewWidget{constructor(e,t,i,n,o,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0},o), this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._callOnDispose=new s.DisposableStore,this._onDidSelectRelatedInformation=new m.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=a.MarkerSeverity.Warning,this._backgroundColor=h.Color.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(t.editorMarkerNavigationBackground);let i=t.editorMarkerNavigationError;this._severity===a.MarkerSeverity.Warning?i=t.editorMarkerNavigationWarning:this._severity===a.MarkerSeverity.Info&&(i=t.editorMarkerNavigationInfo);const n=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(v.peekViewTitleForeground),secondaryHeadingColor:e.getColor(v.peekViewTitleInfoForeground)})}_applyStyles(){ this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}focus(){this._parentContainer.focus()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onDidBeforeRun(e=>this.editor.focus()));const i=[],n=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);y.createAndFillInActionBarActions(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=n.append(e,n.$(""))}_getActionBarOptions(){return Object.assign(Object.assign({},super._getActionBarOptions()),{orientation:0})}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container), this._message=new E(this._container,this.editor,e=>this._onDidSelectRelatedInformation.fire(e),this._openerService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let o=l.Range.lift(e);const s=this.editor.getPosition();let r=s&&o.containsPosition(s)?s:o.getStartPosition();super.show(r,this.computeRequiredHeight());const c=this.editor.getModel();if(c){const e=n>1?i.localize(5,null,t,n):i.localize(6,null,t,n);this.setTitle(f.basename(c.uri),e)}this._icon.className=`codicon ${S.SeverityIcon.className(a.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e, this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};I.TitleMenu=new _.MenuId("gotoErrorTitleMenu"),I=o([r(1,d.IThemeService),r(2,b.IOpenerService),r(3,_.IMenuService),r(4,w.IInstantiationService),r(5,C.IContextKeyService)],I),t.MarkerNavigationWidget=I;let x=c.oneOf(c.editorErrorForeground,c.editorErrorBorder),k=c.oneOf(c.editorWarningForeground,c.editorWarningBorder),D=c.oneOf(c.editorInfoForeground,c.editorInfoBorder);t.editorMarkerNavigationError=c.registerColor("editorMarkerNavigationError.background",{dark:x,light:x,hc:x},i.localize(7,null)),t.editorMarkerNavigationWarning=c.registerColor("editorMarkerNavigationWarning.background",{dark:k,light:k,hc:k},i.localize(8,null)),t.editorMarkerNavigationInfo=c.registerColor("editorMarkerNavigationInfo.background",{dark:D,light:D,hc:D},i.localize(9,null)), t.editorMarkerNavigationBackground=c.registerColor("editorMarkerNavigation.background",{dark:"#2D2D30",light:h.Color.white,hc:"#0C141F"},i.localize(10,null)),d.registerThemingParticipant((e,t)=>{const i=e.getColor(c.textLinkForeground);i&&(t.addRule(`.monaco-editor .marker-widget a { color: ${i}; }`),t.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${i}; }`))})})),define(e[579],t([0,1,995,2,8,47,18,37,58,1589,72,20,44,5,561]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NextMarkerAction=t.MarkerController=void 0;let f=class e{constructor(e,t,i,o,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=o,this._instantiationService=s,this._sessionDispoables=new n.DisposableStore,this._editor=e,this._widgetVisible=C.bindTo(this._contextKeyService)}static get(t){return t.getContribution(e.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(), this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(h.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(e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.Range.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return ;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.Range.lift(e).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.Position(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(t,i){if(this._editor.hasModel()){const n=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(n.move(t,this._editor.getModel(),this._editor.getPosition()), !n.selected)return;if(n.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);o&&(e.get(o).close(),e.get(o).nagivate(t,i))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}};f.ID="editor.contrib.markerController",f=o([r(1,v.IMarkerNavigationService),r(2,s.IContextKeyService),r(3,u.ICodeEditorService),r(4,m.IInstantiationService)],f),t.MarkerController=f;class S extends c.EditorAction{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&f.get(t).nagivate(this._next,this._multiFile)}}class b extends S{constructor(){super(!0,!1,{id:b.ID,label:b.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{ menuId:h.MarkerNavigationWidget.TitleMenu,title:b.LABEL,icon:p.registerIcon("marker-navigation-next",p.Codicon.chevronDown),group:"navigation",order:1}})}}t.NextMarkerAction=b,b.ID="editor.action.marker.next",b.LABEL=i.localize(0,null);class _ extends S{constructor(){super(!1,!1,{id:_.ID,label:_.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:h.MarkerNavigationWidget.TitleMenu,title:b.LABEL,icon:p.registerIcon("marker-navigation-previous",p.Codicon.chevronUp),group:"navigation",order:2}})}}_.ID="editor.action.marker.prev",_.LABEL=i.localize(1,null);c.registerEditorContribution(f.ID,f),c.registerEditorAction(b),c.registerEditorAction(_),c.registerEditorAction(class extends S{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:i.localize(2,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:66, weight:100},menuOpts:{menuId:g.MenuId.MenubarGoMenu,title:i.localize(3,null),group:"6_problem_nav",order:1}})}}),c.registerEditorAction(class extends S{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:i.localize(4,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:g.MenuId.MenubarGoMenu,title:i.localize(5,null),group:"6_problem_nav",order:2}})}});const C=new s.RawContextKey("markersNavigationVisible",!1),y=c.EditorCommand.bindToContribution(f.get);c.registerEditorCommand(new y({id:"closeMarkersNavigation",precondition:C,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:d.EditorContextKeys.focus,primary:9,secondary:[1033]}}))})),define(e[1590],t([0,1,1005,7,31,55,137,2,47,18,75,45,565,429,917,1573,1542,544,545,308,11,14,107,17,21,42,579,15,240,360,215,27,68]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x,k,D,T,R,A,M){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.ModesContentHoverWidget=void 0;const L=n.$;class O{constructor(e,t,i){this.range=e,this.color=t,this.provider=i}}class N{constructor(e,t){this.range=e,this.marker=t}}class P{constructor(e,t){this._markerDecorationsService=t,this._editor=e,this._result=[]}setRange(e){this._range=e,this._result=[]}clearResult(){this._result=[]}computeAsync(e){if(!this._editor.hasModel()||!this._range)return Promise.resolve([]);const t=this._editor.getModel();return h.HoverProviderRegistry.has(t)?v.getHover(t,new l.Position(this._range.startLineNumber,this._range.startColumn),e):Promise.resolve([])}computeSync(){if(!this._editor.hasModel()||!this._range)return[];const e=this._editor.getModel(),t=this._range.startLineNumber;if(t>this._editor.getModel().getLineCount())return[];const i=g.ColorDetector.get(this._editor),n=e.getLineMaxColumn(t),o=this._editor.getLineDecorations(t);let s=!1;const a=this._range,l=o.map(o=>{ const l=o.range.startLineNumber===t?o.range.startColumn:1,d=o.range.endLineNumber===t?o.range.endColumn:n;if(l>a.startColumn||a.endColumn>d)return null;const h=new c.Range(a.startLineNumber,l,a.startLineNumber,d),u=this._markerDecorationsService.getMarker(e,o);if(u)return new N(h,u);const g=i.getColorData(o.range.getStartPosition());if(!s&&g){s=!0;const{color:e,range:t}=g.colorInfo;return new O(t,e,g.provider)}if(r.isEmptyMarkdownString(o.options.hoverMessage))return null;return{contents:o.options.hoverMessage?C.asArray(o.options.hoverMessage):[],range:h}});return C.coalesce(l)}onResult(e,t){this._result=t?e.concat(this._result.sort((e,t)=>e instanceof O?-1:t instanceof O?1:0)):this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){return this._result.slice(0).concat([this._getLoadingMessage()])}_getLoadingMessage(){return{range:this._range,contents:[(new r.MarkdownString).appendText(i.localize(0,null))]}}}const F={type:2,filter:{include:R.CodeActionKind.QuickFix}} ;class B extends S.ContentHoverWidget{constructor(e,t,i,o,s,r,l=I.NullOpenerService){super(B.ID,e,t,o),this._themeService=s,this._modeService=r,this._openerService=l,this.renderDisposable=this._register(new a.MutableDisposable),this._messages=[],this._lastRange=null,this._computer=new P(this._editor,i),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new f.HoverOperation(this._computer,e=>this._withResult(e,!0),null,e=>this._withResult(e,!1),this._editor.getOption(46).delay),this._register(n.addStandardDisposableListener(this.getDomNode(),n.EventType.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(n.addStandardDisposableListener(this.getDomNode(),n.EventType.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(e.onDidChangeConfiguration(e=>{this._hoverOperation.setHoverTime(this._editor.getOption(46).delay)})), this._register(h.TokenizationRegistry.onDidChange(e=>{this.isVisible&&this._lastRange&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastRange,this._messages))}))}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAt(e,t,i){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition&&this._showAtPosition.lineNumber===e.startLineNumber){let t=[];for(let i=0,n=this._messages.length;i=e.endColumn&&t.push(n)}if(t.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(let i=0;i0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()}_renderMessages(e,t){this.renderDisposable.dispose(),this._colorPicker=null ;let i=1073741824,d=t[0].range?c.Range.lift(t[0].range):null,h=document.createDocumentFragment(),g=!0,v=!1;const f=new a.DisposableStore,S=[];if(t.forEach(e=>{if(e.range)if(i=Math.min(i,e.range.startColumn),d=d?c.Range.plusRange(d,e.range):c.Range.lift(e.range),e instanceof O){v=!0;const{red:t,green:i,blue:n,alpha:r}=e.color,l=new s.RGBA(Math.round(255*t),Math.round(255*i),Math.round(255*n),r),d=new s.Color(l);if(!this._editor.hasModel())return;const g=this._editor.getModel();let S=new c.Range(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn),b={range:e.range,color:e.color};const _=new p.ColorPickerModel(d,[],0),C=new m.ColorPickerWidget(h,_,this._editor.getOption(115),this._themeService);u.getColorPresentations(g,b,e.provider,o.CancellationToken.None).then(t=>{if(_.colorPresentations=t||[],!this._editor.hasModel())return;const i=this._editor.getModel().getValueInRange(e.range);_.guessColorPresentation(d,i);const n=()=>{let e,t ;_.presentation.textEdit?(e=[_.presentation.textEdit],t=(t=new c.Range(_.presentation.textEdit.range.startLineNumber,_.presentation.textEdit.range.startColumn,_.presentation.textEdit.range.endLineNumber,_.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+_.presentation.textEdit.text.length)):(e=[{identifier:null,range:S,text:_.presentation.label,forceMoveMarkers:!1}],t=S.setEndPosition(S.endLineNumber,S.startColumn+_.presentation.label.length)),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e),_.presentation.additionalTextEdits&&(e=[..._.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",e),this.hide()),this._editor.pushUndoStop(),S=t},s=t=>u.getColorPresentations(g,{range:S,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},e.provider,o.CancellationToken.None).then(e=>{_.colorPresentations=e||[]}),r=_.onColorFlushed(e=>{s(e).then(n)}),l=_.onDidChangeColor(s);this._colorPicker=C, this.showAt(S.getStartPosition(),S,this._shouldFocus),this.updateContents(h),this._colorPicker.layout(),this.renderDisposable.value=a.combinedDisposable(r,l,C,f)})}else e instanceof N?(S.push(e),g=!1):e.contents.filter(e=>!r.isEmptyMarkdownString(e)).forEach(e=>{const t=L("div.hover-row.markdown-hover"),i=n.append(t,L("div.hover-contents")),o=f.add(new b.MarkdownRenderer(this._editor,this._modeService,this._openerService));f.add(o.onDidRenderCodeBlock(()=>{i.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const s=f.add(o.render(e));i.appendChild(s.element),h.appendChild(t),g=!1})}),S.length){S.forEach(e=>h.appendChild(this.renderMarkerHover(e)));const e=1===S.length?S[0]:S.sort((e,t)=>y.MarkerSeverity.compare(e.marker.severity,t.marker.severity))[0];h.appendChild(this.renderMarkerStatusbar(e))}v||g||(this.showAt(new l.Position(e.startLineNumber,i),d,this._shouldFocus),this.updateContents(h)),this._isChangingDecorations=!0, this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,d?[{range:d,options:B._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}renderMarkerHover(e){const t=L("div.hover-row"),i=n.append(t,L("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(i);const l=n.append(i,L("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!=typeof r){const e=L("span");if(o){n.append(e,L("span")).innerText=o}this._codeLink=n.append(e,L("a.code-link")),this._codeLink.setAttribute("href",r.target.toString()),this._codeLink.onclick=e=>{this._openerService.open(r.target),e.preventDefault(),e.stopPropagation()},n.append(this._codeLink,L("span")).innerText=r.value;const t=n.append(i,e);t.style.opacity="0.6",t.style.paddingLeft="6px"}else{const e=n.append(i,L("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`} if(C.isNonEmptyArray(a))for(const{message:e,resource:t,startLineNumber:o,startColumn:s}of a){const r=n.append(i,L("div"));r.style.marginTop="8px";const a=n.append(r,L("a"));a.innerText=`${w.basename(t)}(${o}, ${s}): `,a.style.cursor="pointer",a.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(t.with({fragment:`${o},${s}`}),{fromUserGesture:!0}).catch(E.onUnexpectedError)};const l=n.append(r,L("span"));l.innerText=e,this._editor.applyFontInfo(l)}return t}renderMarkerStatusbar(e){const t=L("div.hover-row.status-bar"),o=new a.DisposableStore,s=n.append(t,L("div.actions"));if(e.marker.severity!==y.MarkerSeverity.Error&&e.marker.severity!==y.MarkerSeverity.Warning&&e.marker.severity!==y.MarkerSeverity.Info||o.add(this._renderAction(s,{label:i.localize(1,null),commandId:x.NextMarkerAction.ID,run:()=>{this.hide(),x.MarkerController.get(this._editor).showAtMarker(e.marker),this._editor.focus()}})),!this._editor.getOption(72)){const t=n.append(s,L("div")) ;t.style.opacity="0",t.style.transition="opacity 0.2s",setTimeout(()=>t.style.opacity="1",200),t.textContent=i.localize(2,null),o.add(a.toDisposable(()=>t.remove()));const r=this.getCodeActions(e.marker);o.add(a.toDisposable(()=>r.cancel())),r.then(e=>{if(t.style.transition="",t.style.opacity="1",!e.validActions.length)return e.dispose(),void(t.textContent=i.localize(3,null));t.remove();let r=!1;o.add(a.toDisposable(()=>{r||e.dispose()})),o.add(this._renderAction(s,{label:i.localize(4,null),commandId:T.QuickFixAction.Id,run:t=>{r=!0;const i=T.QuickFixController.get(this._editor),o=n.getDomNodePagePosition(t);this.hide(),i.showCodeActions(F,e,{x:o.left+6,y:o.top+o.height+6})}}))})}return this.renderDisposable.value=o,t}getCodeActions(e){return k.createCancelablePromise(t=>D.getCodeActions(this._editor.getModel(),new c.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),F,M.Progress.None,t))}}t.ModesContentHoverWidget=B,B.ID="editor.contrib.modesContentHoverWidget", B._DECORATION_OPTIONS=d.ModelDecorationOptions.register({className:"hoverHighlight"}),_.registerThemingParticipant((e,t)=>{const i=e.getColor(A.textLinkForeground);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)})})),define(e[580],t([0,1,16,11,6,1045,126,15,44]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iconsSchemaId=t.getIconRegistry=t.registerIcon=t.Extensions=void 0,t.Extensions={IconContribution:"base.contributions.icons"};const c=new class{constructor(){this._onDidChangeSchema=new o.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:s.localize(0,null)},fontCharacter:{type:"string",description:s.localize(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.iconsById={}} registerIcon(e,t,i,n){i||(i=s.localize(2,null,e));let o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;let r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),r.markdownDescription=`${i}: $(${e})`,this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),{id:e}}deregisterIcon(e){delete this.iconsById[e],delete this.iconSchema.properties[e];const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enum.splice(t,1),this.iconReferenceSchema.enumDescriptions.splice(t,1)),this._onDidChangeSchema.fire()}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconReferenceSchema(){return this.iconReferenceSchema}toString(){const e=(e,t)=>{const i=n.ThemeIcon.isThemeIcon(e.defaults);return i!==n.ThemeIcon.isThemeIcon(t.defaults)?i?-1:1:e.id.localeCompare(t.id)},t=e=>{ for(;n.ThemeIcon.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let i=[],o=[];const s=Object.keys(this.iconsById).map(e=>this.iconsById[e]);for(const r of s.sort(e))i.push(`||${r.id}|${n.ThemeIcon.isThemeIcon(r.defaults)?r.defaults.id:""}|`),n.ThemeIcon.isThemeIcon(r.defaults)||o.push(`.codicon-${r.id}:before { content: "${r.defaults.character}" }`);return i.join("\n")+"\n\n"+o.join("\n")}};function d(e,t,i,n){return c.registerIcon(e,t,i,n)}i.Registry.add(t.Extensions.IconContribution,c),t.registerIcon=d,t.getIconRegistry=function(){return c},function(){for(const e of l.iconRegistry.all)d(e.id,e.definition);l.iconRegistry.onDidRegister(e=>d(e.id,e.definition))}(),t.iconsSchemaId="vscode://schemas/icons";let h=i.Registry.as(r.Extensions.JSONContribution);h.registerSchema(t.iconsSchemaId,c.getIconSchema());const u=new a.RunOnceScheduler(()=>h.notifySchemaChanged(t.iconsSchemaId),200);c.onDidChangeSchema(()=>{u.isScheduled()||u.schedule()}) })),define(e[315],t([0,1,16,55,1046,126,15,6]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tokenStylingSchemaId=t.getTokenClassificationRegistry=t.parseClassifierString=t.Extensions=t.SemanticTokenRule=t.TokenStyle=t.fontStylePattern=t.selectorPattern=t.typeAndModifierIdPattern=t.idPattern=t.CLASSIFIER_MODIFIER_SEPARATOR=t.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR=t.TOKEN_TYPE_WILDCARD=void 0,t.TOKEN_TYPE_WILDCARD="*",t.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR=":",t.CLASSIFIER_MODIFIER_SEPARATOR=".",t.idPattern="\\w+[-_\\w+]*",t.typeAndModifierIdPattern=`^${t.idPattern}$`,t.selectorPattern=`^(${t.idPattern}|\\*)(\\${t.CLASSIFIER_MODIFIER_SEPARATOR}${t.idPattern})*(\\${t.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR}${t.idPattern})?$`,t.fontStylePattern="^(\\s*(italic|bold|underline))*\\s*$";class l{constructor(e,t,i,n){this.foreground=e,this.bold=t,this.underline=i,this.italic=n}}t.TokenStyle=l,function(e){e.toJSONObject=function(e){return{ _foreground:void 0===e.foreground?null:n.Color.Format.CSS.formatHexA(e.foreground,!0),_bold:void 0===e.bold?null:e.bold,_underline:void 0===e.underline?null:e.underline,_italic:void 0===e.italic?null:e.italic}},e.fromJSONObject=function(t){if(t){const i=e=>"boolean"==typeof e?e:void 0;return new e((e=>"string"==typeof e?n.Color.fromHex(e):void 0)(t._foreground),i(t._bold),i(t._underline),i(t._italic))}},e.equals=function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.foreground instanceof n.Color?e.foreground.equals(t.foreground):void 0===t.foreground)&&e.bold===t.bold&&e.underline===t.underline&&e.italic===t.italic},e.is=function(t){return t instanceof e},e.fromData=function(t){return new e(t.foreground,t.bold,t.underline,t.italic)},e.fromSettings=function(t,i,o,s,r){let a=void 0;if(void 0!==t&&(a=n.Color.fromHex(t)),void 0!==i){o=r=s=!1;const e=/italic|bold|underline/g;let t;for(;t=e.exec(i);)switch(t[0]){case"bold":o=!0;break;case"italic":r=!0;break;case"underline":s=!0}}return new e(a,o,s,r)} }(l=t.TokenStyle||(t.TokenStyle={})),function(e){e.fromJSONObject=function(e,t){if(t&&"string"==typeof t._selector&&t._style){const i=l.fromJSONObject(t._style);if(i)try{return{selector:e.parseTokenSelector(t._selector),style:i}}catch(e){}}},e.toJSONObject=function(e){return{_selector:e.selector.id,_style:l.toJSONObject(e.style)}},e.equals=function(e,t){return e===t||void 0!==e&&void 0!==t&&e.selector&&t.selector&&e.selector.id===t.selector.id&&l.equals(e.style,t.style)},e.is=function(e){return e&&e.selector&&"string"==typeof e.selector.id&&l.is(e.style)}}(t.SemanticTokenRule||(t.SemanticTokenRule={})),t.Extensions={TokenClassificationContribution:"base.contributions.tokenClassification"};class c{constructor(){this._onDidChangeSchema=new a.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.currentTypeNumber=0,this.currentModifierBit=1,this.tokenStylingDefaultRules=[],this.tokenStylingSchema={type:"object",properties:{},patternProperties:{[t.selectorPattern]:p()},additionalProperties:!1, definitions:{style:{type:"object",description:o.localize(0,null),properties:{foreground:{type:"string",description:o.localize(1,null),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:o.localize(2,null)},fontStyle:{type:"string",description:o.localize(3,null),pattern:t.fontStylePattern,patternErrorMessage:o.localize(4,null),defaultSnippets:[{label:o.localize(5,null),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"italic underline"},{body:"bold underline"},{body:"italic bold underline"}]},bold:{type:"boolean",description:o.localize(6,null)},italic:{type:"boolean",description:o.localize(7,null)},underline:{type:"boolean",description:o.localize(8,null)}},defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]}}},this.tokenTypeById=Object.create(null),this.tokenModifierById=Object.create(null),this.typeHierarchy=Object.create(null)}registerTokenType(e,i,n,o){if(!e.match(t.typeAndModifierIdPattern))throw new Error("Invalid token type id.") ;if(n&&!n.match(t.typeAndModifierIdPattern))throw new Error("Invalid token super type id.");let s={num:this.currentTypeNumber++,id:e,superType:n,description:i,deprecationMessage:o};this.tokenTypeById[e]=s;const r=p(i,o);this.tokenStylingSchema.properties[e]=r,this.typeHierarchy=Object.create(null)}registerTokenModifier(e,i,n){if(!e.match(t.typeAndModifierIdPattern))throw new Error("Invalid token modifier id.");const o=this.currentModifierBit;this.currentModifierBit=2*this.currentModifierBit;let s={num:o,id:e,description:i,deprecationMessage:n};this.tokenModifierById[e]=s,this.tokenStylingSchema.properties[`*.${e}`]=p(i,n)}parseTokenSelector(e,i){const n=u(e,i);return n.type?{match:(e,i,o)=>{let s=0;if(void 0!==n.language){if(n.language!==o)return-1;s+=10}if(n.type!==t.TOKEN_TYPE_WILDCARD){const t=this.getTypeHierarchy(e).indexOf(n.type);if(-1===t)return-1;s+=100-t}for(const e of n.modifiers)if(-1===i.indexOf(e))return-1;return s+100*n.modifiers.length}, id:`${[n.type,...n.modifiers.sort()].join(".")}${void 0!==n.language?":"+n.language:""}`}:{match:()=>-1,id:"$invalid"}}registerTokenStyleDefault(e,t){this.tokenStylingDefaultRules.push({selector:e,defaults:t})}deregisterTokenStyleDefault(e){const t=e.id;this.tokenStylingDefaultRules=this.tokenStylingDefaultRules.filter(e=>e.selector.id!==t)}deregisterTokenType(e){delete this.tokenTypeById[e],delete this.tokenStylingSchema.properties[e],this.typeHierarchy=Object.create(null)}deregisterTokenModifier(e){delete this.tokenModifierById[e],delete this.tokenStylingSchema.properties[`*.${e}`]}getTokenTypes(){return Object.keys(this.tokenTypeById).map(e=>this.tokenTypeById[e])}getTokenModifiers(){return Object.keys(this.tokenModifierById).map(e=>this.tokenModifierById[e])}getTokenStylingSchema(){return this.tokenStylingSchema}getTokenStylingDefaultRules(){return this.tokenStylingDefaultRules}getTypeHierarchy(e){let t=this.typeHierarchy[e];if(!t){this.typeHierarchy[e]=t=[e];let i=this.tokenTypeById[e] ;for(;i&&i.superType;)t.push(i.superType),i=this.tokenTypeById[i.superType]}return t}toString(){return Object.keys(this.tokenTypeById).sort((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.tokenTypeById[e].description}`).join("\n")}}const d=t.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR.charCodeAt(0),h=t.CLASSIFIER_MODIFIER_SEPARATOR.charCodeAt(0);function u(e,t){let i=e.length,n=t;const o=[];for(let t=i-1;t>=0;t--){const s=e.charCodeAt(t);if(s===d||s===h){const r=e.substring(t+1,i);i=t,s===d?n=r:o.push(r)}}return{type:e.substring(0,i),modifiers:o,language:n}}t.parseClassifierString=u;let g=function(){const e=new c;function t(t,n,o=[],s,r){return e.registerTokenType(t,n,s,r),o&&i(t,o),t}function i(t,i){try{const n=e.parseTokenSelector(t);e.registerTokenStyleDefault(n,{scopesToProbe:i})}catch(e){console.log(e)}}return t("comment",o.localize(9,null),[["comment"]]),t("string",o.localize(10,null),[["string"]]), t("keyword",o.localize(11,null),[["keyword.control"]]),t("number",o.localize(12,null),[["constant.numeric"]]),t("regexp",o.localize(13,null),[["constant.regexp"]]),t("operator",o.localize(14,null),[["keyword.operator"]]),t("namespace",o.localize(15,null),[["entity.name.namespace"]]),t("type",o.localize(16,null),[["entity.name.type"],["support.type"]]),t("struct",o.localize(17,null),[["entity.name.type.struct"]]),t("class",o.localize(18,null),[["entity.name.type.class"],["support.class"]]),t("interface",o.localize(19,null),[["entity.name.type.interface"]]),t("enum",o.localize(20,null),[["entity.name.type.enum"]]),t("typeParameter",o.localize(21,null),[["entity.name.type.parameter"]]),t("function",o.localize(22,null),[["entity.name.function"],["support.function"]]),t("member",o.localize(23,null),[["entity.name.function.member"],["support.function"]]),t("macro",o.localize(24,null),[["entity.name.other.preprocessor.macro"]]), t("variable",o.localize(25,null),[["variable.other.readwrite"],["entity.name.variable"]]),t("parameter",o.localize(26,null),[["variable.parameter"]]),t("property",o.localize(27,null),[["variable.other.property"]]),t("enumMember",o.localize(28,null),[["variable.other.enummember"]]),t("event",o.localize(29,null),[["variable.other.event"]]),t("label",o.localize(30,null),void 0),e.registerTokenModifier("declaration",o.localize(31,null),void 0),e.registerTokenModifier("documentation",o.localize(32,null),void 0),e.registerTokenModifier("static",o.localize(33,null),void 0),e.registerTokenModifier("abstract",o.localize(34,null),void 0),e.registerTokenModifier("deprecated",o.localize(35,null),void 0),e.registerTokenModifier("modification",o.localize(36,null),void 0),e.registerTokenModifier("async",o.localize(37,null),void 0),e.registerTokenModifier("readonly",o.localize(38,null),void 0),i("variable.readonly",[["variable.other.constant"]]),i("property.readonly",[["variable.other.constant.property"]]), i("type.defaultLibrary",[["support.type"]]),i("class.defaultLibrary",[["support.class"]]),i("interface.defaultLibrary",[["support.class"]]),i("variable.defaultLibrary",[["support.variable"],["support.other.variable"]]),i("variable.defaultLibrary.readonly",[["support.constant"]]),i("property.defaultLibrary",[["support.variable.property"]]),i("property.defaultLibrary.readonly",[["support.constant.property"]]),i("function.defaultLibrary",[["support.function"]]),i("member.defaultLibrary",[["support.function"]]),e}();function p(e,t){return{description:e,deprecationMessage:t,defaultSnippets:[{body:"${1:#ff0000}"}],anyOf:[{type:"string",format:"color-hex"},{$ref:"#definitions/style"}]}}i.Registry.add(t.Extensions.TokenClassificationContribution,g),t.getTokenClassificationRegistry=function(){return g},t.tokenStylingSchemaId="vscode://schemas/token-styling";let m=i.Registry.as(s.Extensions.JSONContribution);m.registerSchema(t.tokenStylingSchemaId,g.getTokenStylingSchema()) ;const v=new r.RunOnceScheduler(()=>m.notifySchemaChanged(t.tokenStylingSchemaId),200);g.onDidChangeSchema(()=>{v.isScheduled()||v.schedule()})})),define(e[149],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndoRedoGroup=t.ResourceEditStackSnapshot=t.UndoRedoElementType=t.IUndoRedoService=void 0,t.IUndoRedoService=i.createDecorator("undoRedoService"),function(e){e[e.Resource=0]="Resource",e[e.Workspace=1]="Workspace"}(t.UndoRedoElementType||(t.UndoRedoElementType={}));t.ResourceEditStackSnapshot=class{constructor(e,t){this.resource=e,this.elements=t}};class n{constructor(){this.id=n._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}t.UndoRedoGroup=n,n._ID=0,n.None=new n})),define(e[435],t([0,1,6,2,12,21,111,115,18,75,45,176,112,9,15,31,11,39,149,133,305,29,559]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E){"use strict";function I(e){return e.toString()}function x(e){const t=new C.StringSHA1,i=e.createSnapshot();let n ;for(;n=i.read();)t.update(n);return t.digest()}Object.defineProperty(t,"__esModule",{value:!0}),t.isSemanticColoringEnabled=t.SEMANTIC_HIGHLIGHTING_SETTING_ID=t.ModelServiceImpl=void 0;class k{constructor(e,t,i){this._modelEventListeners=new n.DisposableStore,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>i(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}} const D=s.isLinux||s.isMacintosh?1:2;class T{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let R=class e extends n.Disposable{constructor(e,t,n,o,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=n,this._logService=o,this._undoRedoService=s,this._onModelAdded=this._register(new i.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.Emitter),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new L(this._themeService,this._logService)), this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new M(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let i=l.EDITOR_MODEL_DEFAULTS.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n=i;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=l.EDITOR_MODEL_DEFAULTS.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=D;const r=e.eol;"\r\n"===r?s=2:"\n"===r&&(s=1);let a=l.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=l.EDITOR_MODEL_DEFAULTS.detectIndentation ;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;return e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:o,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:d}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"auto"!==i?i:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const s=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),r=this._getEOL(i,t);o=e._readModelOptions({ editor:s,eol:r},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach(e=>{e.sharesUndoRedoStack||t.push(e)}),t.sort((e,t)=>e.time-t.time);t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t.language,i,n),s=new h.TextModel(e,o,t,i,this._undoRedoService);if(i&&this._disposedModels.has(I(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=x(s)===e.sha1;if(n||e.sharesUndoRedoStack){ for(const e of t.past)y.isEditStackElement(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)y.isEditStackElement(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,e=>y.isEditStackElement(e)&&e.matchesResource(i)),n&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=I(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new k(s,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[r]=a,a}updateModel(t,i){const n=this.getCreationOptions(t.getLanguageIdentifier().language,t.uri,t.isForSimpleWidget),o=h.createTextBuffer(i,n.defaultEOL);t.equalsTextBuffer(o)||(t.pushStackElement(),t.pushEOL("\r\n"===o.getEOL()?1:0), t.pushEditOperations([],e._computeEdits(t,o),()=>[]),t.pushStackElement())}static _commonPrefix(e,t,i,n,o,s){const r=Math.min(t,o);let a=0;for(let t=0;t0?(r=new d.Range(o+1,1,i-s+1,1),a=new d.Range(o+1,1,n-s+1,1)):o>0?(r=new d.Range(o,e.getLineMaxColumn(o),i,e.getLineMaxColumn(i)),a=new d.Range(o,1+t.getLineLength(o),n,1+t.getLineLength(n))):(r=new d.Range(1,1,i,e.getLineMaxColumn(i)),a=new d.Range(1,1,n,1+t.getLineLength(n))),[c.EditOperation.replaceMove(r,t.getValueInRange(a,0))]}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageIdentifier,i,n), this.setMode(o.model,t)):o=this._createModelData(e,g.PLAINTEXT_LANGUAGE_IDENTIFIER,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[I(e.uri)];i&&i.setLanguage(t)}destroyModel(t){const i=this._models[I(t)];if(!i)return;const n=i.model,o=this._undoRedoService.getUriComparisonKey(n.uri)!==n.uri.toString();let s=!1,r=0;if(o||this._shouldRestoreUndoStack()&&(t.scheme===w.Schemas.file||t.scheme===w.Schemas.vscodeRemote||t.scheme===w.Schemas.userData)){const e=this._undoRedoService.getElements(t);if(e.past.length>0||e.future.length>0){for(const i of e.past)y.isEditStackElement(i)&&i.matchesResource(t)&&(s=!0,r+=i.heapSize(t),i.setModel(t));for(const i of e.future)y.isEditStackElement(i)&&i.matchesResource(t)&&(s=!0,r+=i.heapSize(t),i.setModel(t))}}if(!s){if(!o){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}return void i.model.dispose()}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(!o&&r>a){ const e=i.model.getInitialUndoRedoSnapshot();return null!==e&&this._undoRedoService.restoreSnapshot(e),void i.model.dispose()}this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(t,!1,e=>y.isEditStackElement(e)&&e.matchesResource(t)),this._insertDisposedModel(new T(t,i.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,x(n),n.getVersionId(),n.getAlternativeVersionId())),i.model.dispose()}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i{this._watchers[e.uri.toString()]=new N(e,i,this._semanticStyling) },r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},a=()=>{for(let t of e.getModels()){const e=this._watchers[t.uri.toString()];A(t,i,n)?e||s(t):e&&r(t,e)}};this._register(e.onModelAdded(e=>{A(e,i,n)&&s(e)})),this._register(e.onModelRemoved(e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(t.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&a()})),this._register(i.onDidColorThemeChange(a))}}class L extends n.Disposable{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new E.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class O{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class N extends n.Disposable{ constructor(e,t,i){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new v.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),300)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}));const o=()=>{n.dispose(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of u.DocumentSemanticTokensProviderRegistry.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};o(),this._register(u.DocumentSemanticTokensProviderRegistry.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]), this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=this._getSemanticColoringProvider();if(!e)return;this._currentDocumentRequestCancellationTokenSource=new f.CancellationTokenSource;const t=[],i=this._model.onDidChangeContent(e=>{t.push(e)}),n=this._semanticStyling.get(e),o=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null;Promise.resolve(e.provideDocumentSemanticTokens(this._model,o,this._currentDocumentRequestCancellationTokenSource.token)).then(o=>{ this._currentDocumentRequestCancellationTokenSource=null,i.dispose(),this._setDocumentSemanticTokens(e,o||null,n,t)},e=>{e&&"string"==typeof e.message&&-1!==e.message.indexOf("busy")||a.onUnexpectedError(e),this._currentDocumentRequestCancellationTokenSource=null,i.dispose(),t.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _isSemanticTokens(e){return e&&!!e.data}static _isSemanticTokensEdits(e){return e&&Array.isArray(e.edits)}static _copy(e,t,i,n,o){for(let s=0;s=0;e--){const o=t.edits[e],a=s-(o.start+o.deleteCount);a>0&&(N._copy(i,s-a,n,r-a,a),r-=a),o.data&&(N._copy(o.data,0,n,r-o.data.length,o.data.length),r-=o.data.length),s=o.start}s>0&&N._copy(i,0,n,0,s),t={resultId:t.resultId,data:n}}}if(N._isSemanticTokens(t)){this._currentDocumentResponse=new O(e,t.resultId,t.data);const o=E.toMultilineTokens2(t,i,this._model.getLanguageIdentifier());if(n.length>0){for(const e of n)for(const t of o)for(const i of e.changes)t.applyEdit(i.range,i.text);this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0)}else this._model.setSemanticTokens(null,!0);else this._model.setSemanticTokens(null,!1)}_getSemanticColoringProvider(){const e=u.DocumentSemanticTokensProviderRegistry.ordered(this._model) ;return e.length>0?e[0]:null}}})),define(e[1591],t([0,1,46,64,2,149,305]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelUndoRedoParticipant=void 0;let c=class extends s.Disposable{constructor(e,t,i){super(),this._modelService=e,this._textModelService=t,this._undoRedoService=i,this._register(this._modelService.onModelRemoved(e=>{const t=this._undoRedoService.getElements(e.uri);if(0!==t.past.length||0!==t.future.length){for(const e of t.past)e instanceof l.MultiModelEditStackElement&&e.setDelegate(this);for(const e of t.future)e instanceof l.MultiModelEditStackElement&&e.setDelegate(this)}}))}prepareUndoRedo(e){const t=e.getMissingModels();if(0===t.length)return s.Disposable.None;const i=t.map(async e=>{try{return await this._textModelService.createModelReference(e)}catch(e){return s.Disposable.None}});return Promise.all(i).then(e=>({dispose:()=>s.dispose(e)}))}};c=o([r(0,i.IModelService),r(1,n.ITextModelService),r(2,a.IUndoRedoService)],c), t.ModelUndoRedoParticipant=c})),define(e[1592],t([0,1,7,55,6,2,29,17,241,18,75,64,1575,1001,5,52,69,27,11,188,348,197,149,35,795]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferenceWidget=t.LayoutData=void 0;class x{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new a.DisposableStore,this._callOnModelChange=new a.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 e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return ;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,o=e.children.length;n{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(k,"ReferencesWidget",this._treeContainer,new p.Delegate,[this._instantiationService.createInstance(p.FileReferencesRenderer),this._instantiationService.createInstance(p.OneReferenceRenderer)],this._instantiationService.createInstance(p.DataSource),t),this._splitView.addView({onDidChange:s.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({ height:this._dim.height,width:e})}},w.Sizing.Distribute),this._splitView.addView({onDidChange:s.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},w.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let n=(e,t)=>{e instanceof y.OneReference&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen(e=>{e.sideBySide?n(e.element,"side"):e.editorOptions.pinned?n(e.element,"goto"):n(e.element,"show")}),i.hide(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim={height:e,width:t}, this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=m.localize(1,null),i.show(this._messageContainer),Promise.resolve(void 0)):(i.hide(this._messageContainer),this._decorationsManager=new x(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference() ;n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),i.show(this._treeContainer),i.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof y.OneReference?e:e instanceof y.FileReferences&&e.children.length>0?e.children[0]:void 0}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==l.Schemas.inMemory?this.setTitle(c.basenameOrAuthority(e.uri),this._uriLabel.getUriLabel(c.dirname(e.uri))):this.setTitle(m.localize(2,null)) ;const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const n=await i;if(!this._model)return void n.dispose();a.dispose(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=h.Range.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};D=o([r(3,_.IThemeService),r(4,g.ITextModelService),r(5,v.IInstantiationService),r(6,C.IPeekViewService),r(7,f.ILabelService),r(8,E.IUndoRedoService),r(9,I.IKeybindingService)],D),t.ReferenceWidget=D,_.registerThemingParticipant((e,t)=>{const i=e.getColor(C.peekViewResultsMatchHighlight) ;i&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${i}; }`);const n=e.getColor(C.peekViewEditorMatchHighlight);n&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${n}; }`);const o=e.getColor(C.peekViewEditorMatchHighlightBorder);o&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${o}; box-sizing: border-box; }`);const s=e.getColor(b.activeContrastBorder);s&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${s}; box-sizing: border-box; }`);const r=e.getColor(C.peekViewResultsBackground);r&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${r}; }`);const a=e.getColor(C.peekViewResultsMatchForeground);a&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=e.getColor(C.peekViewResultsFileForeground) ;l&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const c=e.getColor(C.peekViewResultsSelectionBackground);c&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${c}; }`);const d=e.getColor(C.peekViewResultsSelectionForeground);d&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${d} !important; }`);const h=e.getColor(C.peekViewEditorBackground);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {"+`\tbackground-color: ${h};`+"}");const u=e.getColor(C.peekViewEditorGutterBackground);u&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {"+`\tbackground-color: ${u};`+"}")})})), define(e[436],t([0,1,999,21,2,72,5,8,9,26,348,1592,18,47,28,15,188,69,82,79,32]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesController=t.ctxReferenceSearchVisible=void 0,t.ctxReferenceSearchVisible=new c.RawContextKey("referenceSearchVisible",!1);let w=class e{constructor(e,i,n,o,r,a,l,c){this._defaultTreeKeyboardSupport=e,this._editor=i,this._editorService=o,this._notificationService=r,this._instantiationService=a,this._storageService=l,this._configurationService=c,this._disposables=new s.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=t.ctxReferenceSearchVisible.bindTo(n)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let o ;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s=g.LayoutData.fromJSON(this._storageService.get("peekViewLayout",0,"{}"));this._widget=this._instantiationService.createInstance(g.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(i.localize(0,null)),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store("peekViewLayout",JSON.stringify(this._widget.layoutData),0),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(e=>{let{element:t,kind:i}=e;if(t)switch(i){case"open": "editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1);break;case"side":this.openReference(t,!0);break;case"goto":n?this._gotoReference(t):this.openReference(t,!1)}}));const r=++this._requestIdPool;t.then(t=>{if(r===this._requestIdPool&&this._widget)return this._model&&this._model.dispose(),this._model=t,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(i.localize(1,null,this._model.title,this._model.references.length));let t=this._editor.getModel().uri,n=new m.Position(e.startLineNumber,e.startColumn),o=this._model.nearestReference(t,n);if(o)return this._widget.setSelection(o).then(()=>{this._widget&&"editor"===this._editor.getOption(68)&&this._widget.focusOnPreviewEditor()})}})},e=>{this._notificationService.error(e)})}changeFocusBetweenPreviewAndReferences(){ this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){ this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=p.Range.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i}},this._editor).then(t=>{var n;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),s=this._model.clone();this.closeWidget(),t.focus(),o.toggleWidget(i,f.createCancelablePromise(e=>Promise.resolve(s)),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()},e=>{this._ignoreModelChangeEvent=!1,n.onUnexpectedError(e)})}openReference(e,t){t||this.closeWidget();const{uri:i,range:n}=e;this._editorService.openCodeEditor({resource:i,options:{selection:n}},this._editor,t)}};function E(e,t){const i=S.getOuterEditor(e);if(!i)return;let n=w.get(i);n&&t(n)}w.ID="editor.contrib.referencesController", w=o([r(2,c.IContextKeyService),r(3,a.ICodeEditorService),r(4,v.INotificationService),r(5,l.IInstantiationService),r(6,h.IStorageService),r(7,d.IConfigurationService)],w),t.ReferencesController=w,_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:C.KeyChord(2089,60),when:c.ContextKeyExpr.or(t.ctxReferenceSearchVisible,S.PeekContext.inPeekEditor),handler(e){E(e,e=>{e.changeFocusBetweenPreviewAndReferences()})}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:c.ContextKeyExpr.or(t.ctxReferenceSearchVisible,S.PeekContext.inPeekEditor),handler(e){E(e,e=>{e.goToNextOrPreviousReference(!0)})}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:c.ContextKeyExpr.or(t.ctxReferenceSearchVisible,S.PeekContext.inPeekEditor),handler(e){E(e,e=>{e.goToNextOrPreviousReference(!1)})}}), y.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),y.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),y.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),y.CommandsRegistry.registerCommand("closeReferenceSearch",e=>E(e,e=>e.closeWidget())),_.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:c.ContextKeyExpr.and(S.PeekContext.inPeekEditor,c.ContextKeyExpr.not("config.editor.stablePeek"))}),_.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:c.ContextKeyExpr.and(t.ctxReferenceSearchVisible,c.ContextKeyExpr.not("config.editor.stablePeek"))}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]}, when:c.ContextKeyExpr.and(t.ctxReferenceSearchVisible,b.WorkbenchListFocusContextKey),handler(e){var t;const i=null===(t=e.get(b.IListService).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof u.OneReference&&E(e,e=>e.revealReference(i[0]))}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:c.ContextKeyExpr.and(t.ctxReferenceSearchVisible,b.WorkbenchListFocusContextKey),handler(e){var t;const i=null===(t=e.get(b.IListService).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof u.OneReference&&E(e,e=>e.openReference(i[0],!0))}}),y.CommandsRegistry.registerCommand("openReference",e=>{var t;const i=null===(t=e.get(b.IListService).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof u.OneReference&&E(e,e=>e.openReference(i[0],!1))})})), define(e[581],t([0,1,103,15,79,12,85,37,72,47,18,58,45,314,188,436,348,997,20,8,28,68,566,32,177,1541,80,10,5,13,241]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x,k,D,T,R){"use strict";var A,M,L,O,N,P,F,B;Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionAction=void 0,S.MenuRegistry.appendMenuItem(S.MenuId.EditorContext,{submenu:S.MenuId.EditorContextPeek,title:f.localize(0,null),group:"navigation",order:100});class V extends a.EditorAction{constructor(e,t){super(t),this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const o=e.get(_.INotificationService),s=e.get(l.ICodeEditorService),r=e.get(C.IEditorProgressService),a=e.get(I.ISymbolNavigationService),c=t.getModel(),d=t.getPosition(),h=new E.EditorStateCancellationTokenSource(t,5),u=n.raceCancellation(this._getLocationModel(c,d,h.token),h.token).then(async e=>{if(!e||h.token.isCancellationRequested)return;let n;if(i.alert(e.ariaMessage),e.referenceAt(c.uri,d)){const e=this._getAlternativeCommand(t) ;e!==this.id&&(n=t.getAction(e))}const o=e.references.length;if(0===o){if(!this._configuration.muteMessage){const e=c.getWordAtPosition(d);g.MessageController.get(t).showMessage(this._getNoResultFoundMessage(e),d)}}else{if(1!==o||!n)return this._onResult(s,a,t,e);n.run()}},e=>{o.error(e)}).finally(()=>{h.dispose()});return r.showWhile(u,250),u}async _onResult(e,t,i,n){const o=this._getGoToPreference(i);if(i instanceof R.EmbeddedCodeEditorWidget||!(this._configuration.openInPeek||"peek"===o&&n.references.length>1)){const s=n.firstReference(),r=n.references.length>1&&"gotoAndPeek"===o,a=await this._openReference(i,e,s,this._configuration.openToSide,!r);r&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(s)}else this._openInPeek(i,n)}async _openReference(e,t,i,n,o){let s=void 0;u.isLocationLink(i)&&(s=i.targetSelectionRange),s||(s=i.range);const r=await t.openCodeEditor({resource:i.uri,options:{selection:d.Range.collapseToStart(s),selectionRevealType:3}},e,n);if(r){if(o){ const e=r.getModel(),t=r.deltaDecorations([],[{range:s,options:{className:"symbolHighlight"}}]);setTimeout(()=>{r.getModel()===e&&r.deltaDecorations(t,[])},350)}return r}}_openInPeek(e,t){let i=m.ReferencesController.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),n.createCancelablePromise(e=>Promise.resolve(t)),this._configuration.openInPeek):t.dispose()}}class W extends V{async _getLocationModel(e,t,i){return new v.ReferencesModel(await y.getDefinitionsAtPosition(e,t,i),f.localize(1,null))}_getNoResultFoundMessage(e){return e&&e.word?f.localize(2,null,e.word):f.localize(3,null)}_getAlternativeCommand(e){return e.getOption(43).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(43).multipleDefinitions}}t.DefinitionAction=W;const z=s.isWeb&&!x.isStandalone?2118:70;a.registerEditorAction(((A=class e extends W{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:f.localize(4,null),alias:"Go to Definition", precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasDefinitionProvider,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:z,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:S.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:2,title:f.localize(5,null)}}),w.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",A)),a.registerEditorAction(((M=class e extends W{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:f.localize(6,null),alias:"Open Definition to the Side",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasDefinitionProvider,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:o.KeyChord(2089,z),weight:100}}),w.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",M)), a.registerEditorAction(((L=class e extends W{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:f.localize(7,null),alias:"Peek Definition",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasDefinitionProvider,p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:S.MenuId.EditorContextPeek,group:"peek",order:2}}),w.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",L));class U extends V{async _getLocationModel(e,t,i){return new v.ReferencesModel(await y.getDeclarationsAtPosition(e,t,i),f.localize(8,null))}_getNoResultFoundMessage(e){return e&&e.word?f.localize(9,null,e.word):f.localize(10,null)}_getAlternativeCommand(e){return e.getOption(43).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(43).multipleDeclarations}} a.registerEditorAction(((O=class e extends U{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:f.localize(11,null),alias:"Go to Declaration",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasDeclarationProvider,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:S.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:3,title:f.localize(12,null)}})}_getNoResultFoundMessage(e){return e&&e.word?f.localize(13,null,e.word):f.localize(14,null)}}).id="editor.action.revealDeclaration",O)),a.registerEditorAction(class extends U{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:f.localize(15,null),alias:"Peek Declaration",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasDeclarationProvider,p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:S.MenuId.EditorContextPeek,group:"peek",order:3}})}}) ;class K extends V{async _getLocationModel(e,t,i){return new v.ReferencesModel(await y.getTypeDefinitionsAtPosition(e,t,i),f.localize(16,null))}_getNoResultFoundMessage(e){return e&&e.word?f.localize(17,null,e.word):f.localize(18,null)}_getAlternativeCommand(e){return e.getOption(43).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(43).multipleTypeDefinitions}}a.registerEditorAction(((N=class e extends K{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:f.localize(19,null),alias:"Go to Type Definition",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasTypeDefinitionProvider,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:S.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:3,title:f.localize(20,null)}})}}).ID="editor.action.goToTypeDefinition",N)),a.registerEditorAction(((P=class e extends K{constructor(){ super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:f.localize(21,null),alias:"Peek Type Definition",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasTypeDefinitionProvider,p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:S.MenuId.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",P));class H extends V{async _getLocationModel(e,t,i){return new v.ReferencesModel(await y.getImplementationsAtPosition(e,t,i),f.localize(22,null))}_getNoResultFoundMessage(e){return e&&e.word?f.localize(23,null,e.word):f.localize(24,null)}_getAlternativeCommand(e){return e.getOption(43).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(43).multipleImplementations}}a.registerEditorAction(((F=class e extends H{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:f.localize(25,null),alias:"Go to Implementations", precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasImplementationProvider,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:S.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:4,title:f.localize(26,null)},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",F)),a.registerEditorAction(((B=class e extends H{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:f.localize(27,null),alias:"Peek Implementations",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasImplementationProvider,p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:S.MenuId.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",B));class G extends V{_getNoResultFoundMessage(e){ return e?f.localize(28,null,e.word):f.localize(29,null)}_getAlternativeCommand(e){return e.getOption(43).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(43).multipleReferences}}a.registerEditorAction(class extends G{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:f.localize(30,null),alias:"Go to References",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasReferenceProvider,p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:S.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:5,title:f.localize(31,null)}})}async _getLocationModel(e,t,i){return new v.ReferencesModel(await y.getReferencesAtPosition(e,t,!0,i),f.localize(32,null))}}),a.registerEditorAction(class extends G{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{ id:"editor.action.referenceSearch.trigger",label:f.localize(33,null),alias:"Peek References",precondition:b.ContextKeyExpr.and(h.EditorContextKeys.hasReferenceProvider,p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:S.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i){return new v.ReferencesModel(await y.getReferencesAtPosition(e,t,!1,i),f.localize(34,null))}});class $ extends V{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:f.localize(35,null),alias:"Go To Any Symbol",precondition:b.ContextKeyExpr.and(p.PeekContext.notInPeekEditor,h.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i){return new v.ReferencesModel(this._references,f.localize(36,null))}_getNoResultFoundMessage(e){return e&&f.localize(37,null,e.word)||""}_getGoToPreference(e){var t ;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(43).multipleReferences}_getAlternativeCommand(){return""}}w.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:k.URI},{name:"position",description:"The position at which to start",constraint:c.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:async(e,t,i,n,o,s,a)=>{T.assertType(k.URI.isUri(t)),T.assertType(c.Position.isIPosition(i)),T.assertType(Array.isArray(n)),T.assertType(void 0===o||"string"==typeof o),T.assertType(void 0===a||"boolean"==typeof a) ;const d=e.get(l.ICodeEditorService),h=await d.openCodeEditor({resource:t},d.getFocusedCodeEditor());if(r.isCodeEditor(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext(e=>{const t=new class extends ${_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(a),openToSide:!1},n,o);e.get(D.IInstantiationService).invokeFunction(t.run.bind(t),h)})}}),w.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:k.URI},{name:"position",description:"The position at which to start",constraint:c.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:async(e,t,i,n,o)=>{ e.get(w.ICommandService).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}}),w.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{T.assertType(k.URI.isUri(t)),T.assertType(c.Position.isIPosition(i));const o=e.get(l.ICodeEditorService);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then(e=>{if(!r.isCodeEditor(e)||!e.hasModel())return;const t=m.ReferencesController.get(e);if(!t)return;const o=n.createCancelablePromise(t=>y.getReferencesAtPosition(e.getModel(),c.Position.lift(i),!1,t).then(e=>new v.ReferencesModel(e,f.localize(38,null)))),s=new d.Range(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(s,o,!1))})}}),w.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")})),define(e[582],t([0,1,998,15,21,137,50,18,45,37,566,2,64,11,27,177,581,543,47,13,188,8,794]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict";Object.defineProperty(t,"__esModule",{ value:!0}),t.GotoDefinitionAtPositionEditorContribution=void 0;let E=class e{constructor(e,t,i){this.textModelResolverService=t,this.modeService=i,this.toUnhook=new g.DisposableStore,this.toUnhookForKeyboard=new g.DisposableStore,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new b.ClickLinkGesture(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown(([e,t])=>{this.startFindDefinitionFromMouse(e,C.withNullAsUndefined(t))})),this.toUnhook.add(n.onExecute(e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},e=>{this.removeLinkDecorations(),s.onUnexpectedError(e)})})),this.toUnhook.add(n.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{ this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const o=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!o)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===o.startColumn&&this.currentWordAtPosition.endColumn===o.endColumn&&this.currentWordAtPosition.word===o.word)return Promise.resolve(0);this.currentWordAtPosition=o ;let r=new f.EditorState(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=n.createCancelablePromise(t=>this.findDefinition(e,t)),this.previousPromise.then(t=>{if(t&&t.length&&r.validate(this.editor))if(t.length>1)this.addDecoration(new c.Range(e.lineNumber,o.startColumn,e.lineNumber,o.endColumn),(new a.MarkdownString).appendText(i.localize(0,null,t.length)));else{let i=t[0];if(!i.uri)return;this.textModelResolverService.createModelReference(i.uri).then(t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:n}}=t,{startLineNumber:s}=i.range;if(s<1||s>n.getLineCount())return void t.dispose();const r=this.getPreviewValue(n,s,i);let l;l=i.originSelectionRange?c.Range.lift(i.originSelectionRange):new c.Range(e.lineNumber,o.startColumn,e.lineNumber,o.endColumn);const d=this.modeService.getModeIdByFilepathOrFirstLine(n.uri);this.addDecoration(l,(new a.MarkdownString).appendCodeblock(d||"",r)), t.dispose()})}else this.removeLinkDecorations()}).then(void 0,s.onUnexpectedError)}getPreviewValue(t,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;on)return new c.Range(i,1,n+1,1);r=t.findNextBracket(new _.Position(a,l))}return new c.Range(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&d.DefinitionProviderRegistry.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel() ;return i?u.getDefinitionsAtPosition(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(e=>{const i=!t&&this.editor.getOption(69)&&!this.isInPeekEditor(e);return new S.DefinitionAction({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)})}isInPeekEditor(e){const t=e.get(w.IContextKeyService);return y.PeekContext.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};E.ID="editor.contrib.gotodefinitionatposition",E.MAX_SOURCE_PREVIEW_LINES=8,E=o([r(1,p.ITextModelService),r(2,l.IModeService)],E),t.GotoDefinitionAtPositionEditorContribution=E,h.registerEditorContribution(E.ID,E),m.registerThemingParticipant((e,t)=>{const i=e.getColor(v.editorActiveLinkForeground);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)})})),define(e[437],t([0,1,1004,79,2,37,18,58,50,1590,1503,42,27,11,417,35,582,8]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.ModesHoverController=void 0;let _=class e{constructor(e,t,i,n,o,r,a){this._editor=e,this._openerService=t,this._modeService=i,this._markerDecorationsService=n,this._keybindingService=o,this._themeService=r,this._toUnhook=new s.DisposableStore,this._contentWidget=new s.MutableDisposable,this._glyphWidget=new s.MutableDisposable,this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(e=>{e.hasChanged(46)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=c.EditorContextKeys.hoverVisible.bindTo(a)}get contentWidget(){return this._contentWidget.value||this._createHoverWidgets(),this._contentWidget.value}get glyphWidget(){return this._glyphWidget.value||this._createHoverWidgets(),this._glyphWidget.value}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(46);this._isHoverEnabled=t.enabled, this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(e=>this._onEditorMouseDown(e))),this._toUnhook.add(this._editor.onMouseUp(e=>this._onEditorMouseUp(e))),this._toUnhook.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._toUnhook.add(this._editor.onKeyDown(e=>this._onKeyDown(e))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._toUnhook.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(e=>this._onEditorScrollChanged(e)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()} _onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;9!==t||e.target.detail!==h.ModesContentHoverWidget.ID?12===t&&e.target.detail===u.ModesGlyphHoverWidget.ID||(12!==t&&e.target.detail!==u.ModesGlyphHoverWidget.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){let t=e.target.type;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible()||this._isHoverSticky&&9===t&&e.target.detail===h.ModesContentHoverWidget.ID||this._isHoverSticky&&12===t&&e.target.detail===u.ModesGlyphHoverWidget.ID)){if(7===t){const i=this._editor.getOption(36).typicalHalfwidthCharacterWidth/2,n=e.target.detail;n&&!n.isAfterLines&&"number"==typeof n.horizontalDistanceToText&&n.horizontalDistanceToText{i.showContentHover(o,1,!0)}):i.showContentHover(o,1,!0)}}a.registerEditorContribution(_.ID,_),a.registerEditorAction(C),a.registerEditorAction(y),m.registerThemingParticipant((e,t)=>{const i=e.getColor(p.editorHoverHighlight);i&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${i}; }`);const n=e.getColor(p.editorHoverBackground);n&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${n}; }`);const o=e.getColor(p.editorHoverBorder);o&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }`)) ;const s=e.getColor(p.textLinkForeground);s&&t.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const r=e.getColor(p.editorHoverForeground);r&&t.addRule(`.monaco-editor .monaco-hover { color: ${r}; }`);const a=e.getColor(p.editorHoverStatusBarBackground);a&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${a}; }`);const l=e.getColor(p.textCodeBlockBackground);l&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${l}; }`)})})),define(e[1593],t([0,1,15,2,37,45,46,559,11,9,435]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let g=class e extends n.Disposable{constructor(e,t,n,o){super(),this._modelService=t,this._themeService=n,this._configurationService=o,this._editor=e,this._tokenizeViewport=new i.RunOnceScheduler(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})), this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(e=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(a.DocumentRangeSemanticTokensProviderRegistry.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(u.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}static get(t){return t.getContribution(e.ID)}static _getSemanticColoringProvider(e){const t=a.DocumentRangeSemanticTokensProviderRegistry.ordered(e);return t.length>0?t[0]:null}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){ for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(t,e,i,n)))}_requestRange(e,t,n,o){const s=e.getVersionId(),r=i.createCancelablePromise(i=>Promise.resolve(n.provideDocumentRangeSemanticTokens(e,t,i)));return r.then(i=>{i&&!e.isDisposed()&&e.getVersionId()===s&&e.setPartialSemanticTokens(t,c.toMultilineTokens2(i,o,e.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}} ;g.ID="editor.contrib.viewportSemanticTokens",g=o([r(1,l.IModelService),r(2,d.IThemeService),r(3,h.IConfigurationService)],g),s.registerEditorContribution(g.ID,g)})),define(e[1594],t([0,1,1047,149,21,33,71,97,29,28,2]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndoRedoService=void 0;function g(e){return e.scheme===d.Schemas.file?e.fsPath:e.path}let p=0;class m{constructor(e,t,i,n,o){this.id=++p,this.type=0,this.actual=e,this.label=e.label,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}var v;!function(e){e[e.ExternalRemoval=0]="ExternalRemoval",e[e.NoParallelUniverses=1]="NoParallelUniverses"}(v||(v={}));class f{constructor(e,t){this.resourceLabel=e,this.reason=t}} class S{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements){(0===i.reason?e:t).push(i.resourceLabel)}let n=[];return e.length>0&&n.push(i.localize(0,null,e.join(", "))),t.length>0&&n.push(i.localize(1,null,t.join(", "))),n.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class b{constructor(e,t,i,n,o){this.id=++p,this.type=1,this.actual=e,this.label=e.label,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new S),this.removedResources.has(t)||this.removedResources.set(t,new f(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t), 0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new S),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new f(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++} setElementsIsValid(e){for(const t of this._past)1===t.type?t.setValid(this.resourceLabel,this.strResource,e):t.setValid(e);for(const t of this._future)1===t.type?t.setValid(this.resourceLabel,this.strResource,e):t.setValid(e)}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new n.ResourceEditStackSnapshot(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){ for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class C{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e{for(let e=0,i=this._uriComparisonKeyComputers.length;e{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then(()=>(s(),n.dispose(),o()),t=>(s(),n.dispose(),this._onError(t,e))):(s(),n.dispose(),o())}async _invokeWorkspacePrepare(e){if(void 0===e.actual.prepareUndoRedo)return u.Disposable.None;const t=e.actual.prepareUndoRedo();return void 0===t?u.Disposable.None:t}_invokeResourcePrepare(e,t){ if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return void t(u.Disposable.None);const i=e.actual.prepareUndoRedo();if(i){if(!u.isDisposable(i))return i.then(e=>{t(e)});t(i)}else t(u.Disposable.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||y);return new C(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.info(n),new E(this.undo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.info(n),new E}_checkWorkspaceUndo(e,t,n,o){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,i.localize(2,null,t.label,t.removedResources.createMessage()));if(o&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,i.localize(3,null,t.label,t.invalidatedResources.createMessage()));const s=[];for(const e of n.editStacks)e.getClosestPastElement()!==t&&s.push(e.resourceLabel) ;if(s.length>0)return this._tryToSplitAndUndo(e,t,null,i.localize(4,null,t.label,s.join(", ")));const r=[];for(const e of n.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,i.localize(5,null,t.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,i.localize(6,null,t.label))}_workspaceUndo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceUndo(e,t,i,!1);return n?n.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=await this._dialogService.show(c.default.Info,i.localize(7,null,t.label),[i.localize(8,null,n.editStacks.length),i.localize(9,null),i.localize(10,null)],{cancelId:2}) ;if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this.undo(e);const s=this._checkWorkspaceUndo(e,t,n,!1);if(s)return s.returnValue}let o;try{o=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,n,!0);if(s)return o.dispose(),s.returnValue;for(const e of n.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,o,()=>this._continueUndoInGroup(t.groupId))}_resourceUndo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,i=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new C([e]),i,()=>this._continueUndoInGroup(t.groupId))));{const e=i.localize(11,null,t.label);this._notificationService.info(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&(s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n))}return[t,i]} _continueUndoInGroup(e){if(!e)return;const[,t]=this._findClosestUndoElementInGroup(e);return t?this.undo(t):void 0}undo(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);if(!this._editStacks.has(t))return;const i=this._editStacks.get(t),n=i.getClosestPastElement();if(n){if(n.groupId){const[e,t]=this._findClosestUndoElementInGroup(n.groupId);if(n!==e&&t)return this.undo(t)}try{return 1===n.type?this._workspaceUndo(t,n):this._resourceUndo(i,n)}finally{0}}}canRedo(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){return this._editStacks.get(t).hasFutureElements()}return!1}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.info(n),new E(this.redo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.info(n),new E}_checkWorkspaceRedo(e,t,n,o){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,i.localize(12,null,t.label,t.removedResources.createMessage())) ;if(o&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,i.localize(13,null,t.label,t.invalidatedResources.createMessage()));const s=[];for(const e of n.editStacks)e.getClosestFutureElement()!==t&&s.push(e.resourceLabel);if(s.length>0)return this._tryToSplitAndRedo(e,t,null,i.localize(14,null,t.label,s.join(", ")));const r=[];for(const e of n.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,i.localize(15,null,t.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,i.localize(16,null,t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t) ;return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new C([e]),i,()=>this._continueRedoInGroup(t.groupId))));{const e=i.localize(17,null,t.label);this._notificationService.info(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.groupId===e&&(!t||s.groupOrder({type:"idle",updateType:e,error:t}),CheckingForUpdates:e=>({type:"checking for updates",context:e}),AvailableForDownload:e=>({type:"available for download",update:e}), Downloading:e=>({type:"downloading",update:e}),Downloaded:e=>({type:"downloaded",update:e}),Updating:e=>({type:"updating",update:e}),Ready:e=>({type:"ready",update:e})},t.IUpdateService=i.createDecorator("updateService")})),define(e[1595],t([0,1,16,57,1048,12]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i.Registry.as(n.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:o.localize(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:o.localize(1,null),tags:["usesOnlineServices"],enumDescriptions:[o.localize(2,null),o.localize(3,null),o.localize(4,null),o.localize(5,null)]},"update.channel":{type:"string",default:"default",scope:1,description:o.localize(6,null),deprecationMessage:o.localize(7,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:o.localize(8,null),description:o.localize(9,null), included:s.isWindows&&!s.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:o.localize(10,null),tags:["usesOnlineServices"]}}})})),define(e[316],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IURLService=void 0,t.IURLService=i.createDecorator("urlService")})),define(e[1596],t([0,1,10,15,2,309]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeURLService=t.AbstractURLService=void 0;class r extends o.Disposable{constructor(){super(...arguments),this.handlers=new Set}open(e,t){const i=[...this.handlers.values()];return n.first(i.map(i=>()=>i.handleURL(e,t)),void 0,!1).then(e=>e||!1)}registerHandler(e){return this.handlers.add(e),o.toDisposable(()=>this.handlers.delete(e))}}t.AbstractURLService=r;t.NativeURLService=class extends r{create(e){let{authority:t,path:n,query:o,fragment:r}=e||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return t&&n&&0!==n.indexOf("/")&&(n=`/${n}`), i.URI.from({scheme:s.default.urlProtocol,authority:t,path:n,query:o,fragment:r})}}})),define(e[362],t([0,1,164]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLineEndOffset=t.getLineStartOffset=t.edit=void 0,t.edit=function(e,t,n,o){const s=i.setProperty(e,t,n,o)[0];return s&&(e=e.substring(0,s.offset)+s.content+e.substring(s.offset+s.length)),e},t.getLineStartOffset=function(e,t,i){let n=i;for(;n>=0;){if(e.charAt(n)===t.charAt(t.length-1)&&1===t.length)return n+1;if(n--,2===t.length&&n>=0&&e.charAt(n)===t.charAt(0))return n+2}return 0},t.getLineEndOffset=function(e,t,i){let n=i;for(;n>=0;){if(e.charAt(n)===t.charAt(t.length-1)&&1===t.length)return n;if(n++,2===t.length&&n>=0&&e.charAt(n)===t.charAt(1))return n}return e.length-1}})),define(e[583],t([0,1,41,14]),(function(e,t,i,n){"use strict";function o(e,t,i,{checkInstalledProperty:n}={checkInstalledProperty:!1}){ const o=e?[...e.keys()].filter(e=>!i.has(e)):[],s=[...t.keys()].filter(e=>!i.has(e)),r=s.filter(e=>-1===o.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),a=o.filter(e=>-1===s.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),l=new Set;for(const i of o){if(a.has(i))continue;const o=e.get(i),s=t.get(i);(!s||o.disabled!==s.disabled||o.version!==s.version||n&&o.installed!==s.installed)&&l.add(i)}return{added:r,removed:a,updated:l}}function s(e){return Object.assign(Object.assign({},e),{disabled:!!e.disabled,installed:!!e.installed})}function r(e,t){const i={identifier:{id:e.identifier.id,uuid:t.startsWith("uuid:")?t.substring("uuid:".length):void 0}};return e.disabled&&(i.disabled=!0),e.installed&&(i.installed=!0),e.version&&(i.version=e.version),i}Object.defineProperty(t,"__esModule",{value:!0}),t.getIgnoredExtensions=t.merge=void 0,t.merge=function(e,t,n,a,l){var c,d;const h=[],u=[],g=[];if(!t){const t=e.filter(({identifier:e})=>l.every(t=>t.toLowerCase()!==e.id.toLowerCase()));return{added:h,removed:u,updated:g, remote:t.length>0?t:null}}e=e.map(s),t=t.map(s),n=n?n.map(s):null;const p=new Map,m=e=>{e.uuid&&p.set(e.id.toLowerCase(),e.uuid)};e.forEach(({identifier:e})=>m(e)),t.forEach(({identifier:e})=>m(e)),n&&n.forEach(({identifier:e})=>m(e));const v=e=>{const t=e.identifier.uuid||p.get(e.identifier.id.toLowerCase());return t?`uuid:${t}`:`id:${e.identifier.id.toLowerCase()}`},f=(e,t)=>(e.set(v(t),t),e),S=e.reduce(f,new Map),b=t.reduce(f,new Map),_=t.reduce((e,t)=>{var n;const o=v(t);return t=i.deepClone(t),(null===(n=S.get(o))||void 0===n?void 0:n.installed)&&(t.installed=!0),f(e,t)},new Map),C=n?n.reduce(f,new Map):null,y=a.reduce(f,new Map),w=l.reduce((e,t)=>{const i=p.get(t.toLowerCase());return e.add(i?`uuid:${i}`:`id:${t.toLowerCase()}`)},new Set),E=o(S,b,w);if(E.added.size>0||E.removed.size>0||E.updated.size>0){const e=o(C,S,w),t=o(C,b,w);for(const e of t.removed.values()){const t=S.get(e);t&&u.push(t.identifier)}for(const i of t.added.values())if(e.added.has(i))E.updated.has(i)&&g.push(r(b.get(i),i));else{ const e=b.get(i);e.installed&&h.push(r(e,i))}for(const e of t.updated.values())g.push(r(b.get(e),e));for(const i of e.added.values())t.added.has(i)||_.set(i,S.get(i));for(const n of e.updated.values())if(!t.removed.has(n)&&!t.updated.has(n)){const e=i.deepClone(S.get(n));(null===(c=_.get(n))||void 0===c?void 0:c.installed)&&(e.installed=!0),_.set(n,e)}for(const i of e.removed.values())y.has(i)||t.updated.has(i)||(null===(d=null==C?void 0:C.get(i))||void 0===d?void 0:d.installed)&&_.delete(i)}const I=[],x=o(b,_,new Set,{checkInstalledProperty:!0});return(x.added.size>0||x.updated.size>0||x.removed.size>0)&&_.forEach((e,t)=>I.push(r(e,t))),{added:h,removed:u,updated:g,remote:I.length?I:null}},t.getIgnoredExtensions=function(e,t){const i=e.filter(e=>e.isMachineScoped).map(e=>e.identifier.id.toLowerCase()),o=function(e){let t=e.inspect("settingsSync.ignoredExtensions").userValue;if(void 0!==t)return t;if(void 0!==(t=e.inspect("sync.ignoredExtensions").userValue))return t ;return e.getValue("settingsSync.ignoredExtensions")||[]}(t).map(e=>e.toLowerCase()),s=[],r=[];if(Array.isArray(o))for(const e of o)e.startsWith("-")?r.push(e.substring(1)):s.push(e);return n.distinct([...i,...s].filter(e=>-1===r.indexOf(e)))}})),define(e[1597],t([0,1,41]),(function(e,t,i){"use strict";function n(e,t){const n=Object.keys(e),o=Object.keys(t),s=o.filter(e=>-1===n.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),r=n.filter(e=>-1===o.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),a=new Set;for(const o of n){if(r.has(o))continue;const n=e[o],s=t[o];i.equals(n,s)||a.add(o)}return{added:s,removed:r,updated:a}}function o(e,t){const{added:i,removed:o,updated:s}=n(e,t);return 0===i.size&&0===o.size&&0===s.size}Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0,t.merge=function(e,t,s,r,a,l){if(!t)return{remote:Object.keys(e).length>0?e:null,local:{added:{},removed:[],updated:{}},skipped:[]};const c=n(e,t);if(0===c.added.size&&0===c.removed.size&&0===c.updated.size)return{remote:null,local:{ added:{},removed:[],updated:{}},skipped:[]};const d=s?n(s,t):{added:Object.keys(t).reduce((e,t)=>(e.add(t),e),new Set),removed:new Set,updated:new Set},h=s?n(s,e):{added:Object.keys(e).reduce((e,t)=>(e.add(t),e),new Set),removed:new Set,updated:new Set},u={added:{},removed:[],updated:{}},g=i.deepClone(t),p=[];for(const i of d.added.values()){const n=t[i],o=r.filter(e=>e.key===i)[0];if(!o){p.push(i),l.trace(`GlobalState: Skipped adding ${i} in local storage as it is not registered.`);continue}if(o.version!==n.version){l.info(`GlobalState: Skipped adding ${i} in local storage. Local version '${o.version}' and remote version '${n.version} are not same.`);continue}const s=e[i];s&&s.value===n.value||(h.added.has(i)?u.updated[i]=n:u.added[i]=n)}for(const i of d.updated.values()){const n=t[i],o=r.filter(e=>e.key===i)[0];if(!o){p.push(i),l.trace(`GlobalState: Skipped updating ${i} in local storage as is not registered.`);continue}if(o.version!==n.version){ l.info(`GlobalState: Skipped updating ${i} in local storage. Local version '${o.version}' and remote version '${n.version} are not same.`);continue}const s=e[i];s&&s.value===n.value||(u.updated[i]=n)}for(const e of d.removed.values()){r.filter(t=>t.key===e)[0]?u.removed.push(e):l.trace(`GlobalState: Skipped removing ${e} in local storage. It is not registered to sync.`)}for(const t of h.added.values())d.added.has(t)||(g[t]=e[t]);for(const t of h.updated.values()){if(d.updated.has(t)||d.removed.has(t))continue;const i=g[t],n=e[t];n.versiont.key===e)[0];if(!t){p.push(e),l.trace(`GlobalState: Skipped removing ${e} in remote storage. It is not registered to sync.`);continue}const i=g[e] ;t.version-1===i.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),r=i.filter(e=>-1===n.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),a=new Set;for(const n of i){if(r.has(n))continue;const i=e.get(n).map(e=>Object.assign(Object.assign({},e),{key:n})),s=t.get(n).map(e=>Object.assign(Object.assign({},e),{key:n}));o.equals(i,s,(e,t)=>p(e,t))||a.add(n)}return{added:s,removed:r,updated:a}}function u(e,t,i){const n=[...e.keys()],o=[...t.keys()],s=o.filter(e=>-1===n.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),r=n.filter(e=>-1===o.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),a=new Set;for(const o of n){if(r.has(o))continue;g(e.get(o).map(e=>Object.assign(Object.assign({},e),{key:i[e.key] })),t.get(o).map(e=>Object.assign(Object.assign({},e),{key:i[e.key]})))||a.add(o)}return{added:s,removed:r,updated:a}}function g(e,t){return!!o.equals(e.filter(({command:e})=>"-"!==e[0]),t.filter(({command:e})=>"-"!==e[0]),(e,t)=>p(e,t))&&!!o.equals(e.filter(({command:e})=>"-"===e[0]),t.filter(({command:e})=>"-"===e[0]),(e,t)=>p(e,t))}function p(e,t){if(e.command!==t.command)return!1;if(e.key!==t.key)return!1;const n=s.ContextKeyExpr.deserialize(e.when),o=s.ContextKeyExpr.deserialize(t.when);return!(n&&!o||!n&&o)&&(!(n&&o&&!n.equals(o))&&!!i.equals(e.args,t.args))}function m(e,t,i){for(const n of t)e=r.edit(e,[-1],n,i);return e}function v(e,t,i){const n=a(e);for(let o=n.length-1;o>=0;o--)n[o].command!==t&&n[o].command!==`-${t}`||(e=r.edit(e,[o],void 0,i));return e}function f(e,t,i,n){const o=a(e),s=o.findIndex(e=>e.command===t||e.command===`-${t}`);for(let i=o.length-1;i>=0;i--)o[i].command!==t&&o[i].command!==`-${t}`||(e=r.edit(e,[i],void 0,n));for(let t=i.length-1;t>=0;t--)e=r.edit(e,[s],i[t],n);return e} Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.parseKeybindings=void 0,t.parseKeybindings=a,t.merge=async function(e,t,i,n,o){const s=a(e),r=a(t),g=i?a(i):null,p=[...s,...r,...g||[]].map(e=>e.key),S=await o.resolveUserBindings(p);let b=function(e,t,i,n){const o=new Set,s=c(e,n),r=c(t,n),a=i?c(i,n):null,d=h(s,r);if(0===d.added.size&&0===d.removed.size&&0===d.updated.size)return{hasLocalForwarded:!1,hasRemoteForwarded:!1,added:o,removed:o,updated:o,conflicts:o};const u=a?h(a,s):{added:[...s.keys()].reduce((e,t)=>(e.add(t),e),new Set),removed:new Set,updated:new Set};if(0===u.added.size&&0===u.removed.size&&0===u.updated.size)return{hasLocalForwarded:!1,hasRemoteForwarded:!0,added:o,removed:o,updated:o,conflicts:o};const g=a?h(a,r):{added:[...r.keys()].reduce((e,t)=>(e.add(t),e),new Set),removed:new Set,updated:new Set};if(0===g.added.size&&0===g.removed.size&&0===g.updated.size)return{hasLocalForwarded:!0,hasRemoteForwarded:!1,added:o,removed:o,updated:o,conflicts:o} ;const{added:p,removed:m,updated:v,conflicts:f}=l(d,u,g);return{hasLocalForwarded:!0,hasRemoteForwarded:!0,added:p,removed:m,updated:v,conflicts:f}}(s,r,g,S);if(!b.hasLocalForwarded&&!b.hasRemoteForwarded)return{mergeContent:e,hasChanges:!1,hasConflicts:!1};if(!b.hasLocalForwarded&&b.hasRemoteForwarded)return{mergeContent:t,hasChanges:!0,hasConflicts:!1};if(b.hasLocalForwarded&&!b.hasRemoteForwarded)return{mergeContent:e,hasChanges:!0,hasConflicts:!1};const _=d(s),C=d(r),y=g?d(g):null,w=l(u(_,C,S),y?u(y,_,S):{added:[..._.keys()].reduce((e,t)=>(e.add(t),e),new Set),removed:new Set,updated:new Set},y?u(y,C,S):{added:[...C.keys()].reduce((e,t)=>(e.add(t),e),new Set),removed:new Set,updated:new Set});let E=e;for(const e of w.removed.values())w.conflicts.has(e)||(E=v(E,e,n));for(const e of w.added.values()){if(w.conflicts.has(e))continue;const t=C.get(e);t.some(t=>t.command!==`-${e}`&&b.conflicts.has(S[t.key]))?w.conflicts.add(e):E=m(E,t,n)}for(const e of w.updated.values()){if(w.conflicts.has(e))continue ;const t=C.get(e);t.some(t=>t.command!==`-${e}`&&b.conflicts.has(S[t.key]))?w.conflicts.add(e):E=f(E,e,t,n)}return{mergeContent:E,hasChanges:!0,hasConflicts:w.conflicts.size>0}}})),define(e[1599],t([0,1]),(function(e,t){"use strict";function i(e,t){const i=e?Object.keys(e):[],n=t?Object.keys(t):[],o=n.filter(e=>-1===i.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),s=i.filter(e=>-1===n.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),r=new Set;for(const n of i){if(s.has(n))continue;e[n]!==t[n]&&r.add(n)}return{added:o,removed:s,updated:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.areSame=t.merge=void 0,t.merge=function(e,t,n){const o={},s={},r=new Set;if(!t)return{local:{added:o,updated:s,removed:[...r.values()]},remote:{added:e,updated:{},removed:[]},conflicts:[]};const a=i(e,t);if(0===a.added.size&&0===a.removed.size&&0===a.updated.size)return{local:{added:o,updated:s,removed:[...r.values()]},remote:{added:{},updated:{},removed:[]},conflicts:[]};const l=i(n,e),c=i(n,t),d={},h={},u=new Set,g=new Set ;for(const e of l.removed.values())c.updated.has(e)?o[e]=t[e]:u.add(e);for(const e of c.removed.values())g.has(e)||(l.updated.has(e)?g.add(e):r.add(e));for(const t of l.updated.values())g.has(t)||(c.updated.has(t)?a.updated.has(t)&&g.add(t):h[t]=e[t]);for(const i of c.updated.values())g.has(i)||(l.updated.has(i)?a.updated.has(i)&&g.add(i):void 0!==e[i]&&(s[i]=t[i]));for(const t of l.added.values())g.has(t)||(c.added.has(t)?a.updated.has(t)&&g.add(t):d[t]=e[t]);for(const e of c.added.values())g.has(e)||(l.added.has(e)?a.updated.has(e)&&g.add(e):o[e]=t[e]);return{local:{added:o,removed:[...r.values()],updated:s},remote:{added:d,removed:[...u.values()],updated:h},conflicts:[...g.values()]}},t.areSame=function(e,t){const{added:n,removed:o,updated:s}=i(e,t);return 0===n.size&&0===o.size&&0===s.size}})),define(e[116],t([0,1,6,2,5]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageKeysSyncRegistryService=t.IStorageKeysSyncRegistryService=void 0, t.IStorageKeysSyncRegistryService=o.createDecorator("IStorageKeysSyncRegistryService");class s extends n.Disposable{constructor(){super(),this._storageKeys=new Map,this._onDidChangeStorageKeys=this._register(new i.Emitter),this.onDidChangeStorageKeys=this._onDidChangeStorageKeys.event,this._register(n.toDisposable(()=>this._storageKeys.clear()))}get storageKeys(){return[...this._storageKeys.values()]}registerStorageKey(e){this._storageKeys.has(e.key)||(this._storageKeys.set(e.key,e),this._onDidChangeStorageKeys.fire(this.storageKeys))}}t.StorageKeysSyncRegistryService=s})),define(e[317],t([0,1,989,15,2,24,37,58,242,1574,313,433,20,88,8,36,35,26,11,28,116]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.EditorStartFindReplaceAction=t.EditorStartFindAction=t.StartFindReplaceAction=t.PreviousSelectionMatchFindAction=t.NextSelectionMatchFindAction=t.SelectionMatchFindAction=t.PreviousMatchFindAction2=t.PreviousMatchFindAction=t.NextMatchFindAction2=t.NextMatchFindAction=t.MatchFindAction=t.StartFindWithSelectionAction=t.StartFindAction=t.FindController=t.CommonFindController=t.FindStartFocusAction=t.getSelectionSearchString=void 0;const w=524288;function E(e){if(!e.hasModel())return null;const t=e.getSelection();if(t.startLineNumber===t.endLineNumber)if(t.isEmpty()){const i=e.getConfiguredWordAtPosition(t.getStartPosition());if(i)return i.word}else if(e.getModel().getValueLengthInRange(t)this._onStateChanged(e))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let e=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),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(29).loop})}))} static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord), isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!d.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){ let e=this._editor.getSelections();e.map(e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e)).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=a.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)}highlightFindOptions(){}async _start(e){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if(e.seedSearchStringFromSelection){let e=E(this._editor);e&&(this._state.isRegex?t.searchString=a.escapeRegExpCharacters(e):t.searchString=e)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some(e=>!e.isEmpty())&&(t.searchScope=e)} t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new d.FindModelBoundToEditorModel(this._editor,this._state))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(29).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(29).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};I.ID="editor.contrib.findController", I=o([r(1,v.IContextKeyService),r(2,b.IStorageService),r(3,m.IClipboardService)],I),t.CommonFindController=I;let x=class extends I{constructor(e,t,i,n,o,s,r,a,l){super(e,i,r,l),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=s,this._storageKeysSyncRegistryService=a,this._widget=null,this._findOptionsWidget=null}async _start(e){this._widget||this._createFindWidget();const t=this._editor.getSelection();let i=!1;switch(this._editor.getOption(29).autoFindInSelection){case"always":i=!0;break;case"never":i=!1;break;case"multiline":i=!!t&&t.startLineNumber!==t.endLineNumber}e.updateSearchScope=i,await super._start(e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}highlightFindOptions(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){ this._widget=this._register(new g.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._storageKeysSyncRegistryService)),this._findOptionsWidget=this._register(new h.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))}};x=o([r(1,f.IContextViewService),r(2,v.IContextKeyService),r(3,S.IKeybindingService),r(4,_.IThemeService),r(5,C.INotificationService),r(6,b.IStorageService),r(7,y.IStorageKeysSyncRegistryService),r(8,m.IClipboardService)],x),t.FindController=x;class k extends l.MultiEditorAction{constructor(){super({id:d.FIND_IDS.StartFindAction,label:i.localize(0,null),alias:"Find",precondition:void 0,kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(1,null),order:1}})}async run(e,t){let i=I.get(t);i&&await i.start({forceRevealReplace:!1, seedSearchStringFromSelection:t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(29).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop})}}t.StartFindAction=k;class D extends l.EditorAction{constructor(){super({id:d.FIND_IDS.StartFindWithSelection,label:i.localize(2,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){let i=I.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}t.StartFindWithSelectionAction=D;class T extends l.EditorAction{async run(e,t){let i=I.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&t.getOption(29).seedSearchStringFromSelection, seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}),this._run(i))}}t.MatchFindAction=T;class R extends T{constructor(){super({id:d.FIND_IDS.NextMatchFindAction,label:i.localize(3,null),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})}_run(e){return e.moveToNextMatch()}}t.NextMatchFindAction=R;class A extends T{constructor(){super({id:d.FIND_IDS.NextMatchFindAction,label:i.localize(4,null),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:v.ContextKeyExpr.and(c.EditorContextKeys.focus,d.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}})}_run(e){return e.moveToNextMatch()}}t.NextMatchFindAction2=A;class M extends T{constructor(){super({id:d.FIND_IDS.PreviousMatchFindAction,label:i.localize(5,null),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})}_run(e){ return e.moveToPrevMatch()}}t.PreviousMatchFindAction=M;class L extends T{constructor(){super({id:d.FIND_IDS.PreviousMatchFindAction,label:i.localize(6,null),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:v.ContextKeyExpr.and(c.EditorContextKeys.focus,d.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}})}_run(e){return e.moveToPrevMatch()}}t.PreviousMatchFindAction2=L;class O extends l.EditorAction{async run(e,t){let i=I.get(t);if(!i)return;let n=E(t);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}),this._run(i))}}t.SelectionMatchFindAction=O;class N extends O{constructor(){super({id:d.FIND_IDS.NextSelectionMatchFindAction,label:i.localize(7,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:2109,weight:100}})}_run(e){ return e.moveToNextMatch()}}t.NextSelectionMatchFindAction=N;class P extends O{constructor(){super({id:d.FIND_IDS.PreviousSelectionMatchFindAction,label:i.localize(8,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}t.PreviousSelectionMatchFindAction=P;class F extends l.MultiEditorAction{constructor(){super({id:d.FIND_IDS.StartFindReplaceAction,label:i.localize(9,null),alias:"Replace",precondition:void 0,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(10,null),order:2}})}async run(e,t){if(!t.hasModel()||t.getOption(72))return;let i=I.get(t),n=t.getSelection(),o=i.isFindInputFocused(),s=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&t.getOption(29).seedSearchStringFromSelection&&!o,r=o||s?2:1;i&&await i.start({forceRevealReplace:!0,seedSearchStringFromSelection:s, seedSearchStringFromGlobalClipboard:t.getOption(29).seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop})}}t.StartFindReplaceAction=F,l.registerEditorContribution(I.ID,x),t.EditorStartFindAction=new k,l.registerMultiEditorAction(t.EditorStartFindAction),l.registerEditorAction(D),l.registerEditorAction(R),l.registerEditorAction(A),l.registerEditorAction(M),l.registerEditorAction(L),l.registerEditorAction(N),l.registerEditorAction(P),t.EditorStartFindReplaceAction=new F,l.registerMultiEditorAction(t.EditorStartFindReplaceAction);const B=l.EditorCommand.bindToContribution(I.get);l.registerEditorCommand(new B({id:d.FIND_IDS.CloseFindWidgetCommand,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus,primary:9,secondary:[1033]}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105, kbExpr:c.EditorContextKeys.focus,primary:d.ToggleCaseSensitiveKeybinding.primary,mac:d.ToggleCaseSensitiveKeybinding.mac,win:d.ToggleCaseSensitiveKeybinding.win,linux:d.ToggleCaseSensitiveKeybinding.linux}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus,primary:d.ToggleWholeWordKeybinding.primary,mac:d.ToggleWholeWordKeybinding.mac,win:d.ToggleWholeWordKeybinding.win,linux:d.ToggleWholeWordKeybinding.linux}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus,primary:d.ToggleRegexKeybinding.primary,mac:d.ToggleRegexKeybinding.mac,win:d.ToggleRegexKeybinding.win,linux:d.ToggleRegexKeybinding.linux}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus, primary:d.ToggleSearchScopeKeybinding.primary,mac:d.ToggleSearchScopeKeybinding.mac,win:d.ToggleSearchScopeKeybinding.win,linux:d.ToggleSearchScopeKeybinding.linux}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceOneAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus,primary:3094}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceOneAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:v.ContextKeyExpr.and(c.EditorContextKeys.focus,d.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceAllAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus,primary:2563}})),l.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceAllAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:e=>e.replaceAll(),kbOpts:{weight:105, kbExpr:v.ContextKeyExpr.and(c.EditorContextKeys.focus,d.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),l.registerEditorCommand(new B({id:d.FIND_IDS.SelectAllMatchesAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:c.EditorContextKeys.focus,primary:515}}))})),define(e[438],t([0,1,1011,15,79,2,37,554,18,60,58,129,75,45,317,20,27,11,8]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v,f,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionHighlighter=t.CompatChangeAll=t.SelectHighlightsAction=t.MoveSelectionToPreviousFindMatchAction=t.MoveSelectionToNextFindMatchAction=t.AddSelectionToPreviousFindMatchAction=t.AddSelectionToNextFindMatchAction=t.MultiCursorSelectionControllerAction=t.MultiCursorSelectionController=t.MultiCursorSession=t.MultiCursorSessionResult=t.InsertCursorBelow=t.InsertCursorAbove=void 0;class b extends r.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove", label:i.localize(0,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:m.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(1,null),order:2}})}run(e,t,i){if(!t.hasModel())return;const n=i&&!0===i.logicalLine,o=t._getViewModel();o.cursorConfig.readOnly||(o.pushStackElement(),o.setCursorStates(i.source,3,a.CursorMoveCommands.addCursorUp(o,o.getCursorStates(),n)),o.revealTopMostCursor(i.source))}}t.InsertCursorAbove=b;class _ extends r.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:i.localize(2,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:m.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(3,null),order:3}})}run(e,t,i){if(!t.hasModel())return;const n=i&&!0===i.logicalLine,o=t._getViewModel() ;o.cursorConfig.readOnly||(o.pushStackElement(),o.setCursorStates(i.source,3,a.CursorMoveCommands.addCursorDown(o,o.getCursorStates(),n)),o.revealBottomMostCursor(i.source))}}t.InsertCursorBelow=_;class C extends r.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.localize(4,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:m.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(5,null),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new c.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections();let o=[];n.forEach(e=>this.getCursorsForSelection(e,i,o)),o.length>0&&t.setSelections(o)}}class y extends r.EditorAction{constructor(){ super({id:"editor.action.addCursorsToBottom",label:i.localize(6,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount();let o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new c.Selection(e,i[0].startColumn,e,i[0].endColumn));o.length>0&&t.setSelections(o)}}class w extends r.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:i.localize(7,null),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections();let n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new c.Selection(e,i[0].startColumn,e,i[0].endColumn));n.length>0&&t.setSelections(n)}}class E{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}t.MultiCursorSessionResult=E;class I{constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r} static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new I(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,d=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,d=new c.Selection(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new I(e,t,s,l,n,o,d)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new E(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new E(t.slice(0,t.length-1).concat(e),e,0)} _getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1);return i?new c.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new E(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new E(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch ;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1);return i?new c.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1,1073741824)):[]}}t.MultiCursorSession=I;class x extends s.Disposable{constructor(e){super(),this._sessionDispose=this._register(new s.DisposableStore),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(x.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=I.create(this._editor,e);if(!t)return;this._session=t ;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(e=>{(e.matchCase||e.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition()) ;return i?new c.Selection(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!P(this._editor.getModel(),t,i)){const e=this._editor.getModel();let i=[];for(let n=0,o=t.length;n0&&i.isRegex)t=this._editor.getModel().findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(105):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(i.searchScope){const e=i.searchScope;let n=[];t.forEach(t=>{e.forEach(e=>{t.range.endLineNumber<=e.endLineNumber&&t.range.startLineNumber>=e.startLineNumber&&n.push(t)})}),t=n}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew c.Selection(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)))}}selectAllUsingSelections(e){e.length>0&&this._setSelections(e)}}t.MultiCursorSelectionController=x,x.ID="editor.contrib.multiCursorController";class k extends r.EditorAction{run(e,t){const i=x.get(t);if(!i)return;const n=p.CommonFindController.get(t);n&&this._run(i,n)}}t.MultiCursorSelectionControllerAction=k;class D extends k{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:i.localize(8,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:m.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(9,null),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}t.AddSelectionToNextFindMatchAction=D;class T extends k{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:i.localize(10,null),alias:"Add Selection To Previous Find Match", precondition:void 0,menuOpts:{menuId:m.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(11,null),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}t.AddSelectionToPreviousFindMatchAction=T;class R extends k{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:i.localize(12,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:o.KeyChord(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}t.MoveSelectionToNextFindMatchAction=R;class A extends k{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:i.localize(13,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}t.MoveSelectionToPreviousFindMatchAction=A;class M extends k{constructor(){super({id:"editor.action.selectHighlights",label:i.localize(14,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{ kbExpr:d.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:m.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(15,null),order:7}})}_run(e,t){e.selectAll(t)}}t.SelectHighlightsAction=M;class L extends k{constructor(){super({id:"editor.action.changeAll",label:i.localize(16,null),alias:"Change All Occurrences",precondition:S.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}t.CompatChangeAll=L;class O{constructor(e,t,i,n){this.searchText=e,this.matchCase=t,this.wordSeparators=i,this.modelVersionId=n}static softEquals(e,t){return!e&&!t||!(!e||!t)&&(e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId)}}class N extends s.Disposable{constructor(e){super(),this.editor=e,this._isEnabled=e.getOption(89),this.decorations=[], this.updateSoon=this._register(new n.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(89)})),this._register(e.onDidChangeCursorSelection(e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(e=>{this._setState(null)})),this._register(e.onDidChangeModelContent(e=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(p.CommonFindController.get(e).getState().onFindReplaceStateChange(e=>{this._update()}))}_update(){this._setState(N._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e)return null;if(!t.hasModel())return null;const i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const n=x.get(t);if(!n)return null;const o=p.CommonFindController.get(t);if(!o)return null;let s=n.getSession(o);if(!s){const e=t.getSelections();if(e.length>1){ const i=o.getState().matchCase;if(!P(t.getModel(),e,i))return null}s=I.create(t,o)}if(!s)return null;if(s.currentMatch)return null;if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;const r=o.getState(),a=r.matchCase;if(r.isRevealed){let e=r.searchString;a||(e=e.toLowerCase());let t=s.searchText;if(a||(t=t.toLowerCase()),e===t&&s.matchCase===r.matchCase&&s.wholeWord===r.wholeWord&&!r.isRegex)return null}return new O(s.searchText,s.matchCase,s.wholeWord?t.getOption(105):null,t.getModel().getVersionId())}_setState(e){if(O.softEquals(this.state,e))return void(this.state=e);if(this.state=e,!this.state)return void(this.decorations=this.editor.deltaDecorations(this.decorations,[]));if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=g.DocumentHighlightProviderRegistry.has(t)&&this.editor.getOption(63);let n=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(e=>e.range) ;n.sort(l.Range.compareRangesUsingStarts);let o=this.editor.getSelections();o.sort(l.Range.compareRangesUsingStarts);let s=[];for(let e=0,t=0,i=n.length,r=o.length;e=r)s.push(i),e++;else{const n=l.Range.compareRangesUsingStarts(i,o[t]);n<0?(!o[t].isEmpty()&&l.Range.areIntersecting(i,o[t])||s.push(i),e++):n>0?t++:(e++,t++)}}const r=s.map(e=>({range:e,options:i?N._SELECTION_HIGHLIGHT:N._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,r)}dispose(){this._setState(null),super.dispose()}}function P(e,t,i){const n=F(e,t[0],!i);for(let o=1,s=t.length;o{const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);return i&&n?i>n?-1:1:i?-1:n?1:e.label.localeCompare(t.label)});const c=[];let d=!1;for(let e=0;e{this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"});try{await this.commandService.executeCommand(t.commandId)}catch(e){v.isPromiseCanceledError(e)||this.notificationService.error(i.localize(3,null,t.label,S.toErrorMessage(e)))}}}))}return c}};_.PREFIX=">",_.WORD_FILTER=a.or(a.matchesPrefix,a.matchesWords,a.matchesContiguousSubString),_=o([r(1,u.IInstantiationService),r(2,g.IKeybindingService),r(3,p.ICommandService),r(4,m.ITelemetryService),r(5,f.INotificationService)],_),t.AbstractCommandsQuickAccessProvider=_;let C=class e extends s.Disposable{ constructor(t,i,n){super(),this.storageService=t,this.configurationService=i,this.configuredCommandsHistoryLength=0,n.registerStorageKey({key:e.PREF_KEY_CACHE,version:1}),n.registerStorageKey({key:e.PREF_KEY_COUNTER,version:1}),this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let i;if(t)try{i=JSON.parse(t)}catch(e){}const n=e.cache=new c.LRUCache(this.configuredCommandsHistoryLength,1);if(i){let e;(e=i.usesLRU?i.entries:i.entries.sort((e,t)=>e.value-t.value)).forEach(e=>n.set(e.key,e.value))} e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var i;return null===(i=e.cache)||void 0===i?void 0:i.peek(t)}static saveState(t){if(!e.cache)return;const i={usesLRU:!0,entries:[]};e.cache.forEach((e,t)=>i.entries.push({key:t,value:e})),t.store(e.PREF_KEY_CACHE,JSON.stringify(i),0),t.store(e.PREF_KEY_COUNTER,e.counter,0)}static getConfiguredCommandHistoryLength(t){var i,n;const o=null===(n=null===(i=t.getValue().workbench)||void 0===i?void 0:i.commandPalette)||void 0===n?void 0:n.history;return"number"==typeof o?o:e.DEFAULT_COMMANDS_HISTORY_LENGTH}static clearHistory(t,i){const n=e.getConfiguredCommandHistoryLength(t);e.cache=new c.LRUCache(n),e.counter=1,e.saveState(i)}};C.DEFAULT_COMMANDS_HISTORY_LENGTH=50,C.PREF_KEY_CACHE="commandPalette.mru.cache",C.PREF_KEY_COUNTER="commandPalette.mru.counter",C.counter=1, C=o([r(0,d.IStorageService),r(1,h.IConfigurationService),r(2,b.IStorageKeysSyncRegistryService)],C),t.CommandsHistory=C})),define(e[1600],t([0,1,584,44]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractEditorCommandsQuickAccessProvider=void 0;class o extends i.AbstractCommandsQuickAccessProvider{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:n.stripCodicons(i.label)||i.id});return t}}t.AbstractEditorCommandsQuickAccessProvider=o})),define(e[98],t([0,1,5,76,16,57,1053,126,17,14,13]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";function h(){const e=o.Registry.as(s.Extensions.Configuration).getConfigurationProperties();return Object.keys(e).filter(t=>!!e[t].disallowSyncIgnore)}function u(){ const e=o.Registry.as(s.Extensions.Configuration).getConfigurationProperties(),i=Object.keys(e).filter(t=>2===e[t].scope||6===e[t].scope),n=h();return c.distinct([t.CONFIGURATION_SYNC_STORE_KEY,...i,...n])}var g;Object.defineProperty(t,"__esModule",{value:!0}),t.getSyncResourceFromLocalPreview=t.PREVIEW_DIR_NAME=t.USER_DATA_SYNC_SCHEME=t.IUserDataSyncLogService=t.IUserDataSyncUtilService=t.IUserDataAutoSyncService=t.IUserDataSyncService=t.IUserDataSyncResourceEnablementService=t.MergeState=t.Change=t.SyncStatus=t.UserDataAutoSyncError=t.UserDataSyncStoreError=t.UserDataSyncError=t.UserDataSyncErrorCode=t.HEADER_EXECUTION_ID=t.HEADER_OPERATION_ID=t.IUserDataSyncBackupStoreService=t.IUserDataSyncStoreService=t.IUserDataSyncStoreManagementService=t.ALL_SYNC_RESOURCES=t.SyncResource=t.isAuthenticationProvider=t.registerConfiguration=t.getDefaultIgnoredSettings=t.getDisallowedIgnoredSettings=t.CONFIGURATION_SYNC_STORE_KEY=void 0,t.CONFIGURATION_SYNC_STORE_KEY="configurationSync.store", t.getDisallowedIgnoredSettings=h,t.getDefaultIgnoredSettings=u,t.registerConfiguration=function(){const e=o.Registry.as(s.Extensions.Configuration);e.registerConfiguration({id:"settingsSync",order:30,title:r.localize(0,null),type:"object",properties:{"settingsSync.keybindingsPerPlatform":{type:"boolean",description:r.localize(1,null),default:!0,scope:1,tags:["sync","usesOnlineServices"]},"sync.keybindingsPerPlatform":{type:"boolean",deprecationMessage:r.localize(2,null)},"settingsSync.ignoredExtensions":{type:"array",markdownDescription:r.localize(3,null),items:[{type:"string",pattern:n.EXTENSION_IDENTIFIER_PATTERN,errorMessage:r.localize(4,null)}],default:[],scope:1,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]},"sync.ignoredExtensions":{type:"array",deprecationMessage:r.localize(5,null)},"settingsSync.ignoredSettings":{type:"array",description:r.localize(6,null),default:[],scope:1,$ref:"vscode://schemas/ignoredSettings",additionalProperties:!0,uniqueItems:!0,disallowSyncIgnore:!0, tags:["sync","usesOnlineServices"]},"sync.ignoredSettings":{type:"array",deprecationMessage:r.localize(7,null)}}});const i=o.Registry.as(a.Extensions.JSONContribution);return e.onDidUpdateConfiguration(()=>(()=>{const e=h(),n=u().filter(e=>e!==t.CONFIGURATION_SYNC_STORE_KEY),o={items:{type:"string",enum:[...Object.keys(s.allSettings.properties).filter(e=>-1===n.indexOf(e)),...n.filter(t=>-1===e.indexOf(t)).map(e=>`-${e}`)]}};i.registerSchema("vscode://schemas/ignoredSettings",o)})())},t.isAuthenticationProvider=function(e){return e&&d.isObject(e)&&d.isString(e.id)&&d.isArray(e.scopes)},function(e){e.Settings="settings",e.Keybindings="keybindings",e.Snippets="snippets",e.Extensions="extensions",e.GlobalState="globalState"}(t.SyncResource||(t.SyncResource={})),t.ALL_SYNC_RESOURCES=["settings","keybindings","snippets","extensions","globalState"],t.IUserDataSyncStoreManagementService=i.createDecorator("IUserDataSyncStoreManagementService"), t.IUserDataSyncStoreService=i.createDecorator("IUserDataSyncStoreService"),t.IUserDataSyncBackupStoreService=i.createDecorator("IUserDataSyncBackupStoreService"),t.HEADER_OPERATION_ID="x-operation-id",t.HEADER_EXECUTION_ID="X-Execution-Id",function(e){e.Unauthorized="Unauthorized",e.Conflict="Conflict",e.Gone="Gone",e.PreconditionFailed="PreconditionFailed",e.TooLarge="TooLarge",e.UpgradeRequired="UpgradeRequired",e.PreconditionRequired="PreconditionRequired",e.TooManyRequests="RemoteTooManyRequests",e.TooManyRequestsAndRetryAfter="TooManyRequestsAndRetryAfter",e.ConnectionRefused="ConnectionRefused",e.NoRef="NoRef",e.TurnedOff="TurnedOff",e.SessionExpired="SessionExpired",e.ServiceChanged="ServiceChanged",e.DefaultServiceChanged="DefaultServiceChanged",e.LocalTooManyRequests="LocalTooManyRequests",e.LocalPreconditionFailed="LocalPreconditionFailed",e.LocalInvalidContent="LocalInvalidContent",e.LocalError="LocalError",e.IncompatibleLocalContent="IncompatibleLocalContent", e.IncompatibleRemoteContent="IncompatibleRemoteContent",e.UnresolvedConflicts="UnresolvedConflicts",e.Unknown="Unknown"}(g=t.UserDataSyncErrorCode||(t.UserDataSyncErrorCode={}));class p extends Error{constructor(e,t,i,n){super(e),this.code=t,this.resource=i,this.operationId=n,this.name=`${this.code} (UserDataSyncError) syncResource:${this.resource||"unknown"} operationId:${this.operationId||"unknown"}`}}t.UserDataSyncError=p;t.UserDataSyncStoreError=class extends p{constructor(e,t,i){super(e,t,void 0,i),this.operationId=i}};t.UserDataAutoSyncError=class extends p{constructor(e,t){super(e,t)}},function(e){e.toUserDataSyncError=function(t){if(t instanceof e)return t;const i=/^(.+) \(UserDataSyncError\) syncResource:(.+) operationId:(.+)$/.exec(t.name);if(i&&i[1]){const n="unknown"===i[2]?void 0:i[2],o="unknown"===i[3]?void 0:i[3];return new e(t.message,i[1],n,o)}return new e(t.message,g.Unknown)}}(p=t.UserDataSyncError||(t.UserDataSyncError={})),function(e){e.Uninitialized="uninitialized",e.Idle="idle", e.Syncing="syncing",e.HasConflicts="hasConflicts"}(t.SyncStatus||(t.SyncStatus={})),function(e){e[e.None=0]="None",e[e.Added=1]="Added",e[e.Modified=2]="Modified",e[e.Deleted=3]="Deleted"}(t.Change||(t.Change={})),function(e){e.Preview="preview",e.Conflict="conflict",e.Accepted="accepted"}(t.MergeState||(t.MergeState={})),t.IUserDataSyncResourceEnablementService=i.createDecorator("IUserDataSyncResourceEnablementService"),t.IUserDataSyncService=i.createDecorator("IUserDataSyncService"),t.IUserDataAutoSyncService=i.createDecorator("IUserDataAutoSyncService"),t.IUserDataSyncUtilService=i.createDecorator("IUserDataSyncUtilService"),t.IUserDataSyncLogService=i.createDecorator("IUserDataSyncLogService"),t.USER_DATA_SYNC_SCHEME="vscode-userdata-sync",t.PREVIEW_DIR_NAME="preview",t.getSyncResourceFromLocalPreview=function(e,i){if(e.scheme!==t.USER_DATA_SYNC_SCHEME)return e=e.with({scheme:i.userDataSyncHome.scheme}), t.ALL_SYNC_RESOURCES.filter(n=>l.isEqualOrParent(e,l.joinPath(i.userDataSyncHome,n,t.PREVIEW_DIR_NAME)))[0]}})),define(e[318],t([0,1,2,25,66,10,98,84,17,15,6,23,93,1049,9,13,24,14,356,26,31]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";function w(e){if(e&&void 0!==e.version&&"number"==typeof e.version&&void 0!==e.content&&"string"==typeof e.content){if(2===Object.keys(e).length)return!0;if(3===Object.keys(e).length&&void 0!==e.machineId&&"string"==typeof e.machineId)return!0}return!1}function E(e,t,i){return i.joinPath(t.userDataSyncHome,e,`lastSync${e}.json`)}Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractInitializer=t.AbstractJsonFileSynchroniser=t.AbstractFileSynchroniser=t.AbstractSynchroniser=void 0;let I=class extends i.Disposable{constructor(e,t,i,n,o,s,r,a,c,g){super(),this.resource=e,this.fileService=t,this.environmentService=i,this.userDataSyncStoreService=o,this.userDataSyncBackupStoreService=s,this.userDataSyncResourceEnablementService=r,this.telemetryService=a, this.logService=c,this.configurationService=g,this.syncPreviewPromise=null,this._status="idle",this._onDidChangStatus=this._register(new u.Emitter),this.onDidChangeStatus=this._onDidChangStatus.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new u.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this.localChangeTriggerScheduler=new h.RunOnceScheduler(()=>this.doTriggerLocalChange(),50),this._onDidChangeLocal=this._register(new u.Emitter),this.onDidChangeLocal=this._onDidChangeLocal.event,this.syncHeaders={},this.syncResourceLogLabel=S.uppercaseFirstLetter(this.resource),this.extUri=this.fileService.hasCapability(i.userDataSyncHome,1024)?d.extUri:d.extUriIgnorePathCase,this.syncFolder=this.extUri.joinPath(i.userDataSyncHome,e),this.syncPreviewFolder=this.extUri.joinPath(this.syncFolder,l.PREVIEW_DIR_NAME),this.lastSyncResource=E(e,i,this.extUri),this.currentMachineIdPromise=_.getServiceMachineId(i,t,n)}get status(){return this._status}get conflicts(){return this._conflicts }isEnabled(){return this.userDataSyncResourceEnablementService.isResourceEnabled(this.resource)}async triggerLocalChange(){this.isEnabled()&&this.localChangeTriggerScheduler.schedule()}async doTriggerLocalChange(){if("hasConflicts"===this.status){this.logService.info(`${this.syncResourceLogLabel}: In conflicts state and local change detected. Syncing again...`);const e=await this.syncPreviewPromise;this.syncPreviewPromise=null;const t=await this.performSync(e.remoteUserData,e.lastSyncUserData,!0);this.setStatus(t)}else{this.logService.trace(`${this.syncResourceLogLabel}: Checking for local changes...`);const e=await this.getLastSyncUserData();(!e||(await this.doGenerateSyncResourcePreview(e,e,!0,y.CancellationToken.None)).resourcePreviews.some(({remoteChange:e})=>0!==e))&&this._onDidChangeLocal.fire()}}setStatus(e){if(this._status!==e){const t=this._status;"hasConflicts"===e&&this.telemetryService.publicLog2("sync/conflictsDetected",{source:this.resource}), "hasConflicts"===t&&"idle"===e&&this.telemetryService.publicLog2("sync/conflictsResolved",{source:this.resource}),this._status=e,this._onDidChangStatus.fire(e)}}async sync(e,t={}){await this._sync(e,!0,t)}async preview(e,t={}){return this._sync(e,!1,t)}async apply(e,t={}){try{this.syncHeaders=Object.assign({},t);const i=await this.doApply(e);return this.setStatus(i),this.syncPreviewPromise}finally{this.syncHeaders={}}}async _sync(e,t,i){try{if(this.syncHeaders=Object.assign({},i),!this.isEnabled())return"idle"!==this.status&&await this.stop(),this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing ${this.resource.toLowerCase()} as it is disabled.`),null;if("hasConflicts"===this.status)return this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing ${this.resource.toLowerCase()} as there are conflicts.`),this.syncPreviewPromise ;if("syncing"===this.status)return this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing ${this.resource.toLowerCase()} as it is running already.`),this.syncPreviewPromise;this.logService.trace(`${this.syncResourceLogLabel}: Started synchronizing ${this.resource.toLowerCase()}...`),this.setStatus("syncing");let n="idle";try{const i=await this.getLastSyncUserData(),o=await this.getLatestRemoteUserData(e,i);return"hasConflicts"===(n=await this.performSync(o,i,t))?this.logService.info(`${this.syncResourceLogLabel}: Detected conflicts while synchronizing ${this.resource.toLowerCase()}.`):"idle"===n&&this.logService.trace(`${this.syncResourceLogLabel}: Finished synchronizing ${this.resource.toLowerCase()}.`),this.syncPreviewPromise||null}finally{this.setStatus(n)}}finally{this.syncHeaders={}}}async replace(e){const t=await this.resolveContent(e);if(!t)return!1;const i=this.parseSyncData(t);if(!i)return!1;await this.stop();try{ this.logService.trace(`${this.syncResourceLogLabel}: Started resetting ${this.resource.toLowerCase()}...`),this.setStatus("syncing");const e=await this.getLastSyncUserData(),t=await this.getLatestRemoteUserData(null,e),n=await this.generateSyncPreview({ref:t.ref,syncData:i},e,y.CancellationToken.None),o=[];for(const e of n){const t=await this.getAcceptResult(e,e.remoteResource,void 0,y.CancellationToken.None),{remoteChange:i}=await this.getAcceptResult(e,e.previewResource,e.remoteContent,y.CancellationToken.None);o.push([e,Object.assign(Object.assign({},t),{remoteChange:0!==i?i:2})])}await this.applyResult(t,e,o,!1),this.logService.info(`${this.syncResourceLogLabel}: Finished resetting ${this.resource.toLowerCase()}.`)}finally{this.setStatus("idle")}return!0}async getLatestRemoteUserData(e,t){if(t){const i=e&&e.latest?e.latest[this.resource]:void 0;if(t.ref===i)return t;if(void 0===i&&null===t.syncData)return t}return this.getRemoteUserData(t)}async performSync(e,t,i){ if(e.syncData&&e.syncData.version>this.version)throw this.telemetryService.publicLog2("sync/incompatible",{source:this.resource}),new l.UserDataSyncError(m.localize(0,null,this.resource,this.version,e.syncData.version),l.UserDataSyncErrorCode.IncompatibleLocalContent,this.resource);try{return await this.doSync(e,t,i)}catch(n){if(n instanceof l.UserDataSyncError)switch(n.code){case l.UserDataSyncErrorCode.LocalPreconditionFailed:return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize ${this.syncResourceLogLabel} as there is a new local version available. Synchronizing again...`),this.performSync(e,t,i);case l.UserDataSyncErrorCode.Conflict:case l.UserDataSyncErrorCode.PreconditionFailed:return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize as there is a new remote version available. Synchronizing again...`),e=await this.getRemoteUserData(null),t=await this.getLastSyncUserData(),this.performSync(e,t,i)}throw n}}async doSync(e,t,i){try{ this.syncPreviewPromise||(this.syncPreviewPromise=h.createCancelablePromise(n=>this.doGenerateSyncResourcePreview(e,t,i,n)));const n=await this.syncPreviewPromise;return this.updateConflicts(n.resourcePreviews),n.resourcePreviews.some(({mergeState:e})=>"conflict"===e)?"hasConflicts":i?await this.doApply(!1):"syncing"}catch(e){throw this.syncPreviewPromise=null,e}}async merge(e){return await this.updateSyncResourcePreview(e,async e=>{const t=await this.getMergeResult(e,y.CancellationToken.None);await this.fileService.writeFile(e.previewResource,s.VSBuffer.fromString((null==t?void 0:t.content)||""));const i=t&&!t.hasConflicts?await this.getAcceptResult(e,e.previewResource,void 0,y.CancellationToken.None):void 0;return e.acceptResult=i,e.mergeState=t.hasConflicts?"conflict":i?"accepted":"preview",e.localChange=i?i.localChange:t.localChange,e.remoteChange=i?i.remoteChange:t.remoteChange,e}),this.syncPreviewPromise}async accept(e,t){return await this.updateSyncResourcePreview(e,async i=>{ const n=await this.getAcceptResult(i,e,t,y.CancellationToken.None);return i.acceptResult=n,i.mergeState="accepted",i.localChange=n.localChange,i.remoteChange=n.remoteChange,i}),this.syncPreviewPromise}async discard(e){return await this.updateSyncResourcePreview(e,async e=>{const t=await this.getMergeResult(e,y.CancellationToken.None);return await this.fileService.writeFile(e.previewResource,s.VSBuffer.fromString(t.content||"")),e.acceptResult=void 0,e.mergeState="preview",e.localChange=t.localChange,e.remoteChange=t.remoteChange,e}),this.syncPreviewPromise}async updateSyncResourcePreview(e,t){if(!this.syncPreviewPromise)return;let i=await this.syncPreviewPromise;const n=i.resourcePreviews.findIndex(({localResource:t,remoteResource:i,previewResource:n})=>this.extUri.isEqual(t,e)||this.extUri.isEqual(i,e)||this.extUri.isEqual(n,e));-1!==n&&(this.syncPreviewPromise=h.createCancelablePromise(async e=>{const o=[...i.resourcePreviews];return o[n]=await t(o[n]),Object.assign(Object.assign({},i),{resourcePreviews:o}) }),i=await this.syncPreviewPromise,this.updateConflicts(i.resourcePreviews),i.resourcePreviews.some(({mergeState:e})=>"conflict"===e)?this.setStatus("hasConflicts"):this.setStatus("syncing"))}async doApply(e){if(!this.syncPreviewPromise)return"idle";const t=await this.syncPreviewPromise;return t.resourcePreviews.some(({mergeState:e})=>"conflict"===e)?"hasConflicts":t.resourcePreviews.some(({mergeState:e})=>"accepted"!==e)?"syncing":(await this.applyResult(t.remoteUserData,t.lastSyncUserData,t.resourcePreviews.map(e=>[e,e.acceptResult]),e),this.syncPreviewPromise=null,await this.clearPreviewFolder(),"idle")}async clearPreviewFolder(){try{await this.fileService.del(this.syncPreviewFolder,{recursive:!0})}catch(e){}}updateConflicts(e){const t=e.filter(({mergeState:e})=>"conflict"===e);b.equals(this._conflicts,t,(e,t)=>this.extUri.isEqual(e.previewResource,t.previewResource))||(this._conflicts=t,this._onDidChangeConflicts.fire(t))}async hasPreviouslySynced(){return!!await this.getLastSyncUserData()} async getRemoteSyncResourceHandles(){return(await this.userDataSyncStoreService.getAllRefs(this.resource)).map(({created:e,ref:t})=>({created:e,uri:this.toRemoteBackupResource(t)}))}async getLocalSyncResourceHandles(){return(await this.userDataSyncBackupStoreService.getAllRefs(this.resource)).map(({created:e,ref:t})=>({created:e,uri:this.toLocalBackupResource(t)}))}toRemoteBackupResource(e){return a.URI.from({scheme:l.USER_DATA_SYNC_SCHEME,authority:"remote-backup",path:`/${this.resource}/${e}`})}toLocalBackupResource(e){return a.URI.from({scheme:l.USER_DATA_SYNC_SCHEME,authority:"local-backup",path:`/${this.resource}/${e}`})}async getMachineId({uri:e}){const t=this.extUri.basename(e);if(this.extUri.isEqual(e,this.toRemoteBackupResource(t))){const{content:e}=await this.getUserData(t);if(e){const t=this.parseSyncData(e);return null==t?void 0:t.machineId}}}async resolveContent(e){const t=this.extUri.basename(e);if(this.extUri.isEqual(e,this.toRemoteBackupResource(t))){const{content:e}=await this.getUserData(t) ;return e}return this.extUri.isEqual(e,this.toLocalBackupResource(t))?this.userDataSyncBackupStoreService.resolveContent(this.resource,t):null}async resolvePreviewContent(e){const t=this.syncPreviewPromise?await this.syncPreviewPromise:null;if(t)for(const i of t.resourcePreviews){if(this.extUri.isEqual(i.acceptedResource,e))return i.acceptResult?i.acceptResult.content:null;if(this.extUri.isEqual(i.remoteResource,e))return i.remoteContent;if(this.extUri.isEqual(i.localResource,e))return i.localContent}return null}async resetLocal(){try{await this.fileService.del(this.lastSyncResource)}catch(e){}}async doGenerateSyncResourcePreview(e,t,i,n){var o;const r=await this.currentMachineIdPromise,a=!!(null===(o=e.syncData)||void 0===o?void 0:o.machineId)&&e.syncData.machineId===r,c=null===t&&a?e:t,d=await this.generateSyncPreview(e,c,n),h=[];for(const e of d){const t=e.previewResource.with({scheme:l.USER_DATA_SYNC_SCHEME,authority:"accepted"}) ;if(0===e.localChange&&0===e.remoteChange)h.push(Object.assign(Object.assign({},e),{acceptedResource:t,acceptResult:{content:null,localChange:0,remoteChange:0},mergeState:"accepted"}));else{const t=i?await this.getMergeResult(e,n):void 0;if(n.isCancellationRequested)break;await this.fileService.writeFile(e.previewResource,s.VSBuffer.fromString((null==t?void 0:t.content)||""));const o=t&&!t.hasConflicts?await this.getAcceptResult(e,e.previewResource,void 0,n):void 0;h.push(Object.assign(Object.assign({},e),{acceptResult:o,mergeState:(null==t?void 0:t.hasConflicts)?"conflict":o?"accepted":"preview",localChange:o?o.localChange:t?t.localChange:e.localChange,remoteChange:o?o.remoteChange:t?t.remoteChange:e.remoteChange}))}}return{remoteUserData:e,lastSyncUserData:t,resourcePreviews:h,isLastSyncFromCurrentMachine:a}}async getLastSyncUserData(){try{const e=await this.fileService.readFile(this.lastSyncResource),t=JSON.parse(e.value.toString()),i=t;if(null===i.content)return{ref:t.ref,syncData:null} ;const n=JSON.parse(i.content);if(w(n))return Object.assign(Object.assign({},t),{syncData:n,content:void 0})}catch(e){e instanceof n.FileOperationError&&1===e.fileOperationResult||this.logService.error(e)}return null}async updateLastSyncUserData(e,t={}){const i=Object.assign({ref:e.ref,content:e.syncData?JSON.stringify(e.syncData):null},t);await this.fileService.writeFile(this.lastSyncResource,s.VSBuffer.fromString(JSON.stringify(i)))}async getRemoteUserData(e){const{ref:t,content:i}=await this.getUserData(e);let n=null;return null!==i&&(n=this.parseSyncData(i)),{ref:t,syncData:n}}parseSyncData(e){try{const t=JSON.parse(e);if(w(t))return t}catch(e){this.logService.error(e)}throw new l.UserDataSyncError(m.localize(1,null),l.UserDataSyncErrorCode.IncompatibleRemoteContent,this.resource)}async getUserData(e){if(f.isString(e)){return{ref:e,content:await this.userDataSyncStoreService.resolveContent(this.resource,e)}}{const t=e?{ref:e.ref,content:e.syncData?JSON.stringify(e.syncData):null}:null ;return this.userDataSyncStoreService.read(this.resource,t,this.syncHeaders)}}async updateRemoteUserData(e,t){const i=await this.currentMachineIdPromise,n={version:this.version,machineId:i,content:e};return{ref:t=await this.userDataSyncStoreService.write(this.resource,JSON.stringify(n),t,this.syncHeaders),syncData:n}}async backupLocal(e){const t={version:this.version,content:e};return this.userDataSyncBackupStoreService.backup(this.resource,JSON.stringify(t))}async stop(){"idle"!==this.status&&(this.logService.trace(`${this.syncResourceLogLabel}: Stopping synchronizing ${this.resource.toLowerCase()}.`),this.syncPreviewPromise&&(this.syncPreviewPromise.cancel(),this.syncPreviewPromise=null),this.updateConflicts([]),await this.clearPreviewFolder(),this.setStatus("idle"),this.logService.info(`${this.syncResourceLogLabel}: Stopped synchronizing ${this.resource.toLowerCase()}.`))}} ;I=o([r(1,n.IFileService),r(2,c.IEnvironmentService),r(3,C.IStorageService),r(4,l.IUserDataSyncStoreService),r(5,l.IUserDataSyncBackupStoreService),r(6,l.IUserDataSyncResourceEnablementService),r(7,g.ITelemetryService),r(8,l.IUserDataSyncLogService),r(9,v.IConfigurationService)],I),t.AbstractSynchroniser=I;let x=class extends I{constructor(e,t,i,n,o,s,r,a,l,c,d){super(t,i,n,o,s,r,a,l,c,d),this.file=e,this._register(this.fileService.watch(this.extUri.dirname(e))),this._register(this.fileService.onDidFilesChange(e=>this.onFileChanges(e)))}async getLocalFileContent(){try{return await this.fileService.readFile(this.file)}catch(e){return null}}async updateLocalFileContent(e,t,i){try{t?await this.fileService.writeFile(this.file,s.VSBuffer.fromString(e),i?void 0:t):await this.fileService.createFile(this.file,s.VSBuffer.fromString(e),{overwrite:i})}catch(e){ throw e instanceof n.FileOperationError&&1===e.fileOperationResult||e instanceof n.FileOperationError&&3===e.fileOperationResult?new l.UserDataSyncError(e.message,l.UserDataSyncErrorCode.LocalPreconditionFailed):e}}onFileChanges(e){e.contains(this.file)&&this.triggerLocalChange()}};x=o([r(2,n.IFileService),r(3,c.IEnvironmentService),r(4,C.IStorageService),r(5,l.IUserDataSyncStoreService),r(6,l.IUserDataSyncBackupStoreService),r(7,l.IUserDataSyncResourceEnablementService),r(8,g.ITelemetryService),r(9,l.IUserDataSyncLogService),r(10,v.IConfigurationService)],x),t.AbstractFileSynchroniser=x;let k=class extends x{constructor(e,t,i,n,o,s,r,a,l,c,d,h){super(e,t,i,n,o,s,r,a,l,c,h),this.userDataSyncUtilService=d,this._formattingOptions=void 0}hasErrors(e){const t=[];return p.parse(e,t,{allowEmptyContent:!0,allowTrailingComma:!0}),t.length>0}getFormattingOptions(){return this._formattingOptions||(this._formattingOptions=this.userDataSyncUtilService.resolveFormattingOptions(this.file)),this._formattingOptions}} ;k=o([r(2,n.IFileService),r(3,c.IEnvironmentService),r(4,C.IStorageService),r(5,l.IUserDataSyncStoreService),r(6,l.IUserDataSyncBackupStoreService),r(7,l.IUserDataSyncResourceEnablementService),r(8,g.ITelemetryService),r(9,l.IUserDataSyncLogService),r(10,l.IUserDataSyncUtilService),r(11,v.IConfigurationService)],k),t.AbstractJsonFileSynchroniser=k;let D=class{constructor(e,t,i,n){this.resource=e,this.environmentService=t,this.logService=i,this.fileService=n,this.extUri=this.fileService.hasCapability(t.userDataSyncHome,1024)?d.extUri:d.extUriIgnorePathCase,this.lastSyncResource=E(this.resource,t,d.extUri)}async initialize({ref:e,content:t}){if(!t)return void this.logService.info("Remote content does not exist.",this.resource);const i=this.parseSyncData(t);if(i)if(await this.fileService.exists(this.lastSyncResource))this.logService.info("Remote content does not exist.",this.resource);else try{await this.doInitialize({ref:e,syncData:i})}catch(e){this.logService.error(e)}}parseSyncData(e){try{ const t=JSON.parse(e);if(w(t))return t}catch(e){this.logService.error(e)}this.logService.info("Cannot parse sync data as it is not compatible with the current version.",this.resource)}async updateLastSyncUserData(e,t={}){const i=Object.assign({ref:e.ref,content:e.syncData?JSON.stringify(e.syncData):null},t);await this.fileService.writeFile(this.lastSyncResource,s.VSBuffer.fromString(JSON.stringify(i)))}};D=o([r(1,c.IEnvironmentService),r(2,l.IUserDataSyncLogService),r(3,n.IFileService)],D),t.AbstractInitializer=D})),define(e[585],t([0,1,98,6,84,76,106,25,9,583,318,23,10,253,164,24,26,31]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b){"use strict";async function _(e,t){const i=JSON.parse(e.content);if(1===e.version||2===e.version){const n=await t.getInstalled(0);for(const t of i)1===e.version&&(!1===t.enabled&&(t.disabled=!0),delete t.enabled),2===e.version&&n.every(e=>!l.areSameExtensions(e.identifier,t.identifier))&&(t.installed=!0)}return i}Object.defineProperty(t,"__esModule",{value:!0}), t.ExtensionsInitializer=t.ExtensionsSynchroniser=void 0;let C=class e extends u.AbstractSynchroniser{constructor(e,t,o,s,r,a,l,c,d,h,u,g){super("extensions",t,e,o,s,r,u,g,c,h),this.extensionManagementService=a,this.extensionEnablementService=l,this.extensionGalleryService=d,this.version=4,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"extensions.json"),this.localResource=this.previewResource.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._register(n.Event.debounce(n.Event.any(n.Event.filter(this.extensionManagementService.onDidInstallExtension,e=>!!e.gallery),n.Event.filter(this.extensionManagementService.onDidUninstallExtension,e=>!e.error),this.extensionEnablementService.onDidChangeEnablement),()=>void 0,500)(()=>this.triggerLocalChange()))}isEnabled(){ return super.isEnabled()&&this.extensionGalleryService.isEnabled()}async generateSyncPreview(e,t){const i=e.syncData?await _(e.syncData,this.extensionManagementService):null,n=t&&t.skippedExtensions||[],o=t?await _(t.syncData,this.extensionManagementService):null,s=await this.extensionManagementService.getInstalled(),r=this.getLocalExtensions(s),a=h.getIgnoredExtensions(s,this.configurationService);i?this.logService.trace(`${this.syncResourceLogLabel}: Merging remote extensions with local extensions...`):this.logService.trace(`${this.syncResourceLogLabel}: Remote extensions does not exist. Synchronizing extensions for the first time.`);const{added:l,removed:c,updated:d,remote:u}=h.merge(r,i,o,n,a),g={added:l,removed:c,updated:d,remote:u,content:this.getPreviewContent(r,l,d,c),localChange:l.length>0||c.length>0||d.length>0?2:0,remoteChange:null!==u?2:0};return[{skippedExtensions:n,localResource:this.localResource,localContent:this.format(r),localExtensions:r,remoteResource:this.remoteResource, remoteContent:i?this.format(i):null,previewResource:this.previewResource,previewResult:g,localChange:g.localChange,remoteChange:g.remoteChange,acceptedResource:this.acceptedResource}]}getPreviewContent(e,t,i,n){const o=[...t,...i],s=new Set,r=e=>{s.add(e.id.toLowerCase()),e.uuid&&s.add(e.uuid)};o.forEach(({identifier:e})=>r(e)),n.forEach(r);for(const t of e)s.has(t.identifier.id.toLowerCase())||t.identifier.uuid&&s.has(t.identifier.uuid)||o.push(t);return this.format(o)}async getMergeResult(e,t){return Object.assign(Object.assign({},e.previewResult),{hasConflicts:!1})}async getAcceptResult(e,t,i,n){if(this.extUri.isEqual(t,this.localResource))return this.acceptLocal(e);if(this.extUri.isEqual(t,this.remoteResource))return this.acceptRemote(e);if(this.extUri.isEqual(t,this.previewResource))return e.previewResult;throw new Error(`Invalid Resource: ${t.toString()}`)}async acceptLocal(e){ const t=await this.extensionManagementService.getInstalled(),i=h.getIgnoredExtensions(t,this.configurationService),n=h.merge(e.localExtensions,null,null,e.skippedExtensions,i),{added:o,removed:s,updated:r,remote:a}=n;return{content:e.localContent,added:o,removed:s,updated:r,remote:a,localChange:o.length>0||s.length>0||r.length>0?2:0,remoteChange:null!==a?2:0}}async acceptRemote(e){const t=await this.extensionManagementService.getInstalled(),i=h.getIgnoredExtensions(t,this.configurationService),n=e.remoteContent?JSON.parse(e.remoteContent):null;if(null!==n){const t=h.merge(e.localExtensions,n,e.localExtensions,[],i),{added:o,removed:s,updated:r,remote:a}=t;return{content:e.remoteContent,added:o,removed:s,updated:r,remote:a,localChange:o.length>0||s.length>0||r.length>0?2:0,remoteChange:null!==a?2:0}}return{content:e.remoteContent,added:[],removed:[],updated:[],remote:null,localChange:0,remoteChange:0}}async applyResult(e,t,i,n){ let{skippedExtensions:o,localExtensions:s}=i[0][0],{added:r,removed:a,updated:l,remote:c,localChange:d,remoteChange:h}=i[0][1];if(0===d&&0===h&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing extensions.`),0!==d&&(await this.backupLocal(JSON.stringify(s)),o=await this.updateLocalExtensions(r,a,l,o)),c){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote extensions...`);const t=JSON.stringify(c);e=await this.updateRemoteUserData(t,n?null:e.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote extensions`)}(null==t?void 0:t.ref)!==e.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized extensions...`),await this.updateLastSyncUserData(e,{skippedExtensions:o}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized extensions`))}async getAssociatedResources({uri:t}){return[{resource:this.extUri.joinPath(t,"extensions.json"),comparableResource:e.EXTENSIONS_DATA_URI}]} async resolveContent(t){if(this.extUri.isEqual(t,e.EXTENSIONS_DATA_URI)){const e=await this.extensionManagementService.getInstalled(),t=h.getIgnoredExtensions(e,this.configurationService),i=this.getLocalExtensions(e).filter(e=>!t.some(t=>l.areSameExtensions({id:t},e.identifier)));return this.format(i)}if(this.extUri.isEqual(this.remoteResource,t)||this.extUri.isEqual(this.localResource,t)||this.extUri.isEqual(this.acceptedResource,t))return this.resolvePreviewContent(t);let i=await super.resolveContent(t);if(i)return i;if(i=await super.resolveContent(this.extUri.dirname(t))){const e=this.parseSyncData(i);if(e)switch(this.extUri.basename(t)){case"extensions.json":return this.format(this.parseExtensions(e))}}return null}format(e){e.sort((e,t)=>!e.identifier.uuid&&t.identifier.uuid?-1:e.identifier.uuid&&!t.identifier.uuid?1:f.compare(e.identifier.id,t.identifier.id));const t=JSON.stringify(e),i=m.format(t,void 0,{});return v.applyEdits(t,i)}async hasLocalData(){try{ const e=await this.extensionManagementService.getInstalled();if(this.getLocalExtensions(e).some(e=>e.installed||e.disabled))return!0}catch(e){}return!1}async updateLocalExtensions(e,t,i,n){const o=[],s=[];if(t.length){const e=(await this.extensionManagementService.getInstalled(1)).filter(({identifier:e})=>t.some(t=>l.areSameExtensions(e,t)));await Promise.all(e.map(async e=>{this.logService.trace(`${this.syncResourceLogLabel}: Uninstalling local extension...`,e.identifier.id),await this.extensionManagementService.uninstall(e),this.logService.info(`${this.syncResourceLogLabel}: Uninstalled local extension.`,e.identifier.id),o.push(e.identifier)}))}(e.length||i.length)&&await Promise.all([...e,...i].map(async e=>{const t=(await this.extensionManagementService.getInstalled()).filter(t=>l.areSameExtensions(t.identifier,e.identifier))[0];if(t&&0===t.type)return e.disabled?(this.logService.trace(`${this.syncResourceLogLabel}: Disabling extension...`,e.identifier.id), await this.extensionEnablementService.disableExtension(e.identifier),this.logService.info(`${this.syncResourceLogLabel}: Disabled extension`,e.identifier.id)):(this.logService.trace(`${this.syncResourceLogLabel}: Enabling extension...`,e.identifier.id),await this.extensionEnablementService.enableExtension(e.identifier),this.logService.info(`${this.syncResourceLogLabel}: Enabled extension`,e.identifier.id)),void o.push(e.identifier);const i=await this.extensionGalleryService.getCompatibleExtension(e.identifier,e.version);if(i)try{e.disabled?(this.logService.trace(`${this.syncResourceLogLabel}: Disabling extension...`,e.identifier.id,i.version),await this.extensionEnablementService.disableExtension(i.identifier),this.logService.info(`${this.syncResourceLogLabel}: Disabled extension`,e.identifier.id,i.version)):(this.logService.trace(`${this.syncResourceLogLabel}: Enabling extension...`,e.identifier.id,i.version),await this.extensionEnablementService.enableExtension(i.identifier), this.logService.info(`${this.syncResourceLogLabel}: Enabled extension`,e.identifier.id,i.version)),t&&t.manifest.version===i.version||(this.logService.trace(`${this.syncResourceLogLabel}: Installing extension...`,e.identifier.id,i.version),await this.extensionManagementService.installFromGallery(i),this.logService.info(`${this.syncResourceLogLabel}: Installed extension.`,e.identifier.id,i.version),o.push(i.identifier))}catch(t){s.push(e),this.logService.error(t),this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing extension`,i.displayName||i.identifier.id)}else s.push(e)}));const r=[];for(const e of n)o.some(t=>l.areSameExtensions(t,e.identifier))||r.push(e);for(const e of s)r.some(t=>l.areSameExtensions(t.identifier,e.identifier))||r.push(e);return r}parseExtensions(e){return JSON.parse(e.content)}getLocalExtensions(e){const t=this.extensionEnablementService.getDisabledExtensions();return e.map(({identifier:e,type:i})=>{const n={identifier:e} ;return t.some(t=>l.areSameExtensions(t,e))&&(n.disabled=!0),1===i&&(n.installed=!0),n})}};C.EXTENSIONS_DATA_URI=p.URI.from({scheme:i.USER_DATA_SYNC_SCHEME,authority:"extensions",path:"/extensions.json"}),C=o([r(0,s.IEnvironmentService),r(1,c.IFileService),r(2,S.IStorageService),r(3,i.IUserDataSyncStoreService),r(4,i.IUserDataSyncBackupStoreService),r(5,a.IExtensionManagementService),r(6,a.IGlobalExtensionEnablementService),r(7,i.IUserDataSyncLogService),r(8,a.IExtensionGalleryService),r(9,d.IConfigurationService),r(10,i.IUserDataSyncResourceEnablementService),r(11,g.ITelemetryService)],C),t.ExtensionsSynchroniser=C;let y=class extends u.AbstractInitializer{constructor(e,t,i,n,o,s){super("extensions",o,s,n),this.extensionManagementService=e,this.galleryService=t,this.extensionEnablementService=i}async doInitialize(e){const t=e.syncData?await _(e.syncData,this.extensionManagementService):null;if(!t)return void this.logService.info("Skipping initializing extensions because remote extensions does not exist.") ;const i=await this.extensionManagementService.getInstalled(),n={names:[],uuids:[]},o=[];for(const e of t)i.some(t=>l.areSameExtensions(t.identifier,e.identifier))?e.disabled&&o.push(e.identifier):e.installed&&(e.identifier.uuid?n.uuids.push(e.identifier.uuid):n.names.push(e.identifier.id));if(n.names.length||n.uuids.length){const e=(await this.galleryService.query({ids:n.uuids,names:n.names,pageSize:n.uuids.length+n.names.length},b.CancellationToken.None)).firstPage;for(const t of e)try{this.logService.trace("Installing extension...",t.identifier.id),await this.extensionManagementService.installFromGallery(t),this.logService.info("Installed extension.",t.identifier.id)}catch(e){this.logService.error(e)}}if(o.length)for(const e of o)this.logService.trace("Enabling extension...",e.id),await this.extensionEnablementService.disableExtension(e),this.logService.info("Enabled extension",e.id)}} ;y=o([r(0,a.IExtensionManagementService),r(1,a.IExtensionGalleryService),r(2,a.IGlobalExtensionEnablementService),r(3,c.IFileService),r(4,s.IEnvironmentService),r(5,i.IUserDataSyncLogService)],y),t.ExtensionsInitializer=y})),define(e[586],t([0,1,98,66,6,84,25,362,1597,93,318,23,9,10,253,164,26,116,14]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStateInitializer=t.GlobalStateSynchroniser=void 0;const C=["locale"];let y=class e extends u.AbstractSynchroniser{constructor(e,t,n,o,r,a,l,c,d,h){super("globalState",e,r,d,t,n,a,l,o,c),this.environmentService=r,this.storageService=d,this.storageKeysSyncRegistryService=h,this.version=1,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"globalState.json"),this.localResource=this.previewResource.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}), this.acceptedResource=this.previewResource.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._register(this.fileService.watch(this.extUri.dirname(this.environmentService.argvResource))),this._register(s.Event.any(s.Event.filter(this.fileService.onDidFilesChange,e=>e.contains(this.environmentService.argvResource)),s.Event.filter(this.storageService.onDidChangeStorage,e=>h.storageKeys.some(({key:t})=>e.key===t)),this.storageKeysSyncRegistryService.onDidChangeStorageKeys)(()=>this.triggerLocalChange()))}async generateSyncPreview(e,t,i){const n=e.syncData?JSON.parse(e.syncData.content):null,o=t&&t.syncData?JSON.parse(t.syncData.content):null,s=await this.getLocalGlobalState();n?this.logService.trace(`${this.syncResourceLogLabel}: Merging remote ui state with local ui state...`):this.logService.trace(`${this.syncResourceLogLabel}: Remote ui state does not exist. Synchronizing ui state for the first time.`) ;const{local:r,remote:a,skipped:l}=d.merge(s.storage,n?n.storage:null,o?o.storage:null,this.getSyncStorageKeys(),(null==t?void 0:t.skippedStorageKeys)||[],this.logService),c={content:null,local:r,remote:a,localChange:Object.keys(r.added).length>0||Object.keys(r.updated).length>0||r.removed.length>0?2:0,remoteChange:null!==a?2:0};return[{skippedStorageKeys:l,localResource:this.localResource,localContent:this.format(s),localUserData:s,remoteResource:this.remoteResource,remoteContent:n?this.format(n):null,previewResource:this.previewResource,previewResult:c,localChange:c.localChange,remoteChange:c.remoteChange,acceptedResource:this.acceptedResource}]}async getMergeResult(e,t){return Object.assign(Object.assign({},e.previewResult),{hasConflicts:!1})}async getAcceptResult(e,t,i,n){if(this.extUri.isEqual(t,this.localResource))return this.acceptLocal(e);if(this.extUri.isEqual(t,this.remoteResource))return this.acceptRemote(e);if(this.extUri.isEqual(t,this.previewResource))return e.previewResult ;throw new Error(`Invalid Resource: ${t.toString()}`)}async acceptLocal(e){return{content:e.localContent,local:{added:{},removed:[],updated:{}},remote:e.localUserData.storage,localChange:0,remoteChange:2}}async acceptRemote(e){if(null!==e.remoteContent){const t=JSON.parse(e.remoteContent),{local:i,remote:n}=d.merge(e.localUserData.storage,t.storage,null,this.getSyncStorageKeys(),e.skippedStorageKeys,this.logService);return{content:e.remoteContent,local:i,remote:n,localChange:Object.keys(i.added).length>0||Object.keys(i.updated).length>0||i.removed.length>0?2:0,remoteChange:null!==n?2:0}}return{content:e.remoteContent,local:{added:{},removed:[],updated:{}},remote:null,localChange:0,remoteChange:0}}async applyResult(e,t,i,n){let{localUserData:o,skippedStorageKeys:s}=i[0][0],{local:r,remote:a,localChange:l,remoteChange:c}=i[0][1];if(0===l&&0===c&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing ui state.`), 0!==l&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local ui state...`),await this.backupLocal(JSON.stringify(o)),await this.writeLocalGlobalState(r),this.logService.info(`${this.syncResourceLogLabel}: Updated local ui state`)),0!==c){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote ui state...`);const t=JSON.stringify({storage:a});e=await this.updateRemoteUserData(t,n?null:e.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote ui state`)}(null==t?void 0:t.ref)===e.ref&&_.equals(t.skippedStorageKeys,s)||(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized ui state...`),await this.updateLastSyncUserData(e,{skippedStorageKeys:s}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized ui state`))}async getAssociatedResources({uri:t}){return[{resource:this.extUri.joinPath(t,"globalState.json"),comparableResource:e.GLOBAL_STATE_DATA_URI}]}async resolveContent(t){ if(this.extUri.isEqual(t,e.GLOBAL_STATE_DATA_URI)){const e=await this.getLocalGlobalState();return this.format(e)}if(this.extUri.isEqual(this.remoteResource,t)||this.extUri.isEqual(this.localResource,t)||this.extUri.isEqual(this.acceptedResource,t))return this.resolvePreviewContent(t);let i=await super.resolveContent(t);if(i)return i;if(i=await super.resolveContent(this.extUri.dirname(t))){const e=this.parseSyncData(i);if(e)switch(this.extUri.basename(t)){case"globalState.json":return this.format(JSON.parse(e.content))}}return null}format(e){const t=e.storage?Object.keys(e.storage).sort():[],i={};t.forEach(t=>i[t]=e.storage[t]),e.storage=i;const n=JSON.stringify(e),o=v.format(n,void 0,{});return f.applyEdits(n,o)}async hasLocalData(){var e;try{const{storage:t}=await this.getLocalGlobalState();if(Object.keys(t).length>1||"en"!==(null===(e=t["globalState.argv..locale"])||void 0===e?void 0:e.value))return!0}catch(e){}return!1}async getLocalGlobalState(){const e={},t=await this.getLocalArgvContent(),i=h.parse(t) ;for(const t of C)void 0!==i[t]&&(e[`globalState.argv.${t}`]={version:1,value:i[t]});for(const{key:t,version:i}of this.storageKeysSyncRegistryService.storageKeys){const n=this.storageService.get(t,0);n&&(e[t]={version:i,value:n})}return{storage:e}}async getLocalArgvContent(){try{return(await this.fileService.readFile(this.environmentService.argvResource)).value.toString()}catch(e){}return"{}"}async writeLocalGlobalState({added:e,removed:t,updated:i}){const n={},o={},s=(e,t)=>{for(const i of e)if(i.startsWith("globalState.argv."))n[i.substring("globalState.argv.".length)]=t?t[i].value:void 0;else if(t){const e=t[i];e.value!==String(this.storageService.get(i,0))&&(o[i]=e.value)}else void 0!==this.storageService.get(i,0)&&(o[i]=void 0)};if(s(Object.keys(e),e),s(Object.keys(i),i),s(t),Object.keys(n).length&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating locale...`),await this.updateArgv(n),this.logService.info(`${this.syncResourceLogLabel}: Updated locale`)),Object.keys(o).length){ this.logService.trace(`${this.syncResourceLogLabel}: Updating global state...`);for(const e of Object.keys(o))this.storageService.store(e,o[e],0);this.logService.info(`${this.syncResourceLogLabel}: Updated global state`,Object.keys(o))}}async updateArgv(e){const t=await this.getLocalArgvContent();let i=t;for(const t of Object.keys(e))i=c.edit(i,[t],e[t],{});t!==i&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating locale...`),await this.fileService.writeFile(this.environmentService.argvResource,n.VSBuffer.fromString(i)),this.logService.info(`${this.syncResourceLogLabel}: Updated locale.`))}getSyncStorageKeys(){return[...this.storageKeysSyncRegistryService.storageKeys,...C.map(e=>({key:`globalState.argv.${e}`,version:1}))]}};y.GLOBAL_STATE_DATA_URI=m.URI.from({scheme:i.USER_DATA_SYNC_SCHEME,authority:"globalState",path:"/globalState.json"}), y=o([r(0,l.IFileService),r(1,i.IUserDataSyncStoreService),r(2,i.IUserDataSyncBackupStoreService),r(3,i.IUserDataSyncLogService),r(4,a.IEnvironmentService),r(5,i.IUserDataSyncResourceEnablementService),r(6,g.ITelemetryService),r(7,p.IConfigurationService),r(8,S.IStorageService),r(9,b.IStorageKeysSyncRegistryService)],y),t.GlobalStateSynchroniser=y;let w=class extends u.AbstractInitializer{constructor(e,t,i,n){super("globalState",i,n,t),this.storageService=e}async doInitialize(e){const t=e.syncData?JSON.parse(e.syncData.content):null;if(!t)return void this.logService.info("Skipping initializing global state because remote global state does not exist.");const i={},o={};for(const e of Object.keys(t.storage))e.startsWith("globalState.argv.")?i[e.substring("globalState.argv.".length)]=t.storage[e].value:void 0===this.storageService.get(e,0)&&(o[e]=t.storage[e].value);if(Object.keys(i).length){let e="{}";try{e=(await this.fileService.readFile(this.environmentService.argvResource)).value.toString()}catch(e){} for(const t of Object.keys(i))e=c.edit(e,[t],i[t],{});await this.fileService.writeFile(this.environmentService.argvResource,n.VSBuffer.fromString(e))}if(Object.keys(o).length)for(const e of Object.keys(o))this.storageService.store(e,o[e],0)}};w=o([r(0,S.IStorageService),r(1,l.IFileService),r(2,a.IEnvironmentService),r(3,i.IUserDataSyncLogService)],w),t.GlobalStateInitializer=w})),define(e[587],t([0,1,25,98,1598,93,1050,84,9,12,13,14,318,23,26,66]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f){"use strict";function S(e,t){const i=JSON.parse(e);if(!t)return u.isUndefined(i.all)?null:i.all;switch(h.OS){case 2:return u.isUndefined(i.mac)?null:i.mac;case 3:return u.isUndefined(i.linux)?null:i.linux;case 1:return u.isUndefined(i.windows)?null:i.windows}}Object.defineProperty(t,"__esModule",{value:!0}),t.KeybindingsInitializer=t.KeybindingsSynchroniser=t.getKeybindingsContentFromSyncContent=void 0,t.getKeybindingsContentFromSyncContent=S;let b=class extends p.AbstractJsonFileSynchroniser{ constructor(e,t,i,o,s,r,a,l,c,d){super(a.keybindingsResource,"keybindings",r,a,l,e,t,s,d,i,c,o),this.version=2,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"keybindings.json"),this.localResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"accepted"})}async generateSyncPreview(e,t,i){const o=e.syncData?this.getKeybindingsContentFromSyncContent(e.syncData.content):null,r=t&&t.syncData?this.getKeybindingsContentFromSyncContent(t.syncData.content):null,a=await this.getLocalFileContent(),c=await this.getFormattingOptions();let d=null,h=!1,u=!1,g=!1;if(o){let e=a?a.value.toString():"[]";if(e=e||"[]",this.hasErrors(e))throw new n.UserDataSyncError(l.localize(0,null),n.UserDataSyncErrorCode.LocalInvalidContent,this.resource);if(!r||r!==e||r!==o){ this.logService.trace(`${this.syncResourceLogLabel}: Merging remote keybindings with local keybindings...`);const t=await s.merge(e,o,r,c,this.userDataSyncUtilService);t.hasChanges&&(d=t.mergeContent,h=(g=t.hasConflicts)||t.mergeContent!==e,u=g||t.mergeContent!==o)}}else a&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote keybindings does not exist. Synchronizing keybindings for the first time.`),d=a.value.toString(),u=!0);const p={content:d,localChange:h?a?2:1:0,remoteChange:u?2:0,hasConflicts:g};return[{fileContent:a,localResource:this.localResource,localContent:a?a.value.toString():null,localChange:p.localChange,remoteResource:this.remoteResource,remoteContent:o,remoteChange:p.remoteChange,previewResource:this.previewResource,previewResult:p,acceptedResource:this.acceptedResource}]}async getMergeResult(e,t){return e.previewResult}async getAcceptResult(e,t,i,n){if(this.extUri.isEqual(t,this.localResource))return{content:e.fileContent?e.fileContent.value.toString():null,localChange:0, remoteChange:2};if(this.extUri.isEqual(t,this.remoteResource))return{content:e.remoteContent,localChange:2,remoteChange:0};if(this.extUri.isEqual(t,this.previewResource))return void 0===i?{content:e.previewResult.content,localChange:e.previewResult.localChange,remoteChange:e.previewResult.remoteChange}:{content:i,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${t.toString()}`)}async applyResult(e,t,i,o){var s;const{fileContent:r}=i[0][0];let{content:a,localChange:c,remoteChange:d}=i[0][1];if(0===c&&0===d&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing keybindings.`),null!==a&&(a=(a=a.trim())||"[]",this.hasErrors(a)))throw new n.UserDataSyncError(l.localize(1,null),n.UserDataSyncErrorCode.LocalInvalidContent,this.resource);if(0!==c&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local keybindings...`),r&&await this.backupLocal(this.toSyncContent(r.value.toString(),null)),await this.updateLocalFileContent(a||"[]",r,o), this.logService.info(`${this.syncResourceLogLabel}: Updated local keybindings`)),0!==d){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote keybindings...`);const t=this.toSyncContent(a||"[]",e.syncData?e.syncData.content:null);e=await this.updateRemoteUserData(t,o?null:e.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote keybindings`)}try{await this.fileService.del(this.previewResource)}catch(e){}if((null==t?void 0:t.ref)!==e.ref){this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized keybindings...`);const t=null!==a?this.toSyncContent(a,null):null===(s=e.syncData)||void 0===s?void 0:s.content;await this.updateLastSyncUserData({ref:e.ref,syncData:t?{version:e.syncData?e.syncData.version:this.version,machineId:e.syncData.machineId,content:t}:null}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized keybindings`)}}async hasLocalData(){try{const e=await this.getLocalFileContent();if(e){const t=a.parse(e.value.toString()) ;if(g.isNonEmptyArray(t))return!0}}catch(e){if(1!==e.fileOperationResult)return!0}return!1}async getAssociatedResources({uri:e}){const t=await this.fileService.exists(this.file)?this.file:this.localResource;return[{resource:this.extUri.joinPath(e,"keybindings.json"),comparableResource:t}]}async resolveContent(e){if(this.extUri.isEqual(this.remoteResource,e)||this.extUri.isEqual(this.localResource,e)||this.extUri.isEqual(this.acceptedResource,e))return this.resolvePreviewContent(e);let t=await super.resolveContent(e);if(t)return t;if(t=await super.resolveContent(this.extUri.dirname(e))){const i=this.parseSyncData(t);if(i)switch(this.extUri.basename(e)){case"keybindings.json":return this.getKeybindingsContentFromSyncContent(i.content)}}return null}getKeybindingsContentFromSyncContent(e){try{return S(e,this.syncKeybindingsPerPlatform())}catch(e){return this.logService.error(e),null}}toSyncContent(e,t){let i={};try{i=JSON.parse(t||"{}")}catch(e){this.logService.error(e)} switch(this.syncKeybindingsPerPlatform()?delete i.all:i.all=e,h.OS){case 2:i.mac=e;break;case 3:i.linux=e;break;case 1:i.windows=e}return JSON.stringify(i)}syncKeybindingsPerPlatform(){let e=this.configurationService.inspect("settingsSync.keybindingsPerPlatform").userValue;return void 0!==e?e:void 0!==(e=this.configurationService.inspect("sync.keybindingsPerPlatform").userValue)?e:this.configurationService.getValue("settingsSync.keybindingsPerPlatform")}};b=o([r(0,n.IUserDataSyncStoreService),r(1,n.IUserDataSyncBackupStoreService),r(2,n.IUserDataSyncLogService),r(3,d.IConfigurationService),r(4,n.IUserDataSyncResourceEnablementService),r(5,i.IFileService),r(6,c.IEnvironmentService),r(7,v.IStorageService),r(8,n.IUserDataSyncUtilService),r(9,m.ITelemetryService)],b),t.KeybindingsSynchroniser=b;let _=class extends p.AbstractInitializer{constructor(e,t,i){super("keybindings",t,i,e)}async doInitialize(e){const t=e.syncData?this.getKeybindingsContentFromSyncContent(e.syncData.content):null ;t?await this.isEmpty()?(await this.fileService.writeFile(this.environmentService.keybindingsResource,f.VSBuffer.fromString(t)),await this.updateLastSyncUserData(e)):this.logService.info("Skipping initializing keybindings because local keybindings exist."):this.logService.info("Skipping initializing keybindings because remote keybindings does not exist.")}async isEmpty(){try{const e=await this.fileService.readFile(this.environmentService.settingsResource),t=a.parse(e.value.toString());return!g.isNonEmptyArray(t)}catch(e){return 1===e.fileOperationResult}}getKeybindingsContentFromSyncContent(e){try{return S(e,!0)}catch(e){return this.logService.error(e),null}}};_=o([r(0,i.IFileService),r(1,c.IEnvironmentService),r(2,n.IUserDataSyncLogService)],_),t.KeybindingsInitializer=_})),define(e[588],t([0,1,41,93,164,253,362,98,14]),(function(e,t,i,n,o,s,r,a,l){"use strict";function c(e,t,i,o){if(i.length){const s=b(t),a=n.parse(t),l=n.parse(e),c=[];for(const t of i){const i=a[t],n=l[t] ;void 0===i?e=r.edit(e,[t],void 0,o):void 0!==n?e=r.edit(e,[t],i,o):c.push(p(t,s))}c.sort((e,t)=>e.startOffset-t.startOffset),c.forEach(i=>e=g(i.setting.key,t,e,o))}return e}function d(e,t,o){if(e===t)return!0;const s=n.parse(e),r=n.parse(t),a=o.reduce((e,t)=>(e.add(t),e),new Set),l=b(e).filter(e=>!(e.setting&&a.has(e.setting.key))),c=b(t).filter(e=>!(e.setting&&a.has(e.setting.key)));if(l.length!==c.length)return!1;for(let e=0;e!n.has(e)):[],s=Object.keys(t).filter(e=>!n.has(e)),r=s.filter(e=>-1===o.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),a=o.filter(e=>-1===s.indexOf(e)).reduce((e,t)=>(e.add(t),e),new Set),l=new Set;if(e)for(const n of o){if(a.has(n))continue ;const o=e[n],s=t[n];i.equals(o,s)||l.add(n)}return{added:r,removed:a,updated:l}}function g(e,t,i,r){const a=n.parse(t),l=b(t),c=b(i),d=function(e,t,i){const n=t.findIndex(t=>{var i;return(null===(i=t.setting)||void 0===i?void 0:i.key)===e}),o=t[n-1];if(o){if(o.setting){const e=p(o.setting.key,i);if(e)return{index:i.indexOf(e),insertAfter:!0}}else{const e=m(n,t);if(e){const o=p(e.setting.key,i);if(o){const s=v(i.indexOf(o),i),r=f(t,e,t[n]);if(s){const e=f(i,o,s),t=S(r,e);return t?{index:i.indexOf(t),insertAfter:!0}:{index:i.indexOf(s),insertAfter:!1}}{const e=f(i,o,i[i.length-1]),t=S(r,e);return t?{index:i.indexOf(t),insertAfter:!0}:{index:i.length-1,insertAfter:!0}}}}}const e=t[n+1];if(e)if(e.setting){const t=p(e.setting.key,i);if(t)return{index:i.indexOf(t),insertAfter:!1}}else{const e=v(n,t);if(e){const o=p(e.setting.key,i);if(o){const s=m(i.indexOf(o),i),r=f(t,t[n],e);if(s){const e=f(i,s,o),t=S(r.reverse(),e.reverse());return t?{index:i.indexOf(t),insertAfter:!1}:{index:i.indexOf(s),insertAfter:!0}}{ const e=f(i,i[0],o),t=S(r.reverse(),e.reverse());return t?{index:i.indexOf(t),insertAfter:!1}:{index:0,insertAfter:!1}}}}}}return{index:i.length-1,insertAfter:!0}}(e,l,c);return function(e,t,i,n,r,a){let l;l=-1===n.index?o.setProperty(e,[t],i,a):function(e,t,i,n,o,r){var a;const l=`${JSON.stringify(t)}: ${JSON.stringify(i)}`,c=s.getEOL(r,e),d=o[n.index];if(n.insertAfter){const e=[];if(d.setting)e.push({offset:d.endOffset,length:0,content:","+l});else{const t=v(n.index,o),i=m(n.index,o),s=null===(a=null==i?void 0:i.setting)||void 0===a?void 0:a.commaOffset;i&&void 0===s&&e.push({offset:i.endOffset,length:0,content:","});const r=void 0!==s&&s>d.endOffset;e.push({offset:r?s+1:d.endOffset,length:0,content:t?c+l+",":c+l})}return e}{if(d.setting)return[{offset:d.startOffset,length:0,content:l+","}];const e=(o[n.index-1]&&!o[n.index-1].setting?c:"")+l+(v(n.index,o)?",":"")+c;return[{offset:d.startOffset,length:0,content:e}]}}(e,t,i,n,r,a).map(t=>o.withFormatting(e,t,a)[0]);return o.applyEdits(e,l)}(i,e,a[e],d,c,r)} function p(e,t){return t.filter(t=>{var i;return(null===(i=t.setting)||void 0===i?void 0:i.key)===e})[0]}function m(e,t){for(let i=e-1;i>=0;i--)if(t[i].setting)return t[i]}function v(e,t){for(let i=e+1;in{s++},onObjectProperty:(e,t,n)=>{0===s&&(i=t,o=e)},onObjectEnd:(n,r)=>{0===--s&&t.push({startOffset:i,endOffset:n+r,value:e.substring(i,n+r),setting:{key:o,commaOffset:void 0}})},onArrayBegin:(e,t)=>{s++},onArrayEnd:(n,r)=>{0===--s&&t.push({startOffset:i,endOffset:n+r,value:e.substring(i,n+r),setting:{key:o,commaOffset:void 0}})},onLiteralValue:(n,r,a)=>{0===s&&t.push({startOffset:i,endOffset:r+a,value:e.substring(i,r+a),setting:{key:o,commaOffset:void 0}})},onSeparator:(e,i,n)=>{ if(0===s&&","===e){let e=t.length-1;for(;e>=0&&!t[e].setting;e--);const n=t[e];n&&t.splice(e,1,{startOffset:n.startOffset,endOffset:n.endOffset,value:n.value,setting:{key:n.setting.key,commaOffset:i}})}},onComment:(i,n)=>{0===s&&t.push({startOffset:i,endOffset:i+n,value:e.substring(i,i+n)})}};return n.visit(e,r),t}Object.defineProperty(t,"__esModule",{value:!0}),t.addSetting=t.isEmpty=t.areSame=t.merge=t.updateIgnoredSettings=t.getIgnoredSettings=void 0,t.getIgnoredSettings=function(e,t,i){let o=[];o=i?function(e){const t=n.parse(e);return t&&(t["settingsSync.ignoredSettings"]||t["sync.ignoredSettings"])||[]}(i):function(e){let t=e.inspect("settingsSync.ignoredSettings").userValue;if(void 0!==t)return t;if(void 0!==(t=e.inspect("sync.ignoredSettings").userValue))return t;return e.getValue("settingsSync.ignoredSettings")||[]}(t);const s=[],r=[...a.getDisallowedIgnoredSettings()];if(Array.isArray(o))for(const e of o)e.startsWith("-")?r.push(e.substring(1)):s.push(e) ;return l.distinct([...e,...s].filter(e=>-1===r.indexOf(e)))},t.updateIgnoredSettings=c,t.merge=function(e,t,i,o,s,a){const l=c(e,t,o,a),p=i!==l,m=i!==t;if(!p&&!m)return{conflictsSettings:[],localContent:null,remoteContent:null,hasConflicts:!1};if(p&&!m)return{conflictsSettings:[],localContent:null,remoteContent:l,hasConflicts:!1};if(m&&!p)return{conflictsSettings:[],localContent:c(t,e,o,a),remoteContent:null,hasConflicts:!1};if(null===i&&h(e)){return{conflictsSettings:[],localContent:d(e,t,o)?null:c(t,e,o,a),remoteContent:null,hasConflicts:!1}}let v=e,f=t;const S=n.parse(e),b=n.parse(t),_=i?n.parse(i):null,C=o.reduce((e,t)=>(e.add(t),e),new Set),y=u(S,b,C),w=u(_,S,C),E=u(_,b,C),I=new Map,x=new Set,k=e=>{x.add(e);const t=s.filter(({key:t})=>t===e)[0];t?(v=r.edit(v,[e],t.value,a),f=r.edit(f,[e],t.value,a)):I.set(e,{key:e,localValue:S[e],remoteValue:b[e]})};for(const e of w.removed.values())E.updated.has(e)?k(e):f=r.edit(f,[e],void 0,a) ;for(const e of E.removed.values())x.has(e)||(w.updated.has(e)?k(e):v=r.edit(v,[e],void 0,a));for(const e of w.updated.values())x.has(e)||(E.updated.has(e)?y.updated.has(e)&&k(e):f=r.edit(f,[e],S[e],a));for(const e of E.updated.values())x.has(e)||(w.updated.has(e)?y.updated.has(e)&&k(e):v=r.edit(v,[e],b[e],a));for(const e of w.added.values())x.has(e)||(E.added.has(e)?y.updated.has(e)&&k(e):f=g(e,v,f,a));for(const e of E.added.values())x.has(e)||(w.added.has(e)?y.updated.has(e)&&k(e):v=g(e,f,v,a));const D=I.size>0||!d(v,f,o),T=D||!d(v,e,[]),R=D||!d(f,t,[]);return{localContent:T?v:null,remoteContent:R?f:null,conflictsSettings:[...I.values()],hasConflicts:D}},t.areSame=d,t.isEmpty=h,t.addSetting=g})),define(e[589],t([0,1,25,98,66,1051,6,84,9,588,362,318,23,76,26,164]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f){"use strict";function S(e){const t=JSON.parse(e);return(i=t)&&i.settings&&"string"==typeof i.settings&&1===Object.keys(i).length?t:{settings:e};var i}Object.defineProperty(t,"__esModule",{value:!0}), t.SettingsInitializer=t.SettingsSynchroniser=t.parseSettingsSyncContent=void 0,t.parseSettingsSyncContent=S;let b=class extends g.AbstractJsonFileSynchroniser{constructor(e,t,i,o,s,r,a,l,c,d,h){super(t.settingsResource,"settings",e,t,i,o,s,c,d,r,a,l),this.extensionManagementService=h,this.version=2,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"settings.json"),this.localResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._defaultIgnoredSettings=void 0}async generateSyncPreview(e,t,i){const n=await this.getLocalFileContent(),o=await this.getFormattingOptions(),s=this.getSettingsSyncContent(e),r=t?this.getSettingsSyncContent(t):null,a=await this.getIgnoredSettings();let l=null,c=!1,d=!1,u=!1;if(s){let e=n?n.value.toString().trim():"{}";e=e||"{}", this.validateContent(e),this.logService.trace(`${this.syncResourceLogLabel}: Merging remote settings with local settings...`);const t=h.merge(e,s.settings,r?r.settings:null,a,[],o);l=t.localContent||t.remoteContent,c=null!==t.localContent,d=null!==t.remoteContent,u=t.hasConflicts}else n&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote settings does not exist. Synchronizing settings for the first time.`),l=n.value.toString(),d=!0);const g={content:l,localChange:c?2:0,remoteChange:d?2:0,hasConflicts:u};return[{fileContent:n,localResource:this.localResource,localContent:n?n.value.toString():null,localChange:g.localChange,remoteResource:this.remoteResource,remoteContent:s?s.settings:null,remoteChange:g.remoteChange,previewResource:this.previewResource,previewResult:g,acceptedResource:this.acceptedResource}]}async getMergeResult(e,t){const i=await this.getFormattingOptions(),n=await this.getIgnoredSettings();return Object.assign(Object.assign({},e.previewResult),{ content:e.previewResult.content?h.updateIgnoredSettings(e.previewResult.content,"{}",n,i):null})}async getAcceptResult(e,t,i,n){const o=await this.getFormattingOptions(),s=await this.getIgnoredSettings();if(this.extUri.isEqual(t,this.localResource))return{content:e.fileContent?h.updateIgnoredSettings(e.fileContent.value.toString(),"{}",s,o):null,localChange:0,remoteChange:2};if(this.extUri.isEqual(t,this.remoteResource))return{content:null!==e.remoteContent?h.updateIgnoredSettings(e.remoteContent,e.fileContent?e.fileContent.value.toString():"{}",s,o):null,localChange:2,remoteChange:0};if(this.extUri.isEqual(t,this.previewResource))return void 0===i?{content:e.previewResult.content,localChange:e.previewResult.localChange,remoteChange:e.previewResult.remoteChange}:{content:null!==i?h.updateIgnoredSettings(i,e.fileContent?e.fileContent.value.toString():"{}",s,o):null,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${t.toString()}`)}async applyResult(e,t,i,n){const{fileContent:o}=i[0][0] ;let{content:s,localChange:r,remoteChange:a}=i[0][1];if(0===r&&0===a&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing settings.`),s=(s=s?s.trim():"{}")||"{}",this.validateContent(s),0!==r&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local settings...`),o&&await this.backupLocal(JSON.stringify(this.toSettingsSyncContent(o.value.toString()))),await this.updateLocalFileContent(s,o,n),this.logService.info(`${this.syncResourceLogLabel}: Updated local settings`)),0!==a){const t=await this.getFormattingOptions(),i=this.getSettingsSyncContent(e),o=await this.getIgnoredSettings(s);s=h.updateIgnoredSettings(s,i?i.settings:"{}",o,t),this.logService.trace(`${this.syncResourceLogLabel}: Updating remote settings...`),e=await this.updateRemoteUserData(JSON.stringify(this.toSettingsSyncContent(s)),n?null:e.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote settings`)}try{await this.fileService.del(this.previewResource)}catch(e){} (null==t?void 0:t.ref)!==e.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized settings...`),await this.updateLastSyncUserData(e),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized settings`))}async hasLocalData(){try{const e=await this.getLocalFileContent();if(e){const t=await this.getFormattingOptions(),i=u.edit(e.value.toString(),[n.CONFIGURATION_SYNC_STORE_KEY],void 0,t);return!h.isEmpty(i)}}catch(e){if(1!==e.fileOperationResult)return!0}return!1}async getAssociatedResources({uri:e}){const t=await this.fileService.exists(this.file)?this.file:this.localResource;return[{resource:this.extUri.joinPath(e,"settings.json"),comparableResource:t}]}async resolveContent(e){if(this.extUri.isEqual(this.remoteResource,e)||this.extUri.isEqual(this.localResource,e)||this.extUri.isEqual(this.acceptedResource,e))return this.resolvePreviewContent(e);let t=await super.resolveContent(e);if(t)return t;if(t=await super.resolveContent(this.extUri.dirname(e))){ const i=this.parseSyncData(t);if(i){const t=this.parseSettingsSyncContent(i.content);if(t)switch(this.extUri.basename(e)){case"settings.json":return t.settings}}}return null}async resolvePreviewContent(e){let t=await super.resolvePreviewContent(e);if(t){const e=await this.getFormattingOptions(),i=await this.getIgnoredSettings();t=h.updateIgnoredSettings(t,"{}",i,e)}return t}getSettingsSyncContent(e){return e.syncData?this.parseSettingsSyncContent(e.syncData.content):null}parseSettingsSyncContent(e){try{return S(e)}catch(e){this.logService.error(e)}return null}toSettingsSyncContent(e){return{settings:e}}async getIgnoredSettings(e){if(!this._defaultIgnoredSettings){this._defaultIgnoredSettings=this.userDataSyncUtilService.resolveDefaultIgnoredSettings();const e=l.Event.any(l.Event.filter(this.extensionManagementService.onDidInstallExtension,e=>!!e.gallery),l.Event.filter(this.extensionManagementService.onDidUninstallExtension,e=>!e.error))(()=>{e.dispose(),this._defaultIgnoredSettings=void 0})} const t=await this._defaultIgnoredSettings;return h.getIgnoredSettings(t,this.configurationService,e)}validateContent(e){if(this.hasErrors(e))throw new n.UserDataSyncError(a.localize(0,null),n.UserDataSyncErrorCode.LocalInvalidContent,this.resource)}async recoverSettings(){try{const e=await this.getLocalFileContent();if(!e)return;const t=JSON.parse(e.value.toString());if(!function(e){if(e&&void 0!==e.version&&"number"==typeof e.version&&void 0!==e.content&&"string"==typeof e.content&&void 0!==e.machineId&&"string"==typeof e.machineId)return!0;return!1}(t))return;this.telemetryService.publicLog2("sync/settingsCorrupted");const i=this.parseSettingsSyncContent(t.content);if(!i||!i.settings)return;let n=i.settings;const o=await this.getFormattingOptions();for(const e in t)if(-1===["version","content","machineId"].indexOf(e)&&void 0!==t[e]){const i=f.setProperty(n,[e],t[e],o);i.length&&(n=f.applyEdits(n,i))}await this.fileService.writeFile(this.file,s.VSBuffer.fromString(n))}catch(e){}}} ;b=o([r(0,i.IFileService),r(1,c.IEnvironmentService),r(2,v.IStorageService),r(3,n.IUserDataSyncStoreService),r(4,n.IUserDataSyncBackupStoreService),r(5,n.IUserDataSyncLogService),r(6,n.IUserDataSyncUtilService),r(7,d.IConfigurationService),r(8,n.IUserDataSyncResourceEnablementService),r(9,p.ITelemetryService),r(10,m.IExtensionManagementService)],b),t.SettingsSynchroniser=b;let _=class extends g.AbstractInitializer{constructor(e,t,i){super("settings",t,i,e)}async doInitialize(e){const t=e.syncData?this.parseSettingsSyncContent(e.syncData.content):null;t?await this.isEmpty()?(await this.fileService.writeFile(this.environmentService.settingsResource,s.VSBuffer.fromString(t.settings)),await this.updateLastSyncUserData(e)):this.logService.info("Skipping initializing settings because local settings exist."):this.logService.info("Skipping initializing settings because remote settings does not exist.")}async isEmpty(){try{const e=await this.fileService.readFile(this.environmentService.settingsResource) ;return h.isEmpty(e.value.toString().trim())}catch(e){return 1===e.fileOperationResult}}parseSettingsSyncContent(e){try{return S(e)}catch(e){this.logService.error(e)}return null}};_=o([r(0,i.IFileService),r(1,c.IEnvironmentService),r(2,n.IUserDataSyncLogService)],_),t.SettingsInitializer=_})),define(e[590],t([0,1,98,84,25,9,318,23,66,1599,26,41]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetsInitializer=t.SnippetsSynchroniser=void 0;let p=class extends l.AbstractSynchroniser{constructor(e,t,i,n,o,s,r,a,l){super("snippets",t,e,i,n,o,a,l,s,r),this.version=1,this.snippetsFolder=e.snippetsHome,this._register(this.fileService.watch(e.userRoamingDataHome)),this._register(this.fileService.watch(this.snippetsFolder)),this._register(this.fileService.onDidFilesChange(e=>this.onFileChanges(e)))}onFileChanges(e){e.changes.some(e=>this.extUri.isEqualOrParent(e.resource,this.snippetsFolder))&&this.triggerLocalChange()}async generateSyncPreview(e,t,i){ const n=await this.getSnippetsFileContents(),o=this.toSnippetsContents(n),s=e.syncData?this.parseSnippets(e.syncData):null,r=t&&t.syncData?this.parseSnippets(t.syncData):null;s?this.logService.trace(`${this.syncResourceLogLabel}: Merging remote snippets with local snippets...`):this.logService.trace(`${this.syncResourceLogLabel}: Remote snippets does not exist. Synchronizing snippets for the first time.`);const a=h.merge(o,s,r);return this.getResourcePreviews(a,n,s||{})}async getMergeResult(e,t){return e.previewResult}async getAcceptResult(e,t,n,o){if(this.extUri.isEqualOrParent(t,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"})))return{content:e.fileContent?e.fileContent.value.toString():null,localChange:0,remoteChange:e.fileContent?null!==e.remoteContent?2:1:3};if(this.extUri.isEqualOrParent(t,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"})))return{content:e.remoteContent,localChange:null!==e.remoteContent?e.fileContent?2:1:3,remoteChange:0} ;if(this.extUri.isEqualOrParent(t,this.syncPreviewFolder))return void 0===n?{content:e.previewResult.content,localChange:e.previewResult.localChange,remoteChange:e.previewResult.remoteChange}:{content:n,localChange:null===n?null!==e.fileContent?3:0:2,remoteChange:null===n?null!==e.remoteContent?3:0:2};throw new Error(`Invalid Resource: ${t.toString()}`)}async applyResult(e,t,i,n){const o=i.map(([e,t])=>Object.assign(Object.assign({},e),{acceptResult:t}));o.every(({localChange:e,remoteChange:t})=>0===e&&0===t)&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing snippets.`),o.some(({localChange:e})=>0!==e)&&(await this.updateLocalBackup(o),await this.updateLocalSnippets(o,n)),o.some(({remoteChange:e})=>0!==e)&&(e=await this.updateRemoteSnippets(o,e,n)),(null==t?void 0:t.ref)!==e.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized snippets...`),await this.updateLastSyncUserData(e), this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized snippets`));for(const{previewResource:e}of o)try{await this.fileService.del(e)}catch(e){}}getResourcePreviews(e,t,n){const o=new Map;for(const t of Object.keys(e.local.added)){const s={content:e.local.added[t],hasConflicts:!1,localChange:1,remoteChange:0};o.set(t,{fileContent:null,localResource:this.extUri.joinPath(this.syncPreviewFolder,t).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),localContent:null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,t).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:n[t],previewResource:this.extUri.joinPath(this.syncPreviewFolder,t),previewResult:s,localChange:s.localChange,remoteChange:s.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,t).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const s of Object.keys(e.local.updated)){const r={content:e.local.updated[s],hasConflicts:!1,localChange:2,remoteChange:0} ;o.set(s,{localResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:t[s],localContent:t[s].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:n[s],previewResource:this.extUri.joinPath(this.syncPreviewFolder,s),previewResult:r,localChange:r.localChange,remoteChange:r.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const n of e.local.removed){const e={content:null,hasConflicts:!1,localChange:3,remoteChange:0};o.set(n,{localResource:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:t[n],localContent:t[n].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:null, previewResource:this.extUri.joinPath(this.syncPreviewFolder,n),previewResult:e,localChange:e.localChange,remoteChange:e.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const n of Object.keys(e.remote.added)){const s={content:e.remote.added[n],hasConflicts:!1,localChange:0,remoteChange:1};o.set(n,{localResource:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:t[n],localContent:t[n].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,n),previewResult:s,localChange:s.localChange,remoteChange:s.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const s of Object.keys(e.remote.updated)){const r={ content:e.remote.updated[s],hasConflicts:!1,localChange:0,remoteChange:2};o.set(s,{localResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:t[s],localContent:t[s].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:n[s],previewResource:this.extUri.joinPath(this.syncPreviewFolder,s),previewResult:r,localChange:r.localChange,remoteChange:r.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const t of e.remote.removed){const e={content:null,hasConflicts:!1,localChange:0,remoteChange:3};o.set(t,{localResource:this.extUri.joinPath(this.syncPreviewFolder,t).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:null,localContent:null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,t).with({scheme:i.USER_DATA_SYNC_SCHEME, authority:"remote"}),remoteContent:n[t],previewResource:this.extUri.joinPath(this.syncPreviewFolder,t),previewResult:e,localChange:e.localChange,remoteChange:e.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,t).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const s of e.conflicts){const e={content:t[s]?t[s].value.toString():null,hasConflicts:!0,localChange:t[s]?2:1,remoteChange:n[s]?2:1};o.set(s,{localResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:t[s]||null,localContent:t[s]?t[s].value.toString():null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:n[s]||null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,s),previewResult:e,localChange:e.localChange,remoteChange:e.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,s).with({scheme:i.USER_DATA_SYNC_SCHEME, authority:"accepted"})})}for(const e of Object.keys(t))if(!o.has(e)){const s={content:t[e]?t[e].value.toString():null,hasConflicts:!1,localChange:0,remoteChange:0};o.set(e,{localResource:this.extUri.joinPath(this.syncPreviewFolder,e).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:t[e]||null,localContent:t[e]?t[e].value.toString():null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,e).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:n[e]||null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,e),previewResult:s,localChange:s.localChange,remoteChange:s.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,e).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}return[...o.values()]}async getAssociatedResources({uri:e}){let t=await super.resolveContent(e);if(t){const n=this.parseSyncData(t);if(n){const t=this.parseSnippets(n),o=[];for(const n of Object.keys(t)){ const t=this.extUri.joinPath(e,n),s=this.extUri.joinPath(this.snippetsFolder,n),r=await this.fileService.exists(s);o.push({resource:t,comparableResource:r?s:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"})})}return o}}return[]}async resolveContent(e){if(this.extUri.isEqualOrParent(e,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}))||this.extUri.isEqualOrParent(e,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}))||this.extUri.isEqualOrParent(e,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})))return this.resolvePreviewContent(e);let t=await super.resolveContent(e);if(t)return t;if(t=await super.resolveContent(this.extUri.dirname(e))){const i=this.parseSyncData(t);if(i){return this.parseSnippets(i)[this.extUri.basename(e)]||null}}return null}async hasLocalData(){try{const e=await this.getSnippetsFileContents();if(Object.keys(e).length)return!0}catch(e){}return!1} async updateLocalBackup(e){const t={};for(const i of e)i.fileContent&&(t[this.extUri.basename(i.localResource)]=i.fileContent);await this.backupLocal(JSON.stringify(this.toSnippetsContents(t)))}async updateLocalSnippets(e,t){for(const{fileContent:i,acceptResult:n,localResource:o,remoteResource:s,localChange:r}of e)if(0!==r){const e=s?this.extUri.basename(s):this.extUri.basename(o),a=this.extUri.joinPath(this.snippetsFolder,e);3===r?(this.logService.trace(`${this.syncResourceLogLabel}: Deleting snippet...`,this.extUri.basename(a)),await this.fileService.del(a),this.logService.info(`${this.syncResourceLogLabel}: Deleted snippet`,this.extUri.basename(a))):1===r?(this.logService.trace(`${this.syncResourceLogLabel}: Creating snippet...`,this.extUri.basename(a)),await this.fileService.createFile(a,d.VSBuffer.fromString(n.content),{overwrite:t}), this.logService.info(`${this.syncResourceLogLabel}: Created snippet`,this.extUri.basename(a))):(this.logService.trace(`${this.syncResourceLogLabel}: Updating snippet...`,this.extUri.basename(a)),await this.fileService.writeFile(a,d.VSBuffer.fromString(n.content),t?void 0:i),this.logService.info(`${this.syncResourceLogLabel}: Updated snippet`,this.extUri.basename(a)))}}async updateRemoteSnippets(e,t,i){const n=t.syncData?this.parseSnippets(t.syncData):{},o=g.deepClone(n);for(const{acceptResult:t,localResource:i,remoteResource:n,remoteChange:s}of e)if(0!==s){const e=i?this.extUri.basename(i):this.extUri.basename(n);3===s?delete o[e]:o[e]=t.content}return h.areSame(n,o)||(this.logService.trace(`${this.syncResourceLogLabel}: Updating remote snippets...`),t=await this.updateRemoteUserData(JSON.stringify(o),i?null:t.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote snippets`)),t}parseSnippets(e){return JSON.parse(e.content)}toSnippetsContents(e){const t={} ;for(const i of Object.keys(e))t[i]=e[i].value.toString();return t}async getSnippetsFileContents(){const e={};let t;try{t=await this.fileService.resolve(this.snippetsFolder)}catch(t){if(t instanceof s.FileOperationError&&1===t.fileOperationResult)return e;throw t}for(const i of t.children||[]){const t=i.resource,n=this.extUri.extname(t);if(".json"===n||".code-snippets"===n){const i=this.extUri.relativePath(this.snippetsFolder,t),n=await this.fileService.readFile(t);e[i]=n}}return e}};p=o([r(0,n.IEnvironmentService),r(1,s.IFileService),r(2,u.IStorageService),r(3,i.IUserDataSyncStoreService),r(4,i.IUserDataSyncBackupStoreService),r(5,i.IUserDataSyncLogService),r(6,a.IConfigurationService),r(7,i.IUserDataSyncResourceEnablementService),r(8,c.ITelemetryService)],p),t.SnippetsSynchroniser=p;let m=class extends l.AbstractInitializer{constructor(e,t,i){super("snippets",t,i,e)}async doInitialize(e){const t=e.syncData?JSON.parse(e.syncData.content):null;if(t)if(await this.isEmpty()){for(const e of Object.keys(t)){ const i=t[e];if(i){const t=this.extUri.joinPath(this.environmentService.snippetsHome,e);await this.fileService.createFile(t,d.VSBuffer.fromString(i)),this.logService.info("Created snippet",this.extUri.basename(t))}}await this.updateLastSyncUserData(e)}else this.logService.info("Skipping initializing snippets because local snippets exist.");else this.logService.info("Skipping initializing snippets because remote snippets does not exist.")}async isEmpty(){var e;try{return!(null===(e=(await this.fileService.resolve(this.environmentService.snippetsHome)).children)||void 0===e?void 0:e.length)}catch(e){return 1===e.fileOperationResult}}};m=o([r(0,s.IFileService),r(1,n.IEnvironmentService),r(2,i.IUserDataSyncLogService)],m),t.SnippetsInitializer=m})),define(e[319],t([0,1,5,6,2,98]),(function(e,t,i,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataSyncAccountService=t.IUserDataSyncAccountService=void 0,t.IUserDataSyncAccountService=i.createDecorator("IUserDataSyncAccountService") ;let l=class extends s.Disposable{constructor(e){super(),this.userDataSyncStoreService=e,this._onDidChangeAccount=this._register(new n.Emitter),this.onDidChangeAccount=this._onDidChangeAccount.event,this._onTokenFailed=this._register(new n.Emitter),this.onTokenFailed=this._onTokenFailed.event,this.wasTokenFailed=!1,this._register(e.onTokenFailed(()=>{this.updateAccount(void 0),this._onTokenFailed.fire(this.wasTokenFailed),this.wasTokenFailed=!0})),this._register(e.onTokenSucceed(()=>this.wasTokenFailed=!1))}get account(){return this._account}async updateAccount(e){(e&&this._account?e.token!==this._account.token||e.authenticationProviderId!==this._account.authenticationProviderId:e!==this._account)&&(this._account=e,this._account&&this.userDataSyncStoreService.setAuthToken(this._account.token,this._account.authenticationProviderId),this._onDidChangeAccount.fire(e))}};l=o([r(0,a.IUserDataSyncStoreService)],l),t.UserDataSyncAccountService=l})), define(e[1601],t([0,1,2,98,17,9,25,84,198,66]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataSyncBackupStoreService=void 0;let u=class extends i.Disposable{constructor(e,t,i,o){super(),this.environmentService=e,this.fileService=t,this.configurationService=i,this.logService=o,n.ALL_SYNC_RESOURCES.forEach(e=>this.cleanUpBackup(e))}async getAllRefs(e){const t=s.joinPath(this.environmentService.userDataSyncHome,e),i=await this.fileService.resolve(t);if(i.children){return i.children.filter(e=>e.isFile&&/^\d{8}T\d{6}(\.json)?$/.test(e.name)).sort().reverse().map(e=>({ref:e.name,created:this.getCreationTime(e)}))}return[]}async resolveContent(e,t){if(!t){const i=await this.getAllRefs(e);i.length&&(t=i[i.length-1].ref)}if(t){const i=s.joinPath(this.environmentService.userDataSyncHome,e,t);return(await this.fileService.readFile(i)).value.toString()}return null}async backup(e,t){ const i=s.joinPath(this.environmentService.userDataSyncHome,e),n=s.joinPath(i,`${d.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"")}.json`);try{await this.fileService.writeFile(n,h.VSBuffer.fromString(t))}catch(e){this.logService.error(e)}try{this.cleanUpBackup(e)}catch(e){}}async cleanUpBackup(e){const t=s.joinPath(this.environmentService.userDataSyncHome,e);try{try{if(!await this.fileService.exists(t))return}catch(e){return}const e=await this.fileService.resolve(t);if(e.children){const t=e.children.filter(e=>e.isFile&&/^\d{8}T\d{6}(\.json)?$/.test(e.name)).sort(),i=864e5*(this.configurationService.getValue("sync.localBackupDuration")||30);let n=t.filter(e=>Date.now()-this.getCreationTime(e)>i);const o=t.length-n.length;o<10&&(n=n.slice(10-o)),await Promise.all(n.map(e=>{this.logService.info("Deleting from backup",e.resource.path),this.fileService.del(e.resource)}))}}catch(e){this.logService.error(e)}}getCreationTime(e){ return e.ctime||new Date(parseInt(e.name.substring(0,4)),parseInt(e.name.substring(4,6))-1,parseInt(e.name.substring(6,8)),parseInt(e.name.substring(9,11)),parseInt(e.name.substring(11,13)),parseInt(e.name.substring(13,15))).getTime()}};u=o([r(0,c.IEnvironmentService),r(1,l.IFileService),r(2,a.IConfigurationService),r(3,n.IUserDataSyncLogService)],u),t.UserDataSyncBackupStoreService=u})),define(e[1602],t([0,1,39,84]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataSyncLogService=void 0;let s=class extends i.AbstractLogService{constructor(e,t){super(),this.logger=this._register(e.getLogger(t.userDataSyncLogResource))}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}critical(e,...t){this.logger.critical(e,...t)}flush(){this.logger.flush()}};s=o([r(0,i.ILoggerService),r(1,n.IEnvironmentService)],s),t.UserDataSyncLogService=s })),define(e[439],t([0,1,5,2,356,84,25,26,98,1054,61,12,24,6]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataSyncMachinesService=t.IUserDataSyncMachinesService=void 0,t.IUserDataSyncMachinesService=i.createDecorator("IUserDataSyncMachinesService");let v=class e extends n.Disposable{constructor(e,t,i,n,o,r){super(),this.storageService=i,this.userDataSyncStoreService=n,this.logService=o,this.productService=r,this._onDidChange=this._register(new m.Emitter),this.onDidChange=this._onDidChange.event,this.userData=null,this.currentMachineIdPromise=s.getServiceMachineId(e,t,i)}async getMachines(e){const t=await this.currentMachineIdPromise;return(await this.readMachinesData(e)).machines.map(e=>Object.assign(Object.assign({},e),{isCurrent:e.id===t}))}async addCurrentMachine(e){const t=await this.currentMachineIdPromise,i=await this.readMachinesData(e);i.machines.some(({id:e})=>e===t)||(i.machines.push({id:t,name:this.computeCurrentMachineName(i.machines) }),await this.writeMachinesData(i))}async removeCurrentMachine(e){const t=await this.currentMachineIdPromise,i=await this.readMachinesData(e),n=i.machines.filter(({id:e})=>e!==t);n.length!==i.machines.length&&(i.machines=n,await this.writeMachinesData(i))}async renameMachine(e,t,i){const n=await this.currentMachineIdPromise,o=await this.readMachinesData(i),s=o.machines.find(({id:t})=>t===e);s&&(s.name=t,await this.writeMachinesData(o),o.machines.some(({id:e})=>e===n)&&this.storageService.store("sync.currentMachineName",t,0))}async setEnablement(e,t){const i=await this.readMachinesData(),n=i.machines.find(({id:t})=>t===e);n&&(n.disabled=!t||void 0,await this.writeMachinesData(i))}computeCurrentMachineName(e){const t=this.storageService.get("sync.currentMachineName",0);if(t)return t;const i=`${this.productService.nameLong} (${g.PlatformToString(g.isWeb?0:g.platform)})`,n=new RegExp(`${p.escapeRegExpCharacters(i)}\\s#(\\d+)`);let o=0;for(const t of e){const e=n.exec(t.name),i=e?parseInt(e[1]):0;o=i>o?i:o} return`${i} #${o+1}`}async readMachinesData(t){this.userData=await this.readUserData(t);const i=this.parse(this.userData);if(i.version!==e.VERSION)throw new Error(h.localize(0,null,this.productService.nameLong));return i}async writeMachinesData(t){var i;const n=JSON.stringify(t),o=await this.userDataSyncStoreService.write(e.RESOURCE,n,(null===(i=this.userData)||void 0===i?void 0:i.ref)||null);this.userData={ref:o,content:n},this._onDidChange.fire()}async readUserData(t){if(this.userData){const i=t&&t.latest?t.latest[e.RESOURCE]:void 0;if(this.userData.ref===i)return this.userData;if(void 0===i&&null===this.userData.content)return this.userData}return this.userDataSyncStoreService.read(e.RESOURCE,this.userData)}parse(t){if(null!==t.content)try{return JSON.parse(t.content)}catch(e){this.logService.error(e)}return{version:e.VERSION,machines:[]}}};v.VERSION=1,v.RESOURCE="machines", v=o([r(0,a.IEnvironmentService),r(1,l.IFileService),r(2,c.IStorageService),r(3,d.IUserDataSyncStoreService),r(4,d.IUserDataSyncLogService),r(5,u.IProductService)],v),t.UserDataSyncMachinesService=v})),define(e[1603],t([0,1,15,6,2,98,319,23,21,26,84,439,1052,198,10,17]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataAutoSyncService=t.UserDataAutoSyncEnablementService=void 0;const S="sync.sessionId";let b=class extends s.Disposable{constructor(e,t,i){super(),this.storageService=e,this.environmentService=t,this.userDataSyncStoreManagementService=i,this._onDidChangeEnablement=new n.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this._register(e.onDidChangeStorage(e=>this.onDidStorageChange(e)))}isEnabled(e){switch(this.environmentService.sync){case"on":return!0;case"off":return!1}return this.storageService.getBoolean("sync.enable",0,!!e)}canToggleEnablement(){ return void 0!==this.userDataSyncStoreManagementService.userDataSyncStore&&void 0===this.environmentService.sync}setEnablement(e){this.storageService.store("sync.enable",e,0)}onDidStorageChange(e){0===e.scope&&"sync.enable"===e.key&&this._onDidChangeEnablement.fire(this.isEnabled())}};b=o([r(0,h.IStorageService),r(1,u.IEnvironmentService),r(2,a.IUserDataSyncStoreManagementService)],b),t.UserDataAutoSyncEnablementService=b;let _=class extends b{constructor(e,t,o,r,a,l,c,d,h,u){var g;super(h,u,e),this.userDataSyncStoreService=t,this.userDataSyncResourceEnablementService=o,this.userDataSyncService=r,this.logService=a,this.userDataSyncAccountService=l,this.telemetryService=c,this.userDataSyncMachinesService=d,this.autoSync=this._register(new s.MutableDisposable),this.successiveFailures=0,this.lastSyncTriggerTime=void 0,this._onError=this._register(new n.Emitter),this.onError=this._onError.event,this.sources=[],this.syncTriggerDelayer=this._register(new i.Delayer(0)),this.lastSyncUrl=this.syncUrl, this.syncUrl=null===(g=e.userDataSyncStore)||void 0===g?void 0:g.url,this.syncUrl&&(this.logService.info("Using settings sync service",this.syncUrl.toString()),this._register(e.onDidChangeUserDataSyncStore(()=>{var t,i;f.isEqual(this.syncUrl,null===(t=e.userDataSyncStore)||void 0===t?void 0:t.url)||(this.lastSyncUrl=this.syncUrl,this.syncUrl=null===(i=e.userDataSyncStore)||void 0===i?void 0:i.url,this.syncUrl&&this.logService.info("Using settings sync service",this.syncUrl.toString()))})),this.isEnabled()?this.logService.info("Auto Sync is enabled."):this.logService.info("Auto Sync is disabled."),this.updateAutoSync(),this.hasToDisableMachineEventually()&&this.disableMachineEventually(),this._register(l.onDidChangeAccount(()=>this.updateAutoSync())),this._register(t.onDidChangeDonotMakeRequestsUntil(()=>this.updateAutoSync())),this._register(n.Event.debounce(r.onDidChangeLocal,(e,t)=>e?[...e,t]:[t],1e3)(e=>this.triggerSync(e,!1,!1))), this._register(n.Event.filter(this.userDataSyncResourceEnablementService.onDidChangeResourceEnablement,([,e])=>e)(()=>this.triggerSync(["resourceEnablement"],!1,!1))))}get syncUrl(){const e=this.storageService.get("sync.storeUrl",0);return e?v.URI.parse(e):void 0}set syncUrl(e){e?this.storageService.store("sync.storeUrl",e.toString(),0):this.storageService.remove("sync.storeUrl",0)}updateAutoSync(){const{enabled:e,message:t}=this.isAutoSyncEnabled();e?void 0===this.autoSync.value&&(this.autoSync.value=new C(this.lastSyncUrl,3e5,this.userDataSyncStoreManagementService,this.userDataSyncStoreService,this.userDataSyncService,this.userDataSyncMachinesService,this.logService,this.storageService),this.autoSync.value.register(this.autoSync.value.onDidStartSync(()=>this.lastSyncTriggerTime=(new Date).getTime())),this.autoSync.value.register(this.autoSync.value.onDidFinishSync(e=>this.onDidFinishSync(e))),this.startAutoSync()&&this.autoSync.value.start()):(this.syncTriggerDelayer.cancel(), void 0!==this.autoSync.value?(t&&this.logService.info(t),this.autoSync.clear()):t&&this.isEnabled()&&this.logService.info(t))}startAutoSync(){return!0}isAutoSyncEnabled(){return this.isEnabled()?this.userDataSyncAccountService.account?this.userDataSyncStoreService.donotMakeRequestsUntil?{enabled:!1,message:`Auto Sync: Suspended until ${m.toLocalISOString(this.userDataSyncStoreService.donotMakeRequestsUntil)} because server is not accepting requests until then.`}:{enabled:!0}:{enabled:!1,message:"Auto Sync: Suspended until auth token is available."}:{enabled:!1,message:"Auto Sync: Disabled."}}async turnOn(){this.stopDisableMachineEventually(),this.lastSyncUrl=this.syncUrl,this.updateEnablement(!0)}async turnOff(e,t,i){try{this.userDataSyncAccountService.account&&!i&&await this.userDataSyncMachinesService.removeCurrentMachine(),this.updateEnablement(!1),this.storageService.remove(S,0),e?(this.telemetryService.publicLog2("sync/turnOffEveryWhere"), await this.userDataSyncService.reset()):await this.userDataSyncService.resetLocal()}catch(e){if(!t)throw e;this.logService.error(e),this.updateEnablement(!1)}}updateEnablement(e){this.isEnabled()!==e&&(this.telemetryService.publicLog2("sync.enable",{enabled:e}),this.setEnablement(e),this.updateAutoSync())}async onDidFinishSync(e){if(!e)return void(this.successiveFailures=0);const t=a.UserDataSyncError.toUserDataSyncError(e);t instanceof a.UserDataAutoSyncError&&this.telemetryService.publicLog2("autosync/error",{code:t.code,service:this.userDataSyncStoreManagementService.userDataSyncStore.url.toString()}),t.code===a.UserDataSyncErrorCode.SessionExpired?(await this.turnOff(!1,!0),this.logService.info("Auto Sync: Turned off sync because current session is expired")):t.code===a.UserDataSyncErrorCode.TurnedOff?(await this.turnOff(!1,!0), this.logService.info("Auto Sync: Turned off sync because sync is turned off in the cloud")):t.code===a.UserDataSyncErrorCode.LocalTooManyRequests||t.code===a.UserDataSyncErrorCode.TooManyRequests?(await this.turnOff(!1,!0,!0),this.disableMachineEventually(),this.logService.info("Auto Sync: Turned off sync because of making too many requests to server")):t.code===a.UserDataSyncErrorCode.UpgradeRequired||t.code===a.UserDataSyncErrorCode.Gone?(await this.turnOff(!1,!0,!0),this.disableMachineEventually(),this.logService.info("Auto Sync: Turned off sync because current client is not compatible with server. Requires client upgrade.")):t.code===a.UserDataSyncErrorCode.IncompatibleLocalContent?(await this.turnOff(!1,!0),this.logService.info(`Auto Sync: Turned off sync because server has ${t.resource} content with newer version than of client. Requires client upgrade.`)):t.code===a.UserDataSyncErrorCode.IncompatibleRemoteContent?(await this.turnOff(!1,!0), this.logService.info(`Auto Sync: Turned off sync because server has ${t.resource} content with older version than of client. Requires server reset.`)):t.code===a.UserDataSyncErrorCode.ServiceChanged||t.code===a.UserDataSyncErrorCode.DefaultServiceChanged?(await this.turnOff(!1,!0,!0),await this.turnOn(),this.logService.info("Auto Sync: Sync Service changed. Turned off auto sync, reset local state and turned on auto sync.")):(this.logService.error(t),this.successiveFailures++),this._onError.fire(t)}async disableMachineEventually(){this.storageService.store("sync.disableMachineEventually",!0,0),await i.timeout(6e5),this.hasToDisableMachineEventually()&&(this.stopDisableMachineEventually(),!this.isEnabled()&&this.userDataSyncAccountService.account&&await this.userDataSyncMachinesService.removeCurrentMachine())}hasToDisableMachineEventually(){return this.storageService.getBoolean("sync.disableMachineEventually",0,!1)}stopDisableMachineEventually(){this.storageService.remove("sync.disableMachineEventually",0)} async triggerSync(e,t,i){return void 0===this.autoSync.value?this.syncTriggerDelayer.cancel():t&&this.lastSyncTriggerTime&&Math.round(((new Date).getTime()-this.lastSyncTriggerTime)/1e3)<10?void this.logService.debug("Auto Sync: Skipped. Limited to once per 10 seconds."):(this.sources.push(...e),this.syncTriggerDelayer.trigger(async()=>{this.logService.trace("activity sources",...this.sources),this.telemetryService.publicLog2("sync/triggered",{sources:this.sources}),this.sources=[],this.autoSync.value&&await this.autoSync.value.sync("Activity",i)},this.successiveFailures?1*this.getSyncTriggerDelayTime()*Math.min(Math.pow(2,this.successiveFailures),60):this.getSyncTriggerDelayTime()))}getSyncTriggerDelayTime(){return 1e3}} ;_=o([r(0,a.IUserDataSyncStoreManagementService),r(1,a.IUserDataSyncStoreService),r(2,a.IUserDataSyncResourceEnablementService),r(3,a.IUserDataSyncService),r(4,a.IUserDataSyncLogService),r(5,l.IUserDataSyncAccountService),r(6,c.ITelemetryService),r(7,g.IUserDataSyncMachinesService),r(8,h.IStorageService),r(9,u.IEnvironmentService)],_),t.UserDataAutoSyncService=_;class C extends s.Disposable{constructor(e,t,i,o,r,a,l,c){super(),this.lastSyncUrl=e,this.interval=t,this.userDataSyncStoreManagementService=i,this.userDataSyncStoreService=o,this.userDataSyncService=r,this.userDataSyncMachinesService=a,this.logService=l,this.storageService=c,this.intervalHandler=this._register(new s.MutableDisposable),this._onDidStartSync=this._register(new n.Emitter),this.onDidStartSync=this._onDidStartSync.event,this._onDidFinishSync=this._register(new n.Emitter),this.onDidFinishSync=this._onDidFinishSync.event}start(){this._register(this.onDidFinishSync(()=>this.waitUntilNextIntervalAndSync())),this._register(s.toDisposable(()=>{ this.syncPromise&&(this.syncPromise.cancel(),this.logService.info("Auto sync: Cancelled sync that is in progress"),this.syncPromise=void 0),this.syncTask&&this.syncTask.stop(),this.logService.info("Auto Sync: Stopped")})),this.logService.info("Auto Sync: Started"),this.sync(C.INTERVAL_SYNCING,!1)}waitUntilNextIntervalAndSync(){this.intervalHandler.value=i.disposableTimeout(()=>this.sync(C.INTERVAL_SYNCING,!1),this.interval)}sync(e,t){const n=i.createCancelablePromise(async i=>{if(this.syncPromise)try{this.logService.debug("Auto Sync: Waiting until sync is finished."),await this.syncPromise}catch(e){if(d.isPromiseCanceledError(e))return}return this.doSync(e,t,i)});return this.syncPromise=n,this.syncPromise.finally(()=>this.syncPromise=void 0),this.syncPromise}hasSyncServiceChanged(){var e;return void 0!==this.lastSyncUrl&&!f.isEqual(this.lastSyncUrl,null===(e=this.userDataSyncStoreManagementService.userDataSyncStore)||void 0===e?void 0:e.url)}async hasDefaultServiceChanged(){ const e=await this.userDataSyncStoreManagementService.getPreviousUserDataSyncStore(),t=this.userDataSyncStoreManagementService.userDataSyncStore;return!(!t||!e||f.isEqual(t.defaultUrl,e.defaultUrl)&&f.isEqual(t.insidersUrl,e.insidersUrl)&&f.isEqual(t.stableUrl,e.stableUrl))}async doSync(e,t,i){let n;this.logService.info(`Auto Sync: Triggered by ${e}`),this._onDidStartSync.fire();try{if(this.syncTask=await this.userDataSyncService.createSyncTask(t),i.isCancellationRequested)return;let e=this.syncTask.manifest;if(null===e&&await this.userDataSyncService.hasPreviouslySynced())throw this.hasSyncServiceChanged()?await this.hasDefaultServiceChanged()?new a.UserDataAutoSyncError(p.localize(0,null),a.UserDataSyncErrorCode.DefaultServiceChanged):new a.UserDataAutoSyncError(p.localize(1,null),a.UserDataSyncErrorCode.ServiceChanged):new a.UserDataAutoSyncError(p.localize(2,null),a.UserDataSyncErrorCode.TurnedOff);const n=this.storageService.get(S,0) ;if(n&&e&&n!==e.session)throw this.hasSyncServiceChanged()?await this.hasDefaultServiceChanged()?new a.UserDataAutoSyncError(p.localize(3,null),a.UserDataSyncErrorCode.DefaultServiceChanged):new a.UserDataAutoSyncError(p.localize(4,null),a.UserDataSyncErrorCode.ServiceChanged):new a.UserDataAutoSyncError(p.localize(5,null),a.UserDataSyncErrorCode.SessionExpired);const o=await this.userDataSyncMachinesService.getMachines(e||void 0);if(i.isCancellationRequested)return;const s=o.find(e=>e.isCurrent);if(null==s?void 0:s.disabled)throw new a.UserDataAutoSyncError(p.localize(6,null),a.UserDataSyncErrorCode.TurnedOff);if(await this.syncTask.run(),null===e&&(e=await this.userDataSyncStoreService.manifest()),e&&e.session!==n&&this.storageService.store(S,e.session,0),i.isCancellationRequested)return;s||await this.userDataSyncMachinesService.addCurrentMachine(e||void 0)}catch(e){this.logService.error(e),n=e}this._onDidFinishSync.fire(n)}register(e){return super._register(e)}}C.INTERVAL_SYNCING="Interval"})), define(e[1604],t([0,1,98,2,6,26,23]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataSyncResourceEnablementService=void 0;const c="sync.enable";function d(e){return`${c}.${e}`}let h=class extends n.Disposable{constructor(e,t){super(),this.storageService=e,this.telemetryService=t,this._onDidChangeResourceEnablement=new s.Emitter,this.onDidChangeResourceEnablement=this._onDidChangeResourceEnablement.event,this._register(e.onDidChangeStorage(e=>this.onDidStorageChange(e)))}isResourceEnabled(e){return this.storageService.getBoolean(d(e),0,this.getDefaultResourceEnablementValue(e))}setResourceEnablement(e,t){if(this.isResourceEnabled(e)!==t){const i=d(e);this.telemetryService.publicLog2(i,{enabled:t}),this.storageService.store(i,t,0)}}onDidStorageChange(e){if(0===e.scope){const t=i.ALL_SYNC_RESOURCES.filter(t=>d(t)===e.key)[0];if(t)return void this._onDidChangeResourceEnablement.fire([t,this.isResourceEnabled(t)])}}getDefaultResourceEnablementValue(e){return!0}} ;h=o([r(0,a.IStorageService),r(1,l.ITelemetryService)],h),t.UserDataSyncResourceEnablementService=h})),define(e[1605],t([0,1,98,2,5,6,585,587,586,130,23,14,26,589,17,590,92,15,21]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDataSyncService=void 0;function C(e){const t={};return t[i.HEADER_EXECUTION_ID]=e,t}let y=class extends n.Disposable{constructor(e,t,i,n,o,s){super(),this.userDataSyncStoreService=e,this.userDataSyncStoreManagementService=t,this.instantiationService=i,this.logService=n,this.telemetryService=o,this.storageService=s,this._status="uninitialized",this._onDidChangeStatus=this._register(new a.Emitter),this.onDidChangeStatus=this._onDidChangeStatus.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new a.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this._syncErrors=[],this._onSyncErrors=this._register(new a.Emitter),this.onSyncErrors=this._onSyncErrors.event,this._lastSyncTime=void 0, this._onDidChangeLastSyncTime=this._register(new a.Emitter),this.onDidChangeLastSyncTime=this._onDidChangeLastSyncTime.event,this._onDidResetLocal=this._register(new a.Emitter),this.onDidResetLocal=this._onDidResetLocal.event,this._onDidResetRemote=this._register(new a.Emitter),this.onDidResetRemote=this._onDidResetRemote.event,this.recoveredSettings=!1,this.settingsSynchroniser=this._register(this.instantiationService.createInstance(m.SettingsSynchroniser)),this.keybindingsSynchroniser=this._register(this.instantiationService.createInstance(c.KeybindingsSynchroniser)),this.snippetsSynchroniser=this._register(this.instantiationService.createInstance(f.SnippetsSynchroniser)),this.globalStateSynchroniser=this._register(this.instantiationService.createInstance(d.GlobalStateSynchroniser)),this.extensionsSynchroniser=this._register(this.instantiationService.createInstance(l.ExtensionsSynchroniser)), this.synchronisers=[this.settingsSynchroniser,this.keybindingsSynchroniser,this.snippetsSynchroniser,this.globalStateSynchroniser,this.extensionsSynchroniser],this.updateStatus(),this.userDataSyncStoreManagementService.userDataSyncStore&&(this._register(a.Event.any(...this.synchronisers.map(e=>a.Event.map(e.onDidChangeStatus,()=>void 0)))(()=>this.updateStatus())),this._register(a.Event.any(...this.synchronisers.map(e=>a.Event.map(e.onDidChangeConflicts,()=>void 0)))(()=>this.updateConflicts()))),this._lastSyncTime=this.storageService.getNumber("sync.lastSyncTime",0,void 0),this.onDidChangeLocal=a.Event.any(...this.synchronisers.map(e=>a.Event.map(e.onDidChangeLocal,()=>e.resource)))}get status(){return this._status}get conflicts(){return this._conflicts}get lastSyncTime(){return this._lastSyncTime}async createSyncTask(e){await this.checkEnablement();const t=S.generateUuid();let n;try{const i=C(t);e&&(i["Cache-Control"]="no-cache"),n=await this.userDataSyncStoreService.manifest(i)}catch(e){ throw e=i.UserDataSyncError.toUserDataSyncError(e),this.telemetryService.publicLog2("sync/error",{code:e.code,resource:e.resource,executionId:t,service:this.userDataSyncStoreManagementService.userDataSyncStore.url.toString()}),e}const o=this;let s;return{manifest:n,run:()=>(s=b.createCancelablePromise(e=>o.sync(n,t,e))).finally(()=>s=void 0),async stop(){if(s&&s.cancel(),"idle"!==o.status)return o.stop()}}}async createManualSyncTask(){await this.checkEnablement();const e=S.generateUuid(),t=C(e);let n;try{n=await this.userDataSyncStoreService.manifest(t)}catch(t){throw t=i.UserDataSyncError.toUserDataSyncError(t),this.telemetryService.publicLog2("sync/error",{code:t.code,resource:t.resource,executionId:e,service:this.userDataSyncStoreManagementService.userDataSyncStore.url.toString()}),t}return new w(e,n,t,this.synchronisers,this.logService)}async sync(e,t,n){if(this.recoveredSettings||(await this.settingsSynchroniser.recoverSettings(),this.recoveredSettings=!0),n.isCancellationRequested)return ;const o=(new Date).getTime();this._syncErrors=[];try{this.logService.trace("Sync started."),"hasConflicts"!==this.status&&this.setStatus("syncing");const s=C(t);for(const t of this.synchronisers){if(n.isCancellationRequested)return;try{await t.sync(e,s)}catch(e){this.handleSynchronizerError(e,t.resource),this._syncErrors.push([t.resource,i.UserDataSyncError.toUserDataSyncError(e)])}}this.logService.info(`Sync done. Took ${(new Date).getTime()-o}ms`),this.updateLastSyncTime()}catch(e){throw e=i.UserDataSyncError.toUserDataSyncError(e),this.telemetryService.publicLog2("sync/error",{code:e.code,resource:e.resource,executionId:t,service:this.userDataSyncStoreManagementService.userDataSyncStore.url.toString()}),e}finally{this.updateStatus(),this._onSyncErrors.fire(this._syncErrors)}}async stop(){if("idle"!==this.status)for(const e of this.synchronisers)try{"idle"!==e.status&&await e.stop()}catch(e){this.logService.error(e)}}async replace(e){await this.checkEnablement() ;for(const t of this.synchronisers)if(await t.replace(e))return}async accept(e,t,i,n){await this.checkEnablement();const o=this.getSynchroniser(e);await o.accept(t,i),n&&await o.apply(!1,C(S.generateUuid()))}async resolveContent(e){for(const t of this.synchronisers){const i=await t.resolveContent(e);if(i)return i}return null}getRemoteSyncResourceHandles(e){return this.getSynchroniser(e).getRemoteSyncResourceHandles()}getLocalSyncResourceHandles(e){return this.getSynchroniser(e).getLocalSyncResourceHandles()}getAssociatedResources(e,t){return this.getSynchroniser(e).getAssociatedResources(t)}getMachineId(e,t){return this.getSynchroniser(e).getMachineId(t)}async hasLocalData(){const e=[this.settingsSynchroniser,this.keybindingsSynchroniser,this.snippetsSynchroniser,this.extensionsSynchroniser];for(const t of e)if(await t.hasLocalData())return!0;return!1}async reset(){await this.checkEnablement(),await this.resetRemote(),await this.resetLocal()}async resetRemote(){await this.checkEnablement();try{ await this.userDataSyncStoreService.clear(),this.logService.info("Cleared data on server")}catch(e){this.logService.error(e)}this._onDidResetRemote.fire()}async resetLocal(){await this.checkEnablement(),this.storageService.remove("sync.lastSyncTime",0);for(const e of this.synchronisers)try{await e.resetLocal()}catch(t){this.logService.error(`${e.resource}: ${h.toErrorMessage(t)}`),this.logService.error(t)}this._onDidResetLocal.fire(),this.logService.info("Did reset the local sync state.")}async hasPreviouslySynced(){for(const e of this.synchronisers)if(await e.hasPreviouslySynced())return!0;return!1}setStatus(e){const t=this._status;this._status!==e&&(this._status=e,this._onDidChangeStatus.fire(e),"hasConflicts"===t&&this.updateLastSyncTime())}updateStatus(){this.updateConflicts();const e=this.computeStatus();this.setStatus(e)}updateConflicts(){const e=this.computeConflicts() ;g.equals(this._conflicts,e,([e,t],[i,n])=>e==e&&g.equals(t,n,(e,t)=>v.isEqual(e.previewResource,t.previewResource)))||(this._conflicts=this.computeConflicts(),this._onDidChangeConflicts.fire(e))}computeStatus(){return this.userDataSyncStoreManagementService.userDataSyncStore?this.synchronisers.some(e=>"hasConflicts"===e.status)?"hasConflicts":this.synchronisers.some(e=>"syncing"===e.status)?"syncing":"idle":"uninitialized"}updateLastSyncTime(){"idle"===this.status&&(this._lastSyncTime=(new Date).getTime(),this.storageService.store("sync.lastSyncTime",this._lastSyncTime,0),this._onDidChangeLastSyncTime.fire(this._lastSyncTime))}handleSynchronizerError(e,t){if(e instanceof i.UserDataSyncError)switch(e.code){case i.UserDataSyncErrorCode.TooLarge:throw new i.UserDataSyncError(e.message,e.code,t);case i.UserDataSyncErrorCode.TooManyRequests:case i.UserDataSyncErrorCode.TooManyRequestsAndRetryAfter:case i.UserDataSyncErrorCode.LocalTooManyRequests:case i.UserDataSyncErrorCode.Gone: case i.UserDataSyncErrorCode.UpgradeRequired:case i.UserDataSyncErrorCode.IncompatibleRemoteContent:case i.UserDataSyncErrorCode.IncompatibleLocalContent:throw e}this.logService.error(e),this.logService.error(`${t}: ${h.toErrorMessage(e)}`)}computeConflicts(){return this.synchronisers.filter(e=>"hasConflicts"===e.status).map(e=>[e.resource,e.conflicts.map(E)])}getSynchroniser(e){return this.synchronisers.find(t=>t.resource===e)}async checkEnablement(){if(!this.userDataSyncStoreManagementService.userDataSyncStore)throw new Error("Not enabled")}};y=o([r(0,i.IUserDataSyncStoreService),r(1,i.IUserDataSyncStoreManagementService),r(2,s.IInstantiationService),r(3,i.IUserDataSyncLogService),r(4,u.ITelemetryService),r(5,p.IStorageService)],y),t.UserDataSyncService=y;class w extends n.Disposable{constructor(e,t,i,n,o){super(),this.id=e,this.manifest=t,this.syncHeaders=i,this.synchronisers=n,this.logService=o,this.synchronizingResources=[],this._onSynchronizeResources=this._register(new a.Emitter), this.onSynchronizeResources=this._onSynchronizeResources.event,this.isDisposed=!1}get status(){return this.synchronisers.some(e=>"hasConflicts"===e.status)?"hasConflicts":this.synchronisers.some(e=>"syncing"===e.status)?"syncing":"idle"}async preview(){if(this.isDisposed)throw new Error("Disposed");return this.previewsPromise||(this.previewsPromise=b.createCancelablePromise(e=>this.getPreviews(e))),this.previews||(this.previews=await this.previewsPromise),this.previews}async accept(e,t){return this.performAction(e,i=>i.accept(e,t))}async merge(e){return e?this.performAction(e,t=>t.merge(e)):this.mergeAll()}async discard(e){return this.performAction(e,t=>t.discard(e))}async discardConflicts(){if(!this.previews)throw new Error("Missing preview. Create preview and try again.");if(this.synchronizingResources.length)throw new Error("Cannot discard while synchronizing resources");const e=[];for(const[,t]of this.previews)for(const i of t.resourcePreviews)"conflict"===i.mergeState&&e.push(i.previewResource) ;for(const t of e)await this.discard(t);return this.previews}async apply(){if(!this.previews)throw new Error("You need to create preview before applying");if(this.synchronizingResources.length)throw new Error("Cannot pull while synchronizing resources");const e=[];for(const[t,i]of this.previews){this.synchronizingResources.push([t,i.resourcePreviews.map(e=>e.localResource)]),this._onSynchronizeResources.fire(this.synchronizingResources);const n=this.synchronisers.find(e=>e.resource===t);for(const e of i.resourcePreviews)0===e.localChange&&0===e.remoteChange||"preview"!==e.mergeState||await n.merge(e.previewResource);const o=await n.apply(!1,this.syncHeaders);o&&e.push(this.toSyncResourcePreview(n.resource,o)),this.synchronizingResources.splice(this.synchronizingResources.findIndex(e=>e[0]===t),1),this._onSynchronizeResources.fire(this.synchronizingResources)}return this.previews=e,this.previews}async pull(){if(!this.previews)throw new Error("You need to create preview before applying") ;if(this.synchronizingResources.length)throw new Error("Cannot pull while synchronizing resources");for(const[e,t]of this.previews){this.synchronizingResources.push([e,t.resourcePreviews.map(e=>e.localResource)]),this._onSynchronizeResources.fire(this.synchronizingResources);const i=this.synchronisers.find(t=>t.resource===e);for(const e of t.resourcePreviews)await i.accept(e.remoteResource);await i.apply(!0,this.syncHeaders),this.synchronizingResources.splice(this.synchronizingResources.findIndex(t=>t[0]===e),1),this._onSynchronizeResources.fire(this.synchronizingResources)}this.previews=[]}async push(){if(!this.previews)throw new Error("You need to create preview before applying");if(this.synchronizingResources.length)throw new Error("Cannot pull while synchronizing resources");for(const[e,t]of this.previews){this.synchronizingResources.push([e,t.resourcePreviews.map(e=>e.localResource)]),this._onSynchronizeResources.fire(this.synchronizingResources);const i=this.synchronisers.find(t=>t.resource===e) ;for(const e of t.resourcePreviews)await i.accept(e.localResource);await i.apply(!0,this.syncHeaders),this.synchronizingResources.splice(this.synchronizingResources.findIndex(t=>t[0]===e),1),this._onSynchronizeResources.fire(this.synchronizingResources)}this.previews=[]}async stop(){for(const e of this.synchronisers)try{await e.stop()}catch(e){_.isPromiseCanceledError(e)||this.logService.error(e)}this.reset()}async performAction(e,t){if(!this.previews)throw new Error("Missing preview. Create preview and try again.");const i=this.previews.findIndex(([,t])=>t.resourcePreviews.some(({localResource:t,previewResource:i,remoteResource:n})=>v.isEqual(e,t)||v.isEqual(e,i)||v.isEqual(e,n)));if(-1===i)return this.previews;const[n,o]=this.previews[i],s=o.resourcePreviews.find(({localResource:t,remoteResource:i,previewResource:n})=>v.isEqual(t,e)||v.isEqual(i,e)||v.isEqual(n,e));if(!s)return this.previews;let r=this.synchronizingResources.find(e=>e[0]===n);r||(r=[n,[]],this.synchronizingResources.push(r)), r[1].some(e=>v.isEqual(e,s.localResource))||(r[1].push(s.localResource),this._onSynchronizeResources.fire(this.synchronizingResources));const a=this.synchronisers.find(e=>e.resource===this.previews[i][0]),l=await t(a);l?this.previews.splice(i,1,this.toSyncResourcePreview(a.resource,l)):this.previews.splice(i,1);const c=this.synchronizingResources.findIndex(e=>e[0]===n);return this.synchronizingResources[c][1].splice(r[1].findIndex(e=>v.isEqual(e,s.localResource)),1),r[1].length||(this.synchronizingResources.splice(c,1),this._onSynchronizeResources.fire(this.synchronizingResources)),this.previews}async mergeAll(){if(!this.previews)throw new Error("You need to create preview before merging or applying");if(this.synchronizingResources.length)throw new Error("Cannot merge or apply while synchronizing resources");const e=[];for(const[t,i]of this.previews){this.synchronizingResources.push([t,i.resourcePreviews.map(e=>e.localResource)]),this._onSynchronizeResources.fire(this.synchronizingResources) ;const n=this.synchronisers.find(e=>e.resource===t);let o=i;for(const e of i.resourcePreviews)0===e.localChange&&0===e.remoteChange||"preview"!==e.mergeState||(o=await n.merge(e.previewResource));o&&e.push(this.toSyncResourcePreview(n.resource,o)),this.synchronizingResources.splice(this.synchronizingResources.findIndex(e=>e[0]===t),1),this._onSynchronizeResources.fire(this.synchronizingResources)}return this.previews=e,this.previews}async getPreviews(e){const t=[];for(const i of this.synchronisers){if(e.isCancellationRequested)return[];const n=await i.preview(this.manifest,this.syncHeaders);n&&t.push(this.toSyncResourcePreview(i.resource,n))}return t}toSyncResourcePreview(e,t){return[e,{isLastSyncFromCurrentMachine:t.isLastSyncFromCurrentMachine,resourcePreviews:t.resourcePreviews.map(E)}]}reset(){this.previewsPromise&&(this.previewsPromise.cancel(),this.previewsPromise=void 0),this.previews=void 0,this.synchronizingResources=[]}dispose(){this.reset(),this.isDisposed=!0}}function E(e){return{ localResource:e.localResource,previewResource:e.previewResource,remoteResource:e.remoteResource,acceptedResource:e.acceptedResource,localChange:e.localChange,remoteChange:e.remoteChange,mergeState:e.mergeState}}})),define(e[440],t([0,1,2,98,167,17,31,9,61,356,84,25,26,92,12,6,15,13,10]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestsSession=t.UserDataSyncStoreService=t.UserDataSyncStoreClient=t.UserDataSyncStoreManagementService=t.AbstractUserDataSyncStoreManagementService=void 0;let C=class extends i.Disposable{constructor(e,t,i){super(),this.productService=e,this.configurationService=t,this.storageService=i,this._onDidChangeUserDataSyncStore=this._register(new f.Emitter),this.onDidChangeUserDataSyncStore=this._onDidChangeUserDataSyncStore.event,this.updateUserDataSyncStore()}get userDataSyncStore(){return this._userDataSyncStore}updateUserDataSyncStore(){ this._userDataSyncStore=this.toUserDataSyncStore(this.productService[n.CONFIGURATION_SYNC_STORE_KEY],this.configurationService.getValue(n.CONFIGURATION_SYNC_STORE_KEY)),this._onDidChangeUserDataSyncStore.fire()}toUserDataSyncStore(e,t){e=v.isWeb&&(null==e?void 0:e.web)?Object.assign(Object.assign({},e),e.web):e;const i=Object.assign(Object.assign({},e||{}),t||{});if(i&&b.isString(i.url)&&b.isObject(i.authenticationProviders)&&Object.keys(i.authenticationProviders).every(e=>b.isArray(i.authenticationProviders[e].scopes))){const e=i,n=!!e.canSwitch&&!(null==t?void 0:t.url)?this.storageService.get("sync.store.url.type",0):void 0,o=(null==t?void 0:t.url)||"insiders"===n?e.insidersUrl:"stable"===n?e.stableUrl:e.url;return{url:_.URI.parse(o),type:n,defaultType:e.url===e.insidersUrl?"insiders":e.url===e.stableUrl?"stable":void 0,defaultUrl:_.URI.parse(e.url),stableUrl:_.URI.parse(e.stableUrl),insidersUrl:_.URI.parse(e.insidersUrl),canSwitch:!!e.canSwitch&&!(null==t?void 0:t.url), authenticationProviders:Object.keys(e.authenticationProviders).reduce((t,i)=>(t.push({id:i,scopes:e.authenticationProviders[i].scopes}),t),[])}}}};C=o([r(0,d.IProductService),r(1,c.IConfigurationService),r(2,p.IStorageService)],C),t.AbstractUserDataSyncStoreManagementService=C;let y=class extends C{constructor(e,t,i){super(e,t,i);const o=this.storageService.get("sync.previous.store",0);o&&(this.previousConfigurationSyncStore=JSON.parse(o));const s=this.productService[n.CONFIGURATION_SYNC_STORE_KEY];s?this.storageService.store("sync.previous.store",JSON.stringify(s),0):this.storageService.remove("sync.previous.store",0)}async switch(e){var t;(null===(t=this.userDataSyncStore)||void 0===t?void 0:t.canSwitch)&&e!==this.userDataSyncStore.type&&(e===this.userDataSyncStore.defaultType?this.storageService.remove("sync.store.url.type",0):this.storageService.store("sync.store.url.type",e,0),this.updateUserDataSyncStore())}async getPreviousUserDataSyncStore(){ return this.toUserDataSyncStore(this.previousConfigurationSyncStore)}};y=o([r(0,d.IProductService),r(1,c.IConfigurationService),r(2,p.IStorageService)],y),t.UserDataSyncStoreManagementService=y;let w=class extends i.Disposable{constructor(e,t,i,n,o,s,r){super(),this.requestService=i,this.logService=n,this.storageService=r,this._onTokenFailed=this._register(new f.Emitter),this.onTokenFailed=this._onTokenFailed.event,this._onTokenSucceed=this._register(new f.Emitter),this.onTokenSucceed=this._onTokenSucceed.event,this._donotMakeRequestsUntil=void 0,this._onDidChangeDonotMakeRequestsUntil=this._register(new f.Emitter),this.onDidChangeDonotMakeRequestsUntil=this._onDidChangeDonotMakeRequestsUntil.event,this.resetDonotMakeRequestsUntilPromise=void 0,this.updateUserDataSyncStoreUrl(e),this.commonHeadersPromise=h.getServiceMachineId(o,s,r).then(e=>{const i={"X-Client-Name":`${t.applicationName}${v.isWeb?"-web":""}`,"X-Client-Version":t.version,"X-Machine-Id":e};return t.commit&&(i["X-Client-Commit"]=t.commit),i}), this.session=new I(100,3e5,this.requestService,this.logService),this.initDonotMakeRequestsUntil()}get donotMakeRequestsUntil(){return this._donotMakeRequestsUntil}setAuthToken(e,t){this.authToken={token:e,type:t}}updateUserDataSyncStoreUrl(e){this.userDataSyncStoreUrl=e?a.joinPath(e,"v1"):void 0}initDonotMakeRequestsUntil(){const e=this.storageService.getNumber("sync.donot-make-requests-until",0);e&&Date.now()S.timeout(this._donotMakeRequestsUntil.getTime()-Date.now(),e).then(()=>this.setDonotMakeRequestsUntil(void 0)))):this.storageService.remove("sync.donot-make-requests-until",0),this._onDidChangeDonotMakeRequestsUntil.fire())}async getAllRefs(e){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const t=a.joinPath(this.userDataSyncStoreUrl,"resource",e),i=await this.request({type:"GET",url:t.toString(),headers:{}},[],l.CancellationToken.None);return(await s.asJson(i)||[]).map(({url:e,created:i})=>({ref:a.relativePath(t,t.with({path:e})),created:1e3*i}))}async resolveContent(e,t){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const i=a.joinPath(this.userDataSyncStoreUrl,"resource",e,t).toString(),n={"Cache-Control":"no-cache"},o=await this.request({type:"GET",url:i,headers:n},[],l.CancellationToken.None);return await s.asText(o)}async delete(e){ if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const t=a.joinPath(this.userDataSyncStoreUrl,"resource",e).toString();await this.request({type:"DELETE",url:t,headers:{}},[],l.CancellationToken.None)}async read(e,t,i={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const o=a.joinPath(this.userDataSyncStoreUrl,"resource",e,"latest").toString();(i=Object.assign({},i))["Cache-Control"]="no-cache",t&&(i["If-None-Match"]=t.ref);const r=await this.request({type:"GET",url:o,headers:i},[304],l.CancellationToken.None);if(304===r.res.statusCode)return t;const c=r.res.headers.etag;if(!c)throw new n.UserDataSyncStoreError("Server did not return the ref",n.UserDataSyncErrorCode.NoRef,r.res.headers[n.HEADER_OPERATION_ID]);return{ref:c,content:await s.asText(r)}}async write(e,t,i,o={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const s=a.joinPath(this.userDataSyncStoreUrl,"resource",e).toString() ;(o=Object.assign({},o))["Content-Type"]="text/plain",i&&(o["If-Match"]=i);const r=await this.request({type:"POST",url:s,data:t,headers:o},[],l.CancellationToken.None),c=r.res.headers.etag;if(!c)throw new n.UserDataSyncStoreError("Server did not return the ref",n.UserDataSyncErrorCode.NoRef,r.res.headers[n.HEADER_OPERATION_ID]);return c}async manifest(e={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const t=a.joinPath(this.userDataSyncStoreUrl,"manifest").toString();(e=Object.assign({},e))["Content-Type"]="application/json";const i=await this.request({type:"GET",url:t,headers:e},[],l.CancellationToken.None),n=await s.asJson(i),o=this.storageService.get("sync.user-session-id",0);return o&&n&&o!==n.session&&this.clearSession(),null===n&&o&&this.clearSession(),n&&this.storageService.store("sync.user-session-id",n.session,0),n}async clear(){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.") ;const e=a.joinPath(this.userDataSyncStoreUrl,"resource").toString();await this.request({type:"DELETE",url:e,headers:{"Content-Type":"text/plain"}},[],l.CancellationToken.None),this.clearSession()}clearSession(){this.storageService.remove("sync.user-session-id",0),this.storageService.remove("sync.machine-session-id",0)}async request(e,t,i){var o,r,a,l,c,d,h,u,g,p;if(!this.authToken)throw new n.UserDataSyncStoreError("No Auth Token Available",n.UserDataSyncErrorCode.Unauthorized,void 0);if(this._donotMakeRequestsUntil&&Date.now(){var t;return this.updateUserDataSyncStoreUrl(null===(t=e.userDataSyncStore)||void 0===t?void 0:t.url)}))}} ;E=o([r(0,n.IUserDataSyncStoreManagementService),r(1,d.IProductService),r(2,s.IRequestService),r(3,n.IUserDataSyncLogService),r(4,u.IEnvironmentService),r(5,g.IFileService),r(6,p.IStorageService)],E),t.UserDataSyncStoreService=E;class I{constructor(e,t,i,n){this.limit=e,this.interval=t,this.requestService=i,this.logService=n,this.requests=[],this.startTime=void 0}request(e,t){if(this.isExpired()&&this.reset(),this.requests.length>=this.limit)throw this.logService.info("Too many requests",...this.requests),new n.UserDataSyncStoreError(`Too many requests. Only ${this.limit} requests allowed in ${this.interval/6e4} minutes.`,n.UserDataSyncErrorCode.LocalTooManyRequests,void 0);return this.startTime=this.startTime||new Date,this.requests.push(e.url),this.requestService.request(e,t)}isExpired(){return void 0!==this.startTime&&(new Date).getTime()-this.startTime.getTime()>this.interval}reset(){this.requests=[],this.startTime=void 0}}t.RequestsSession=I})),define(e[1606],t([0,1,184,48]),(function(e,t,i,n){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWebviewContentMimeType=void 0;const o=new Map([[".svg","image/svg+xml"],[".txt","text/plain"],[".css","text/css"],[".js","application/javascript"],[".json","application/json"],[".html","text/html"],[".htm","text/html"],[".xhtml","application/xhtml+xml"],[".oft","font/otf"],[".xml","application/xml"]]);t.getWebviewContentMimeType=function(e){const t=n.extname(e.fsPath).toLowerCase();return o.get(t)||i.getMediaMime(e.fsPath)||i.MIME_UNKNOWN}})),define(e[1607],t([0,1,31,136,29,48,10,1606]),(function(e,t,i,n,o,s,r,a){"use strict";var l;function c(e,t){let i=e.fsPath+(e.fsPath.endsWith(s.sep)?"":s.sep),o=t.fsPath;return n.isUNC(e.fsPath)&&n.isUNC(t.fsPath)&&(i=i.toLowerCase(),o=o.toLowerCase()),o.startsWith(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.loadLocalResource=t.WebviewResourceResponse=t.webviewPartitionId=void 0,t.webviewPartitionId="webview",function(e){let t;!function(e){e[e.Success=0]="Success",e[e.Failed=1]="Failed", e[e.AccessDenied=2]="AccessDenied"}(t=e.Type||(e.Type={}));e.StreamSuccess=class{constructor(e,i){this.stream=e,this.mimeType=i,this.type=t.Success}},e.Failed={type:t.Failed},e.AccessDenied={type:t.AccessDenied}}(l=t.WebviewResourceResponse||(t.WebviewResourceResponse={})),t.loadLocalResource=async function(e,t,n,s){let d=function(e,t){const i=function(e){if(e.scheme===o.Schemas.vscodeWebviewResource){return r.URI.parse(encodeURIComponent(e.path).replace(/%2F/gi,"/").replace(/^\/([a-z0-9\-]+)(\/{1,2})/i,(e,t,i)=>1===i.length?`${t}:///`:`${t}://`)).with({query:e.query,fragment:e.fragment})}return e}(e);for(const e of t)if(c(e,i))return i;return}(e,t.roots);if(!d)return l.AccessDenied;const h=a.getWebviewContentMimeType(e);if(t.rewriteUri&&(d=t.rewriteUri(d)),d.scheme===o.Schemas.http||d.scheme===o.Schemas.https){const e=await s.request({url:d.toString(!0)},i.CancellationToken.None);return 200===e.res.statusCode?new l.StreamSuccess(e.stream,h):l.Failed}try{const e=await n.readFileStream(d) ;return new l.StreamSuccess(e,h)}catch(e){return console.log(e),l.Failed}}})),define(e[1608],t([0,1,29,10,239]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebviewPortMappingManager=void 0;t.WebviewPortMappingManager=class{constructor(e,t,i){this._getExtensionLocation=e,this._getMappings=t,this.tunnelService=i,this._tunnels=new Map}async getRedirect(e,t){const s=n.URI.parse(t),r=o.extractLocalHostUriMetaDataForPortMapping(s);if(r)for(const t of this._getMappings())if(t.webviewPort===r.port){const n=this._getExtensionLocation();if(n&&n.scheme===i.Schemas.vscodeRemote){const i=e&&await this.getOrCreateTunnel(e,t.extensionHostPort);if(i){if(i.tunnelLocalPort===t.webviewPort)return;return encodeURI(s.with({authority:`127.0.0.1:${i.tunnelLocalPort}`}).toString(!0))}}if(t.webviewPort!==t.extensionHostPort)return encodeURI(s.with({authority:`${r.address}:${t.extensionHostPort}`}).toString(!0))}}dispose(){for(const e of this._tunnels.values())e.then(e=>e.dispose()) ;this._tunnels.clear()}getOrCreateTunnel(e,t){const i=this._tunnels.get(t);if(i)return i;const n=this.tunnelService.openTunnel({getAddress:async()=>e},void 0,t);return n&&this._tunnels.set(t,n),n}}})),define(e[202],t([0,1,12]),(function(e,t,i){"use strict";function n(e,t,n=t.isExtensionDevelopment){if(i.isWeb)return"custom";const o=e.getValue("window"),s=!t.isBuilt||n;if(i.isMacintosh&&s)return"native";if(o){if(i.isMacintosh&&!0===o.nativeTabs)return"native";if(i.isMacintosh&&!1===o.nativeFullScreen)return"native";const e=o.titleBarStyle;if("native"===e||"custom"===e)return e}return i.isLinux?"native":"custom"}Object.defineProperty(t,"__esModule",{value:!0}),t.zoomLevelToZoomFactor=t.getTitleBarStyle=t.getMenuBarVisibility=t.isFileToOpen=t.isFolderToOpen=t.isWorkspaceToOpen=t.WindowMinimumSize=void 0,t.WindowMinimumSize={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270},t.isWorkspaceToOpen=function(e){return!!e.workspaceUri},t.isFolderToOpen=function(e){return!!e.folderUri},t.isFileToOpen=function(e){ return!!e.fileUri},t.getMenuBarVisibility=function(e,t,i=t.isExtensionDevelopment){const o=n(e,t,i),s=e.getValue("window.menuBarVisibility");return"native"===o&&"compact"===s?"default":s},t.getTitleBarStyle=n,t.zoomLevelToZoomFactor=function(e=0){return Math.pow(1.2,e)}})),define(e[120],t([0,1,5,1055,10,12,48,17,164,93,29,110,136,355]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g){"use strict";function p(e){return e.hasOwnProperty("folderUri")}function m(e){return v(e)||f(e)}function v(e){return e&&"object"==typeof e&&"string"==typeof e.path&&(!e.name||"string"==typeof e.name)}function f(e){return e&&"object"==typeof e&&"string"==typeof e.uri&&(!e.name||"string"==typeof e.name)}function S(e){return e instanceof o.URI}Object.defineProperty(t,"__esModule",{value:!0}), t.toStoreData=t.restoreRecentlyOpened=t.useSlashForPath=t.rewriteWorkspaceFileForNewLocation=t.getStoredWorkspaceFolder=t.hasWorkspaceFileExtension=t.isSingleFolderWorkspaceInitializationPayload=t.isUntitledWorkspace=t.toWorkspaceIdentifier=t.isWorkspaceIdentifier=t.isSingleFolderWorkspaceIdentifier=t.isRawUriWorkspaceFolder=t.isRawFileWorkspaceFolder=t.isStoredWorkspaceFolder=t.reviveWorkspaceIdentifier=t.isRecentFile=t.isRecentFolder=t.isRecentWorkspace=t.IWorkspacesService=t.UNTITLED_WORKSPACE_NAME=t.WORKSPACE_FILTER=t.WORKSPACE_EXTENSION=void 0,t.WORKSPACE_EXTENSION="code-workspace",t.WORKSPACE_FILTER=[{name:n.localize(0,null),extensions:[t.WORKSPACE_EXTENSION]}],t.UNTITLED_WORKSPACE_NAME="workspace.json",t.IWorkspacesService=i.createDecorator("workspacesService"),t.isRecentWorkspace=function(e){return e.hasOwnProperty("workspace")},t.isRecentFolder=p,t.isRecentFile=function(e){return e.hasOwnProperty("fileUri")},t.reviveWorkspaceIdentifier=function(e){return{id:e.id,configPath:o.URI.revive(e.configPath)} },t.isStoredWorkspaceFolder=m,t.isRawFileWorkspaceFolder=v,t.isRawUriWorkspaceFolder=f,t.isSingleFolderWorkspaceIdentifier=S,t.isWorkspaceIdentifier=function(e){const t=e;return t&&"string"==typeof t.id&&t.configPath instanceof o.URI},t.toWorkspaceIdentifier=function(e){return e.configuration?{configPath:e.configuration,id:e.id}:1===e.folders.length?e.folders[0].uri:void 0},t.isUntitledWorkspace=function(e,t){return a.extUriBiasedIgnorePathCase.isEqualOrParent(e,t.untitledWorkspacesHome)},t.isSingleFolderWorkspaceInitializationPayload=function(e){return S(e.folder)};const b="."+t.WORKSPACE_EXTENSION;t.hasWorkspaceFileExtension=function(e){return("string"==typeof e?r.extname(e):a.extname(e))===b};const _="/";function C(e,t,i,n,o=!s.isWindows){if(e.scheme!==n.scheme)return{name:i,uri:e.toString(!0)};let r=t?void 0:a.relativePath(n,e);if(void 0!==r)0===r.length?r=".":s.isWindows&&e.scheme===d.Schemas.file&&!o&&(r=r.replace(/\//g,"\\"));else if(e.scheme===d.Schemas.file)r=e.fsPath, s.isWindows&&(r=h.normalizeDriveLetter(r),o&&(r=u.toSlashes(r)));else{if(!a.isEqualAuthority(e.authority,n.authority))return{name:i,uri:e.toString(!0)};r=e.path}return{name:i,path:r}}function y(e){return!s.isWindows||e.some(e=>v(e)&&e.path.indexOf(_)>=0)}t.getStoredWorkspaceFolder=C,t.rewriteWorkspaceFileForNewLocation=function(e,t,i,n){let d=function(e,t){let i=c.parse(t);if(!i||!Array.isArray(i.folders))throw new Error(`${e} looks like an invalid workspace file.`);i.folders=i.folders.filter(e=>m(e));return i}(t,e);const h=a.dirname(t),u=a.dirname(n),p=[],f=y(d.folders);for(const e of d.folders){const t=v(e)?a.resolvePath(h,e.path):o.URI.parse(e.uri);let n;n=!i&&(!v(e)||r.isAbsolute(e.path)),p.push(C(t,n,e.name,u,f))}const S={insertSpaces:!1,tabSize:4,eol:s.isLinux||s.isMacintosh?"\n":"\r\n"},b=l.setProperty(e,["folders"],p,S);let _=l.applyEdits(e,b);return d.remoteAuthority===g.getRemoteAuthority(n)&&(_=l.applyEdits(_,l.removeProperty(_,["remoteAuthority"],S))),_},t.useSlashForPath=y, t.restoreRecentlyOpened=function(e,t){const i={workspaces:[],files:[]};if(e){const n=function(e,i){for(let n=0;n{const n=Array.isArray(s.workspaceLabels)&&s.workspaceLabels[t]||void 0;"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.configURIPath?i.workspaces.push({label:n,workspace:{id:e.id,configPath:o.URI.parse(e.configURIPath)}}):"string"==typeof e&&i.workspaces.push({label:n,folderUri:o.URI.parse(e)})}),Array.isArray(s.files2)&&n(s.files2,(e,t)=>{const n=Array.isArray(s.fileLabels)&&s.fileLabels[t]||void 0;"string"==typeof e&&i.files.push({label:n,fileUri:o.URI.parse(e)})})}return i},t.toStoreData=function(e){const t={workspaces3:[],files2:[]};let i=!1;const n=[];for(const o of e.workspaces)p(o)?t.workspaces3.push(o.folderUri.toString()):t.workspaces3.push({id:o.workspace.id, configURIPath:o.workspace.configPath.toString()}),n.push(o.label||null),i=i||!!o.label;i&&(t.workspaceLabels=n),i=!1;const o=[];for(const n of e.files)t.files2.push(n.fileUri.toString()),o.push(n.label||null),i=i||!!n.label;return i&&(t.fileLabels=o),t}})),define(e[591],t([0,1,1021,48,17,236,134,24,120,110]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RandomBasedVariableResolver=t.WorkspaceBasedVariableResolver=t.TimeBasedVariableResolver=t.CommentBasedVariableResolver=t.ClipboardBasedVariableResolver=t.ModelBasedVariableResolver=t.SelectionBasedVariableResolver=t.CompositeSnippetVariableResolver=t.KnownSnippetVariableNames=void 0,t.KnownSnippetVariableNames=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0, TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0});t.CompositeSnippetVariableResolver=class{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){let i=t.resolve(e);if(void 0!==i)return i}}};t.SelectionBasedVariableResolver=class{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){ const i=this._model.getLineContent(this._selection.startLineNumber),n=a.getLeadingWhitespace(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk(t=>t!==e&&(t instanceof s.Text&&(o=a.getLeadingWhitespace(t.value.split(/\r\n|\r|\n/).pop())),!0));const r=a.commonPrefixLength(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,(e,t,i)=>`${t}${o.substr(r)}${i}`)}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}};t.ModelBasedVariableResolver=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return n.basename(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){ const e=n.basename(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t&&this._labelService?"."===n.dirname(this._model.uri.fsPath)?"":this._labelService.getUriLabel(o.dirname(this._model.uri)):"TM_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri):void 0}};t.ClipboardBasedVariableResolver=class{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter(e=>!a.isFalsyOrWhitespace(e));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}};t.CommentBasedVariableResolver=class{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=r.LanguageConfigurationRegistry.getComments(i) ;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};class d{resolve(e){const{name:t}=e ;return"CURRENT_YEAR"===t?String((new Date).getFullYear()):"CURRENT_YEAR_SHORT"===t?String((new Date).getFullYear()).slice(-2):"CURRENT_MONTH"===t?String((new Date).getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String((new Date).getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String((new Date).getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String((new Date).getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String((new Date).getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?d.dayNames[(new Date).getDay()]:"CURRENT_DAY_NAME_SHORT"===t?d.dayNamesShort[(new Date).getDay()]:"CURRENT_MONTH_NAME"===t?d.monthNames[(new Date).getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?d.monthNamesShort[(new Date).getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(Date.now()/1e3)):void 0}}t.TimeBasedVariableResolver=d,d.dayNames=[i.localize(0,null),i.localize(1,null),i.localize(2,null),i.localize(3,null),i.localize(4,null),i.localize(5,null),i.localize(6,null)], d.dayNamesShort=[i.localize(7,null),i.localize(8,null),i.localize(9,null),i.localize(10,null),i.localize(11,null),i.localize(12,null),i.localize(13,null)],d.monthNames=[i.localize(14,null),i.localize(15,null),i.localize(16,null),i.localize(17,null),i.localize(18,null),i.localize(19,null),i.localize(20,null),i.localize(21,null),i.localize(22,null),i.localize(23,null),i.localize(24,null),i.localize(25,null)],d.monthNamesShort=[i.localize(26,null),i.localize(27,null),i.localize(28,null),i.localize(29,null),i.localize(30,null),i.localize(31,null),i.localize(32,null),i.localize(33,null),i.localize(34,null),i.localize(35,null),i.localize(36,null),i.localize(37,null)];t.WorkspaceBasedVariableResolver=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=l.toWorkspaceIdentifier(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0} _resolveWorkspaceName(e){if(l.isSingleFolderWorkspaceIdentifier(e))return n.basename(e.path);let t=n.basename(e.configPath.path);return t.endsWith(l.WORKSPACE_EXTENSION)&&(t=t.substr(0,t.length-l.WORKSPACE_EXTENSION.length-1)),t}_resoveWorkspacePath(e){if(l.isSingleFolderWorkspaceIdentifier(e))return c.normalizeDriveLetter(e.fsPath);let t=n.basename(e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?c.normalizeDriveLetter(i):"/"}};t.RandomBasedVariableResolver=class{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):void 0}}})),define(e[34],t([0,1,10,17,5,67,120]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toWorkspaceFolders=t.toWorkspaceFolder=t.WorkspaceFolder=t.Workspace=t.IWorkspaceFolder=t.IWorkspace=t.WorkbenchState=t.IWorkspaceContextService=void 0,t.IWorkspaceContextService=o.createDecorator("contextService"),function(e){ e[e.EMPTY=1]="EMPTY",e[e.FOLDER=2]="FOLDER",e[e.WORKSPACE=3]="WORKSPACE"}(t.WorkbenchState||(t.WorkbenchState={})),function(e){e.isIWorkspace=function(e){return!(!e||"object"!=typeof e||"string"!=typeof e.id||!Array.isArray(e.folders))}}(t.IWorkspace||(t.IWorkspace={})),function(e){e.isIWorkspaceFolder=function(e){return!(!e||"object"!=typeof e||!i.URI.isUri(e.uri)||"string"!=typeof e.name||"function"!=typeof e.toResource)}}(t.IWorkspaceFolder||(t.IWorkspaceFolder={}));t.Workspace=class{constructor(e,t=[],i=null){this._id=e,this._configuration=i,this._foldersMap=s.TernarySearchTree.forUris(),this.folders=t}update(e){this._id=e.id,this._configuration=e.configuration,this.folders=e.folders}get folders(){return this._folders}set folders(e){this._folders=e,this.updateFoldersMap()}get id(){return this._id}get configuration(){return this._configuration}set configuration(e){this._configuration=e}getFolder(e){return e&&this._foldersMap.findSubstr(e.with({scheme:e.scheme,authority:e.authority,path:e.path}))||null} updateFoldersMap(){this._foldersMap=s.TernarySearchTree.forUris();for(const e of this.folders)this._foldersMap.set(e.uri,e)}toJSON(){return{id:this.id,folders:this.folders,configuration:this.configuration}}};class a{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toResource(e){return n.joinPath(this.uri,e)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}t.WorkspaceFolder=a,t.toWorkspaceFolder=function(e){return new a({uri:e,index:0,name:n.basenameOrAuthority(e)},{uri:e.toString()})},t.toWorkspaceFolders=function(e,t){let o=[],s=new Set;const l=n.dirname(t);for(let t of e){let e=null;if(r.isRawFileWorkspaceFolder(t))t.path&&(e=n.resolvePath(l,t.path));else if(r.isRawUriWorkspaceFolder(t))try{"/"!==(e=i.URI.parse(t.uri)).path[0]&&(e=e.with({path:"/"+e.path}))}catch(e){console.warn(e)}if(e){let i=n.getComparisonKey(e);if(!s.has(i)){s.add(i);const r=t.name||n.basenameOrAuthority(e);o.push(new a({uri:e,name:r,index:o.length},t))}}}return o}})), define(e[1609],t([0,1,14,2,24,115,18,60,75,34,5,236,591,11,27,13,52,802]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetSession=t.OneSnippet=void 0,g.registerThemingParticipant((e,t)=>{function i(t){const i=e.getColor(t);return i?i.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${i(p.snippetTabstopHighlightBackground)}; outline-color: ${i(p.snippetTabstopHighlightBorder)}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${i(p.snippetFinalTabstopHighlightBackground)}; outline-color: ${i(p.snippetFinalTabstopHighlightBorder)}; }`)});class f{constructor(e,t,n){this._nestingLevel=1,this._editor=e,this._snippet=t,this._offset=n,this._placeholderGroups=i.groupBy(t.placeholders,h.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]), this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=r.Range.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),a=i.isFinalTabstop?f._decor.inactiveFinal:f._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n);e.push(s.EditOperation.replaceMove(n,t.transform.resolve(o)))}e.length>0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1 ;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new a.Selection(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?f._decor.activeFinal:f._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?f._decor.activeFinal:f._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?f._decor.inactiveFinal:f._decor.inactive);return n});return t?this.move(e):null!=i?i:[]} _hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof h.Placeholder){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{ for(const i of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=i.index+(s+1)/this._nestingLevel:e.index=i.index+e.index/this._nestingLevel;this._snippet.replace(i,o._snippet.children);const a=this._placeholderDecorations.get(i);n.removeDecoration(a),this._placeholderDecorations.delete(i);for(const e of o._snippet.placeholders){const i=o._snippet.offset(e),s=o._snippet.fullLen(e),a=r.Range.fromPositions(t.getPositionAt(o._offset+i),t.getPositionAt(o._offset+i+s)),l=n.addDecoration(a,f._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=i.groupBy(this._snippet.placeholders,h.Placeholder.compareByIndex)})}getEnclosingRange(){let e;const t=this._editor.getModel();for(const i of this._placeholderDecorations.values()){const n=m.withNullAsUndefined(t.getDecorationRange(i));e=e?e.plusRange(n):n}return e}} t.OneSnippet=f,f._decor={active:l.ModelDecorationOptions.register({stickiness:0,className:"snippet-placeholder"}),inactive:l.ModelDecorationOptions.register({stickiness:1,className:"snippet-placeholder"}),activeFinal:l.ModelDecorationOptions.register({stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:l.ModelDecorationOptions.register({stickiness:1,className:"finish-snippet-placeholder"})};const S={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class b{constructor(e,t,i=S){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,s){const r=e.getLineContent(t.lineNumber),a=o.getLeadingWhitespace(r,0,t.column-1);i.walk(t=>{if(t instanceof h.Text&&!(t.parent instanceof h.Choice)){const i=t.value.split(/\r\n|\r|\n/);if(n)for(let t=1;te.get(c.IWorkspaceContextService,d.optional)),C=e.invokeWithinContext(e=>new u.ModelBasedVariableResolver(e.get(v.ILabelService,d.optional),S)),y=()=>l;let w=0,E=S.getValueInRange(b.adjustSelection(S,e.getSelection(),i,0)),I=S.getValueInRange(b.adjustSelection(S,e.getSelection(),0,n)),x=S.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const k=e.getSelections().map((e,t)=>({selection:e,idx:t})).sort((e,t)=>r.Range.compareRangesUsingStarts(e.selection,t.selection)) ;for(const{selection:r,idx:l}of k){let c=b.adjustSelection(S,r,i,0),d=b.adjustSelection(S,r,0,n);E!==S.getValueInRange(c)&&(c=r),I!==S.getValueInRange(d)&&(d=r);const v=r.setStartPosition(c.startLineNumber,c.startColumn).setEndPosition(d.endLineNumber,d.endColumn),D=(new h.SnippetParser).parse(t,!0,o),T=v.getStartPosition();b.adjustWhitespace(S,T,D,a||l>0&&x!==S.getLineFirstNonWhitespaceColumn(r.positionLineNumber),!0),D.resolveVariables(new u.CompositeSnippetVariableResolver([C,new u.ClipboardBasedVariableResolver(y,l,k.length,"spread"===e.getOption(62)),new u.SelectionBasedVariableResolver(S,r,l,g),new u.CommentBasedVariableResolver(S,r),new u.TimeBasedVariableResolver,new u.WorkspaceBasedVariableResolver(_),new u.RandomBasedVariableResolver]));const R=S.getOffsetAt(T)+w;w+=D.toString().length-S.getValueLengthInRange(v),p[l]=s.EditOperation.replace(v,D.toString()),p[l].identifier={major:l,minor:0},m[l]=new f(e,D,R)}return{edits:p,snippets:m}}dispose(){n.dispose(this._snippets)}_logInfo(){ return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=b.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter(e=>!!e.identifier).map(e=>a.Selection.fromPositions(e.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=S){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=b.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,e=>{for(const e of this._snippets)e.merge(n) ;return console.assert(0===n.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter(e=>!!e.identifier).map(e=>a.Selection.fromPositions(e.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))})}e.sort(r.Range.compareRangesUsingStarts);for(let[i,n]of t)if(n.length===e.length){n.sort(r.Range.compareRangesUsingStarts);for(let o=0;o0}getEnclosingRange(){let e;for(const t of this._snippets){const i=t.getEnclosingRange();e=e?e.plusRange(i):i}return e}}t.SnippetSession=b})),define(e[168],t([0,1,2,37,18,60,58,220,8,39,1609]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetController2=void 0;const g={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let p=class e{constructor(t,n,o){this._editor=t,this._logService=n,this._snippetListener=new i.DisposableStore,this._modelVersionId=-1, this._inSnippet=e.InSnippetMode.bindTo(o),this._hasNextTabstop=e.HasNextTabstop.bindTo(o),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(o)}static get(t){return t.getContribution(e.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?g:Object.assign(Object.assign({},g),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new u.SnippetSession(this._editor,e,t),this._session.insert()), t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(e=>e.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;if(e){if(this._currentChoice!==e){this._currentChoice=e, this._editor.setSelections(this._editor.getSelections().map(e=>a.Selection.fromPositions(e.getStartPosition())));const[t]=e.options;c.showSimpleSuggestions(this._editor,e.options.map((e,i)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(i+1),range:s.Range.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))})))}}else this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}getSessionEnclosingRange(){if(this._session)return this._session.getEnclosingRange()}} ;p.ID="snippetController2",p.InSnippetMode=new d.RawContextKey("inSnippetMode",!1),p.HasNextTabstop=new d.RawContextKey("hasNextTabstop",!1),p.HasPrevTabstop=new d.RawContextKey("hasPrevTabstop",!1),p=o([r(1,h.ILogService),r(2,d.IContextKeyService)],p),t.SnippetController2=p,n.registerEditorContribution(p.ID,p);const m=n.EditorCommand.bindToContribution(p.get);n.registerEditorCommand(new m({id:"jumpToNextSnippetPlaceholder",precondition:d.ContextKeyExpr.and(p.InSnippetMode,p.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.EditorContextKeys.editorTextFocus,primary:2}})),n.registerEditorCommand(new m({id:"jumpToPrevSnippetPlaceholder",precondition:d.ContextKeyExpr.and(p.InSnippetMode,p.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.EditorContextKeys.editorTextFocus,primary:1026}})),n.registerEditorCommand(new m({id:"leaveSnippet",precondition:p.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})), n.registerEditorCommand(new m({id:"acceptSnippet",precondition:p.InSnippetMode,handler:e=>e.finish()}))})),define(e[1610],t([0,1,14,15,21,6,2,60,45,929,220,168,31,932,24]),(function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestModel=t.State=t.LineContext=void 0;class m{constructor(e,t,i,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&(n.endColumn===i.column&&!!isNaN(Number(n.word)))}}t.LineContext=m,function(e){e[e.Idle=0]="Idle",e[e.Manual=1]="Manual",e[e.Auto=2]="Auto"}(t.State||(t.State={}));class v{constructor(e,t,i){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._toDispose=new r.DisposableStore, this._quickSuggestDelay=10,this._triggerCharacterListener=new r.DisposableStore,this._triggerQuickSuggest=new n.TimeoutTimer,this._state=0,this._completionDisposables=new r.DisposableStore,this._onDidCancel=new s.Emitter,this._onDidTrigger=new s.Emitter,this._onDidSuggest=new s.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._currentSelection=this._editor.getSelection()||new a.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(l.CompletionProviderRegistry.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})), this._toDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._onCursorChange(e)}));let o=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{o=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{o=!1,this._refilterCompletionItems()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{o||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){r.dispose(this._triggerCharacterListener),r.dispose([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(71),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(), this._editor.getOption(72)||!this._editor.hasModel()||!this._editor.getOption(99))return;const e=new Map;for(const t of l.CompletionProviderRegistry.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||((n=new Set).add(d.getSnippetSuggestSupport()),e.set(i,n)),n.add(t)}const t=t=>{var i;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";p.isLowSurrogate(t.charCodeAt(t.length-1))?p.isHighSurrogate(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const o=e.get(n);if(o){const e=null===(i=this._completionModel)||void 0===i?void 0:i.adopt(o);this.trigger({auto:!0,shy:!1,triggerCharacter:n},Boolean(this._completionModel),o,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){0!==this._state&&(this._triggerQuickSuggest.cancel(), this._requestToken&&(this._requestToken.cancel(),this._requestToken=void 0),this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&l.CompletionProviderRegistry.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(l.CompletionProviderRegistry.has(t)&&0===this._state){if(!1===this._editor.getOption(70))return;if(!i.containsRange(this._currentSelection)&&!i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return ;if(this._editor.getOption(96).snippetsPreventQuickSuggestions&&h.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(0!==this._state)return;if(!m.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(70);if(!1!==i){if(!0===i);else{e.tokenizeIfCheap(t.lineNumber);const n=e.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(!(i.other&&0===o||i.comments&&1===o||i.strings&&2===o))return}this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)}}_refilterCompletionItems(){Promise.resolve().then(()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new m(e,t,2===this._state,!1);this._onNewContext(i)})}trigger(e,t=!1,n,s){var r;if(!this._editor.hasModel())return ;const a=this._editor.getModel(),l=e.auto,h=new m(a,this._editor.getPosition(),l,e.shy);this.cancel(t),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:e.shy,position:this._editor.getPosition()}),this._context=h;let p={triggerKind:null!==(r=e.triggerKind)&&void 0!==r?r:0};e.triggerCharacter&&(p={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new u.CancellationTokenSource;const f=this._editor.getOption(93);let S=1;switch(f){case"top":S=0;break;case"bottom":S=2}let b=v._createItemKindFilter(this._editor),_=g.WordDistance.create(this._editorWorkerService,this._editor),C=d.provideSuggestionItems(a,this._editor.getPosition(),new d.CompletionOptions(S,b,n),p,this._requestToken.token);Promise.all([C,_]).then(async([t,n])=>{var o;if(null===(o=this._requestToken)||void 0===o||o.dispose(),0===this._state)return;if(!this._editor.hasModel())return;let r;(t.needsClipboard||i.isNonEmptyArray(s))&&(r=await this._clipboardService.readText());const a=this._editor.getModel();let h=t.items ;if(i.isNonEmptyArray(s)){const e=d.getSuggestionComparator(S);h=h.concat(s).sort(e)}const u=new m(a,this._editor.getPosition(),l,e.shy);this._completionModel=new c.CompletionModel(h,this._context.column,{leadingLineContent:u.leadingLineContent,characterCountDelta:u.column-this._context.column},n,this._editor.getOption(96),this._editor.getOption(93),r),this._completionDisposables.add(t.dispoables),this._onNewContext(u)}).catch(o.onUnexpectedError)}static _createItemKindFilter(e){const t=new Set;"none"===e.getOption(93)&&t.add(27);const i=e.getOption(96);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17), i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),t}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber){if(e.leadingWord.startColumnthis._context.leadingWord.startColumn){const e=new Set(l.CompletionProviderRegistry.all(this._editor.getModel()));this._completionModel.allProvider.forEach(t=>e.delete(t));const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,t)}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){ const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,t)}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(m.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}else this.cancel()}}t.SuggestModel=v})), define(e[267],t([0,1,103,14,21,79,2,177,37,115,18,58,168,236,1524,1022,32,8,5,82,220,1486,1610,1585,1487,6,155,15,13,930,931,47,12,20,31,39,232,88]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x,k,D,T,R,A,M,L,O,N,P,F,B,V){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggerSuggestAction=t.SuggestController=void 0;class W{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:u.Range.fromPositions(t,n),options:{stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}var z;!function(e){ e[e.NoBeforeUndoStop=1]="NoBeforeUndoStop",e[e.NoAfterUndoStop=2]="NoAfterUndoStop",e[e.KeepAlternativeSuggestions=4]="KeepAlternativeSuggestions",e[e.AlternativeOverwriteConfig=8]="AlternativeOverwriteConfig"}(z||(z={}));let U=class e{constructor(e,t,i,n,o,s,r,c){this._memoryService=i,this._commandService=n,this._contextKeyService=o,this._instantiationService=s,this._logService=r,this._lineSuffix=new l.MutableDisposable,this._toDispose=new l.DisposableStore,this.editor=e,this.model=new E.SuggestModel(this.editor,t,c),this.widget=this._toDispose.add(new T.IdleValue(()=>{const e=this._instantiationService.createInstance(I.SuggestWidget,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect(e=>this._insertSuggestion(e,0),this));const t=new A.CommitCharacterController(this.editor,e,e=>this._insertSuggestion(e,2));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest(e=>{0===e.completionModel.items.length&&t.reset()})) ;const i=y.Context.MakesTextEdit.bindTo(this._contextKeyService),n=y.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=y.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(l.toDisposable(()=>{i.reset(),n.reset(),o.reset()})),this._toDispose.add(e.onDidFocus(({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;if(!("smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.command||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-s!==e.completion.insertText.length)){a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText}i.set(a),n.set(!L.Position.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)})),this._toDispose.add(e.onDetailsKeyDown(e=>{ e.toKeybinding().equals(new a.SimpleKeybinding(!0,!1,!1,!1,33))||O.isMacintosh&&e.toKeybinding().equals(new a.SimpleKeybinding(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()})),e})),this._overtypingCapturer=this._toDispose.add(new T.IdleValue(()=>this._toDispose.add(new M.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new T.IdleValue(()=>this._toDispose.add(new w.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(x.WordContextKey,e)),this._toDispose.add(this.model.onDidTrigger(e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new W(this.editor.getModel(),e.position)})),this._toDispose.add(this.model.onDidSuggest(e=>{if(!e.shy){let t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items);this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}})),this._toDispose.add(this.model.onDidCancel(e=>{ e.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));let d=y.Context.AcceptSuggestionsOnEnter.bindTo(o),h=()=>{const e=this.editor.getOption(1);d.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>h())),h()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:o}=e,r=[],a=new P.CancellationTokenSource;1&t||this.editor.pushUndoStop();const l=this.getOverwriteInfo(o,Boolean(8&t));if(this._memoryService.memorize(i,this.editor.getPosition(),o),Array.isArray(o.completion.additionalTextEdits)){ const e=c.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map(e=>h.EditOperation.replace(u.Range.lift(e.range),e.text))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!o.isResolved){const e=new B.StopWatch(!0);let n;const s=i.onDidChangeContent(e=>{if(e.isFlush)return a.cancel(),void s.dispose();for(let t of e.changes){const e=u.Range.getEndPosition(t.range);n&&!L.Position.isBefore(e,n)||(n=e)}});let l=t;t|=2;let d=!1,g=this.editor.onWillType(()=>{g.dispose(),d=!0,2&l||this.editor.pushUndoStop()});r.push(o.resolve(a.token).then(()=>{if(!o.completion.additionalTextEdits||a.token.isCancellationRequested)return!1;if(n&&o.completion.additionalTextEdits.some(e=>L.Position.isBefore(n,u.Range.getStartPosition(e.range))))return!1;d&&this.editor.pushUndoStop();const e=c.StableEditorScrollState.capture(this.editor) ;return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map(e=>h.EditOperation.replace(u.Range.lift(e.range),e.text))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!d&&2&l||this.editor.pushUndoStop(),!0}).then(t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),s.dispose(),g.dispose()}))}let{insertText:d}=o.completion;4&o.completion.insertTextRules||(d=m.SnippetParser.escape(d)),p.SnippetController2.get(this.editor).insert(d,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command?o.completion.command.id===K.id?this.model.trigger({auto:!0,shy:!1 },!0):(r.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch(s.onUnexpectedError)),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,e=>{for(a.cancel();i.canUndo();){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}}),this._alertCompletionItem(o),Promise.all(r).finally(()=>{this.model.clear(),a.dispose()})}getOverwriteInfo(e,t){R.assertType(this.editor.hasModel());let i="replace"===this.editor.getOption(96).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem({completion:e}){const t="string"==typeof e.label?e.label:e.label.name;if(n.isNonEmptyArray(e.additionalTextEdits)){ let n=f.localize(0,null,t,e.additionalTextEdits.length);i.alert(n)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};k.Event.once(this.model.onDidTrigger)(e=>{let t=[];k.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{l.dispose(t),i()},void 0,t),this.model.onDidSuggest(({completionModel:e})=>{if(l.dispose(t),0===e.items.length)return void i() ;const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()},void 0,t)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){ this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}};U.ID="editor.contrib.suggestController",U=o([r(1,D.IEditorWorkerService),r(2,v.ISuggestMemoryService),r(3,S.ICommandService),r(4,b.IContextKeyService),r(5,_.IInstantiationService),r(6,F.ILogService),r(7,V.IClipboardService)],U),t.SuggestController=U;class K extends d.EditorAction{constructor(){super({id:K.id,label:f.localize(1,null),alias:"Trigger Suggest",precondition:b.ContextKeyExpr.and(g.EditorContextKeys.writable,g.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:g.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const i=U.get(t);i&&i.triggerSuggest()}}t.TriggerSuggestAction=K,K.id="editor.action.triggerSuggest",d.registerEditorContribution(U.ID,U),d.registerEditorAction(K);const H=d.EditorCommand.bindToContribution(U.get);d.registerEditorCommand(new H({ id:"acceptSelectedSuggestion",precondition:y.Context.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),C.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:b.ContextKeyExpr.and(y.Context.Visible,g.EditorContextKeys.textInputFocus),primary:2,weight:190}),C.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:b.ContextKeyExpr.and(y.Context.Visible,g.EditorContextKeys.textInputFocus,y.Context.AcceptSuggestionsOnEnter,y.Context.MakesTextEdit),primary:3,weight:190}),N.MenuRegistry.appendMenuItem(y.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:f.localize(2,null)},group:"left",order:1,when:y.Context.HasInsertAndReplaceRange.toNegated()}),N.MenuRegistry.appendMenuItem(y.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:f.localize(3,null)},group:"left",order:1,when:b.ContextKeyExpr.and(y.Context.HasInsertAndReplaceRange,b.ContextKeyExpr.equals("config.editor.suggest.insertMode","insert"))}), N.MenuRegistry.appendMenuItem(y.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:f.localize(4,null)},group:"left",order:1,when:b.ContextKeyExpr.and(y.Context.HasInsertAndReplaceRange,b.ContextKeyExpr.equals("config.editor.suggest.insertMode","replace"))}),d.registerEditorCommand(new H({id:"acceptAlternativeSelectedSuggestion",precondition:b.ContextKeyExpr.and(y.Context.Visible,g.EditorContextKeys.textInputFocus),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:y.suggestWidgetStatusbarMenu,group:"left",order:2,when:b.ContextKeyExpr.and(y.Context.HasInsertAndReplaceRange,b.ContextKeyExpr.equals("config.editor.suggest.insertMode","insert")),title:f.localize(5,null)},{menuId:y.suggestWidgetStatusbarMenu,group:"left",order:2,when:b.ContextKeyExpr.and(y.Context.HasInsertAndReplaceRange,b.ContextKeyExpr.equals("config.editor.suggest.insertMode","replace")),title:f.localize(6,null)}]})), S.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),d.registerEditorCommand(new H({id:"hideSuggestWidget",precondition:y.Context.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),d.registerEditorCommand(new H({id:"selectNextSuggestion",precondition:b.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),d.registerEditorCommand(new H({id:"selectNextPageSuggestion",precondition:b.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),d.registerEditorCommand(new H({id:"selectLastSuggestion", precondition:b.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),d.registerEditorCommand(new H({id:"selectPrevSuggestion",precondition:b.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),d.registerEditorCommand(new H({id:"selectPrevPageSuggestion",precondition:b.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),d.registerEditorCommand(new H({id:"selectFirstSuggestion",precondition:b.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),d.registerEditorCommand(new H({id:"toggleSuggestionDetails",precondition:y.Context.Visible,handler:e=>e.toggleSuggestionDetails(), kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:y.suggestWidgetStatusbarMenu,group:"right",order:1,when:b.ContextKeyExpr.and(y.Context.DetailsVisible,y.Context.CanResolve),title:f.localize(7,null)},{menuId:y.suggestWidgetStatusbarMenu,group:"right",order:1,when:b.ContextKeyExpr.and(y.Context.DetailsVisible.toNegated(),y.Context.CanResolve),title:f.localize(8,null)}]})),d.registerEditorCommand(new H({id:"toggleExplainMode",precondition:y.Context.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),d.registerEditorCommand(new H({id:"toggleSuggestionFocus",precondition:y.Context.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),d.registerEditorCommand(new H({id:"insertBestCompletion", precondition:b.ContextKeyExpr.and(g.EditorContextKeys.textInputFocus,b.ContextKeyExpr.equals("config.editor.tabCompletion","on"),x.WordContextKey.AtEnd,y.Context.Visible.toNegated(),w.SuggestAlternatives.OtherSuggestions.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest(R.isObject(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:190,primary:2}})),d.registerEditorCommand(new H({id:"insertNextSuggestion",precondition:b.ContextKeyExpr.and(g.EditorContextKeys.textInputFocus,b.ContextKeyExpr.equals("config.editor.tabCompletion","on"),w.SuggestAlternatives.OtherSuggestions,y.Context.Visible.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:2}})),d.registerEditorCommand(new H({id:"insertPrevSuggestion", precondition:b.ContextKeyExpr.and(g.EditorContextKeys.textInputFocus,b.ContextKeyExpr.equals("config.editor.tabCompletion","on"),w.SuggestAlternatives.OtherSuggestions,y.Context.Visible.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:190,kbExpr:g.EditorContextKeys.textInputFocus,primary:1026}}))})),define(e[1611],t([0,1,266,140,312,531,1530,1569,1531,1532,358,1578,1572,429,1536,310,1537,1538,317,575,1539,1540,1484,581,582,579,437,567,1576,568,576,438,1580,1582,1584,1544,168,267,1545,569,1546,1593,1586,570,1547,975,342]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define(e[65],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtHostCustomersRegistry=t.extHostCustomer=t.extHostNamedCustomer=void 0,t.extHostNamedCustomer=function(e){return function(t){i.INSTANCE.registerNamedCustomer(e,t)}},t.extHostCustomer=function(e){i.INSTANCE.registerCustomer(e)},function(e){ e.getNamedCustomers=function(){return i.INSTANCE.getNamedCustomers()},e.getCustomers=function(){return i.INSTANCE.getCustomers()}}(t.ExtHostCustomersRegistry||(t.ExtHostCustomersRegistry={}));class i{constructor(){this._namedCustomers=[],this._customers=[]}registerNamedCustomer(e,t){const i=[e,t];this._namedCustomers.push(i)}getNamedCustomers(){return this._namedCustomers}registerCustomer(e){this._customers.push(e)}getCustomers(){return this._customers}}i.INSTANCE=new i})),define(e[1612],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtHostRpcService=t.IExtHostRpcService=void 0,t.IExtHostRpcService=i.createDecorator("IExtHostRpcService");t.ExtHostRpcService=class{constructor(e){this.getProxy=e.getProxy.bind(e),this.set=e.set.bind(e),this.assertRegistered=e.assertRegistered.bind(e),this.drain=e.drain.bind(e)}}})),define(e[1613],t([0,1,66,12]),(function(e,t,i,n){"use strict";var o;function s(e){for(let t=0,i=e.length;t0&&(r=t.subarray(i,i+s),i+=s),a[e]={start:n,deleteCount:o,data:r}}return{id:o,type:"delta",deltas:a}}})),define(e[1614],t([0,1,82,175,69,521,14,8,415,416,550,32]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";function u(e){e&&e.getHTMLElement()!==document.activeElement&&e.domFocus()}function g(e,t,i=!1){const r=e.get(o.IListService).lastFocusedList,a="number"==typeof t?t:1;if(r instanceof n.List||r instanceof s.PagedList){const e=r;e.focusNext(a);const t=e.getFocus();t.length&&e.reveal(t[0])}else if(r instanceof l.ObjectTree||r instanceof d.DataTree||r instanceof c.AsyncDataTree){const e=r,t=new KeyboardEvent("keydown") ;e.focusNext(a,i,t);const n=e.getFocus();n.length&&e.reveal(n[0])}u(r)}function p(e,t){if(e instanceof n.List||e instanceof s.PagedList){const i=e,n=i.getFocus()?i.getFocus()[0]:void 0,o=i.getSelection();o&&"number"==typeof n&&o.indexOf(n)>=0?i.setSelection(o.filter(e=>e!==t)):"number"==typeof n&&i.setSelection(o.concat(n))}else if(e instanceof l.ObjectTree||e instanceof d.DataTree||e instanceof c.AsyncDataTree){const i=e,n=i.getFocus()?i.getFocus()[0]:void 0;if(t===n)return;const o=i.getSelection(),s=new KeyboardEvent("keydown",{shiftKey:!0});o&&o.indexOf(n)>=0?i.setSelection(o.filter(e=>e!==t),s):i.setSelection(o.concat(n),s)}}function m(e,t,i=!1){const r=e.get(o.IListService).lastFocusedList,a="number"==typeof t?t:1;if(r instanceof n.List||r instanceof s.PagedList){const e=r;e.focusPrevious(a);const t=e.getFocus();t.length&&e.reveal(t[0])}else if(r instanceof l.ObjectTree||r instanceof d.DataTree||r instanceof c.AsyncDataTree){const e=r,t=new KeyboardEvent("keydown");e.focusPrevious(a,i,t) ;const n=e.getFocus();n.length&&e.reveal(n[0])}u(r)}function v(e,t){const i=e.get(o.IListService).lastFocusedList;if(i instanceof n.List||i instanceof s.PagedList){const e=i;e.setFocus([0]),e.reveal(0)}else if(i instanceof l.ObjectTree||i instanceof d.DataTree||i instanceof c.AsyncDataTree){const e=i,t=new KeyboardEvent("keydown");e.focusFirst(t);const n=e.getFocus();n.length>0&&e.reveal(n[0])}u(i)}function f(e,t){const i=e.get(o.IListService).lastFocusedList;if(i instanceof n.List||i instanceof s.PagedList){const e=i;e.setFocus([e.length-1]),e.reveal(e.length-1)}else if(i instanceof l.ObjectTree||i instanceof d.DataTree||i instanceof c.AsyncDataTree){const e=i,t=new KeyboardEvent("keydown");e.focusLast(t);const n=e.getFocus();n.length>0&&e.reveal(n[0])}u(i)}function S(e,t){const i=e.get(o.IListService).lastFocusedList,r=o.getSelectionKeyboardEvent("keydown",t);if(i instanceof n.List||i instanceof s.PagedList){const e=i;e.setSelection(e.getFocus(),r) }else if(i instanceof l.ObjectTree||i instanceof d.DataTree||i instanceof c.AsyncDataTree){const e=i,t=e.getFocus();if(t.length>0){let i=!0;!0===e.expandOnlyOnTwistieClick?i=!1:"boolean"!=typeof e.expandOnlyOnTwistieClick&&e.expandOnlyOnTwistieClick(t[0])&&(i=!1),i&&e.toggleCollapsed(t[0])}e.setSelection(t,r)}}Object.defineProperty(t,"__esModule",{value:!0}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusDown",weight:200,when:o.WorkbenchListFocusContextKey,primary:18,mac:{primary:18,secondary:[300]},handler:(e,t)=>g(e,t)}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionDown",weight:200,when:a.ContextKeyExpr.and(o.WorkbenchListFocusContextKey,o.WorkbenchListSupportsMultiSelectContextKey),primary:1042,handler:(e,t)=>{const i=e.get(o.IListService).lastFocusedList;if(i instanceof n.List||i instanceof s.PagedList||i instanceof l.ObjectTree||i instanceof d.DataTree||i instanceof c.AsyncDataTree){const n=i,o=n.getFocus()?n.getFocus()[0]:void 0;g(e,t,!1),p(i,o)} }}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusUp",weight:200,when:o.WorkbenchListFocusContextKey,primary:16,mac:{primary:16,secondary:[302]},handler:(e,t)=>m(e,t)}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionUp",weight:200,when:a.ContextKeyExpr.and(o.WorkbenchListFocusContextKey,o.WorkbenchListSupportsMultiSelectContextKey),primary:1040,handler:(e,t)=>{const i=e.get(o.IListService).lastFocusedList;if(i instanceof n.List||i instanceof s.PagedList||i instanceof l.ObjectTree||i instanceof d.DataTree||i instanceof c.AsyncDataTree){const n=i,o=n.getFocus()?n.getFocus()[0]:void 0;m(e,t,!1),p(i,o)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapse",weight:200,when:o.WorkbenchListFocusContextKey,primary:15,mac:{primary:15,secondary:[2064]},handler:e=>{const t=e.get(o.IListService).lastFocusedList ;if(t&&!(t instanceof n.List||t instanceof s.PagedList)&&(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree)){const e=t,i=e.getFocus();if(0===i.length)return;const n=i[0];if(!e.collapse(n)){const t=e.getParentElement(n);if(t){const i=new KeyboardEvent("keydown");e.setFocus([t],i),e.reveal(t)}}}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapseAll",weight:200,when:o.WorkbenchListFocusContextKey,primary:2063,mac:{primary:2063,secondary:[3088]},handler:e=>{const t=e.get(o.IListService).lastFocusedList;t&&!(t instanceof n.List||t instanceof s.PagedList)&&t.collapseAll()}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusParent",weight:200,when:o.WorkbenchListFocusContextKey,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(!(!t||t instanceof n.List||t instanceof s.PagedList)&&(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree)){const e=t,i=e.getFocus();if(0===i.length)return ;const n=i[0],o=e.getParentElement(n);if(o){const t=new KeyboardEvent("keydown");e.setFocus([o],t),e.reveal(o)}}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expand",weight:200,when:o.WorkbenchListFocusContextKey,primary:17,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t&&!(t instanceof n.List||t instanceof s.PagedList))if(t instanceof l.ObjectTree||t instanceof d.DataTree){const e=t,i=e.getFocus();if(0===i.length)return;const n=i[0];if(!e.expand(n)){const t=e.getFirstElementChild(n);if(t){if(e.getNode(t).visible){const i=new KeyboardEvent("keydown");e.setFocus([t],i),e.reveal(t)}}}}else if(t instanceof c.AsyncDataTree){const e=t,i=e.getFocus();if(0===i.length)return;const n=i[0];e.expand(n).then(t=>{if(n&&!t){const t=e.getFirstElementChild(n);if(t){if(e.getNode(t).visible){const i=new KeyboardEvent("keydown");e.setFocus([t],i),e.reveal(t)}}}})}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageUp",weight:200,when:o.WorkbenchListFocusContextKey, primary:11,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof n.List||t instanceof s.PagedList){const e=t;e.focusPreviousPage(),e.reveal(e.getFocus()[0])}else if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){const e=t,i=new KeyboardEvent("keydown");e.focusPreviousPage(i),e.reveal(e.getFocus()[0])}u(t)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageDown",weight:200,when:o.WorkbenchListFocusContextKey,primary:12,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof n.List||t instanceof s.PagedList){const e=t;e.focusNextPage(),e.reveal(e.getFocus()[0])}else if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){const e=t,i=new KeyboardEvent("keydown");e.focusNextPage(i),e.reveal(e.getFocus()[0])}u(t)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirst",weight:200,when:o.WorkbenchListFocusContextKey,primary:14,handler:e=>v(e)}), i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirstChild",weight:200,when:o.WorkbenchListFocusContextKey,primary:0,handler:e=>v(e,{fromFocused:!0})}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLast",weight:200,when:o.WorkbenchListFocusContextKey,primary:13,handler:e=>f(e)}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLastChild",weight:200,when:o.WorkbenchListFocusContextKey,primary:0,handler:e=>f(e,{fromFocused:!0})}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.select",weight:200,when:o.WorkbenchListFocusContextKey,primary:3,mac:{primary:3,secondary:[2066]},handler:e=>{S(e,!1)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAndPreserveFocus",weight:200,when:o.WorkbenchListFocusContextKey,handler:e=>{S(e,!0)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAll",weight:200, when:a.ContextKeyExpr.and(o.WorkbenchListFocusContextKey,o.WorkbenchListSupportsMultiSelectContextKey),primary:2079,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof n.List||t instanceof s.PagedList){const e=t,i=new KeyboardEvent("keydown");e.setSelection(r.range(e.length),i)}else if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){const e=t,i=e.getFocus(),n=e.getSelection();let o=void 0;i.length>0&&(0===n.length||!n.includes(i[0]))&&(o=i[0]),!o&&n.length>0&&(o=n[0]);let s=void 0;s=o?e.getParentElement(o):void 0;const r=[],a=e=>{for(const t of e.children)t.visible&&(r.push(t.element),t.collapsed||a(t))};a(e.getNode(s)),s&&n.length===r.length&&r.unshift(s);const l=new KeyboardEvent("keydown");e.setSelection(r,l)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleSelection",weight:200,when:o.WorkbenchListFocusContextKey,primary:3075,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(!t)return;const i=t.getFocus() ;if(0===i.length)return;const n=t.getSelection(),s=n.indexOf(i[0]);s>-1?t.setSelection([...n.slice(0,s),...n.slice(s+1)]):t.setSelection([...n,i[0]])}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleExpand",weight:200,when:o.WorkbenchListFocusContextKey,primary:10,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){const e=t,i=e.getFocus();if(i.length>0&&e.isCollapsible(i[0]))return void e.toggleCollapsed(i[0])}S(e,!0)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.clear",weight:200,when:a.ContextKeyExpr.and(o.WorkbenchListFocusContextKey,o.WorkbenchListHasSelectionOrFocus),primary:9,handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof n.List||t instanceof s.PagedList){const e=t;e.setSelection([]),e.setFocus([])}else if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){const e=t,i=new KeyboardEvent("keydown") ;e.setSelection([],i),e.setFocus([],i)}}}),h.CommandsRegistry.registerCommand({id:"list.toggleKeyboardNavigation",handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof n.List||t instanceof s.PagedList){t.toggleKeyboardNavigation()}else if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){t.toggleKeyboardNavigation()}}}),h.CommandsRegistry.registerCommand({id:"list.toggleFilterOnType",handler:e=>{const t=e.get(o.IListService).lastFocusedList;if(t instanceof n.List||t instanceof s.PagedList);else if(t instanceof l.ObjectTree||t instanceof d.DataTree||t instanceof c.AsyncDataTree){const e=t;e.updateOptions({filterOnType:!e.filterOnType})}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollUp",weight:200,when:o.WorkbenchListFocusContextKey,primary:2064,handler:e=>{const t=e.get(o.IListService).lastFocusedList;t&&(t.scrollTop-=10)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollDown",weight:200, when:o.WorkbenchListFocusContextKey,primary:2066,handler:e=>{const t=e.get(o.IListService).lastFocusedList;t&&(t.scrollTop+=10)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollLeft",weight:200,when:o.WorkbenchListFocusContextKey,handler:e=>{const t=e.get(o.IListService).lastFocusedList;t&&(t.scrollLeft-=10)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollRight",weight:200,when:o.WorkbenchListFocusContextKey,handler:e=>{const t=e.get(o.IListService).lastFocusedList;t&&(t.scrollLeft+=10)}})})),define(e[363],t([0,1,6,1086,57,33,5,16]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadcrumbsConfig=t.BreadcrumbsService=t.IBreadcrumbsService=void 0,t.IBreadcrumbsService=r.createDecorator("IEditorBreadcrumbsService");class l{constructor(){this._map=new Map}register(e,t){if(this._map.has(e))throw new Error(`group (${e}) has already a widget`);return this._map.set(e,t),{dispose:()=>this._map.delete(e)}}getWidget(e){ return this._map.get(e)}}t.BreadcrumbsService=l,s.registerSingleton(t.IBreadcrumbsService,l,!0);class c{constructor(){}static _stub(e){return{bindTo(t){let n=new i.Emitter,o=t.onDidChangeConfiguration(t=>{t.affectsConfiguration(e)&&n.fire(void 0)});return new class{constructor(){this.name=e,this.onDidChange=n.event}getValue(i){return i?t.getValue(e,i):t.getValue(e)}updateValue(i,n){return n?t.updateValue(e,i,n):t.updateValue(e,i)}dispose(){o.dispose(),n.dispose()}}}}}}t.BreadcrumbsConfig=c,c.IsEnabled=c._stub("breadcrumbs.enabled"),c.UseQuickPick=c._stub("breadcrumbs.useQuickPick"),c.FilePath=c._stub("breadcrumbs.filePath"),c.SymbolPath=c._stub("breadcrumbs.symbolPath"),c.SymbolSortOrder=c._stub("breadcrumbs.symbolSortOrder"),c.Icons=c._stub("breadcrumbs.icons"),c.TitleScrollbarSizing=c._stub("workbench.editor.titleScrollbarSizing"),c.FileExcludes=c._stub("files.exclude"),a.Registry.as(o.Extensions.Configuration).registerConfiguration({id:"breadcrumbs",title:n.localize(0,null),order:101,type:"object", properties:{"breadcrumbs.enabled":{description:n.localize(1,null),type:"boolean",default:!0},"breadcrumbs.filePath":{description:n.localize(2,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[n.localize(3,null),n.localize(4,null),n.localize(5,null)]},"breadcrumbs.symbolPath":{description:n.localize(6,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[n.localize(7,null),n.localize(8,null),n.localize(9,null)]},"breadcrumbs.symbolSortOrder":{description:n.localize(10,null),type:"string",default:"position",scope:5,enum:["position","name","type"],enumDescriptions:[n.localize(11,null),n.localize(12,null),n.localize(13,null)]},"breadcrumbs.icons":{description:n.localize(14,null),type:"boolean",default:!0},"breadcrumbs.showFiles":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(15,null)},"breadcrumbs.showModules":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(16,null)},"breadcrumbs.showNamespaces":{type:"boolean",default:!0, scope:5,markdownDescription:n.localize(17,null)},"breadcrumbs.showPackages":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(18,null)},"breadcrumbs.showClasses":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(19,null)},"breadcrumbs.showMethods":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(20,null)},"breadcrumbs.showProperties":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(21,null)},"breadcrumbs.showFields":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(22,null)},"breadcrumbs.showConstructors":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(23,null)},"breadcrumbs.showEnums":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(24,null)},"breadcrumbs.showInterfaces":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(25,null)},"breadcrumbs.showFunctions":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(26,null)},"breadcrumbs.showVariables":{type:"boolean", default:!0,scope:5,markdownDescription:n.localize(27,null)},"breadcrumbs.showConstants":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(28,null)},"breadcrumbs.showStrings":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(29,null)},"breadcrumbs.showNumbers":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(30,null)},"breadcrumbs.showBooleans":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(31,null)},"breadcrumbs.showArrays":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(32,null)},"breadcrumbs.showObjects":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(33,null)},"breadcrumbs.showKeys":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(34,null)},"breadcrumbs.showNull":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(35,null)},"breadcrumbs.showEnumMembers":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(36,null)},"breadcrumbs.showStructs":{type:"boolean", default:!0,scope:5,markdownDescription:n.localize(37,null)},"breadcrumbs.showEvents":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(38,null)},"breadcrumbs.showOperators":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(39,null)},"breadcrumbs.showTypeParameters":{type:"boolean",default:!0,scope:5,markdownDescription:n.localize(40,null)}}})})),define(e[592],t([0,1,14,15,31,21,6,2,17,45,237,34,29,9,363,25,13,359,112]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorBreadcrumbsModel=t.FileElement=void 0;class C{constructor(e,t){this.uri=e,this.kind=t}}t.FileElement=C;let y=class e{constructor(t,i,n,o,s,r){this._uri=i,this._editor=n,this._configurationService=o,this._textResourceConfigurationService=s,this._disposables=new c.DisposableStore,this._outlineElements=[],this._outlineDisposables=new c.DisposableStore,this._onDidUpdate=new l.Emitter,this.onDidUpdate=this._onDidUpdate.event, this._cfgEnabled=v.BreadcrumbsConfig.IsEnabled.bindTo(o),this._cfgFilePath=v.BreadcrumbsConfig.FilePath.bindTo(o),this._cfgSymbolPath=v.BreadcrumbsConfig.SymbolPath.bindTo(o),this._disposables.add(this._cfgFilePath.onDidChange(e=>this._onDidUpdate.fire(this))),this._disposables.add(this._cfgSymbolPath.onDidChange(e=>this._onDidUpdate.fire(this))),this._fileInfo=e._initFilePathInfo(t,r),this._bindToEditor(),this._onDidUpdate.fire(this)}dispose(){this._cfgEnabled.dispose(),this._cfgFilePath.dispose(),this._cfgSymbolPath.dispose(),this._outlineDisposables.dispose(),this._disposables.dispose(),this._onDidUpdate.dispose()}isRelative(){return Boolean(this._fileInfo.folder)}getElements(){let e=[];return"on"===this._cfgFilePath.getValue()?e=e.concat(this._fileInfo.path):"last"===this._cfgFilePath.getValue()&&this._fileInfo.path.length>0&&(e=e.concat(this._fileInfo.path.slice(-1))), "on"===this._cfgSymbolPath.getValue()?e=e.concat(this._outlineElements):"last"===this._cfgSymbolPath.getValue()&&this._outlineElements.length>0&&(e=e.concat(this._outlineElements.slice(-1))),e}static _initFilePathInfo(e,t){if(e.scheme===p.Schemas.untitled)return{folder:void 0,path:[]};let i={folder:S.withNullAsUndefined(t.getWorkspaceFolder(e)),path:[]},n=e;for(;n&&"/"!==n.path&&(!i.folder||!d.isEqual(i.folder.uri,n));){i.path.unshift(new C(n,0===i.path.length?f.FileKind.FILE:f.FileKind.FOLDER));let e=n.path.length;if((n=d.dirname(n)).path.length===e)break}return i.folder&&3===t.getWorkbenchState()&&i.path.unshift(new C(i.folder.uri,f.FileKind.ROOT_FOLDER)),i}_bindToEditor(){if(!this._editor)return;this._disposables.add(h.DocumentSymbolProviderRegistry.onDidChange(e=>this._updateOutline())),this._disposables.add(this._editor.onDidChangeModel(e=>this._updateOutline())),this._disposables.add(this._editor.onDidChangeModelLanguage(e=>this._updateOutline())), this._disposables.add(this._configurationService.onDidChangeConfiguration(e=>{if(this._cfgEnabled.getValue())if(e.affectsConfiguration("breadcrumbs"))this._updateOutline(!0);else if(this._editor&&this._editor.getModel()){const t=this._editor.getModel().getLanguageIdentifier().language;e.affectsConfiguration(`[${t}]`)&&this._updateOutline(!0)}}));const e=new n.TimeoutTimer;this._disposables.add(e),this._disposables.add(this._editor.onDidChangeModelContent(t=>{const i=u.OutlineModel.getRequestDelay(this._editor.getModel());e.cancelAndSet(()=>this._updateOutline(!0),i)})),this._updateOutline(),this._disposables.add(this._editor.onDidDispose(()=>this._outlineDisposables.clear()))}_updateOutline(e){this._outlineDisposables.clear(),e||this._updateOutlineElements([]);const t=this._editor,i=t.getModel();if(!i||!h.DocumentSymbolProviderRegistry.has(i)||!d.isEqual(i.uri,this._uri))return;const o=new s.CancellationTokenSource,r=i.getVersionId(),l=new n.TimeoutTimer;this._outlineDisposables.add({dispose:()=>{ o.dispose(!0),l.dispose()}}),u.OutlineModel.create(i,o.token).then(e=>{o.token.isCancellationRequested||(u.TreeElement.empty(e)?this._updateOutlineElements([]):(e=e.adopt(),this._updateOutlineElements(this._getOutlineElements(e,t.getPosition())),this._outlineDisposables.add(t.onDidChangeCursorPosition(n=>{l.cancelAndSet(()=>{!i.isDisposed()&&r===i.getVersionId()&&t.getModel()&&this._updateOutlineElements(this._getOutlineElements(e,t.getPosition()))},150)}))))}).catch(e=>{this._updateOutlineElements([]),a.onUnexpectedError(e)})}_getOutlineElements(e,t){if(!e||!t)return[];let i=e.getItemEnclosingPosition(t);if(!i)return this._getOutlineElementsRoot(e);let n=[];for(;i;){n.push(i);let e=i.parent;if(e instanceof u.OutlineModel)break;if(e instanceof u.OutlineGroup&&e.parent&&1===e.parent.children.size)break;i=e}let o=[];for(let e=n.length-1;e>=0;e--){let t=n[e];if(this._isFiltered(t))break;o.push(t)}return 0===o.length?this._getOutlineElementsRoot(e):o}_getOutlineElementsRoot(e){ for(const t of e.children.values())if(!this._isFiltered(t))return[e];return[]}_isFiltered(e){if(e instanceof u.OutlineElement){const t=`breadcrumbs.${b.OutlineFilter.kindToConfigName[e.symbol.kind]}`;let i;if(this._editor&&this._editor.getModel()){i=this._editor.getModel().uri}return!this._textResourceConfigurationService.getValue(i,t)}return!1}_updateOutlineElements(t){i.equals(t,this._outlineElements,e._outlineElementEquals)||(this._outlineElements=t,this._onDidUpdate.fire(this))}static _outlineElementEquals(e,t){return e===t||!(!e||!t)&&e.id===t.id}};y=o([r(3,m.IConfigurationService),r(4,_.ITextResourceConfigurationService),r(5,g.IWorkspaceContextService)],y),t.EditorBreadcrumbsModel=y})),define(e[1615],t([0,1,103,1103,2,130,28,6]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsAlerts=void 0;class l extends o.Disposable{constructor(e){super(),this.model=e,e.notifications.forEach(e=>this.triggerAriaAlert(e)),this.registerListeners()} registerListeners(){this._register(this.model.onDidChangeNotification(e=>this.onDidChangeNotification(e)))}onDidChangeNotification(e){0===e.kind&&(this.triggerAriaAlert(e.item),e.item.severity===r.Severity.Error&&(e.item.message.original instanceof Error?console.error(e.item.message.original):console.error(s.toErrorMessage(e.item.message.linkedText.toString(),!0))))}triggerAriaAlert(e){if(e.silent)return;const t=e.onDidChangeContent(t=>{1===t.kind&&this.doTriggerAriaAlert(e)});a.Event.once(e.onDidClose)(()=>t.dispose()),this.doTriggerAriaAlert(e)}doTriggerAriaAlert(e){let t;t=e.severity===r.Severity.Error?n.localize(0,null,e.message.linkedText.toString()):e.severity===r.Severity.Warning?n.localize(1,null,e.message.linkedText.toString()):n.localize(2,null,e.message.linkedText.toString()),i.alert(t)}}t.NotificationsAlerts=l})),define(e[441],t([0,1,2,6,20,8,94]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewContainerMenuActions=t.ViewMenuActions=void 0 ;let c=class extends i.Disposable{constructor(e,t,o,s,r){super(),this.contextKeyService=s,this.menuService=r,this.primaryActions=[],this.titleActionsDisposable=this._register(new i.MutableDisposable),this.secondaryActions=[],this.contextMenuActions=[],this._onDidChangeTitle=this._register(new n.Emitter),this.onDidChangeTitle=this._onDidChangeTitle.event;const a=this._register(this.contextKeyService.createScoped());a.createKey("view",e);const c=this._register(this.menuService.createMenu(t,a)),d=()=>{this.primaryActions=[],this.secondaryActions=[],this.titleActionsDisposable.value=l.createAndFillInActionBarActions(c,{shouldForwardArgs:!0},{primary:this.primaryActions,secondary:this.secondaryActions}),this._onDidChangeTitle.fire()};this._register(c.onDidChange(d)),d();const h=this._register(this.menuService.createMenu(o,a)),u=()=>{this.contextMenuActions=[],this.titleActionsDisposable.value=l.createAndFillInActionBarActions(h,{shouldForwardArgs:!0},{primary:[],secondary:this.contextMenuActions})} ;this._register(h.onDidChange(u)),u(),this._register(i.toDisposable(()=>{this.primaryActions=[],this.secondaryActions=[],this.contextMenuActions=[]}))}getPrimaryActions(){return this.primaryActions}getSecondaryActions(){return this.secondaryActions}getContextMenuActions(){return this.contextMenuActions}};c=o([r(3,a.IContextKeyService),r(4,s.IMenuService)],c),t.ViewMenuActions=c;let d=class extends i.Disposable{constructor(e,t,n,o){super(),this.contextKeyService=n,this.menuService=o,this.titleActionsDisposable=this._register(new i.MutableDisposable),this.contextMenuActions=[];const s=this._register(this.contextKeyService.createScoped());s.createKey("container",e);const r=this._register(this.menuService.createMenu(t,s)),a=()=>{this.contextMenuActions=[],this.titleActionsDisposable.value=l.createAndFillInActionBarActions(r,{shouldForwardArgs:!0},{primary:[],secondary:this.contextMenuActions})};this._register(r.onDidChange(a)),a(),this._register(i.toDisposable(()=>{this.contextMenuActions=[]}))} getContextMenuActions(){return this.contextMenuActions}};d=o([r(2,a.IContextKeyService),r(3,s.IMenuService)],d),t.ViewContainerMenuActions=d})),define(e[221],t([0,1,8,35,49]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuickNavigateHandler=t.defaultQuickAccessContext=t.defaultQuickAccessContextKeyValue=t.inQuickPickContext=t.InQuickPickContextKey=t.inQuickPickContextKeyValue=void 0,t.inQuickPickContextKeyValue="inQuickOpen",t.InQuickPickContextKey=new i.RawContextKey(t.inQuickPickContextKeyValue,!1),t.inQuickPickContext=i.ContextKeyExpr.has(t.inQuickPickContextKeyValue),t.defaultQuickAccessContextKeyValue="inFilesPicker",t.defaultQuickAccessContext=i.ContextKeyExpr.and(t.inQuickPickContext,i.ContextKeyExpr.has(t.defaultQuickAccessContextKeyValue)),t.getQuickNavigateHandler=function(e,t){return i=>{const s=i.get(n.IKeybindingService),r=i.get(o.IQuickInputService),a={keybindings:s.lookupKeybindings(e)};r.navigate(!!t,a)}}})), define(e[1616],t([0,1,1074,20,82,49,35,32,221]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const c={primary:2094,secondary:[2083],mac:{primary:2094,secondary:void 0}};n.MenuRegistry.appendMenuItem(n.MenuId.CommandPalette,{command:{id:"workbench.action.quickOpen",title:{value:i.localize(0,null),original:"Go to File..."}}}),o.KeybindingsRegistry.registerKeybindingRule({id:"workbench.action.quickOpen",weight:200,when:void 0,primary:c.primary,secondary:c.secondary,mac:c.mac}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.closeQuickOpen",weight:200,when:l.inQuickPickContext,primary:9,secondary:[1033],handler:e=>{return e.get(s.IQuickInputService).cancel()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.acceptSelectedQuickOpenItem",weight:200,when:l.inQuickPickContext,primary:0,handler:e=>{return e.get(s.IQuickInputService).accept()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({ id:"workbench.action.alternativeAcceptSelectedQuickOpenItem",weight:200,when:l.inQuickPickContext,primary:0,handler:e=>{return e.get(s.IQuickInputService).accept({ctrlCmd:!0,alt:!1})}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.focusQuickOpen",weight:200,when:l.inQuickPickContext,primary:0,handler:e=>{e.get(s.IQuickInputService).focus()}});o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigateNextInFilePicker",weight:250,handler:l.getQuickNavigateHandler("workbench.action.quickOpenNavigateNextInFilePicker",!0),when:l.defaultQuickAccessContext,primary:c.primary,secondary:c.secondary,mac:c.mac});o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigatePreviousInFilePicker",weight:250,handler:l.getQuickNavigateHandler("workbench.action.quickOpenNavigatePreviousInFilePicker",!1),when:l.defaultQuickAccessContext,primary:1024|c.primary,secondary:[1024|c.secondary[0]],mac:{primary:1024|c.mac.primary, secondary:void 0}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickPickManyToggle",weight:200,when:l.inQuickPickContext,primary:0,handler:e=>{e.get(s.IQuickInputService).toggle()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickInputBack",weight:250,when:l.inQuickPickContext,primary:0,win:{primary:527},mac:{primary:339},linux:{primary:2643},handler:e=>{e.get(s.IQuickInputService).back()}}),a.CommandsRegistry.registerCommand({id:"workbench.action.quickOpen",handler:async function(e,t){e.get(s.IQuickInputService).quickAccess.show("string"==typeof t?t:void 0,{preserveValue:"string"==typeof t})},description:{description:"Quick access",args:[{name:"prefix",schema:{type:"string"}}]}}),a.CommandsRegistry.registerCommand("workbench.action.quickOpenPreviousEditor",async e=>{e.get(s.IQuickInputService).quickAccess.show("",{itemActivation:s.ItemActivation.SECOND})});class d extends n.Action2{constructor(e,t,i,n,o){super({id:e,title:t,f1:!0, keybinding:o}),this.id=e,this.next=i,this.quickNavigate=n}async run(e){const t=e.get(r.IKeybindingService),i=e.get(s.IQuickInputService),n=t.lookupKeybindings(this.id),o=this.quickNavigate?{keybindings:n}:void 0;i.navigate(this.next,o)}}n.registerAction2(class extends d{constructor(){super("workbench.action.quickOpenSelectNext",{value:i.localize(3,null),original:"Select Next in Quick Open"},!0,!1,{weight:250,when:l.inQuickPickContext,primary:0,mac:{primary:300}})}}),n.registerAction2(class extends d{constructor(){super("workbench.action.quickOpenSelectPrevious",{value:i.localize(4,null),original:"Select Previous in Quick Open"},!1,!1,{weight:250,when:l.inQuickPickContext,primary:0,mac:{primary:302}})}}),n.registerAction2(class extends d{constructor(){super("workbench.action.quickOpenNavigateNext",{value:i.localize(1,null),original:"Navigate Next in Quick Open"},!0,!0)}}),n.registerAction2(class extends d{constructor(){super("workbench.action.quickOpenNavigatePrevious",{value:i.localize(2,null), original:"Navigate Previous in Quick Open"},!1,!0)}})})),define(e[70],t([0,1,1120,16,82,32,20,5,2,89,28,8]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CATEGORIES=t.Extensions=void 0,t.Extensions={WorkbenchActions:"workbench.contributions.actions"},n.Registry.add(t.Extensions.WorkbenchActions,new class{registerWorkbenchAction(e,t,i,n){return this.registerWorkbenchCommandFromAction(e,t,i,n)}registerWorkbenchCommandFromAction(e,t,i,n){const a=new l.DisposableStore;a.add(s.CommandsRegistry.registerCommand(e.id,this.createCommandHandler(e)));const c=void 0===e.keybindingWeight?200:e.keybindingWeight,d=e.keybindings;if(o.KeybindingsRegistry.registerKeybindingRule({id:e.id,weight:c,when:e.keybindingContext&&n?h.ContextKeyExpr.and(e.keybindingContext,n):e.keybindingContext||n||null,primary:d?d.primary:0,secondary:null==d?void 0:d.secondary,win:null==d?void 0:d.win,mac:null==d?void 0:d.mac,linux:null==d?void 0:d.linux}),e.label){let o=t.indexOf(": "),s="" ;o>0&&(s=t.substr(0,o),t=t.substr(o+2));const l={id:e.id,title:{value:e.label,original:t},category:i?{value:i,original:s}:void 0};r.MenuRegistry.addCommand(l),a.add(r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:l,when:n}))}return a}createCommandHandler(e){return async(t,i)=>{const n=t.get(d.INotificationService),o=t.get(a.IInstantiationService),s=t.get(c.ILifecycleService);try{await this.triggerAndDisposeAction(o,s,e,i)}catch(e){n.error(e)}}}async triggerAndDisposeAction(e,t,i,n){var o;await t.when(2);const s=e.createInstance(i.syncDescriptor);if(s.label=i.label||s.label,s.enabled)try{const e=(null===(o=n)||void 0===o?void 0:o.from)||"keybinding";await s.run(void 0,{from:e})}finally{s.dispose()}else s.dispose()}}),t.CATEGORIES={View:{value:i.localize(0,null),original:"View"},Help:{value:i.localize(1,null),original:"Help"},Developer:{value:i.localize(2,null),original:"Developer"}}})),define(e[1617],t([0,1,1071,309,12,23,42,10,20,79,61,70]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});class u extends l.Action2{constructor(){super({id:u.ID,title:{value:i.localize(0,null),original:"Keyboard Shortcuts Reference"},category:h.CATEGORIES.Help,f1:!0,keybinding:{weight:200,when:null,primary:c.KeyChord(2089,2096)}})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService),n=o.isLinux?t.keyboardShortcutsUrlLinux:o.isMacintosh?t.keyboardShortcutsUrlMac:t.keyboardShortcutsUrlWin;n&&i.open(a.URI.parse(n))}}u.ID="workbench.action.keybindingsReference",u.AVAILABLE=!!(o.isLinux?n.default.keyboardShortcutsUrlLinux:o.isMacintosh?n.default.keyboardShortcutsUrlMac:n.default.keyboardShortcutsUrlWin);class g extends l.Action2{constructor(){super({id:g.ID,title:{value:i.localize(1,null),original:"Documentation"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);t.documentationUrl&&i.open(a.URI.parse(t.documentationUrl))}}g.ID="workbench.action.openDocumentationUrl", g.AVAILABLE=!!n.default.documentationUrl;class p extends l.Action2{constructor(){super({id:p.ID,title:{value:i.localize(2,null),original:"Introductory Videos"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);t.introductoryVideosUrl&&i.open(a.URI.parse(t.introductoryVideosUrl))}}p.ID="workbench.action.openIntroductoryVideosUrl",p.AVAILABLE=!!n.default.introductoryVideosUrl;class m extends l.Action2{constructor(){super({id:m.ID,title:{value:i.localize(3,null),original:"Tips and Tricks"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);t.tipsAndTricksUrl&&i.open(a.URI.parse(t.tipsAndTricksUrl))}}m.ID="workbench.action.openTipsAndTricksUrl",m.AVAILABLE=!!n.default.tipsAndTricksUrl;class v extends l.Action2{constructor(){super({id:v.ID,title:{value:i.localize(4,null),original:"Signup for the VS Code Newsletter"},category:h.CATEGORIES.Help,f1:!0})}async run(e){ const t=e.get(d.IProductService),i=e.get(r.IOpenerService),n=e.get(s.ITelemetryService),o=await n.getTelemetryInfo();i.open(a.URI.parse(`${t.newsletterSignupUrl}?machineId=${encodeURIComponent(o.machineId)}`))}}v.ID="workbench.action.openNewsletterSignupUrl",v.AVAILABLE=!!n.default.newsletterSignupUrl;class f extends l.Action2{constructor(){super({id:f.ID,title:{value:i.localize(5,null),original:"Join Us on Twitter"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);t.twitterUrl&&i.open(a.URI.parse(t.twitterUrl))}}f.ID="workbench.action.openTwitterUrl",f.AVAILABLE=!!n.default.twitterUrl;class S extends l.Action2{constructor(){super({id:S.ID,title:{value:i.localize(6,null),original:"Search Feature Requests"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);t.requestFeatureUrl&&i.open(a.URI.parse(t.requestFeatureUrl))}}S.ID="workbench.action.openRequestFeatureUrl",S.AVAILABLE=!!n.default.requestFeatureUrl ;class b extends l.Action2{constructor(){super({id:b.ID,title:{value:i.localize(7,null),original:"View License"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);if(t.licenseUrl)if(o.language){const e=t.licenseUrl.indexOf("?")>0?"&":"?";i.open(a.URI.parse(`${t.licenseUrl}${e}lang=${o.language}`))}else i.open(a.URI.parse(t.licenseUrl))}}b.ID="workbench.action.openLicenseUrl",b.AVAILABLE=!!n.default.licenseUrl;class _ extends l.Action2{constructor(){super({id:_.ID,title:{value:i.localize(8,null),original:"Privacy Statement"},category:h.CATEGORIES.Help,f1:!0})}run(e){const t=e.get(d.IProductService),i=e.get(r.IOpenerService);if(t.privacyStatementUrl)if(o.language){const e=t.privacyStatementUrl.indexOf("?")>0?"&":"?";i.open(a.URI.parse(`${t.privacyStatementUrl}${e}lang=${o.language}`))}else i.open(a.URI.parse(t.privacyStatementUrl))}}_.ID="workbench.action.openPrivacyStatementUrl",_.AVAILABE=!!n.default.privacyStatementUrl,u.AVAILABLE&&l.registerAction2(u), g.AVAILABLE&&l.registerAction2(g),p.AVAILABLE&&l.registerAction2(p),m.AVAILABLE&&l.registerAction2(m),v.AVAILABLE&&l.registerAction2(v),f.AVAILABLE&&l.registerAction2(f),S.AVAILABLE&&l.registerAction2(S),b.AVAILABLE&&l.registerAction2(b),_.AVAILABE&&l.registerAction2(_),g.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:g.ID,title:i.localize(9,null)},order:3}),u.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"2_reference",command:{id:u.ID,title:i.localize(10,null)},order:1}),p.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"2_reference",command:{id:p.ID,title:i.localize(11,null)},order:2}),m.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"2_reference",command:{id:m.ID,title:i.localize(12,null)},order:3}),f.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:f.ID,title:i.localize(13,null)},order:1}), S.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:S.ID,title:i.localize(14,null)},order:2}),b.AVAILABLE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"4_legal",command:{id:b.ID,title:i.localize(15,null)},order:1}),_.AVAILABE&&l.MenuRegistry.appendMenuItem(l.MenuId.MenubarHelpMenu,{group:"4_legal",command:{id:_.ID,title:i.localize(16,null)},order:2})})),define(e[593],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ACCOUNTS_ACTIIVTY_ID=t.GLOBAL_ACTIVITY_ID=void 0,t.GLOBAL_ACTIVITY_ID="workbench.action.globalActivity",t.ACCOUNTS_ACTIIVTY_ID="workbench.action.accountsActivity"})),define(e[222],t([0,1,1121]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.workbenchConfigurationNodeBase=void 0,t.workbenchConfigurationNodeBase=Object.freeze({id:"workbench",order:7,title:i.localize(0,null),type:"object"})})),define(e[1618],t([0,1,16,1119,57,12,222]),(function(e,t,i,n,o,s,r){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(){const e=i.Registry.as(o.Extensions.Configuration);e.registerConfiguration(Object.assign(Object.assign({},r.workbenchConfigurationNodeBase),{properties:{"workbench.editor.titleScrollbarSizing":{type:"string",enum:["default","large"],enumDescriptions:[n.localize(0,null),n.localize(1,null)],description:n.localize(2,null),default:"default"},"workbench.editor.showTabs":{type:"boolean",description:n.localize(3,null),default:!0},"workbench.editor.scrollToSwitchTabs":{type:"boolean",markdownDescription:n.localize(4,null),default:!1},"workbench.editor.highlightModifiedTabs":{type:"boolean",markdownDescription:n.localize(5,null),default:!1},"workbench.editor.labelFormat":{type:"string",enum:["default","short","medium","long"],enumDescriptions:[n.localize(6,null),n.localize(7,null),n.localize(8,null),n.localize(9,null)],default:"default",description:n.localize(10,null)},"workbench.editor.untitled.labelFormat":{type:"string",enum:["content","name"], enumDescriptions:[n.localize(11,null),n.localize(12,null)],default:"content",description:n.localize(13,null)},"workbench.editor.tabCloseButton":{type:"string",enum:["left","right","off"],default:"right",markdownDescription:n.localize(14,null)},"workbench.editor.tabSizing":{type:"string",enum:["fit","shrink"],default:"fit",enumDescriptions:[n.localize(15,null),n.localize(16,null)],markdownDescription:n.localize(17,null)},"workbench.editor.pinnedTabSizing":{type:"string",enum:["normal","compact","shrink"],default:"normal",enumDescriptions:[n.localize(18,null),n.localize(19,null),n.localize(20,null)],markdownDescription:n.localize(21,null)},"workbench.editor.splitSizing":{type:"string",enum:["distribute","split"],default:"distribute",enumDescriptions:[n.localize(22,null),n.localize(23,null)],description:n.localize(24,null)},"workbench.editor.focusRecentEditorAfterClose":{type:"boolean",description:n.localize(25,null),default:!0},"workbench.editor.showIcons":{type:"boolean",description:n.localize(26,null), default:!0},"workbench.editor.enablePreview":{type:"boolean",description:n.localize(27,null),default:!0},"workbench.editor.enablePreviewFromQuickOpen":{type:"boolean",description:n.localize(28,null),default:!0},"workbench.editor.closeOnFileDelete":{type:"boolean",description:n.localize(29,null),default:!1},"workbench.editor.openPositioning":{type:"string",enum:["left","right","first","last"],default:"right",markdownDescription:n.localize(30,null)},"workbench.editor.openSideBySideDirection":{type:"string",enum:["right","down"],default:"right",markdownDescription:n.localize(31,null)},"workbench.editor.closeEmptyGroups":{type:"boolean",description:n.localize(32,null),default:!0},"workbench.editor.revealIfOpen":{type:"boolean",description:n.localize(33,null),default:!1},"workbench.editor.mouseBackForwardToNavigate":{type:"boolean",description:n.localize(34,null),default:!0},"workbench.editor.restoreViewState":{type:"boolean",description:n.localize(35,null),default:!0,scope:5}, "workbench.editor.centeredLayoutAutoResize":{type:"boolean",default:!0,description:n.localize(36,null)},"workbench.editor.limit.enabled":{type:"boolean",default:!1,description:n.localize(37,null)},"workbench.editor.limit.value":{type:"number",default:10,exclusiveMinimum:0,markdownDescription:n.localize(38,null)},"workbench.editor.limit.perEditorGroup":{type:"boolean",default:!1,description:n.localize(39,null)},"workbench.commandPalette.history":{type:"number",description:n.localize(40,null),default:50},"workbench.commandPalette.preserveInput":{type:"boolean",description:n.localize(41,null),default:!1},"workbench.quickOpen.closeOnFocusLost":{type:"boolean",description:n.localize(42,null),default:!0},"workbench.quickOpen.preserveInput":{type:"boolean",description:n.localize(43,null),default:!1},"workbench.settings.openDefaultSettings":{type:"boolean",description:n.localize(44,null),default:!1},"workbench.settings.useSplitJSON":{type:"boolean",markdownDescription:n.localize(45,null),default:!1}, "workbench.settings.openDefaultKeybindings":{type:"boolean",description:n.localize(46,null),default:!1},"workbench.sideBar.location":{type:"string",enum:["left","right"],default:"left",description:n.localize(47,null)},"workbench.panel.defaultLocation":{type:"string",enum:["left","bottom","right"],default:"bottom",description:n.localize(48,null)},"workbench.panel.opensMaximized":{type:"string",enum:["always","never","preserve"],default:"preserve",description:n.localize(49,null),enumDescriptions:[n.localize(50,null),n.localize(51,null),n.localize(52,null)]},"workbench.statusBar.visible":{type:"boolean",default:!0,description:n.localize(53,null)},"workbench.activityBar.visible":{type:"boolean",default:!0,description:n.localize(54,null)},"workbench.activityBar.iconClickBehavior":{type:"string",enum:["toggle","focus"],default:"toggle",description:n.localize(55,null),enumDescriptions:[n.localize(56,null),n.localize(57,null)]},"workbench.view.alwaysShowHeaderActions":{type:"boolean",default:!1, description:n.localize(58,null)},"workbench.fontAliasing":{type:"string",enum:["default","antialiased","none","auto"],default:"default",description:n.localize(59,null),enumDescriptions:[n.localize(60,null),n.localize(61,null),n.localize(62,null),n.localize(63,null)],included:s.isMacintosh},"workbench.settings.editor":{type:"string",enum:["ui","json"],enumDescriptions:[n.localize(64,null),n.localize(65,null)],description:n.localize(66,null),default:"ui",scope:3}}}));let t=n.localize(67,null);t+="\n- "+[n.localize(68,null),n.localize(69,null),n.localize(70,null),n.localize(71,null),n.localize(72,null),n.localize(73,null),n.localize(74,null),n.localize(75,null),n.localize(76,null),n.localize(77,null),n.localize(78,null),n.localize(79,null),n.localize(80,null),n.localize(81,null)].join("\n- "),e.registerConfiguration({id:"window",order:8,title:n.localize(82,null),type:"object",properties:{"window.title":{type:"string",default:(()=>{if(s.isMacintosh&&s.isNative)return"${activeEditorShort}${separator}${rootName}" ;const e="${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}";return s.isWeb?e+"${separator}${remoteName}":e})(),markdownDescription:t},"window.titleSeparator":{type:"string",default:s.isMacintosh?" — ":" - ",markdownDescription:n.localize(83,null)},"window.menuBarVisibility":{type:"string",enum:["default","visible","toggle","hidden","compact"],enumDescriptions:[n.localize(84,null),n.localize(85,null),n.localize(86,null),n.localize(87,null),n.localize(88,null)],default:s.isWeb?"compact":"default",scope:1,description:n.localize(89,null),included:s.isWindows||s.isLinux||s.isWeb},"window.enableMenuBarMnemonics":{type:"boolean",default:!s.isMacintosh,scope:1,description:n.localize(90,null),included:s.isWindows||s.isLinux||s.isWeb},"window.customMenuBarAltFocus":{type:"boolean",default:!s.isMacintosh,scope:1,markdownDescription:n.localize(91,null),included:s.isWindows||s.isLinux||s.isWeb},"window.openFilesInNewWindow":{type:"string",enum:["on","off","default"], enumDescriptions:[n.localize(92,null),n.localize(93,null),s.isMacintosh?n.localize(94,null):n.localize(95,null)],default:"off",scope:1,markdownDescription:s.isMacintosh?n.localize(96,null):n.localize(97,null)},"window.openFoldersInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[n.localize(98,null),n.localize(99,null),n.localize(100,null)],default:"default",scope:1,markdownDescription:n.localize(101,null)}}}),e.registerConfiguration({id:"zenMode",order:9,title:n.localize(102,null),type:"object",properties:{"zenMode.fullScreen":{type:"boolean",default:!0,description:n.localize(103,null)},"zenMode.centerLayout":{type:"boolean",default:!0,description:n.localize(104,null)},"zenMode.hideTabs":{type:"boolean",default:!0,description:n.localize(105,null)},"zenMode.hideStatusBar":{type:"boolean",default:!0,description:n.localize(106,null)},"zenMode.hideActivityBar":{type:"boolean",default:!0,description:n.localize(107,null)},"zenMode.hideLineNumbers":{type:"boolean",default:!0, description:n.localize(108,null)},"zenMode.restore":{type:"boolean",default:!1,description:n.localize(109,null)},"zenMode.silentNotifications":{type:"boolean",default:!0,description:n.localize(110,null)}}})}()})),define(e[56],t([0,1,5,89,16,15]),(function(e,t,i,n,o,s){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=void 0,function(e){e.Workbench="workbench.contributions.kind"}(r=t.Extensions||(t.Extensions={}));o.Registry.add(r.Workbench,new class{constructor(){this.toBeInstantiated=new Map}registerWorkbenchContribution(e,t=1){if(this.instantiationService&&this.lifecycleService&&this.lifecycleService.phase>=t)this.instantiationService.createInstance(e);else{let i=this.toBeInstantiated.get(t);i||(i=[],this.toBeInstantiated.set(t,i)),i.push(e)}}start(e){const t=this.instantiationService=e.get(i.IInstantiationService),o=this.lifecycleService=e.get(n.ILifecycleService);[1,2,3,4].forEach(e=>{this.instantiateByPhase(t,o,e)})}instantiateByPhase(e,t,i){ t.phase>=i?this.doInstantiateByPhase(e,i):t.when(i).then(()=>this.doInstantiateByPhase(e,i))}doInstantiateByPhase(e,t){const i=this.toBeInstantiated.get(t);if(i)if(this.toBeInstantiated.delete(t),4!==t)for(const t of i)this.safeCreateInstance(e,t);else{let t=3e3,n=0,o=r=>{for(;n{this.isDisposed()||this.dispose()}));const t=n.Event.once(this.primary.onDispose);this._register(t(()=>{this.isDisposed()||this.dispose()})),this._register(this.primary.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this.primary.onDidChangeLabel(()=>this._onDidChangeLabel.fire()))}get resource(){}get primary(){return this._primary}get secondary(){return this._secondary}getTypeId(){return m.ID}getName(){return this.name?this.name:i.localize(0,null,this._secondary.getName(),this._primary.getName())}getDescription(){return this.description}isReadonly(){ return this.primary.isReadonly()}isUntitled(){return this.primary.isUntitled()}isDirty(){return this.primary.isDirty()}isSaving(){return this.primary.isSaving()}save(e,t){return this.primary.save(e,t)}saveAs(e,t){return this.primary.saveAs(e,t)}revert(e,t){return this.primary.revert(e,t)}getTelemetryDescriptor(){const e=this.primary.getTelemetryDescriptor();return Object.assign(e,super.getTelemetryDescriptor())}matches(e){return e===this||e instanceof m&&(this.primary.matches(e.primary)&&this.secondary.matches(e.secondary))}}t.SideBySideEditorInput=m,m.ID="workbench.editorinputs.sidebysideEditorInput";class v extends r.Disposable{constructor(){super(...arguments),this._onDispose=this._register(new n.Emitter),this.onDispose=this._onDispose.event,this.disposed=!1}async load(){return this}isResolved(){return!0}isDisposed(){return this.disposed}dispose(){this.disposed=!0,this._onDispose.fire(),super.dispose()}}t.EditorModel=v,t.isEditorInputWithOptions=function(e){return!!e&&!!e.editor};class f{static create(e){ const t=new f;return t.overwrite(e),t}overwrite(e){return"boolean"==typeof e.forceReload&&(this.forceReload=e.forceReload),"boolean"==typeof e.revealIfVisible&&(this.revealIfVisible=e.revealIfVisible),"boolean"==typeof e.revealIfOpened&&(this.revealIfOpened=e.revealIfOpened),"boolean"==typeof e.preserveFocus&&(this.preserveFocus=e.preserveFocus),"number"==typeof e.activation&&(this.activation=e.activation),"boolean"==typeof e.pinned&&(this.pinned=e.pinned),"boolean"==typeof e.sticky&&(this.sticky=e.sticky),"boolean"==typeof e.inactive&&(this.inactive=e.inactive),"boolean"==typeof e.ignoreError&&(this.ignoreError=e.ignoreError),"number"==typeof e.index&&(this.index=e.index),"string"!=typeof e.override&&!1!==e.override||(this.override=e.override),"number"==typeof e.context&&(this.context=e.context),this}}t.EditorOptions=f;class S extends f{static from(e){if(null==e?void 0:e.options)return S.create(e.options)}static create(e=Object.create(null)){const t=new S;return t.overwrite(e),t}overwrite(e){var t,i ;return super.overwrite(e),e.selection&&(this.selection={startLineNumber:e.selection.startLineNumber,startColumn:e.selection.startColumn,endLineNumber:null!==(t=e.selection.endLineNumber)&&void 0!==t?t:e.selection.startLineNumber,endColumn:null!==(i=e.selection.endColumn)&&void 0!==i?i:e.selection.startColumn}),e.viewState&&(this.editorViewState=e.viewState),void 0!==e.selectionRevealType&&(this.selectionRevealType=e.selectionRevealType),this}hasOptionsDefined(){return!!this.editorViewState||!!this.selectionRevealType||!!this.selection}static fromEditor(e,t){const i=S.create(t);return i.editorViewState=o.withNullAsUndefined(e.saveViewState()),i}apply(e,t){var i,n;let o=!1;if(this.editorViewState)e.restoreViewState(this.editorViewState),o=!0;else if(this.selection){const s={startLineNumber:this.selection.startLineNumber,startColumn:this.selection.startColumn,endLineNumber:null!==(i=this.selection.endLineNumber)&&void 0!==i?i:this.selection.startLineNumber, endColumn:null!==(n=this.selection.endColumn)&&void 0!==n?n:this.selection.startColumn};e.setSelection(s),2===this.selectionRevealType?e.revealRangeNearTop(s,t):3===this.selectionRevealType?e.revealRangeNearTopIfOutsideViewport(s,t):1===this.selectionRevealType?e.revealRangeInCenterIfOutsideViewport(s,t):e.revealRangeInCenter(s,t),o=!0}return o}}t.TextEditorOptions=S;class b extends d.ActionRunner{constructor(e){super(),this.context=e}run(e){return super.run(e,this.context)}}t.EditorCommandsContextActionRunner=b,function(e){e[e.PRIMARY=1]="PRIMARY",e[e.SECONDARY=2]="SECONDARY",e[e.BOTH=3]="BOTH"}(u=t.SideBySideEditor||(t.SideBySideEditor={}));t.EditorResourceAccessor=new class{getOriginalUri(e,t){if(!e)return;if((null==t?void 0:t.supportSideBySide)&&e instanceof m){if((null==t?void 0:t.supportSideBySide)===u.BOTH)return{primary:this.getOriginalUri(e.primary,{filterByScheme:t.filterByScheme}),secondary:this.getOriginalUri(e.secondary,{filterByScheme:t.filterByScheme})} ;e=t.supportSideBySide===u.PRIMARY?e.primary:e.secondary}const i=p(e)?e.preferredResource:e.resource;return i&&t&&t.filterByScheme?this.filterUri(i,t.filterByScheme):i}getCanonicalUri(e,t){if(!e)return;if((null==t?void 0:t.supportSideBySide)&&e instanceof m){if((null==t?void 0:t.supportSideBySide)===u.BOTH)return{primary:this.getCanonicalUri(e.primary,{filterByScheme:t.filterByScheme}),secondary:this.getCanonicalUri(e.secondary,{filterByScheme:t.filterByScheme})};e=t.supportSideBySide===u.PRIMARY?e.primary:e.secondary}const i=e.resource;return i&&t&&t.filterByScheme?this.filterUri(i,t.filterByScheme):i}filterUri(e,t){if(Array.isArray(t)){if(t.some(t=>e.scheme===t))return e}else if(t===e.scheme)return e}},function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.CloseDirection||(t.CloseDirection={}));t.Extensions={EditorInputFactories:"workbench.contributions.editor.inputFactories"},c.Registry.add(t.Extensions.EditorInputFactories,new class{constructor(){this.customEditorInputFactoryInstances=new Map, this.editorInputFactoryConstructors=new Map,this.editorInputFactoryInstances=new Map}start(e){const t=this.instantiationService=e.get(a.IInstantiationService);this.editorInputFactoryConstructors.forEach((e,i)=>{this.createEditorInputFactory(i,e,t)}),this.editorInputFactoryConstructors.clear()}createEditorInputFactory(e,t,i){const n=i.createInstance(t);this.editorInputFactoryInstances.set(e,n)}registerFileEditorInputFactory(e){this.fileEditorInputFactory=e}getFileEditorInputFactory(){return o.assertIsDefined(this.fileEditorInputFactory)}registerCustomEditorInputFactory(e,t){this.customEditorInputFactoryInstances.set(e,t)}getCustomEditorInputFactory(e){return this.customEditorInputFactoryInstances.get(e)}registerEditorInputFactory(e,t){return this.instantiationService?this.createEditorInputFactory(e,t,this.instantiationService):this.editorInputFactoryConstructors.set(e,t),r.toDisposable(()=>{this.editorInputFactoryConstructors.delete(e),this.editorInputFactoryInstances.delete(e)})}getEditorInputFactory(e){ return this.editorInputFactoryInstances.get(e)}}),t.pathsToEditors=async function(e,t){if(!e||!e.length)return[];const i=await Promise.all(e.map(async e=>{const i=s.URI.revive(e.fileUri);if(!i||!t.canHandleResource(i))return;const n="boolean"==typeof e.exists?e.exists:await t.exists(i);if(!n&&e.openOnlyIfExists)return;const o=n&&"number"==typeof e.lineNumber?{selection:{startLineNumber:e.lineNumber,startColumn:e.columnNumber||1},pinned:!0,override:e.overrideId}:{pinned:!0,override:e.overrideId};let r;return r=n?{resource:i,options:o,forceFile:!0}:{resource:i,options:o,forceUntitled:!0}}));return h.coalesce(i)},function(e){e[e.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",e[e.SEQUENTIAL=1]="SEQUENTIAL"}(t.EditorsOrder||(t.EditorsOrder={})),t.computeEditorAriaLabel=function(e,t,n,o){let s=e.getAriaLabel();return n&&!n.isPinned(e)&&(s=i.localize(1,null,s)),n&&n.isSticky(null!=t?t:e)&&(s=i.localize(2,null,s)),n&&o>1&&(s=`${s}, ${n.ariaLabel}`),s}})),define(e[320],t([0,1,43,7,85]),(function(e,t,i,n,o){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveTextEditorOptions=t.getEditorPartOptions=t.impactsEditorPartOptions=t.DEFAULT_EDITOR_PART_OPTIONS=t.DEFAULT_EDITOR_MAX_DIMENSIONS=t.DEFAULT_EDITOR_MIN_DIMENSIONS=void 0,t.DEFAULT_EDITOR_MIN_DIMENSIONS=new n.Dimension(220,70),t.DEFAULT_EDITOR_MAX_DIMENSIONS=new n.Dimension(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),t.DEFAULT_EDITOR_PART_OPTIONS={showTabs:!0,highlightModifiedTabs:!1,tabCloseButton:"right",tabSizing:"fit",pinnedTabSizing:"normal",titleScrollbarSizing:"default",focusRecentEditorAfterClose:!0,showIcons:!0,hasIcons:!0,enablePreview:!0,openPositioning:"right",openSideBySideDirection:"right",closeEmptyGroups:!0,labelFormat:"default",splitSizing:"distribute"},t.impactsEditorPartOptions=function(e){return e.affectsConfiguration("workbench.editor")||e.affectsConfiguration("workbench.iconTheme")},t.getEditorPartOptions=function(e,i){var n;const o=Object.assign(Object.assign({},t.DEFAULT_EDITOR_PART_OPTIONS),{ hasIcons:i.getFileIconTheme().hasFileIcons}),s=e.getValue();return(null===(n=null==s?void 0:s.workbench)||void 0===n?void 0:n.editor)&&Object.assign(o,s.workbench.editor),o},t.getActiveTextEditorOptions=function(e,t,n){const s=e.activeEditorPane?o.getIEditor(e.activeEditorPane.getControl()):void 0;return!s||t&&!t.matches(e.activeEditor)?n||new i.EditorOptions:i.TextEditorOptions.fromEditor(s,n)}})),define(e[442],t([0,1,43,25,184]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryEditorModel=void 0;let a=class extends i.EditorModel{constructor(e,t,i){super(),this.resource=e,this.name=t,this.fileService=i,this.resource=e,this.name=t,this.mime=s.MIME_BINARY}getName(){return this.name}getSize(){return this.size}getMime(){return this.mime}getETag(){return this.etag}async load(){if(this.fileService.canHandleResource(this.resource)){const e=await this.fileService.resolve(this.resource,{resolveMetadata:!0});this.etag=e.etag,"number"==typeof e.size&&(this.size=e.size)} return this}};a=o([r(2,n.IFileService)],a),t.BinaryEditorModel=a})),define(e[594],t([0,1,43]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorModel=void 0;class n extends i.EditorModel{constructor(e,t){super(),this._originalModel=e,this._modifiedModel=t}get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}async load(){var e,t;return await Promise.all([null===(e=this._originalModel)||void 0===e?void 0:e.load(),null===(t=this._modifiedModel)||void 0===t?void 0:t.load()]),this}isResolved(){return this.originalModel instanceof i.EditorModel&&this.originalModel.isResolved()&&this.modifiedModel instanceof i.EditorModel&&this.modifiedModel.isResolved()}dispose(){super.dispose()}}t.DiffEditorModel=n})),define(e[595],t([0,1,6,43,5,9,2,16,14]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorGroup=t.isSerializedEditorGroup=void 0;const h="left",u="first",g="last";function p(e){const t=e ;return!!(e&&"object"==typeof e&&Array.isArray(t.editors)&&Array.isArray(t.mru))}t.isSerializedEditorGroup=p;let m=class e extends l.Disposable{constructor(t,n,o){super(),this.instantiationService=n,this.configurationService=o,this._onDidActivateEditor=this._register(new i.Emitter),this.onDidActivateEditor=this._onDidActivateEditor.event,this._onDidOpenEditor=this._register(new i.Emitter),this.onDidOpenEditor=this._onDidOpenEditor.event,this._onDidCloseEditor=this._register(new i.Emitter),this.onDidCloseEditor=this._onDidCloseEditor.event,this._onDidDisposeEditor=this._register(new i.Emitter),this.onDidDisposeEditor=this._onDidDisposeEditor.event,this._onDidChangeEditorDirty=this._register(new i.Emitter),this.onDidChangeEditorDirty=this._onDidChangeEditorDirty.event,this._onDidChangeEditorLabel=this._register(new i.Emitter),this.onDidEditorLabelChange=this._onDidChangeEditorLabel.event,this._onDidMoveEditor=this._register(new i.Emitter),this.onDidMoveEditor=this._onDidMoveEditor.event, this._onDidChangeEditorPinned=this._register(new i.Emitter),this.onDidChangeEditorPinned=this._onDidChangeEditorPinned.event,this._onDidChangeEditorSticky=this._register(new i.Emitter),this.onDidChangeEditorSticky=this._onDidChangeEditorSticky.event,this.editors=[],this.mru=[],this.preview=null,this.active=null,this.sticky=-1,p(t)?this._id=this.deserialize(t):this._id=e.IDS++,this.onConfigurationUpdated(),this.registerListeners()}get id(){return this._id}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.onConfigurationUpdated()))}onConfigurationUpdated(){this.editorOpenPositioning=this.configurationService.getValue("workbench.editor.openPositioning"),this.focusRecentEditorAfterClose=this.configurationService.getValue("workbench.editor.focusRecentEditorAfterClose")}get count(){return this.editors.length}get stickyCount(){return this.sticky+1}getEditors(e,t){const i=0===e?this.mru.slice(0):this.editors.slice(0) ;return(null==t?void 0:t.excludeSticky)?0===e?i.filter(e=>!this.isSticky(e)):i.slice(this.sticky+1):i}getEditorByIndex(e){return this.editors[e]}get activeEditor(){return this.active}isActive(e){return this.matches(this.active,e)}get previewEditor(){return this.preview}openEditor(e,t){const i=(null==t?void 0:t.sticky)||"number"==typeof(null==t?void 0:t.index)&&this.isSticky(t.index),n=(null==t?void 0:t.pinned)||(null==t?void 0:t.sticky),o=(null==t?void 0:t.active)||!this.activeEditor||!n&&this.matches(this.preview,this.activeEditor),s=this.findEditor(e);if(s){const[e]=s;return n&&this.doPin(e),o&&this.doSetActive(e),t&&"number"==typeof t.index&&this.moveEditor(e,t.index),i&&this.doStick(e,this.indexOf(e)),{editor:e,isNew:!1}}{const s=e,r=this.indexOf(this.active);let a;if(t&&"number"==typeof t.index?a=t.index:this.editorOpenPositioning===u?(a=0,!i&&this.isSticky(a)&&(a=this.sticky+1)):this.editorOpenPositioning===g?a=this.editors.length:(a=this.editorOpenPositioning===h?0!==r&&this.editors.length?r:0:r+1, !i&&this.isSticky(a)&&(a=this.sticky+1)),i&&(this.sticky++,this.isSticky(a)||(a=this.sticky)),!n&&this.preview||this.splice(a,!1,s),!n){if(this.preview){a>this.indexOf(this.preview)&&a--,this.replaceEditor(this.preview,s,a,!o)}this.preview=s}return this.registerEditorListeners(s),this._onDidOpenEditor.fire(s),o&&this.doSetActive(s),{editor:s,isNew:!0}}}registerEditorListeners(e){const t=new l.DisposableStore;t.add(i.Event.once(e.onDispose)(()=>{this.indexOf(e)>=0&&this._onDidDisposeEditor.fire(e)})),t.add(e.onDidChangeDirty(()=>{this._onDidChangeEditorDirty.fire(e)})),t.add(e.onDidChangeLabel(()=>{this._onDidChangeEditorLabel.fire(e)})),t.add(this.onDidCloseEditor(i=>{i.editor.matches(e)&&l.dispose(t)}))}replaceEditor(e,t,i,n=!0){const o=this.doCloseEditor(e,n,!0);this.splice(i,!1,t),o&&this._onDidCloseEditor.fire(o)}closeEditor(e,t=!0){const i=this.doCloseEditor(e,t,!1);if(i)return this._onDidCloseEditor.fire(i),i.editor}doCloseEditor(e,t,i){const n=this.indexOf(e);if(-1===n)return ;const o=this.editors[n],s=this.isSticky(n);if(t&&this.matches(this.active,o))if(this.mru.length>1){let e;e=this.focusRecentEditorAfterClose?this.mru[1]:n===this.editors.length-1?this.editors[n-1]:this.editors[n+1],this.doSetActive(e)}else this.active=null;return this.matches(this.preview,o)&&(this.preview=null),this.splice(n,!0),{editor:o,replaced:i,sticky:s,index:n,groupId:this.id}}moveEditor(e,t){t>=this.editors.length?t=this.editors.length-1:t<0&&(t=0);const i=this.indexOf(e);if(i<0||t===i)return;const n=this.editors[i];return this.isSticky(i)&&t>this.sticky?this.sticky--:!this.isSticky(i)&&t<=this.sticky&&this.sticky++,this.editors.splice(i,1),this.editors.splice(t,0,n),this._onDidMoveEditor.fire(n),n}setActive(e){const t=this.findEditor(e);if(!t)return;const[i]=t;return this.doSetActive(i),i}doSetActive(e){if(this.matches(this.active,e))return;this.active=e;const t=this.indexOf(e,this.mru);this.mru.splice(t,1),this.mru.unshift(e),this._onDidActivateEditor.fire(e)}pin(e){const t=this.findEditor(e) ;if(!t)return;const[i]=t;return this.doPin(i),i}doPin(e){this.isPinned(e)||(this.preview=null,this._onDidChangeEditorPinned.fire(e))}unpin(e){const t=this.findEditor(e);if(!t)return;const[i]=t;return this.doUnpin(i),i}doUnpin(e){if(!this.isPinned(e))return;const t=this.preview;this.preview=e,this._onDidChangeEditorPinned.fire(e),t&&this.closeEditor(t)}isPinned(e){let t;return t="number"==typeof e?this.editors[e]:e,!this.matches(this.preview,t)}stick(e){const t=this.findEditor(e);if(!t)return;const[i,n]=t;return this.doStick(i,n),i}doStick(e,t){this.isSticky(t)||(this.pin(e),this.moveEditor(e,this.sticky+1),this.sticky++,this._onDidChangeEditorSticky.fire(e))}unstick(e){const t=this.findEditor(e);if(!t)return;const[i,n]=t;return this.doUnstick(i,n),i}doUnstick(e,t){this.isSticky(t)&&(this.moveEditor(e,this.sticky),this.sticky--,this._onDidChangeEditorSticky.fire(e))}isSticky(e){if(this.sticky<0)return!1;let t;return!((t="number"==typeof e?e:this.indexOf(e))<0)&&t<=this.sticky}splice(e,t,i){ const n=this.editors[e];if(t&&this.isSticky(e)&&this.sticky--,i?this.editors.splice(e,t?1:0,i):this.editors.splice(e,t?1:0),!t&&i)0===this.mru.length?this.mru.push(i):this.mru.splice(1,0,i);else{const e=this.indexOf(n,this.mru);t&&!i?this.mru.splice(e,1):t&&i&&this.mru.splice(e,1,i)}}indexOf(e,t=this.editors){if(!e)return-1;for(let i=0;ithis.indexOf(e,i)).filter(e=>e>=0);return{id:this.id,editors:o,mru:r,preview:t,sticky:s>=0?s:void 0}}deserialize(t){const i=c.Registry.as(n.Extensions.EditorInputFactories);return"number"==typeof t.id?(this._id=t.id,e.IDS=Math.max(t.id+1,e.IDS)):this._id=e.IDS++,this.editors=d.coalesce(t.editors.map((e,n)=>{let o=void 0;const s=i.getEditorInputFactory(e.id);return s&&(o=s.deserialize(this.instantiationService,e.value))&&this.registerEditorListeners(o),!o&&"number"==typeof t.sticky&&n<=t.sticky&&t.sticky--,o})),this.mru=d.coalesce(t.mru.map(e=>this.editors[e])), this.active=this.mru[0],"number"==typeof t.preview&&(this.preview=this.editors[t.preview]),"number"==typeof t.sticky&&(this.sticky=t.sticky),this._id}};m.IDS=0,m=o([r(1,s.IInstantiationService),r(2,a.IConfigurationService)],m),t.EditorGroup=m})),define(e[596],t([0,1,594]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDiffEditorModel=void 0;class n extends i.DiffEditorModel{constructor(e,t){super(e,t),this._textDiffEditorModel=null,this._originalModel=e,this._modifiedModel=t,this.updateTextDiffEditorModel()}get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}get textDiffEditorModel(){return this._textDiffEditorModel}async load(){return await super.load(),this.updateTextDiffEditorModel(),this}updateTextDiffEditorModel(){var e,t ;(null===(e=this.originalModel)||void 0===e?void 0:e.isResolved())&&(null===(t=this.modifiedModel)||void 0===t?void 0:t.isResolved())&&(this._textDiffEditorModel?(this._textDiffEditorModel.original=this.originalModel.textEditorModel,this._textDiffEditorModel.modified=this.modifiedModel.textEditorModel):this._textDiffEditorModel={original:this.originalModel.textEditorModel,modified:this.modifiedModel.textEditorModel})}isResolved(){return!!this._textDiffEditorModel}isReadonly(){return!!this.modifiedModel&&this.modifiedModel.isReadonly()}dispose(){this._textDiffEditorModel=null,super.dispose()}}t.TextDiffEditorModel=n})),define(e[268],t([0,1,43,50,46,2,176,13]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTextEditorModel=void 0;let d=class extends i.EditorModel{constructor(e,t,i){super(),this.modelService=e,this.modeService=t,this.textEditorModelHandle=null,this.modelDisposeListener=this._register(new a.MutableDisposable),i&&this.handleExistingModel(i)} handleExistingModel(e){const t=this.modelService.getModel(e);if(!t)throw new Error(`Document with resource ${e.toString(!0)} does not exist`);this.textEditorModelHandle=e,this.registerModelDisposeListener(t)}registerModelDisposeListener(e){this.modelDisposeListener.value=e.onWillDispose(()=>{this.textEditorModelHandle=null,this.dispose()})}get textEditorModel(){return this.textEditorModelHandle?this.modelService.getModel(this.textEditorModelHandle):null}isReadonly(){return!0}setMode(e){this.isResolved()&&e&&e!==this.textEditorModel.getModeId()&&this.modelService.setMode(this.textEditorModel,this.modeService.create(e))}getMode(){var e;return null===(e=this.textEditorModel)||void 0===e?void 0:e.getModeId()}createTextEditorModel(e,t,i){const n=this.getFirstLineText(e),o=this.getOrCreateMode(t,this.modeService,i,n);return this.doCreateTextEditorModel(e,o,t)}doCreateTextEditorModel(e,t,i){let n=i&&this.modelService.getModel(i) ;return n?this.updateTextEditorModel(e,t.languageIdentifier.language):(n=this.modelService.createModel(e,t,i),this.createdEditorModel=!0,this.registerModelDisposeListener(n)),this.textEditorModelHandle=n.uri,n}getFirstLineText(e){const t=e;return"function"==typeof t.getFirstLineText?t.getFirstLineText(1e3):e.getLineContent(1).substr(0,1e3)}getOrCreateMode(e,t,i,n){return i&&i!==l.PLAINTEXT_MODE_ID?t.create(i):t.createByFilepathOrFirstLine(c.withUndefinedAsNull(e),n)}updateTextEditorModel(e,t){this.isResolved()&&(e&&this.modelService.updateModel(this.textEditorModel,e),t&&t!==l.PLAINTEXT_MODE_ID&&this.textEditorModel.getModeId()!==t&&this.modelService.setMode(this.textEditorModel,this.modeService.create(t)))}createSnapshot(){return this.textEditorModel?this.textEditorModel.createSnapshot(!0):null}isResolved(){return!!this.textEditorModelHandle}dispose(){this.modelDisposeListener.dispose(),this.textEditorModelHandle&&this.createdEditorModel&&this.modelService.destroyModel(this.textEditorModelHandle), this.textEditorModelHandle=null,this.createdEditorModel=!1,super.dispose()}};d=o([r(0,s.IModelService),r(1,n.IModeService)],d),t.BaseTextEditorModel=d})),define(e[169],t([0,1,43,268,594,596,1123]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorInput=void 0;class a extends i.SideBySideEditorInput{constructor(e,t,i,n,o){super(e,t,i,n),this.name=e,this.originalInput=i,this.modifiedInput=n,this.forceOpenAsBinary=o,this.cachedModel=void 0}getTypeId(){return a.ID}getName(){return this.name?this.name:r.localize(0,null,this.originalInput.getName(),this.modifiedInput.getName())}async resolve(){const e=await this.createModel();return this.cachedModel&&this.cachedModel.dispose(),this.cachedModel=e,this.cachedModel}getPreferredEditorId(e){return this.forceOpenAsBinary?i.BINARY_DIFF_EDITOR_ID:i.TEXT_DIFF_EDITOR_ID}async createModel(){const e=await Promise.all([this.originalInput.resolve(),this.modifiedInput.resolve()]),t=e[0],i=e[1] ;return i instanceof n.BaseTextEditorModel&&t instanceof n.BaseTextEditorModel?new s.TextDiffEditorModel(t,i):new o.DiffEditorModel(t,i)}matches(e){return!!super.matches(e)&&(e instanceof a&&e.forceOpenAsBinary===this.forceOpenAsBinary)}dispose(){this.cachedModel&&(this.cachedModel.dispose(),this.cachedModel=void 0),super.dispose()}}t.DiffEditorInput=a,a.ID="workbench.editors.diffEditorInput"})),define(e[597],t([0,1,268,50,46]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceEditorModel=void 0;let a=class extends i.BaseTextEditorModel{constructor(e,t,i){super(i,t,e)}dispose(){this.textEditorModelHandle&&this.modelService.destroyModel(this.textEditorModelHandle),super.dispose()}};a=o([r(1,n.IModeService),r(2,s.IModelService)],a),t.ResourceEditorModel=a})),define(e[203],t([0,1,13,21]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Memento=void 0;class o{constructor(e,t){this.storageService=t,this.id=o.COMMON_PREFIX+e}getMemento(e){ if(1===e){let t=o.workspaceMementos.get(this.id);return t||(t=new s(this.id,e,this.storageService),o.workspaceMementos.set(this.id,t)),t.getMemento()}let t=o.globalMementos.get(this.id);return t||(t=new s(this.id,e,this.storageService),o.globalMementos.set(this.id,t)),t.getMemento()}saveMemento(){const e=o.workspaceMementos.get(this.id);e&&e.save();const t=o.globalMementos.get(this.id);t&&t.save()}}t.Memento=o,o.globalMementos=new Map,o.workspaceMementos=new Map,o.COMMON_PREFIX="memento/";class s{constructor(e,t,i){this.id=e,this.scope=t,this.storageService=i,this.mementoObj=this.load()}getMemento(){return this.mementoObj}load(){const e=this.storageService.get(this.id,this.scope);if(e)try{return JSON.parse(e)}catch(t){n.onUnexpectedError(`[memento]: failed to parse contents: ${t} (id: ${this.id}, scope: ${this.scope}, contents: ${e})`)}return{}}save(){i.isEmptyObject(this.mementoObj)?this.storageService.remove(this.id,this.scope):this.storageService.store(this.id,JSON.stringify(this.mementoObj),this.scope)}} })),define(e[443],t([0,1,203,11]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;class o extends n.Themable{constructor(e,t,n){super(t),this.id=e,this.id=e,this.memento=new i.Memento(this.id,n),this._register(n.onWillSaveState(()=>{this.saveState(),this.memento.saveMemento()}))}getId(){return this.id}getMemento(e){return this.memento.getMemento(e)}saveState(){}}t.Component=o})),define(e[364],t([0,1,30,443,6,7,2,13]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeRegistry=t.CompositeDescriptor=t.Composite=void 0;class l extends n.Component{constructor(e,t,i,n){super(e,i,n),this._telemetryService=t,this._onTitleAreaUpdate=this._register(new o.Emitter),this.onTitleAreaUpdate=this._onTitleAreaUpdate.event,this.visible=!1}get onDidFocus(){return this._onDidFocus||(this._onDidFocus=this.registerFocusTrackEvents().onDidFocus),this._onDidFocus.event}fireOnDidFocus(){this._onDidFocus&&this._onDidFocus.fire()} get onDidBlur(){return this._onDidBlur||(this._onDidBlur=this.registerFocusTrackEvents().onDidBlur),this._onDidBlur.event}registerFocusTrackEvents(){const e=a.assertIsDefined(this.getContainer()),t=this._register(s.trackFocus(e)),i=this._onDidFocus=this._register(new o.Emitter);this._register(t.onDidFocus(()=>i.fire()));const n=this._onDidBlur=this._register(new o.Emitter);return this._register(t.onDidBlur(()=>n.fire())),{onDidFocus:i,onDidBlur:n}}getTitle(){}get telemetryService(){return this._telemetryService}create(e){this.parent=e}updateStyles(){super.updateStyles()}getContainer(){return this.parent}setVisible(e){this.visible!==!!e&&(this.visible=e)}focus(){}getActions(){return[]}getSecondaryActions(){return[]}getContextMenuActions(){return[]}getActionViewItem(e){}getActionsContext(){return null}getActionRunner(){return this.actionRunner||(this.actionRunner=new i.ActionRunner),this.actionRunner}updateTitleArea(){this._onTitleAreaUpdate.fire()}isVisible(){return this.visible}getControl(){}}t.Composite=l ;t.CompositeDescriptor=class{constructor(e,t,i,n,o,s,r){this.ctor=e,this.id=t,this.name=i,this.cssClass=n,this.order=o,this.requestedIndex=s,this.keybindingId=r}instantiate(e){return e.createInstance(this.ctor)}};class c extends r.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new o.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new o.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.composites=[]}registerComposite(e){this.compositeById(e.id)||(this.composites.push(e),this._onDidRegister.fire(e))}deregisterComposite(e){const t=this.compositeById(e);t&&(this.composites.splice(this.composites.indexOf(t),1),this._onDidDeregister.fire(t))}getComposite(e){return this.compositeById(e)}getComposites(){return this.composites.slice(0)}compositeById(e){return this.composites.find(t=>t.id===e)}}t.CompositeRegistry=c})),define(e[321],t([0,1,443,7,6,13,808]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{ value:!0}),t.Part=void 0;class r extends i.Component{constructor(e,t,i,n,s){super(e,i,n),this.options=t,this.layoutService=s,this._onDidVisibilityChange=this._register(new o.Emitter),this.onDidVisibilityChange=this._onDidVisibilityChange.event,this._onDidChange=this._register(new o.Emitter),s.registerPart(this)}get dimension(){return this._dimension}onThemeChange(e){this.parent&&super.onThemeChange(e)}updateStyles(){super.updateStyles()}create(e,t){this.parent=e,this.titleArea=this.createTitleArea(e,t),this.contentArea=this.createContentArea(e,t),this.partLayout=new a(this.options,this.contentArea),this.updateStyles()}getContainer(){return this.parent}createTitleArea(e,t){}getTitleArea(){return this.titleArea}createContentArea(e,t){}getContentArea(){return this.contentArea}layoutContents(e,t){return s.assertIsDefined(this.partLayout).layout(e,t)}get onDidChange(){return this._onDidChange.event}layout(e,t){this._dimension=new n.Dimension(e,t)}setVisible(e){this._onDidVisibilityChange.fire(e)}}t.Part=r;class a{ constructor(e,t){this.options=e,this.contentArea=t}layout(e,t){let i;i=this.options&&this.options.hasTitle?new n.Dimension(e,Math.min(t,a.TITLE_HEIGHT)):new n.Dimension(0,0);let o=e;this.options&&"function"==typeof this.options.borderWidth&&(o-=this.options.borderWidth());const s=new n.Dimension(o,t-i.height);return this.contentArea&&n.size(this.contentArea,s.width,s.height),{titleSize:i,contentSize:s}}}a.TITLE_HEIGHT=35})),define(e[150],t([0,1,364,43,67,10,6,13,320,17,136]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorMemento=t.EditorPane=void 0;class h extends i.Composite{constructor(e,t,i,n){super(e,t,i,n),this.onDidSizeConstraintsChange=r.Event.None}get minimumWidth(){return l.DEFAULT_EDITOR_MIN_DIMENSIONS.width}get maximumWidth(){return l.DEFAULT_EDITOR_MAX_DIMENSIONS.width}get minimumHeight(){return l.DEFAULT_EDITOR_MIN_DIMENSIONS.height}get maximumHeight(){return l.DEFAULT_EDITOR_MAX_DIMENSIONS.height}get input(){return this._input} get options(){return this._options}get group(){return this._group}get scopedContextKeyService(){}create(e){super.create(e),this.createEditor(e)}async setInput(e,t,i,n){this._input=e,this._options=t}clearInput(){this._input=void 0,this._options=void 0}setOptions(e){this._options=e}setVisible(e,t){super.setVisible(e),this.setEditorVisible(e,t)}setEditorVisible(e,t){this._group=t}getEditorMemento(e,t,i=10){const n=`${this.getId()}${t}`;let o=h.EDITOR_MEMENTOS.get(n);return o||(o=new u(this.getId(),t,this.getMemento(1),i,e),h.EDITOR_MEMENTOS.set(n,o)),o}saveState(){h.EDITOR_MEMENTOS.forEach(e=>{e.id===this.getId()&&e.saveState()}),super.saveState()}dispose(){this._input=void 0,this._options=void 0,super.dispose()}}t.EditorPane=h,h.EDITOR_MEMENTOS=new Map;class u{constructor(e,t,i,n,o){this.id=e,this.key=t,this.memento=i,this.limit=n,this.editorGroupService=o,this.cleanedUp=!1}saveEditorState(e,t,i){const o=this.doGetResource(t);if(!o||!e)return;const s=this.doLoad();let a=s.get(o.toString()) ;if(a||(a=Object.create(null),s.set(o.toString(),a)),a[e.id]=i,t instanceof n.EditorInput){const e=t;this.editorDisposables||(this.editorDisposables=new Map),this.editorDisposables.has(e)||this.editorDisposables.set(e,r.Event.once(t.onDispose)(()=>{var t;this.clearEditorState(o),null===(t=this.editorDisposables)||void 0===t||t.delete(e)}))}}loadEditorState(e,t,i){const n=this.doGetResource(t);if(!n||!e)return;const o=this.doLoad().get(n.toString());if(o){let t=o[e.id];if(!i||!a.isUndefinedOrNull(t))return t;for(const e of this.editorGroupService.getGroups(1))if(t=o[e.id],!a.isUndefinedOrNull(t))return t}}clearEditorState(e,t){const i=this.doGetResource(e);if(i){const e=this.doLoad();if(t){const n=e.get(i.toString());n&&(delete n[t.id],a.isEmptyObject(n)&&e.delete(i.toString()))}else e.delete(i.toString())}}moveEditorState(e,t,i){const n=this.doLoad(),o=[...n.keys()];for(const r of o){const o=s.URI.parse(r);if(!i.isEqualOrParent(o,e))continue;let a;if(c.isEqual(e,o))a=t;else{ const i=d.indexOfPath(o.path,e.path);a=c.joinPath(t,o.path.substr(i+e.path.length+1))}const l=n.get(r,0);l&&(n.delete(r),n.set(a.toString(),l))}}doGetResource(e){return e instanceof n.EditorInput?e.resource:e}doLoad(){if(!this.cache){this.cache=new o.LRUCache(this.limit);const e=this.memento[this.key];Array.isArray(e)&&this.cache.fromJSON(e)}return this.cache}saveState(){const e=this.doLoad();this.cleanedUp||(this.cleanUp(),this.cleanedUp=!0),this.memento[this.key]=e.toJSON()}cleanUp(){const e=this.doLoad(),t=[...e.entries()];for(const[i,n]of t)for(const t of Object.keys(n)){const o=Number(t);this.editorGroupService.getGroup(o)||(delete n[o],a.isEmptyObject(n)&&e.delete(i))}}}t.EditorMemento=u})),define(e[151],t([0,1,16,150,14,2]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=t.EditorDescriptor=void 0;class r{constructor(e,t,i){this.ctor=e,this.id=t,this.name=i}static create(e,t,i){return new r(e,t,i)}instantiate(e){return e.createInstance(this.ctor)} getId(){return this.id}getName(){return this.name}describes(e){return e instanceof n.EditorPane&&e.getId()===this.id}}t.EditorDescriptor=r;t.Extensions={Editors:"workbench.contributions.editors"},i.Registry.add(t.Extensions.Editors,new class{constructor(){this.editors=[],this.mapEditorToInputs=new Map}registerEditor(e,t){this.mapEditorToInputs.set(e,t);const i=o.insert(this.editors,e);return s.toDisposable(()=>{this.mapEditorToInputs.delete(e),i()})}getEditor(e){const t=(e,i)=>{const n=[];for(const t of this.editors){const o=this.mapEditorToInputs.get(t)||[];for(const s of o){const o=s.ctor;if(!i&&e.constructor===o){n.push(t);break}if(i&&e instanceof o){n.push(t);break}}}return i||0!==n.length?n:t(e,!0)},i=t(e);if(i.length>0){const t=e.getPreferredEditorId(i.map(e=>e.getId()));return t?this.getEditorById(t):i[0]}}getEditorById(e){return this.editors.find(t=>t.getId()===e)}getEditors(){return this.editors.slice(0)}getEditorInputs(){const e=[];for(const t of this.editors){const i=this.mapEditorToInputs.get(t) ;i&&e.push(...i.map(e=>e.ctor))}return e}})})),define(e[598],t([0,1,7,16,150,23,5,11,27,151,197,6,26,13]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SideBySideEditor=void 0;let v=class e extends s.EditorPane{constructor(t,n,o,s){super(e.ID,t,o,s),this.instantiationService=n,this.dimension=new i.Dimension(0,0),this.onDidCreateEditors=this._register(new g.Emitter),this._onDidSizeConstraintsChange=this._register(new g.Relay),this.onDidSizeConstraintsChange=g.Event.any(this.onDidCreateEditors.event,this._onDidSizeConstraintsChange.event)}get minimumPrimaryWidth(){return this.primaryEditorPane?this.primaryEditorPane.minimumWidth:0}get maximumPrimaryWidth(){return this.primaryEditorPane?this.primaryEditorPane.maximumWidth:Number.POSITIVE_INFINITY}get minimumPrimaryHeight(){return this.primaryEditorPane?this.primaryEditorPane.minimumHeight:0}get maximumPrimaryHeight(){ return this.primaryEditorPane?this.primaryEditorPane.maximumHeight:Number.POSITIVE_INFINITY}get minimumSecondaryWidth(){return this.secondaryEditorPane?this.secondaryEditorPane.minimumWidth:0}get maximumSecondaryWidth(){return this.secondaryEditorPane?this.secondaryEditorPane.maximumWidth:Number.POSITIVE_INFINITY}get minimumSecondaryHeight(){return this.secondaryEditorPane?this.secondaryEditorPane.minimumHeight:0}get maximumSecondaryHeight(){return this.secondaryEditorPane?this.secondaryEditorPane.maximumHeight:Number.POSITIVE_INFINITY}set minimumWidth(e){}set maximumWidth(e){}set minimumHeight(e){}set maximumHeight(e){}get minimumWidth(){return this.minimumPrimaryWidth+this.minimumSecondaryWidth}get maximumWidth(){return this.maximumPrimaryWidth+this.maximumSecondaryWidth}get minimumHeight(){return this.minimumPrimaryHeight+this.minimumSecondaryHeight}get maximumHeight(){return this.maximumPrimaryHeight+this.maximumSecondaryHeight}createEditor(e){e.classList.add("side-by-side-editor") ;const t=this.splitview=this._register(new u.SplitView(e,{orientation:1}));this._register(this.splitview.onDidSashReset(()=>t.distributeViewSizes())),this.secondaryEditorContainer=i.$(".secondary-editor-container"),this.splitview.addView({element:this.secondaryEditorContainer,layout:e=>this.secondaryEditorPane&&this.secondaryEditorPane.layout(new i.Dimension(e,this.dimension.height)),minimumSize:220,maximumSize:Number.POSITIVE_INFINITY,onDidChange:g.Event.None},u.Sizing.Distribute),this.primaryEditorContainer=i.$(".primary-editor-container"),this.splitview.addView({element:this.primaryEditorContainer,layout:e=>this.primaryEditorPane&&this.primaryEditorPane.layout(new i.Dimension(e,this.dimension.height)),minimumSize:220,maximumSize:Number.POSITIVE_INFINITY,onDidChange:g.Event.None},u.Sizing.Distribute),this.updateStyles()}async setInput(e,t,i,n){const o=this.input;return await super.setInput(e,t,i,n),this.updateInput(o,e,t,i,n)}setOptions(e){this.primaryEditorPane&&this.primaryEditorPane.setOptions(e)} setEditorVisible(e,t){this.primaryEditorPane&&this.primaryEditorPane.setVisible(e,t),this.secondaryEditorPane&&this.secondaryEditorPane.setVisible(e,t),super.setEditorVisible(e,t)}clearInput(){this.primaryEditorPane&&this.primaryEditorPane.clearInput(),this.secondaryEditorPane&&this.secondaryEditorPane.clearInput(),this.disposeEditors(),super.clearInput()}focus(){this.primaryEditorPane&&this.primaryEditorPane.focus()}layout(e){this.dimension=e,m.assertIsDefined(this.splitview).layout(e.width)}getControl(){if(this.primaryEditorPane)return this.primaryEditorPane.getControl()}getPrimaryEditorPane(){return this.primaryEditorPane}getSecondaryEditorPane(){return this.secondaryEditorPane}async updateInput(e,t,i,n,o){if(!t.matches(e))return e&&this.disposeEditors(),this.setNewInput(t,i,n,o);this.secondaryEditorPane&&this.primaryEditorPane&&await Promise.all([this.secondaryEditorPane.setInput(t.secondary,void 0,n,o),this.primaryEditorPane.setInput(t.primary,i,n,o)])}setNewInput(e,t,i,n){ const o=this.doCreateEditor(e.secondary,m.assertIsDefined(this.secondaryEditorContainer)),s=this.doCreateEditor(e.primary,m.assertIsDefined(this.primaryEditorContainer));return this.onEditorsCreated(o,s,e.secondary,e.primary,t,i,n)}doCreateEditor(e,t){const i=n.Registry.as(h.Extensions.Editors).getEditor(e);if(!i)throw new Error("No descriptor for editor found");const o=i.instantiate(this.instantiationService);return o.create(t),o.setVisible(this.isVisible(),this.group),o}async onEditorsCreated(e,t,i,n,o,s,r){this.secondaryEditorPane=e,this.primaryEditorPane=t,this._onDidSizeConstraintsChange.input=g.Event.any(g.Event.map(e.onDidSizeConstraintsChange,()=>void 0),g.Event.map(t.onDidSizeConstraintsChange,()=>void 0)),this.onDidCreateEditors.fire(void 0),await Promise.all([this.secondaryEditorPane.setInput(i,void 0,s,r),this.primaryEditorPane.setInput(n,o,s,r)])}updateStyles(){super.updateStyles(), this.primaryEditorContainer&&(this.primaryEditorContainer.style.boxShadow=`-6px 0 5px -5px ${this.getColor(d.scrollbarShadow)}`)}disposeEditors(){this.secondaryEditorPane&&(this.secondaryEditorPane.dispose(),this.secondaryEditorPane=void 0),this.primaryEditorPane&&(this.primaryEditorPane.dispose(),this.primaryEditorPane=void 0),this.secondaryEditorContainer&&i.clearNode(this.secondaryEditorContainer),this.primaryEditorContainer&&i.clearNode(this.primaryEditorContainer)}dispose(){this.disposeEditors(),super.dispose()}};v.ID="workbench.editor.sidebysideEditor",v=o([r(0,a.ITelemetryService),r(1,l.IInstantiationService),r(2,c.IThemeService),r(3,p.IStorageService)],v),t.SideBySideEditor=v})),define(e[444],t([0,1,28,130,6,2,21,30,211,14,391]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.ChoiceAction=t.NotificationViewItem=t.NotificationViewItemProgress=t.NotificationViewItemContentChangeKind=t.isNotificationViewItem=t.NotificationsModel=t.NotificationHandle=t.StatusMessageChangeType=t.NotificationChangeType=void 0,function(e){e[e.ADD=0]="ADD",e[e.CHANGE=1]="CHANGE",e[e.EXPAND_COLLAPSE=2]="EXPAND_COLLAPSE",e[e.REMOVE=3]="REMOVE"}(t.NotificationChangeType||(t.NotificationChangeType={})),function(e){e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE"}(t.StatusMessageChangeType||(t.StatusMessageChangeType={}));class h extends s.Disposable{constructor(e,t){super(),this.item=e,this.onClose=t,this._onDidClose=this._register(new o.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeVisibility=this._register(new o.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.registerListeners()}registerListeners(){this._register(this.item.onDidChangeVisibility(e=>this._onDidChangeVisibility.fire(e))),o.Event.once(this.item.onDidClose)(()=>{this._onDidClose.fire(),this.dispose()})} get progress(){return this.item.progress}updateSeverity(e){this.item.updateSeverity(e)}updateMessage(e){this.item.updateMessage(e)}updateActions(e){this.item.updateActions(e)}close(){this.onClose(this.item),this.dispose()}}t.NotificationHandle=h;class u extends s.Disposable{constructor(){super(...arguments),this._onDidChangeNotification=this._register(new o.Emitter),this.onDidChangeNotification=this._onDidChangeNotification.event,this._onDidChangeStatusMessage=this._register(new o.Emitter),this.onDidChangeStatusMessage=this._onDidChangeStatusMessage.event,this._onDidChangeFilter=this._register(new o.Emitter),this.onDidChangeFilter=this._onDidChangeFilter.event,this._notifications=[],this.filter=i.NotificationsFilter.OFF}get notifications(){return this._notifications}get statusMessage(){return this._statusMessage}setFilter(e){this.filter=e,this._onDidChangeFilter.fire(e)}addNotification(e){const t=this.createViewItem(e);if(!t)return u.NO_OP_NOTIFICATION;const i=this.findNotification(t);return i&&i.close(), this._notifications.splice(0,0,t),this._onDidChangeNotification.fire({item:t,index:0,kind:0}),new h(t,e=>this.onClose(e))}onClose(e){const t=this.findNotification(e);t&&t!==e?t.close():e.close()}findNotification(e){return this._notifications.find(t=>t.equals(e))}createViewItem(e){const t=p.create(e,this.filter);if(!t)return;const i=(e,i)=>{const n=this._notifications.indexOf(t);n>=0&&this._onDidChangeNotification.fire({item:t,index:n,kind:e,detail:i})},n=t.onDidChangeExpansion(()=>i(2)),s=t.onDidChangeContent(e=>i(1,e.kind));return o.Event.once(t.onDidClose)(()=>{n.dispose(),s.dispose();const e=this._notifications.indexOf(t);e>=0&&(this._notifications.splice(e,1),this._onDidChangeNotification.fire({item:t,index:e,kind:3}))}),t}showStatusMessage(e,t){const i=v.create(e,t);return i?(this._statusMessage=i,this._onDidChangeStatusMessage.fire({kind:0,item:i}),s.toDisposable(()=>{this._statusMessage===i&&(this._statusMessage=void 0,this._onDidChangeStatusMessage.fire({kind:1,item:i}))})):s.Disposable.None}} t.NotificationsModel=u,u.NO_OP_NOTIFICATION=new i.NoOpNotification,t.isNotificationViewItem=function(e){return e instanceof p},function(e){e[e.SEVERITY=0]="SEVERITY",e[e.MESSAGE=1]="MESSAGE",e[e.ACTIONS=2]="ACTIONS",e[e.PROGRESS=3]="PROGRESS"}(t.NotificationViewItemContentChangeKind||(t.NotificationViewItemContentChangeKind={}));class g extends s.Disposable{constructor(){super(),this._onDidChange=this._register(new o.Emitter),this.onDidChange=this._onDidChange.event,this._state=Object.create(null)}get state(){return this._state}infinite(){this._state.infinite||(this._state.infinite=!0,this._state.total=void 0,this._state.worked=void 0,this._state.done=void 0,this._onDidChange.fire())}done(){this._state.done||(this._state.done=!0,this._state.infinite=void 0,this._state.total=void 0,this._state.worked=void 0,this._onDidChange.fire())}total(e){this._state.total!==e&&(this._state.total=e,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire())}worked(e){ "number"==typeof this._state.worked?this._state.worked+=e:this._state.worked=e,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire()}}t.NotificationViewItemProgress=g;class p extends s.Disposable{constructor(e,t,i,n,s,r,a){super(),this._severity=e,this._sticky=t,this._silent=i,this._message=n,this._source=s,this._visible=!1,this._onDidChangeExpansion=this._register(new o.Emitter),this.onDidChangeExpansion=this._onDidChangeExpansion.event,this._onDidClose=this._register(new o.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeContent=this._register(new o.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeVisibility=this._register(new o.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,r&&this.setProgress(r),this.setActions(a)}static create(e,t=i.NotificationsFilter.OFF){if(!e||!e.message||r.isPromiseCanceledError(e.message))return;let n;n="number"==typeof e.severity?e.severity:i.Severity.Info ;const o=p.parseNotificationMessage(e.message);if(!o)return;let s;return e.actions?s=e.actions:l.isErrorWithActions(e.message)&&(s={primary:e.message.actions}),new p(n,e.sticky,e.silent||t===i.NotificationsFilter.SILENT||t===i.NotificationsFilter.ERROR&&e.severity!==i.Severity.Error,o,e.source,e.progress,s)}static parseNotificationMessage(e){let t;if(e instanceof Error?t=n.toErrorMessage(e,!1):"string"==typeof e&&(t=e),!t)return;const i=t;return t.length>p.MAX_MESSAGE_LENGTH&&(t=`${t.substr(0,p.MAX_MESSAGE_LENGTH)}...`),t=t.replace(/(\r\n|\n|\r)/gm," ").trim(),{raw:i,linkedText:d.parseLinkedText(t),original:e}}setProgress(e){e.infinite?this.progress.infinite():e.total&&(this.progress.total(e.total),e.worked&&this.progress.worked(e.worked))}setActions(e={primary:[],secondary:[]}){this._actions={primary:Array.isArray(e.primary)?e.primary:[],secondary:Array.isArray(e.secondary)?e.secondary:[]},this._expanded=e.primary&&e.primary.length>0}get canCollapse(){return!this.hasActions}get expanded(){ return!!this._expanded}get severity(){return this._severity}get sticky(){if(this._sticky)return!0;const e=this.hasActions;return!!(e&&this._severity===i.Severity.Error||!e&&this._expanded||this._progress&&!this._progress.state.done)}get silent(){return!!this._silent}get hasActions(){return!!this._actions&&(!!this._actions.primary&&this._actions.primary.length>0)}get hasProgress(){return!!this._progress}get progress(){return this._progress||(this._progress=this._register(new g),this._register(this._progress.onDidChange(()=>this._onDidChangeContent.fire({kind:3})))),this._progress}get message(){return this._message}get source(){return this._source}get actions(){return this._actions}updateSeverity(e){this._severity=e,this._onDidChangeContent.fire({kind:0})}updateMessage(e){const t=p.parseNotificationMessage(e);t&&(this._message=t,this._onDidChangeContent.fire({kind:1}))}updateActions(e){this.setActions(e),this._onDidChangeContent.fire({kind:2})}updateVisibility(e){this._visible!==e&&(this._visible=e, this._onDidChangeVisibility.fire(e))}expand(){!this._expanded&&this.canCollapse&&(this._expanded=!0,this._onDidChangeExpansion.fire())}collapse(e){this._expanded&&this.canCollapse&&(this._expanded=!1,e||this._onDidChangeExpansion.fire())}toggle(){this._expanded?this.collapse():this.expand()}close(){this._onDidClose.fire(),this.dispose()}equals(e){if(this.hasProgress||e.hasProgress)return!1;if(this._source!==e.source)return!1;if(this._message.raw!==e.message.raw)return!1;const t=this._actions&&this._actions.primary||[],i=e.actions&&e.actions.primary||[];return c.equals(t,i,(e,t)=>e.id+e.label===t.id+t.label)}}t.NotificationViewItem=p,p.MAX_MESSAGE_LENGTH=1e3;class m extends a.Action{constructor(e,t){super(e,t.label,void 0,!0,async()=>{t.run(),this._onDidRun.fire()}),this._onDidRun=this._register(new o.Emitter),this.onDidRun=this._onDidRun.event,this._keepOpen=!!t.keepOpen}get keepOpen(){return this._keepOpen}}t.ChoiceAction=m;class v{static create(e,t){if(!e||r.isPromiseCanceledError(e))return;let i ;return e instanceof Error?i=n.toErrorMessage(e,!1):"string"==typeof e&&(i=e),i?{message:i,options:t}:void 0}}})),define(e[269],t([0,1,32,8,82,444,20,1105,69]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerNotificationCommands=t.NotificationsToastsVisibleContext=t.NotificationsCenterVisibleContext=t.NotificationFocusedContext=t.CLEAR_ALL_NOTIFICATIONS=t.CLEAR_NOTIFICATION=t.TOGGLE_NOTIFICATION=t.EXPAND_NOTIFICATION=t.COLLAPSE_NOTIFICATION=t.FOCUS_LAST_NOTIFICATION_TOAST=t.FOCUS_FIRST_NOTIFICATION_TOAST=t.FOCUS_PREVIOUS_NOTIFICATION_TOAST=t.FOCUS_NEXT_NOTIFICATION_TOAST=t.FOCUS_NOTIFICATION_TOAST=t.HIDE_NOTIFICATION_TOAST=t.TOGGLE_NOTIFICATIONS_CENTER=t.HIDE_NOTIFICATIONS_CENTER=t.SHOW_NOTIFICATIONS_CENTER=void 0,t.SHOW_NOTIFICATIONS_CENTER="notifications.showList",t.HIDE_NOTIFICATIONS_CENTER="notifications.hideList",t.TOGGLE_NOTIFICATIONS_CENTER="notifications.toggleList",t.HIDE_NOTIFICATION_TOAST="notifications.hideToasts", t.FOCUS_NOTIFICATION_TOAST="notifications.focusToasts",t.FOCUS_NEXT_NOTIFICATION_TOAST="notifications.focusNextToast",t.FOCUS_PREVIOUS_NOTIFICATION_TOAST="notifications.focusPreviousToast",t.FOCUS_FIRST_NOTIFICATION_TOAST="notifications.focusFirstToast",t.FOCUS_LAST_NOTIFICATION_TOAST="notifications.focusLastToast",t.COLLAPSE_NOTIFICATION="notification.collapse",t.EXPAND_NOTIFICATION="notification.expand",t.TOGGLE_NOTIFICATION="notification.toggle",t.CLEAR_NOTIFICATION="notification.clear",t.CLEAR_ALL_NOTIFICATIONS="notifications.clearAll",t.NotificationFocusedContext=new n.RawContextKey("notificationFocus",!0),t.NotificationsCenterVisibleContext=new n.RawContextKey("notificationCenterVisible",!1),t.NotificationsToastsVisibleContext=new n.RawContextKey("notificationToastsVisible",!1),t.registerNotificationCommands=function(e,c){function d(e,t){if(s.isNotificationViewItem(t))return t;const i=e.lastFocusedList;if(i instanceof l.WorkbenchList){const e=i.getFocusedElements()[0] ;if(s.isNotificationViewItem(e))return e}}i.CommandsRegistry.registerCommand(t.SHOW_NOTIFICATIONS_CENTER,()=>{c.hide(),e.show()}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.HIDE_NOTIFICATIONS_CENTER,weight:250,when:t.NotificationsCenterVisibleContext,primary:9,handler:t=>e.hide()}),i.CommandsRegistry.registerCommand(t.TOGGLE_NOTIFICATIONS_CENTER,t=>{e.isVisible?e.hide():(c.hide(),e.show())}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLEAR_NOTIFICATION,weight:200,when:t.NotificationFocusedContext,primary:20,mac:{primary:2049},handler:(e,t)=>{const i=d(e.get(l.IListService),t);i&&!i.hasProgress&&i.close()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.EXPAND_NOTIFICATION,weight:200,when:t.NotificationFocusedContext,primary:17,handler:(e,t)=>{const i=d(e.get(l.IListService),t);i&&i.expand()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.COLLAPSE_NOTIFICATION,weight:200,when:t.NotificationFocusedContext,primary:15,handler:(e,t)=>{ const i=d(e.get(l.IListService),t);i&&i.collapse()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.TOGGLE_NOTIFICATION,weight:200,when:t.NotificationFocusedContext,primary:10,secondary:[3],handler:e=>{const t=d(e.get(l.IListService));t&&t.toggle()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.HIDE_NOTIFICATION_TOAST,weight:250,when:t.NotificationsToastsVisibleContext,primary:9,handler:e=>c.hide()}),i.CommandsRegistry.registerCommand(t.FOCUS_NOTIFICATION_TOAST,()=>c.focus()),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_NEXT_NOTIFICATION_TOAST,weight:200,when:n.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:18,handler:e=>{c.focusNext()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_PREVIOUS_NOTIFICATION_TOAST,weight:200,when:n.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:16,handler:e=>{c.focusPrevious()}}), o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_FIRST_NOTIFICATION_TOAST,weight:200,when:n.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:11,secondary:[14],handler:e=>{c.focusFirst()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_LAST_NOTIFICATION_TOAST,weight:200,when:n.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:12,secondary:[13],handler:e=>{c.focusLast()}}),i.CommandsRegistry.registerCommand(t.CLEAR_ALL_NOTIFICATIONS,()=>e.clearAll());const h={value:a.localize(0,null),original:"Notifications"};r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:t.SHOW_NOTIFICATIONS_CENTER,title:{value:a.localize(1,null),original:"Show Notifications"},category:h}}),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:t.HIDE_NOTIFICATIONS_CENTER,title:{value:a.localize(2,null),original:"Hide Notifications"},category:h},when:t.NotificationsCenterVisibleContext}), r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:t.CLEAR_ALL_NOTIFICATIONS,title:{value:a.localize(3,null),original:"Clear All Notifications"},category:h}}),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:t.FOCUS_NOTIFICATION_TOAST,title:{value:a.localize(4,null),original:"Focus Notification Toast"},category:h},when:t.NotificationsToastsVisibleContext})}})),define(e[445],t([0,1,1102,30,23,28,269,32,88,44,526]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationActionRunner=t.CopyNotificationMessageAction=t.ConfigureNotificationAction=t.CollapseNotificationAction=t.ExpandNotificationAction=t.HideNotificationsCenterAction=t.ClearAllNotificationsAction=t.ClearNotificationAction=void 0 ;const u=h.registerIcon("notifications-clear",h.Codicon.close),g=h.registerIcon("notifications-clear-all",h.Codicon.clearAll),p=h.registerIcon("notifications-hide",h.Codicon.chevronDown),m=h.registerIcon("notifications-expand",h.Codicon.chevronUp),v=h.registerIcon("notifications-collapse",h.Codicon.chevronDown),f=h.registerIcon("notifications-configure",h.Codicon.gear);let S=class extends n.Action{constructor(e,t,i){super(e,t,u.classNames),this.commandService=i}async run(e){this.commandService.executeCommand(l.CLEAR_NOTIFICATION,e)}};S.ID=l.CLEAR_NOTIFICATION,S.LABEL=i.localize(0,null),S=o([r(2,c.ICommandService)],S),t.ClearNotificationAction=S;let b=class extends n.Action{constructor(e,t,i){super(e,t,g.classNames),this.commandService=i}async run(){this.commandService.executeCommand(l.CLEAR_ALL_NOTIFICATIONS)}};b.ID=l.CLEAR_ALL_NOTIFICATIONS,b.LABEL=i.localize(1,null),b=o([r(2,c.ICommandService)],b),t.ClearAllNotificationsAction=b;let _=class extends n.Action{constructor(e,t,i){super(e,t,p.classNames), this.commandService=i}async run(){this.commandService.executeCommand(l.HIDE_NOTIFICATIONS_CENTER)}};_.ID=l.HIDE_NOTIFICATIONS_CENTER,_.LABEL=i.localize(2,null),_=o([r(2,c.ICommandService)],_),t.HideNotificationsCenterAction=_;let C=class extends n.Action{constructor(e,t,i){super(e,t,m.classNames),this.commandService=i}async run(e){this.commandService.executeCommand(l.EXPAND_NOTIFICATION,e)}};C.ID=l.EXPAND_NOTIFICATION,C.LABEL=i.localize(3,null),C=o([r(2,c.ICommandService)],C),t.ExpandNotificationAction=C;let y=class extends n.Action{constructor(e,t,i){super(e,t,v.classNames),this.commandService=i}async run(e){this.commandService.executeCommand(l.COLLAPSE_NOTIFICATION,e)}};y.ID=l.COLLAPSE_NOTIFICATION,y.LABEL=i.localize(4,null),y=o([r(2,c.ICommandService)],y),t.CollapseNotificationAction=y;class w extends n.Action{constructor(e,t,i){super(e,t,f.classNames),this.configurationActions=i}}t.ConfigureNotificationAction=w,w.ID="workbench.action.configureNotification",w.LABEL=i.localize(5,null) ;let E=class extends n.Action{constructor(e,t,i){super(e,t),this.clipboardService=i}run(e){return this.clipboardService.writeText(e.message.raw)}};E.ID="workbench.action.copyNotificationMessage",E.LABEL=i.localize(6,null),E=o([r(2,d.IClipboardService)],E),t.CopyNotificationMessageAction=E;let I=class extends n.ActionRunner{constructor(e,t){super(),this.telemetryService=e,this.notificationService=t}async runAction(e,t){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.id,from:"message"});try{await super.runAction(e,t)}catch(e){this.notificationService.error(e)}}};I=o([r(0,s.ITelemetryService),r(1,a.INotificationService)],I),t.NotificationActionRunner=I})),define(e[1619],t([0,1,7,42,10,1108,174,59,11,78,5,2,36,444,445,35,214,28,14,44,302]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationTemplateRenderer=t.NotificationRenderer=t.NotificationsListDelegate=void 0;class w{constructor(e){ this.offsetHelper=this.createOffsetHelper(e)}createOffsetHelper(e){const t=document.createElement("div");return t.classList.add("notification-offset-helper"),e.appendChild(t),t}getHeight(e){if(!e.expanded)return w.ROW_HEIGHT;let t=w.ROW_HEIGHT;const i=this.computePreferredHeight(e);if(w.LINE_HEIGHT{i.EventHelper.stop(e,!0),t.callback(o.href)})),n.appendChild(s)}return n}}let I=class e{constructor(e,t,i,n){this.actionRunner=e,this.themeService=t,this.contextMenuService=i,this.instantiationService=n}get templateId(){return e.TEMPLATE_ID}renderTemplate(e){const t=Object.create(null);t.toDispose=new g.DisposableStore,t.container=document.createElement("div"),t.container.classList.add("notification-list-item"),t.mainRow=document.createElement("div"),t.mainRow.classList.add("notification-list-item-main-row"),t.icon=document.createElement("div"),t.icon.classList.add("notification-list-item-icon","codicon"), t.message=document.createElement("div"),t.message.classList.add("notification-list-item-message");const i=document.createElement("div");return i.classList.add("notification-list-item-toolbar-container"),t.toolbar=new h.ActionBar(i,{ariaLabel:a.localize(1,null),actionViewItemProvider:e=>{if(e&&e instanceof v.ConfigureNotificationAction){const i=new y.DropdownMenuActionViewItem(e,e.configurationActions,this.contextMenuService,{actionRunner:this.actionRunner,classNames:e.class});return t.toDispose.add(i),i}},actionRunner:this.actionRunner}),t.toDispose.add(t.toolbar),t.detailsRow=document.createElement("div"),t.detailsRow.classList.add("notification-list-item-details-row"),t.source=document.createElement("div"),t.source.classList.add("notification-list-item-source"),t.buttonsContainer=document.createElement("div"),t.buttonsContainer.classList.add("notification-list-item-buttons-container"),e.appendChild(t.container),t.container.appendChild(t.detailsRow),t.detailsRow.appendChild(t.source), t.detailsRow.appendChild(t.buttonsContainer),t.container.appendChild(t.mainRow),t.mainRow.appendChild(t.icon),t.mainRow.appendChild(t.message),t.mainRow.appendChild(i),t.progress=new S.ProgressBar(e),t.toDispose.add(c.attachProgressBarStyler(t.progress,this.themeService)),t.toDispose.add(t.progress),t.renderer=this.instantiationService.createInstance(x,t,this.actionRunner),t.toDispose.add(t.renderer),t}renderElement(e,t,i){i.renderer.setInput(e)}disposeTemplate(e){g.dispose(e.toDispose)}};I.TEMPLATE_ID="notification",I=o([r(1,d.IThemeService),r(2,p.IContextMenuService),r(3,u.IInstantiationService)],I),t.NotificationRenderer=I;let x=class e extends g.Disposable{constructor(t,i,n,o,s,r){super(),this.template=t,this.actionRunner=i,this.openerService=n,this.instantiationService=o,this.themeService=s,this.keybindingService=r,this.inputDisposables=this._register(new g.DisposableStore), e.closeNotificationAction||(e.closeNotificationAction=o.createInstance(v.ClearNotificationAction,v.ClearNotificationAction.ID,v.ClearNotificationAction.LABEL),e.expandNotificationAction=o.createInstance(v.ExpandNotificationAction,v.ExpandNotificationAction.ID,v.ExpandNotificationAction.LABEL),e.collapseNotificationAction=o.createInstance(v.CollapseNotificationAction,v.CollapseNotificationAction.ID,v.CollapseNotificationAction.LABEL))}setInput(e){this.inputDisposables.clear(),this.render(e)}render(e){this.template.container.classList.toggle("expanded",e.expanded),this.inputDisposables.add(i.addDisposableListener(this.template.container,i.EventType.AUXCLICK,t=>{e.hasProgress||1!==t.button||(i.EventHelper.stop(t,!0),e.close())})),this.renderSeverity(e);const t=this.renderMessage(e);this.renderSecondaryActions(e,t),this.renderSource(e),this.renderButtons(e),this.renderProgress(e),this.inputDisposables.add(e.onDidChangeContent(t=>{switch(t.kind){case 0:this.renderSeverity(e);break;case 3:this.renderProgress(e) ;break;case 1:this.renderMessage(e)}}))}renderSeverity(t){e.SEVERITIES.forEach(e=>{t.severity!==e&&this.template.icon.classList.remove(...this.toSeverityIcon(e).classNamesArray)}),this.template.icon.classList.add(...this.toSeverityIcon(t.severity).classNamesArray)}renderMessage(e){i.clearNode(this.template.message),this.template.message.appendChild(E.render(e.message,{callback:e=>this.openerService.open(s.URI.parse(e)),toDispose:this.inputDisposables}));const t=e.canCollapse&&!e.expanded&&this.template.message.scrollWidth>this.template.message.clientWidth;t?this.template.message.title=this.template.message.textContent+"":this.template.message.removeAttribute("title");const n=this.template.message.querySelectorAll("a");for(let e=0;ethis.template.toolbar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)}))}renderSource(e){e.expanded&&e.source?(this.template.source.textContent=a.localize(2,null,e.source),this.template.source.title=e.source):(this.template.source.textContent="",this.template.source.removeAttribute("title"))}renderButtons(e){i.clearNode(this.template.buttonsContainer);const t=e.actions?e.actions.primary:void 0;if(e.expanded&&_.isNonEmptyArray(t)){const n=new l.ButtonGroup(this.template.buttonsContainer,t.length,{title:!0});n.buttons.forEach((n,o)=>{const s=t[o] ;n.label=s.label,this.inputDisposables.add(n.onDidClick(t=>{i.EventHelper.stop(t,!0),this.actionRunner.run(s,e),s instanceof m.ChoiceAction&&s.keepOpen||e.close()})),this.inputDisposables.add(c.attachButtonStyler(n,this.themeService))}),this.inputDisposables.add(n)}}renderProgress(e){if(!e.hasProgress)return void this.template.progress.stop().hide();const t=e.progress.state;t.infinite?this.template.progress.infinite().show():"number"==typeof t.total||"number"==typeof t.worked?("number"!=typeof t.total||this.template.progress.hasTotal()||this.template.progress.total(t.total),"number"==typeof t.worked&&this.template.progress.setWorked(t.worked).show()):this.template.progress.done().hide()}toSeverityIcon(e){switch(e){case b.Severity.Warning:return C.Codicon.warning;case b.Severity.Error:return C.Codicon.error}return C.Codicon.info}getKeybindingLabel(e){const t=this.keybindingService.lookupKeybinding(e.id);return t?t.getLabel():null}};x.SEVERITIES=[b.Severity.Info,b.Severity.Warning,b.Severity.Error], x=o([r(2,n.IOpenerService),r(3,u.IInstantiationService),r(4,d.IThemeService),r(5,f.IKeybindingService)],x),t.NotificationTemplateRenderer=x})),define(e[322],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PanelPositionContext=t.PanelFocusContext=t.ActivePanelContext=void 0,t.ActivePanelContext=new i.RawContextKey("activePanel",""),t.PanelFocusContext=new i.RawContextKey("panelFocus",!1),t.PanelPositionContext=new i.RawContextKey("panelPosition","bottom")})),define(e[204],t([0,1,10,41,6,17,8,50,25,2,122,34,9,13]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceGlobMatcher=t.ResourceContextKey=void 0;let v=class e extends h.Disposable{constructor(t,i,n){super(),this._contextKeyService=t,this._fileService=i,this._modeService=n,this._schemeKey=e.Scheme.bindTo(this._contextKeyService),this._filenameKey=e.Filename.bindTo(this._contextKeyService),this._dirnameKey=e.Dirname.bindTo(this._contextKeyService), this._pathKey=e.Path.bindTo(this._contextKeyService),this._langIdKey=e.LangId.bindTo(this._contextKeyService),this._resourceKey=e.Resource.bindTo(this._contextKeyService),this._extensionKey=e.Extension.bindTo(this._contextKeyService),this._hasResource=e.HasResource.bindTo(this._contextKeyService),this._isFileSystemResource=e.IsFileSystemResource.bindTo(this._contextKeyService),this._register(i.onDidChangeFileSystemProviderRegistrations(()=>{const e=this._resourceKey.get();this._isFileSystemResource.set(Boolean(e&&i.canHandleResource(e)))})),this._register(n.onDidCreateMode(()=>{const e=this._resourceKey.get();this._langIdKey.set(e?this._modeService.getModeIdByFilepathOrFirstLine(e):null)}))}set(t){e._uriEquals(this._resourceKey.get(),t)||this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.set(t),this._schemeKey.set(t?t.scheme:null),this._filenameKey.set(t?a.basename(t):null),this._dirnameKey.set(t?a.dirname(t).fsPath:null),this._pathKey.set(t?t.fsPath:null), this._langIdKey.set(t?this._modeService.getModeIdByFilepathOrFirstLine(t):null),this._extensionKey.set(t?a.extname(t):null),this._hasResource.set(!!t),this._isFileSystemResource.set(!!t&&this._fileService.canHandleResource(t))})}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.reset(),this._schemeKey.reset(),this._filenameKey.reset(),this._dirnameKey.reset(),this._pathKey.reset(),this._langIdKey.reset(),this._extensionKey.reset(),this._hasResource.reset(),this._isFileSystemResource.reset()})}get(){return m.withNullAsUndefined(this._resourceKey.get())}static _uriEquals(e,t){return e===t||!(!e||!t)&&(e.scheme===t.scheme&&e.authority===t.authority&&e.path===t.path&&e.query===t.query&&e.fragment===t.fragment&&e.toString()===t.toString())}};v.Scheme=new l.RawContextKey("resourceScheme",void 0),v.Filename=new l.RawContextKey("resourceFilename",void 0),v.Dirname=new l.RawContextKey("resourceDirname",void 0),v.Path=new l.RawContextKey("resourcePath",void 0), v.LangId=new l.RawContextKey("resourceLangId",void 0),v.Resource=new l.RawContextKey("resource",void 0),v.Extension=new l.RawContextKey("resourceExtname",void 0),v.HasResource=new l.RawContextKey("resourceSet",void 0),v.IsFileSystemResource=new l.RawContextKey("isFileSystemResource",void 0),v=o([r(0,l.IContextKeyService),r(1,d.IFileService),r(2,c.IModeService)],v),t.ResourceContextKey=v;let f=class e extends h.Disposable{constructor(e,t,i,n){super(),this.globFn=e,this.shouldUpdate=t,this.contextService=i,this.configurationService=n,this._onExpressionChange=this._register(new s.Emitter),this.onExpressionChange=this._onExpressionChange.event,this.mapRootToParsedExpression=new Map,this.mapRootToExpressionConfig=new Map,this.updateExcludes(!1),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{this.shouldUpdate(e)&&this.updateExcludes(!0)})),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.updateExcludes(!0)))} updateExcludes(t){let o=!1;this.contextService.getWorkspace().folders.forEach(e=>{const t=this.globFn(e.uri);this.mapRootToExpressionConfig.has(e.uri.toString())&&n.equals(this.mapRootToExpressionConfig.get(e.uri.toString()),t)||(o=!0,this.mapRootToParsedExpression.set(e.uri.toString(),u.parse(t)),this.mapRootToExpressionConfig.set(e.uri.toString(),n.deepClone(t)))}),this.mapRootToExpressionConfig.forEach((t,n)=>{n!==e.NO_ROOT&&n&&!this.contextService.getWorkspaceFolder(i.URI.parse(n))&&(this.mapRootToParsedExpression.delete(n),this.mapRootToExpressionConfig.delete(n),o=!0)});const s=this.globFn();this.mapRootToExpressionConfig.has(e.NO_ROOT)&&n.equals(this.mapRootToExpressionConfig.get(e.NO_ROOT),s)||(o=!0,this.mapRootToParsedExpression.set(e.NO_ROOT,u.parse(s)),this.mapRootToExpressionConfig.set(e.NO_ROOT,n.deepClone(s))),t&&o&&this._onExpressionChange.fire()}matches(t){const i=this.contextService.getWorkspaceFolder(t);let n,o ;return n=i&&this.mapRootToParsedExpression.has(i.uri.toString())?this.mapRootToParsedExpression.get(i.uri.toString()):this.mapRootToParsedExpression.get(e.NO_ROOT),o=i?a.relativePath(i.uri,t):t.fsPath,!!n&&"string"==typeof o&&!!n(o)}};f.NO_ROOT=null,f=o([r(2,g.IWorkspaceContextService),r(3,p.IConfigurationService)],f),t.ResourceGlobMatcher=f})),define(e[81],t([0,1,1124,27,55]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.WINDOW_INACTIVE_BORDER=t.WINDOW_ACTIVE_BORDER=t.NOTIFICATIONS_INFO_ICON_FOREGROUND=t.NOTIFICATIONS_WARNING_ICON_FOREGROUND=t.NOTIFICATIONS_ERROR_ICON_FOREGROUND=t.NOTIFICATIONS_BORDER=t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=t.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=t.NOTIFICATIONS_LINKS=t.NOTIFICATIONS_BACKGROUND=t.NOTIFICATIONS_FOREGROUND=t.NOTIFICATIONS_TOAST_BORDER=t.NOTIFICATIONS_CENTER_BORDER=t.MENUBAR_SELECTION_BORDER=t.MENUBAR_SELECTION_BACKGROUND=t.MENUBAR_SELECTION_FOREGROUND=t.TITLE_BAR_BORDER=t.TITLE_BAR_INACTIVE_BACKGROUND=t.TITLE_BAR_ACTIVE_BACKGROUND=t.TITLE_BAR_INACTIVE_FOREGROUND=t.TITLE_BAR_ACTIVE_FOREGROUND=t.SIDE_BAR_SECTION_HEADER_BORDER=t.SIDE_BAR_SECTION_HEADER_FOREGROUND=t.SIDE_BAR_SECTION_HEADER_BACKGROUND=t.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=t.SIDE_BAR_TITLE_FOREGROUND=t.SIDE_BAR_BORDER=t.SIDE_BAR_FOREGROUND=t.SIDE_BAR_BACKGROUND=t.EXTENSION_BADGE_REMOTE_FOREGROUND=t.EXTENSION_BADGE_REMOTE_BACKGROUND=t.STATUS_BAR_HOST_NAME_FOREGROUND=t.STATUS_BAR_HOST_NAME_BACKGROUND=t.ACTIVITY_BAR_BADGE_FOREGROUND=t.ACTIVITY_BAR_BADGE_BACKGROUND=t.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=t.ACTIVITY_BAR_ACTIVE_BACKGROUND=t.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=t.ACTIVITY_BAR_ACTIVE_BORDER=t.ACTIVITY_BAR_BORDER=t.ACTIVITY_BAR_INACTIVE_FOREGROUND=t.ACTIVITY_BAR_FOREGROUND=t.ACTIVITY_BAR_BACKGROUND=t.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=t.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=t.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=t.STATUS_BAR_ITEM_HOVER_BACKGROUND=t.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=t.STATUS_BAR_NO_FOLDER_BORDER=t.STATUS_BAR_BORDER=t.STATUS_BAR_NO_FOLDER_BACKGROUND=t.STATUS_BAR_BACKGROUND=t.STATUS_BAR_NO_FOLDER_FOREGROUND=t.STATUS_BAR_FOREGROUND=t.PANEL_SECTION_BORDER=t.PANEL_SECTION_HEADER_BORDER=t.PANEL_SECTION_HEADER_FOREGROUND=t.PANEL_SECTION_HEADER_BACKGROUND=t.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=t.PANEL_DRAG_AND_DROP_BORDER=t.PANEL_INPUT_BORDER=t.PANEL_ACTIVE_TITLE_BORDER=t.PANEL_INACTIVE_TITLE_FOREGROUND=t.PANEL_ACTIVE_TITLE_FOREGROUND=t.PANEL_BORDER=t.PANEL_BACKGROUND=t.IMAGE_PREVIEW_BORDER=t.EDITOR_DRAG_AND_DROP_BACKGROUND=t.EDITOR_GROUP_BORDER=t.EDITOR_GROUP_HEADER_BORDER=t.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=t.EDITOR_GROUP_HEADER_TABS_BORDER=t.EDITOR_GROUP_HEADER_TABS_BACKGROUND=t.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=t.EDITOR_GROUP_EMPTY_BACKGROUND=t.EDITOR_PANE_BACKGROUND=t.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=t.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=t.TAB_INACTIVE_MODIFIED_BORDER=t.TAB_ACTIVE_MODIFIED_BORDER=t.TAB_UNFOCUSED_HOVER_BORDER=t.TAB_HOVER_BORDER=t.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=t.TAB_ACTIVE_BORDER_TOP=t.TAB_UNFOCUSED_ACTIVE_BORDER=t.TAB_ACTIVE_BORDER=t.TAB_LAST_PINNED_BORDER=t.TAB_BORDER=t.TAB_UNFOCUSED_HOVER_FOREGROUND=t.TAB_HOVER_FOREGROUND=t.TAB_UNFOCUSED_HOVER_BACKGROUND=t.TAB_HOVER_BACKGROUND=t.TAB_UNFOCUSED_INACTIVE_FOREGROUND=t.TAB_UNFOCUSED_ACTIVE_FOREGROUND=t.TAB_INACTIVE_FOREGROUND=t.TAB_ACTIVE_FOREGROUND=t.TAB_UNFOCUSED_INACTIVE_BACKGROUND=t.TAB_INACTIVE_BACKGROUND=t.TAB_UNFOCUSED_ACTIVE_BACKGROUND=t.TAB_ACTIVE_BACKGROUND=t.WORKBENCH_BACKGROUND=void 0, t.WORKBENCH_BACKGROUND=function(e){switch(e.type){case"dark":return o.Color.fromHex("#252526");case"light":return o.Color.fromHex("#F3F3F3");default:return o.Color.fromHex("#000000")}},t.TAB_ACTIVE_BACKGROUND=n.registerColor("tab.activeBackground",{dark:n.editorBackground,light:n.editorBackground,hc:n.editorBackground},i.localize(0,null)),t.TAB_UNFOCUSED_ACTIVE_BACKGROUND=n.registerColor("tab.unfocusedActiveBackground",{dark:t.TAB_ACTIVE_BACKGROUND,light:t.TAB_ACTIVE_BACKGROUND,hc:t.TAB_ACTIVE_BACKGROUND},i.localize(1,null)),t.TAB_INACTIVE_BACKGROUND=n.registerColor("tab.inactiveBackground",{dark:"#2D2D2D",light:"#ECECEC",hc:null},i.localize(2,null)),t.TAB_UNFOCUSED_INACTIVE_BACKGROUND=n.registerColor("tab.unfocusedInactiveBackground",{dark:t.TAB_INACTIVE_BACKGROUND,light:t.TAB_INACTIVE_BACKGROUND,hc:t.TAB_INACTIVE_BACKGROUND},i.localize(3,null)),t.TAB_ACTIVE_FOREGROUND=n.registerColor("tab.activeForeground",{dark:o.Color.white,light:"#333333",hc:o.Color.white},i.localize(4,null)), t.TAB_INACTIVE_FOREGROUND=n.registerColor("tab.inactiveForeground",{dark:n.transparent(t.TAB_ACTIVE_FOREGROUND,.5),light:n.transparent(t.TAB_ACTIVE_FOREGROUND,.7),hc:o.Color.white},i.localize(5,null)),t.TAB_UNFOCUSED_ACTIVE_FOREGROUND=n.registerColor("tab.unfocusedActiveForeground",{dark:n.transparent(t.TAB_ACTIVE_FOREGROUND,.5),light:n.transparent(t.TAB_ACTIVE_FOREGROUND,.7),hc:o.Color.white},i.localize(6,null)),t.TAB_UNFOCUSED_INACTIVE_FOREGROUND=n.registerColor("tab.unfocusedInactiveForeground",{dark:n.transparent(t.TAB_INACTIVE_FOREGROUND,.5),light:n.transparent(t.TAB_INACTIVE_FOREGROUND,.5),hc:o.Color.white},i.localize(7,null)),t.TAB_HOVER_BACKGROUND=n.registerColor("tab.hoverBackground",{dark:null,light:null,hc:null},i.localize(8,null)),t.TAB_UNFOCUSED_HOVER_BACKGROUND=n.registerColor("tab.unfocusedHoverBackground",{dark:n.transparent(t.TAB_HOVER_BACKGROUND,.5),light:n.transparent(t.TAB_HOVER_BACKGROUND,.7),hc:null},i.localize(9,null)),t.TAB_HOVER_FOREGROUND=n.registerColor("tab.hoverForeground",{ dark:null,light:null,hc:null},i.localize(10,null)),t.TAB_UNFOCUSED_HOVER_FOREGROUND=n.registerColor("tab.unfocusedHoverForeground",{dark:n.transparent(t.TAB_HOVER_FOREGROUND,.5),light:n.transparent(t.TAB_HOVER_FOREGROUND,.5),hc:null},i.localize(11,null)),t.TAB_BORDER=n.registerColor("tab.border",{dark:"#252526",light:"#F3F3F3",hc:n.contrastBorder},i.localize(12,null)),t.TAB_LAST_PINNED_BORDER=n.registerColor("tab.lastPinnedBorder",{dark:null,light:null,hc:n.contrastBorder},i.localize(13,null)),t.TAB_ACTIVE_BORDER=n.registerColor("tab.activeBorder",{dark:null,light:null,hc:null},i.localize(14,null)),t.TAB_UNFOCUSED_ACTIVE_BORDER=n.registerColor("tab.unfocusedActiveBorder",{dark:n.transparent(t.TAB_ACTIVE_BORDER,.5),light:n.transparent(t.TAB_ACTIVE_BORDER,.7),hc:null},i.localize(15,null)),t.TAB_ACTIVE_BORDER_TOP=n.registerColor("tab.activeBorderTop",{dark:null,light:null,hc:null},i.localize(16,null)),t.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=n.registerColor("tab.unfocusedActiveBorderTop",{ dark:n.transparent(t.TAB_ACTIVE_BORDER_TOP,.5),light:n.transparent(t.TAB_ACTIVE_BORDER_TOP,.7),hc:null},i.localize(17,null)),t.TAB_HOVER_BORDER=n.registerColor("tab.hoverBorder",{dark:null,light:null,hc:null},i.localize(18,null)),t.TAB_UNFOCUSED_HOVER_BORDER=n.registerColor("tab.unfocusedHoverBorder",{dark:n.transparent(t.TAB_HOVER_BORDER,.5),light:n.transparent(t.TAB_HOVER_BORDER,.7),hc:null},i.localize(19,null)),t.TAB_ACTIVE_MODIFIED_BORDER=n.registerColor("tab.activeModifiedBorder",{dark:"#3399CC",light:"#33AAEE",hc:null},i.localize(20,null)),t.TAB_INACTIVE_MODIFIED_BORDER=n.registerColor("tab.inactiveModifiedBorder",{dark:n.transparent(t.TAB_ACTIVE_MODIFIED_BORDER,.5),light:n.transparent(t.TAB_ACTIVE_MODIFIED_BORDER,.5),hc:o.Color.white},i.localize(21,null)),t.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=n.registerColor("tab.unfocusedActiveModifiedBorder",{dark:n.transparent(t.TAB_ACTIVE_MODIFIED_BORDER,.5),light:n.transparent(t.TAB_ACTIVE_MODIFIED_BORDER,.7),hc:o.Color.white},i.localize(22,null)), t.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=n.registerColor("tab.unfocusedInactiveModifiedBorder",{dark:n.transparent(t.TAB_INACTIVE_MODIFIED_BORDER,.5),light:n.transparent(t.TAB_INACTIVE_MODIFIED_BORDER,.5),hc:o.Color.white},i.localize(23,null)),t.EDITOR_PANE_BACKGROUND=n.registerColor("editorPane.background",{dark:n.editorBackground,light:n.editorBackground,hc:n.editorBackground},i.localize(24,null)),n.registerColor("editorGroup.background",{dark:null,light:null,hc:null},i.localize(25,null),!1,i.localize(26,null)),t.EDITOR_GROUP_EMPTY_BACKGROUND=n.registerColor("editorGroup.emptyBackground",{dark:null,light:null,hc:null},i.localize(27,null)),t.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=n.registerColor("editorGroup.focusedEmptyBorder",{dark:null,light:null,hc:n.focusBorder},i.localize(28,null)),t.EDITOR_GROUP_HEADER_TABS_BACKGROUND=n.registerColor("editorGroupHeader.tabsBackground",{dark:"#252526",light:"#F3F3F3",hc:null},i.localize(29,null)), t.EDITOR_GROUP_HEADER_TABS_BORDER=n.registerColor("editorGroupHeader.tabsBorder",{dark:null,light:null,hc:null},i.localize(30,null)),t.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=n.registerColor("editorGroupHeader.noTabsBackground",{dark:n.editorBackground,light:n.editorBackground,hc:n.editorBackground},i.localize(31,null)),t.EDITOR_GROUP_HEADER_BORDER=n.registerColor("editorGroupHeader.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(32,null)),t.EDITOR_GROUP_BORDER=n.registerColor("editorGroup.border",{dark:"#444444",light:"#E7E7E7",hc:n.contrastBorder},i.localize(33,null)),t.EDITOR_DRAG_AND_DROP_BACKGROUND=n.registerColor("editorGroup.dropBackground",{dark:o.Color.fromHex("#53595D").transparent(.5),light:o.Color.fromHex("#2677CB").transparent(.18),hc:null},i.localize(34,null)),t.IMAGE_PREVIEW_BORDER=n.registerColor("imagePreview.border",{dark:o.Color.fromHex("#808080").transparent(.35),light:o.Color.fromHex("#808080").transparent(.35),hc:n.contrastBorder},i.localize(35,null)), t.PANEL_BACKGROUND=n.registerColor("panel.background",{dark:n.editorBackground,light:n.editorBackground,hc:n.editorBackground},i.localize(36,null)),t.PANEL_BORDER=n.registerColor("panel.border",{dark:o.Color.fromHex("#808080").transparent(.35),light:o.Color.fromHex("#808080").transparent(.35),hc:n.contrastBorder},i.localize(37,null)),t.PANEL_ACTIVE_TITLE_FOREGROUND=n.registerColor("panelTitle.activeForeground",{dark:"#E7E7E7",light:"#424242",hc:o.Color.white},i.localize(38,null)),t.PANEL_INACTIVE_TITLE_FOREGROUND=n.registerColor("panelTitle.inactiveForeground",{dark:n.transparent(t.PANEL_ACTIVE_TITLE_FOREGROUND,.6),light:n.transparent(t.PANEL_ACTIVE_TITLE_FOREGROUND,.75),hc:o.Color.white},i.localize(39,null)),t.PANEL_ACTIVE_TITLE_BORDER=n.registerColor("panelTitle.activeBorder",{dark:t.PANEL_ACTIVE_TITLE_FOREGROUND,light:t.PANEL_ACTIVE_TITLE_FOREGROUND,hc:n.contrastBorder},i.localize(40,null)),t.PANEL_INPUT_BORDER=n.registerColor("panelInput.border",{dark:null,light:o.Color.fromHex("#ddd"),hc:null },i.localize(41,null)),t.PANEL_DRAG_AND_DROP_BORDER=n.registerColor("panel.dropBorder",{dark:t.PANEL_ACTIVE_TITLE_FOREGROUND,light:t.PANEL_ACTIVE_TITLE_FOREGROUND,hc:t.PANEL_ACTIVE_TITLE_FOREGROUND},i.localize(42,null)),t.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=n.registerColor("panelSection.dropBackground",{dark:t.EDITOR_DRAG_AND_DROP_BACKGROUND,light:t.EDITOR_DRAG_AND_DROP_BACKGROUND,hc:t.EDITOR_DRAG_AND_DROP_BACKGROUND},i.localize(43,null)),t.PANEL_SECTION_HEADER_BACKGROUND=n.registerColor("panelSectionHeader.background",{dark:o.Color.fromHex("#808080").transparent(.2),light:o.Color.fromHex("#808080").transparent(.2),hc:null},i.localize(44,null)),t.PANEL_SECTION_HEADER_FOREGROUND=n.registerColor("panelSectionHeader.foreground",{dark:null,light:null,hc:null},i.localize(45,null)),t.PANEL_SECTION_HEADER_BORDER=n.registerColor("panelSectionHeader.border",{dark:n.contrastBorder,light:n.contrastBorder,hc:n.contrastBorder},i.localize(46,null)),t.PANEL_SECTION_BORDER=n.registerColor("panelSection.border",{ dark:t.PANEL_BORDER,light:t.PANEL_BORDER,hc:t.PANEL_BORDER},i.localize(47,null)),t.STATUS_BAR_FOREGROUND=n.registerColor("statusBar.foreground",{dark:"#FFFFFF",light:"#FFFFFF",hc:"#FFFFFF"},i.localize(48,null)),t.STATUS_BAR_NO_FOLDER_FOREGROUND=n.registerColor("statusBar.noFolderForeground",{dark:t.STATUS_BAR_FOREGROUND,light:t.STATUS_BAR_FOREGROUND,hc:t.STATUS_BAR_FOREGROUND},i.localize(49,null)),t.STATUS_BAR_BACKGROUND=n.registerColor("statusBar.background",{dark:"#007ACC",light:"#007ACC",hc:null},i.localize(50,null)),t.STATUS_BAR_NO_FOLDER_BACKGROUND=n.registerColor("statusBar.noFolderBackground",{dark:"#68217A",light:"#68217A",hc:null},i.localize(51,null)),t.STATUS_BAR_BORDER=n.registerColor("statusBar.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(52,null)),t.STATUS_BAR_NO_FOLDER_BORDER=n.registerColor("statusBar.noFolderBorder",{dark:t.STATUS_BAR_BORDER,light:t.STATUS_BAR_BORDER,hc:t.STATUS_BAR_BORDER},i.localize(53,null)), t.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=n.registerColor("statusBarItem.activeBackground",{dark:o.Color.white.transparent(.18),light:o.Color.white.transparent(.18),hc:o.Color.white.transparent(.18)},i.localize(54,null)),t.STATUS_BAR_ITEM_HOVER_BACKGROUND=n.registerColor("statusBarItem.hoverBackground",{dark:o.Color.white.transparent(.12),light:o.Color.white.transparent(.12),hc:o.Color.white.transparent(.12)},i.localize(55,null)),t.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=n.registerColor("statusBarItem.prominentForeground",{dark:t.STATUS_BAR_FOREGROUND,light:t.STATUS_BAR_FOREGROUND,hc:t.STATUS_BAR_FOREGROUND},i.localize(56,null)),t.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=n.registerColor("statusBarItem.prominentBackground",{dark:o.Color.black.transparent(.5),light:o.Color.black.transparent(.5),hc:o.Color.black.transparent(.5)},i.localize(57,null)),t.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=n.registerColor("statusBarItem.prominentHoverBackground",{dark:o.Color.black.transparent(.3),light:o.Color.black.transparent(.3), hc:o.Color.black.transparent(.3)},i.localize(58,null)),t.ACTIVITY_BAR_BACKGROUND=n.registerColor("activityBar.background",{dark:"#333333",light:"#2C2C2C",hc:"#000000"},i.localize(59,null)),t.ACTIVITY_BAR_FOREGROUND=n.registerColor("activityBar.foreground",{dark:o.Color.white,light:o.Color.white,hc:o.Color.white},i.localize(60,null)),t.ACTIVITY_BAR_INACTIVE_FOREGROUND=n.registerColor("activityBar.inactiveForeground",{dark:n.transparent(t.ACTIVITY_BAR_FOREGROUND,.4),light:n.transparent(t.ACTIVITY_BAR_FOREGROUND,.4),hc:o.Color.white},i.localize(61,null)),t.ACTIVITY_BAR_BORDER=n.registerColor("activityBar.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(62,null)),t.ACTIVITY_BAR_ACTIVE_BORDER=n.registerColor("activityBar.activeBorder",{dark:t.ACTIVITY_BAR_FOREGROUND,light:t.ACTIVITY_BAR_FOREGROUND,hc:null},i.localize(63,null)),t.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=n.registerColor("activityBar.activeFocusBorder",{dark:null,light:null,hc:null},i.localize(64,null)), t.ACTIVITY_BAR_ACTIVE_BACKGROUND=n.registerColor("activityBar.activeBackground",{dark:null,light:null,hc:null},i.localize(65,null)),t.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=n.registerColor("activityBar.dropBorder",{dark:t.ACTIVITY_BAR_FOREGROUND,light:t.ACTIVITY_BAR_FOREGROUND,hc:t.ACTIVITY_BAR_FOREGROUND},i.localize(66,null)),t.ACTIVITY_BAR_BADGE_BACKGROUND=n.registerColor("activityBarBadge.background",{dark:"#007ACC",light:"#007ACC",hc:"#000000"},i.localize(67,null)),t.ACTIVITY_BAR_BADGE_FOREGROUND=n.registerColor("activityBarBadge.foreground",{dark:o.Color.white,light:o.Color.white,hc:o.Color.white},i.localize(68,null)),t.STATUS_BAR_HOST_NAME_BACKGROUND=n.registerColor("statusBarItem.remoteBackground",{dark:t.ACTIVITY_BAR_BADGE_BACKGROUND,light:t.ACTIVITY_BAR_BADGE_BACKGROUND,hc:t.ACTIVITY_BAR_BADGE_BACKGROUND},i.localize(69,null)),t.STATUS_BAR_HOST_NAME_FOREGROUND=n.registerColor("statusBarItem.remoteForeground",{dark:t.ACTIVITY_BAR_BADGE_FOREGROUND,light:t.ACTIVITY_BAR_BADGE_FOREGROUND, hc:t.ACTIVITY_BAR_BADGE_FOREGROUND},i.localize(70,null)),t.EXTENSION_BADGE_REMOTE_BACKGROUND=n.registerColor("extensionBadge.remoteBackground",{dark:t.ACTIVITY_BAR_BADGE_BACKGROUND,light:t.ACTIVITY_BAR_BADGE_BACKGROUND,hc:t.ACTIVITY_BAR_BADGE_BACKGROUND},i.localize(71,null)),t.EXTENSION_BADGE_REMOTE_FOREGROUND=n.registerColor("extensionBadge.remoteForeground",{dark:t.ACTIVITY_BAR_BADGE_FOREGROUND,light:t.ACTIVITY_BAR_BADGE_FOREGROUND,hc:t.ACTIVITY_BAR_BADGE_FOREGROUND},i.localize(72,null)),t.SIDE_BAR_BACKGROUND=n.registerColor("sideBar.background",{dark:"#252526",light:"#F3F3F3",hc:"#000000"},i.localize(73,null)),t.SIDE_BAR_FOREGROUND=n.registerColor("sideBar.foreground",{dark:null,light:null,hc:null},i.localize(74,null)),t.SIDE_BAR_BORDER=n.registerColor("sideBar.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(75,null)),t.SIDE_BAR_TITLE_FOREGROUND=n.registerColor("sideBarTitle.foreground",{dark:t.SIDE_BAR_FOREGROUND,light:t.SIDE_BAR_FOREGROUND,hc:t.SIDE_BAR_FOREGROUND},i.localize(76,null)), t.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=n.registerColor("sideBar.dropBackground",{dark:t.EDITOR_DRAG_AND_DROP_BACKGROUND,light:t.EDITOR_DRAG_AND_DROP_BACKGROUND,hc:t.EDITOR_DRAG_AND_DROP_BACKGROUND},i.localize(77,null)),t.SIDE_BAR_SECTION_HEADER_BACKGROUND=n.registerColor("sideBarSectionHeader.background",{dark:o.Color.fromHex("#808080").transparent(.2),light:o.Color.fromHex("#808080").transparent(.2),hc:null},i.localize(78,null)),t.SIDE_BAR_SECTION_HEADER_FOREGROUND=n.registerColor("sideBarSectionHeader.foreground",{dark:t.SIDE_BAR_FOREGROUND,light:t.SIDE_BAR_FOREGROUND,hc:t.SIDE_BAR_FOREGROUND},i.localize(79,null)),t.SIDE_BAR_SECTION_HEADER_BORDER=n.registerColor("sideBarSectionHeader.border",{dark:n.contrastBorder,light:n.contrastBorder,hc:n.contrastBorder},i.localize(80,null)),t.TITLE_BAR_ACTIVE_FOREGROUND=n.registerColor("titleBar.activeForeground",{dark:"#CCCCCC",light:"#333333",hc:"#FFFFFF"},i.localize(81,null)),t.TITLE_BAR_INACTIVE_FOREGROUND=n.registerColor("titleBar.inactiveForeground",{ dark:n.transparent(t.TITLE_BAR_ACTIVE_FOREGROUND,.6),light:n.transparent(t.TITLE_BAR_ACTIVE_FOREGROUND,.6),hc:null},i.localize(82,null)),t.TITLE_BAR_ACTIVE_BACKGROUND=n.registerColor("titleBar.activeBackground",{dark:"#3C3C3C",light:"#DDDDDD",hc:"#000000"},i.localize(83,null)),t.TITLE_BAR_INACTIVE_BACKGROUND=n.registerColor("titleBar.inactiveBackground",{dark:n.transparent(t.TITLE_BAR_ACTIVE_BACKGROUND,.6),light:n.transparent(t.TITLE_BAR_ACTIVE_BACKGROUND,.6),hc:null},i.localize(84,null)),t.TITLE_BAR_BORDER=n.registerColor("titleBar.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(85,null)),t.MENUBAR_SELECTION_FOREGROUND=n.registerColor("menubar.selectionForeground",{dark:t.TITLE_BAR_ACTIVE_FOREGROUND,light:t.TITLE_BAR_ACTIVE_FOREGROUND,hc:t.TITLE_BAR_ACTIVE_FOREGROUND},i.localize(86,null)),t.MENUBAR_SELECTION_BACKGROUND=n.registerColor("menubar.selectionBackground",{dark:n.transparent(o.Color.white,.1),light:n.transparent(o.Color.black,.1),hc:null},i.localize(87,null)), t.MENUBAR_SELECTION_BORDER=n.registerColor("menubar.selectionBorder",{dark:null,light:null,hc:n.activeContrastBorder},i.localize(88,null)),t.NOTIFICATIONS_CENTER_BORDER=n.registerColor("notificationCenter.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(89,null)),t.NOTIFICATIONS_TOAST_BORDER=n.registerColor("notificationToast.border",{dark:null,light:null,hc:n.contrastBorder},i.localize(90,null)),t.NOTIFICATIONS_FOREGROUND=n.registerColor("notifications.foreground",{dark:n.editorWidgetForeground,light:n.editorWidgetForeground,hc:n.editorWidgetForeground},i.localize(91,null)),t.NOTIFICATIONS_BACKGROUND=n.registerColor("notifications.background",{dark:n.editorWidgetBackground,light:n.editorWidgetBackground,hc:n.editorWidgetBackground},i.localize(92,null)),t.NOTIFICATIONS_LINKS=n.registerColor("notificationLink.foreground",{dark:n.textLinkForeground,light:n.textLinkForeground,hc:n.textLinkForeground},i.localize(93,null)), t.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=n.registerColor("notificationCenterHeader.foreground",{dark:null,light:null,hc:null},i.localize(94,null)),t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=n.registerColor("notificationCenterHeader.background",{dark:n.lighten(t.NOTIFICATIONS_BACKGROUND,.3),light:n.darken(t.NOTIFICATIONS_BACKGROUND,.05),hc:t.NOTIFICATIONS_BACKGROUND},i.localize(95,null)),t.NOTIFICATIONS_BORDER=n.registerColor("notifications.border",{dark:t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,light:t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,hc:t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND},i.localize(96,null)),t.NOTIFICATIONS_ERROR_ICON_FOREGROUND=n.registerColor("notificationsErrorIcon.foreground",{dark:n.editorErrorForeground,light:n.editorErrorForeground,hc:n.editorErrorForeground},i.localize(97,null)),t.NOTIFICATIONS_WARNING_ICON_FOREGROUND=n.registerColor("notificationsWarningIcon.foreground",{dark:n.editorWarningForeground,light:n.editorWarningForeground,hc:n.editorWarningForeground},i.localize(98,null)), t.NOTIFICATIONS_INFO_ICON_FOREGROUND=n.registerColor("notificationsInfoIcon.foreground",{dark:n.editorInfoForeground,light:n.editorInfoForeground,hc:n.editorInfoForeground},i.localize(99,null)),t.WINDOW_ACTIVE_BORDER=n.registerColor("window.activeBorder",{dark:null,light:null,hc:n.contrastBorder},i.localize(100,null)),t.WINDOW_INACTIVE_BORDER=n.registerColor("window.inactiveBorder",{dark:null,light:null,hc:n.contrastBorder},i.localize(101,null))})),define(e[599],t([0,1,1106,7,69,5,81,11,27,1619,445,269,36,13,44,822]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsList=void 0;let f=class extends c.Themable{constructor(e,t,i,n,o){super(n),this.container=e,this.options=t,this.instantiationService=i,this.contextMenuService=o,this.viewModel=[]}show(e){if(this.isVisible){if(e){m.assertIsDefined(this.list).domFocus()}}else if(this.list||this.createNotificationsList(),this.isVisible=!0,e){m.assertIsDefined(this.list).domFocus()}} createNotificationsList(){this.listContainer=document.createElement("div"),this.listContainer.classList.add("notifications-list-container");const e=this._register(this.instantiationService.createInstance(u.NotificationActionRunner)),t=this.instantiationService.createInstance(h.NotificationRenderer,e),o=this.listDelegate=new h.NotificationsListDelegate(this.listContainer),r=this.list=this._register(this.instantiationService.createInstance(s.WorkbenchList,"NotificationsList",this.listContainer,o,[t],Object.assign(Object.assign({},this.options),{setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:l.NOTIFICATIONS_BACKGROUND},accessibilityProvider:{getAriaLabel:e=>e.source?i.localize(1,null,e.message.raw,e.source):i.localize(0,null,e.message.raw),getWidgetAriaLabel:()=>i.localize(2,null),getRole:()=>"dialog"}}))),a=this._register(this.instantiationService.createInstance(u.CopyNotificationMessageAction,u.CopyNotificationMessageAction.ID,u.CopyNotificationMessageAction.LABEL)) ;this._register(r.onContextMenu(t=>{t.element&&this.contextMenuService.showContextMenu({getAnchor:()=>t.anchor,getActions:()=>[a],getActionsContext:()=>t.element,actionRunner:e})})),this._register(r.onMouseDblClick(e=>e.element.toggle()));const c=this._register(n.trackFocus(r.getHTMLElement()));this._register(c.onDidBlur(()=>{document.hasFocus()&&r.setFocus([])})),g.NotificationFocusedContext.bindTo(r.contextKeyService),this._register(r.onDidChangeSelection(e=>{e.indexes.length>0&&r.setSelection([])})),this.container.appendChild(this.listContainer),this.updateStyles()}updateNotificationsList(e,t,i=[]){const[o,s]=m.assertAllDefined(this.list,this.listContainer),r=n.isAncestor(document.activeElement,s),a=o.getFocus()[0],l=this.viewModel[a];let c=null;if("number"==typeof a&&(c=o.getRelativeTop(a)),this.viewModel.splice(e,t,...i),o.splice(e,t,i),o.layout(),0===this.viewModel.length)this.hide();else if("number"==typeof a){let e=0;if(l){let t=this.viewModel.indexOf(l);-1===t&&(t=a-1), t=0&&(e=t)}"number"==typeof c&&o.reveal(e,c),o.setFocus([e])}this.isVisible&&r&&o.domFocus()}updateNotificationHeight(e){const t=this.viewModel.indexOf(e);if(-1===t)return;const[i,n]=m.assertAllDefined(this.list,this.listDelegate);i.updateElementHeight(t,n.getHeight(e)),i.layout()}hide(){this.isVisible&&this.list&&(this.isVisible=!1,this.list.splice(0,this.viewModel.length),this.viewModel=[])}focusFirst(){this.isVisible&&this.list&&(this.list.focusFirst(),this.list.domFocus())}hasFocus(){return!(!this.isVisible||!this.listContainer)&&n.isAncestor(document.activeElement,this.listContainer)}updateStyles(){if(this.listContainer){const e=this.getColor(l.NOTIFICATIONS_FOREGROUND);this.listContainer.style.color=e||"";const t=this.getColor(l.NOTIFICATIONS_BACKGROUND);this.listContainer.style.background=t||"";const i=this.getColor(d.contrastBorder);this.listContainer.style.outlineColor=i||""}}layout(e,t){this.listContainer&&this.list&&(this.listContainer.style.width=`${e}px`, "number"==typeof t&&(this.list.getHTMLElement().style.maxHeight=`${t}px`),this.list.layout())}dispose(){this.hide(),super.dispose()}};f=o([r(2,a.IInstantiationService),r(3,c.IThemeService),r(4,p.IContextMenuService)],f),t.NotificationsList=f,c.registerThemingParticipant((e,t)=>{const i=e.getColor(l.NOTIFICATIONS_LINKS);i&&t.addRule(`.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a { color: ${i}; }`);const n=e.getColor(d.focusBorder);n&&t.addRule(`\n\t\t.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus {\n\t\t\toutline-color: ${n};\n\t\t}`);const o=e.getColor(l.NOTIFICATIONS_ERROR_ICON_FOREGROUND);if(o){const e=v.Codicon.error.cssSelector;t.addRule(`\n\t\t.monaco-workbench .notifications-center ${e},\n\t\t.monaco-workbench .notifications-toasts ${e} {\n\t\t\tcolor: ${o};\n\t\t}`)}const s=e.getColor(l.NOTIFICATIONS_WARNING_ICON_FOREGROUND);if(s){const e=v.Codicon.warning.cssSelector ;t.addRule(`\n\t\t.monaco-workbench .notifications-center ${e},\n\t\t.monaco-workbench .notifications-toasts ${e} {\n\t\t\tcolor: ${s};\n\t\t}`)}const r=e.getColor(l.NOTIFICATIONS_INFO_ICON_FOREGROUND);if(r){const e=v.Codicon.info.cssSelector;t.addRule(`\n\t\t.monaco-workbench .notifications-center ${e},\n\t\t.monaco-workbench .notifications-toasts ${e} {\n\t\t\tcolor: ${r};\n\t\t}`)}})})),define(e[365],t([0,1,11,27,81,12,7,80,144,809]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FONT_FAMILY=void 0,i.registerThemingParticipant((e,t)=>{const i=e.getColor(n.foreground);i&&t.addRule(`.monaco-workbench { color: ${i}; }`);const c=o.WORKBENCH_BACKGROUND(e);t.addRule(`.monaco-workbench { background-color: ${c}; }`);const d=e.getColor(n.iconForeground);d&&t.addRule(`.codicon { color: ${d}; }`);const h=e.getColor(n.selectionBackground);h&&t.addRule(`.monaco-workbench ::selection { background-color: ${h}; }`);const u=e.getColor(n.inputPlaceholderForeground) ;u&&(t.addRule(`\n\t\t\t.monaco-workbench input::placeholder { color: ${u}; }\n\t\t\t.monaco-workbench input::-webkit-input-placeholder { color: ${u}; }\n\t\t\t.monaco-workbench input::-moz-placeholder { color: ${u}; }\n\t\t`),t.addRule(`\n\t\t\t.monaco-workbench textarea::placeholder { color: ${u}; }\n\t\t\t.monaco-workbench textarea::-webkit-input-placeholder { color: ${u}; }\n\t\t\t.monaco-workbench textarea::-moz-placeholder { color: ${u}; }\n\t\t`));const g=e.getColor(n.listHighlightForeground);g&&t.addRule(`\n\t\t\t.monaco-workbench .monaco-list .monaco-list-row .monaco-highlighted-label .highlight {\n\t\t\t\tcolor: ${g};\n\t\t\t}\n\t\t`);const p=e.getColor(n.scrollbarShadow) ;p&&t.addRule(`\n\t\t\t.monaco-workbench .monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${p} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${p} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${p} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const m=e.getColor(n.scrollbarSliderBackground);m&&t.addRule(`\n\t\t\t.monaco-workbench .monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${m};\n\t\t\t}\n\t\t`);const v=e.getColor(n.scrollbarSliderHoverBackground);v&&t.addRule(`\n\t\t\t.monaco-workbench .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${v};\n\t\t\t}\n\t\t`);const f=e.getColor(n.scrollbarSliderActiveBackground);f&&t.addRule(`\n\t\t\t.monaco-workbench .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${f};\n\t\t\t}\n\t\t`);const S=e.getColor(n.focusBorder) ;if(S&&t.addRule(`\n\t\t.monaco-workbench [tabindex="0"]:focus,\n\t\t.monaco-workbench [tabindex="-1"]:focus,\n\t\t.monaco-workbench .synthetic-focus,\n\t\t.monaco-workbench select:focus,\n\t\t.monaco-workbench .monaco-list:not(.element-focused):focus:before,\n\t\t.monaco-workbench input[type="button"]:focus,\n\t\t.monaco-workbench input[type="text"]:focus,\n\t\t.monaco-workbench button:focus,\n\t\t.monaco-workbench textarea:focus,\n\t\t.monaco-workbench input[type="search"]:focus,\n\t\t.monaco-workbench input[type="checkbox"]:focus {\n\t\t\toutline-color: ${S};\n\t\t}\n\t\t`), e.type===l.ColorScheme.HIGH_CONTRAST&&t.addRule('\n\t\t.hc-black [tabindex="0"]:focus,\n\t\t.hc-black [tabindex="-1"]:focus,\n\t\t.hc-black .synthetic-focus,\n\t\t.hc-black select:focus,\n\t\t.hc-black input[type="button"]:focus,\n\t\t.hc-black input[type="text"]:focus,\n\t\t.hc-black textarea:focus,\n\t\t.hc-black input[type="checkbox"]:focus {\n\t\t\toutline-style: solid;\n\t\t\toutline-width: 1px;\n\t\t}\n\n\t\t.hc-black .synthetic-focus input {\n\t\t\tbackground: transparent; /* Search input focus fix when in high contrast */\n\t\t}\n\t\t'),s.isWeb){const t=e.getColor(o.TITLE_BAR_ACTIVE_BACKGROUND);if(t){const e="monaco-workbench-meta-theme-color";let i=document.getElementById(e);i||((i=r.createMetaElement()).name="theme-color",i.id=e),i.content=t.toString()}}a.isSafari&&t.addRule("\n\t\t\tbody.web {\n\t\t\t\ttouch-action: none;\n\t\t\t}\n\t\t\t.monaco-workbench .monaco-editor .view-lines {\n\t\t\t\tuser-select: text;\n\t\t\t\t-webkit-user-select: text;\n\t\t\t}\n\t\t"), s.isIOS&&a.isStandalone&&t.addRule(`body { background-color: ${c}; }`)}),t.DEFAULT_FONT_FAMILY=s.isWindows?'"Segoe WPC", "Segoe UI", sans-serif':s.isMacintosh?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'})),define(e[366],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveViewletContext=t.SidebarFocusContext=t.SideBarVisibleContext=void 0,t.SideBarVisibleContext=new i.RawContextKey("sideBarVisible",!1),t.SidebarFocusContext=new i.RawContextKey("sideBarFocus",!1),t.ActiveViewletContext=new i.RawContextKey("activeViewlet","")})),define(e[38],t([0,1,6,8,1125,5,2,67,16,14,141,41]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";var u,g;Object.defineProperty(t,"__esModule",{value:!0}), t.ResolvableTreeItem=t.TreeItemCollapsibleState=t.ViewVisibilityState=t.IViewDescriptorService=t.getVisbileViewContextKey=t.FocusedViewContext=t.IViewsService=t.ViewContentGroups=t.ViewContainerLocation=t.Extensions=t.TEST_VIEW_CONTAINER_ID=void 0,t.TEST_VIEW_CONTAINER_ID="workbench.view.extension.test",function(e){e.ViewContainersRegistry="workbench.registry.view.containers",e.ViewsRegistry="workbench.registry.view"}(u=t.Extensions||(t.Extensions={})),function(e){e[e.Sidebar=0]="Sidebar",e[e.Panel=1]="Panel"}(t.ViewContainerLocation||(t.ViewContainerLocation={}));class p extends r.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new i.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new i.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.viewContainers=new Map,this.defaultViewContainers=[]}get all(){return c.flatten([...this.viewContainers.values()])}registerViewContainer(e,t,i){const n=this.get(e.id);if(n)return n ;const o=e;return a.getOrSet(this.viewContainers,t,[]).push(o),i&&this.defaultViewContainers.push(o),this._onDidRegister.fire({viewContainer:o,viewContainerLocation:t}),o}deregisterViewContainer(e){for(const t of this.viewContainers.keys()){const i=this.viewContainers.get(t),n=null==i?void 0:i.indexOf(e);if(-1!==n)return null==i||i.splice(n,1),0===i.length&&this.viewContainers.delete(t),void this._onDidDeregister.fire({viewContainer:e,viewContainerLocation:t})}}get(e){return this.all.filter(t=>t.id===e)[0]}getViewContainers(e){return[...this.viewContainers.get(e)||[]]}getViewContainerLocation(e){return[...this.viewContainers.keys()].filter(t=>this.getViewContainers(t).filter(t=>t.id===e.id).length>0)[0]}getDefaultViewContainer(e){return this.defaultViewContainers.find(t=>this.getViewContainerLocation(t)===e)}}function m(e,t){var i,n,o,s;const r=null!==(i=e.group)&&void 0!==i?i:g.More,a=null!==(n=t.group)&&void 0!==n?n:g.More ;return r!==a?r.localeCompare(a):(null!==(o=e.order)&&void 0!==o?o:5)-(null!==(s=t.order)&&void 0!==s?s:5)}l.Registry.add(u.ViewContainersRegistry,new p),function(e){e.Open="2_open",e.Debug="4_debug",e.SCM="5_scm",e.More="9_more"}(g=t.ViewContentGroups||(t.ViewContentGroups={}));class v extends r.Disposable{constructor(){super(...arguments),this._onViewsRegistered=this._register(new i.Emitter),this.onViewsRegistered=this._onViewsRegistered.event,this._onViewsDeregistered=this._register(new i.Emitter),this.onViewsDeregistered=this._onViewsDeregistered.event,this._onDidChangeContainer=this._register(new i.Emitter),this.onDidChangeContainer=this._onDidChangeContainer.event,this._onDidChangeViewWelcomeContent=this._register(new i.Emitter),this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event,this._viewContainers=[],this._views=new Map,this._viewWelcomeContents=new d.SetMap}registerViews(e,t){this.registerViews2([{views:e,viewContainer:t}])}registerViews2(e){ e.forEach(({views:e,viewContainer:t})=>this.addViews(e,t)),this._onViewsRegistered.fire(e)}deregisterViews(e,t){const i=this.removeViews(e,t);i.length&&this._onViewsDeregistered.fire({views:i,viewContainer:t})}moveViews(e,t){for(const i of this._views.keys())if(i!==t){const n=this.removeViews(e,i);n.length&&(this.addViews(n,t),this._onDidChangeContainer.fire({views:n,from:i,to:t}))}}getViews(e){return this._views.get(e)||[]}getView(e){for(const t of this._viewContainers){const i=(this._views.get(t)||[]).filter(t=>t.id===e)[0];if(i)return i}return null}getViewContainer(e){for(const t of this._viewContainers){if((this._views.get(t)||[]).filter(t=>t.id===e)[0])return t}return null}registerViewWelcomeContent(e,t){return this._viewWelcomeContents.add(e,t),this._onDidChangeViewWelcomeContent.fire(e),r.toDisposable(()=>{this._viewWelcomeContents.delete(e,t),this._onDidChangeViewWelcomeContent.fire(e)})}getViewWelcomeContent(e){const t=[];return this._viewWelcomeContents.forEach(e,e=>t.push(e)),c.mergeSort(t,m),t} addViews(e,t){let i=this._views.get(t);i||(i=[],this._views.set(t,i),this._viewContainers.push(t));for(const t of e){if(null!==this.getView(t.id))throw new Error(o.localize(0,null,t.id));i.push(t)}}removeViews(e,t){const i=this._views.get(t);if(!i)return[];const n=[],o=[];for(const t of i)e.includes(t)?n.push(t):o.push(t);return n.length&&(o.length?this._views.set(t,o):(this._views.delete(t),this._viewContainers.splice(this._viewContainers.indexOf(t),1))),n}}l.Registry.add(u.ViewsRegistry,new v),t.IViewsService=s.createDecorator("viewsService"),t.FocusedViewContext=new n.RawContextKey("focusedView",""),t.getVisbileViewContextKey=function(e){return`${e}.visible`},t.IViewDescriptorService=s.createDecorator("viewDescriptorService"),function(e){e[e.Default=0]="Default",e[e.Expand=1]="Expand"}(t.ViewVisibilityState||(t.ViewVisibilityState={})),function(e){e[e.None=0]="None",e[e.Collapsed=1]="Collapsed",e[e.Expanded=2]="Expanded"}(t.TreeItemCollapsibleState||(t.TreeItemCollapsibleState={})) ;t.ResolvableTreeItem=class{constructor(e,t){this.resolved=!1,this._hasResolve=!1,h.mixin(this,e),this._hasResolve=!!t,this.resolve=async()=>{if(t&&!this.resolved){const e=await t();e&&(this.tooltip=e.tooltip)}this.resolved=!0}}get hasResolve(){return this._hasResolve}}})),define(e[1620],t([0,1,2]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackupTracker=void 0;class n extends i.Disposable{constructor(e,t,i,n,o){super(),this.backupFileService=e,this.filesConfigurationService=t,this.workingCopyService=i,this.logService=n,this.lifecycleService=o,this.mapWorkingCopyToContentVersion=new Map,this.backupsDisabledForAutoSaveables=!1,this.pendingBackups=new Map,this.onAutoSaveConfigurationChange(t.getAutoSaveConfiguration()),this.workingCopyService.dirtyWorkingCopies.forEach(e=>this.onDidRegister(e)),this.registerListeners()}registerListeners(){this._register(this.workingCopyService.onDidRegister(e=>this.onDidRegister(e))), this._register(this.workingCopyService.onDidUnregister(e=>this.onDidUnregister(e))),this._register(this.workingCopyService.onDidChangeDirty(e=>this.onDidChangeDirty(e))),this._register(this.workingCopyService.onDidChangeContent(e=>this.onDidChangeContent(e))),this._register(this.filesConfigurationService.onAutoSaveConfigurationChange(e=>this.onAutoSaveConfigurationChange(e))),this.lifecycleService.onBeforeShutdown(e=>e.veto(this.onBeforeShutdown(e.reason)))}onDidRegister(e){e.isDirty()&&this.scheduleBackup(e)}onDidUnregister(e){this.mapWorkingCopyToContentVersion.delete(e),this.discardBackup(e)}onDidChangeDirty(e){e.isDirty()?this.scheduleBackup(e):this.discardBackup(e)}onDidChangeContent(e){const t=this.getContentVersion(e);this.mapWorkingCopyToContentVersion.set(e,t+1),e.isDirty()&&this.scheduleBackup(e)}onAutoSaveConfigurationChange(e){this.backupsDisabledForAutoSaveables="number"==typeof e.autoSaveDelay&&e.autoSaveDelay{if(this.pendingBackups.delete(e),e.isDirty()){this.logService.trace("[backup tracker] running backup",e.resource.toString());try{const t=await e.backup();await this.backupFileService.backup(e.resource,t.content,this.getContentVersion(e),t.meta)}catch(e){this.logService.error(e)}}},n.BACKUP_FROM_CONTENT_CHANGE_DELAY);this.pendingBackups.set(e,i.toDisposable(()=>{this.logService.trace("[backup tracker] clearing pending backup",e.resource.toString()),clearTimeout(t)}))}getContentVersion(e){return this.mapWorkingCopyToContentVersion.get(e)||0}discardBackup(e){this.logService.trace("[backup tracker] discarding backup",e.resource.toString()),i.dispose(this.pendingBackups.get(e)),this.pendingBackups.delete(e),this.backupFileService.discardBackup(e.resource)}} t.BackupTracker=n,n.DISABLE_BACKUP_AUTO_SAVE_THRESHOLD=1500,n.BACKUP_FROM_CONTENT_CHANGE_DELAY=1e3})),define(e[1621],t([0,1,14,2,115,18,64,155,149,305,67,46,143]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BulkTextEdits=void 0;class m{constructor(e){this._modelReference=e,this.model=this._modelReference.object.textEditorModel,this._edits=[]}dispose(){this._modelReference.dispose()}addEdit(e){this._expectedModelVersionId=e.versionId;const{textEdit:t}=e;if("number"==typeof t.eol&&(this._newEol=t.eol),!t.range&&!t.text)return;if(a.Range.isEmpty(t.range)&&!t.text)return;let i;i=t.range?a.Range.lift(t.range):this.model.getFullModelRange(),this._edits.push(s.EditOperation.replaceMove(i,t.text))}validate(){return void 0===this._expectedModelVersionId||this.model.getVersionId()===this._expectedModelVersionId?{canApply:!0}:{canApply:!1,reason:this.model.uri}}getBeforeCursorState(){return null}apply(){ this._edits.length>0&&(this._edits=i.mergeSort(this._edits,(e,t)=>a.Range.compareRangesUsingStarts(e.range,t.range)),this.model.pushEditOperations(null,this._edits,()=>null)),void 0!==this._newEol&&this.model.pushEOL(this._newEol)}}class v extends m{constructor(e,t){super(e),this._editor=t}getBeforeCursorState(){return this._editor.getSelections()}apply(){this._edits.length>0&&(this._edits=i.mergeSort(this._edits,(e,t)=>a.Range.compareRangesUsingStarts(e.range,t.range)),this._editor.executeEdits("",this._edits)),void 0!==this._newEol&&this._editor.hasModel()&&this._editor.getModel().pushEOL(this._newEol)}}let f=class{constructor(e,t,i,n,o,s,r,a,l){this._label=e,this._editor=t,this._undoRedoGroup=i,this._progress=n,this._editorWorker=s,this._modelService=r,this._textModelResolverService=a,this._undoRedoService=l,this._edits=new u.ResourceMap;for(const e of o){let t=this._edits.get(e.resource);t||(t=[],this._edits.set(e.resource,t)),t.push(e)}}_validateBeforePrepare(){ for(const e of this._edits.values())for(let t of e)if("number"==typeof t.versionId){let e=this._modelService.getModel(t.resource);if(e&&e.getVersionId()!==t.versionId)throw new Error(`${e.uri.toString()} has changed in the meantime`)}}async _createEditsTasks(){const e=[],t=[];for(let[i,n]of this._edits){const o=this._textModelResolverService.createModelReference(i).then(async t=>{var i,o;let s,r=!1;(null===(o=null===(i=this._editor)||void 0===i?void 0:i.getModel())||void 0===o?void 0:o.uri.toString())===t.object.textEditorModel.uri.toString()?(s=new v(t,this._editor),r=!0):s=new m(t);for(const e of n)if(r){const t=await this._editorWorker.computeMoreMinimalEdits(e.resource,[e.textEdit]);if(t)for(let i of t)s.addEdit(new p.ResourceTextEdit(e.resource,i,e.versionId,e.metadata));else s.addEdit(e)}else s.addEdit(e);e.push(s)});t.push(o)}return await Promise.all(t),e}_validateTasks(e){for(const t of e){const e=t.validate();if(!e.canApply)return e}return{canApply:!0}}async apply(){this._validateBeforePrepare() ;const e=await this._createEditsTasks();try{const t=this._validateTasks(e);if(!t.canApply)throw new Error(`${t.reason.toString()} has changed in the meantime`);if(1===e.length){const t=e[0],i=new h.SingleModelEditStackElement(t.model,t.getBeforeCursorState());this._undoRedoService.pushElement(i,this._undoRedoGroup),t.apply(),i.close(),this._progress.report(void 0)}else{const t=new h.MultiModelEditStackElement(this._label,e.map(e=>new h.SingleModelEditStackElement(e.model,e.getBeforeCursorState())));this._undoRedoService.pushElement(t,this._undoRedoGroup);for(const t of e)t.apply(),this._progress.report(void 0);t.close()}}finally{n.dispose(e)}}};f=o([r(5,c.IEditorWorkerService),r(6,g.IModelService),r(7,l.ITextModelService),r(8,d.IUndoRedoService)],f),t.BulkTextEdits=f})),define(e[1622],t([0,1,25,46,67,2,6,143]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConflictDetector=void 0;let d=class{constructor(e,t,i){this._conflicts=new s.ResourceMap, this._disposables=new a.DisposableStore,this._onDidConflict=new l.Emitter,this.onDidConflict=this._onDidConflict.event;const n=new s.ResourceMap;for(let t of e)if(t instanceof c.ResourceTextEdit){if(n.set(t.resource,!0),"number"==typeof t.versionId){const e=i.getModel(t.resource);e&&e.getVersionId()!==t.versionId&&(this._conflicts.set(t.resource,!0),this._onDidConflict.fire(this))}}else t instanceof c.ResourceFileEdit?t.newResource?n.set(t.newResource,!0):t.oldResource&&n.set(t.oldResource,!0):console.log("UNKNOWN EDIT TYPE");this._disposables.add(t.onDidFilesChange(e=>{for(let t of e.changes)i.getModel(t.resource)||n.has(t.resource)&&(this._conflicts.set(t.resource,!0),this._onDidConflict.fire(this))}));const o=e=>{n.has(e.uri)&&(this._conflicts.set(e.uri,!0),this._onDidConflict.fire(this))};for(let e of i.getModels())this._disposables.add(e.onDidChangeContent(()=>o(e)))}dispose(){this._disposables.dispose(),this._onDidConflict.dispose()}list(){return[...this._conflicts.keys()]}hasConflicts(){ return this._conflicts.size>0}};d=o([r(1,i.IFileService),r(2,n.IModelService)],d),t.ConflictDetector=d})),define(e[446],t([0,1,64,10,50,46,75,2,14,18,115,5,25,6,1622,67,1129,17,143]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BulkEditPreviewProvider=t.BulkFileOperations=t.BulkCategory=t.BulkFileOperation=t.BulkFileOperationType=t.BulkTextEdit=t.CheckedStates=void 0;class C{constructor(){this._states=new WeakMap,this._checkedCount=0,this._onDidChange=new m.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}get checkedCount(){return this._checkedCount}isChecked(e){var t;return null!==(t=this._states.get(e))&&void 0!==t&&t}updateChecked(e,t){const i=this._states.get(e);i!==t&&(void 0===i?t&&(this._checkedCount+=1):t?this._checkedCount+=1:this._checkedCount-=1,this._states.set(e,t),this._onDidChange.fire(e))}}t.CheckedStates=C;class y{constructor(e,t){this.parent=e,this.textEdit=t}}t.BulkTextEdit=y, function(e){e[e.TextEdit=1]="TextEdit",e[e.Create=2]="Create",e[e.Delete=4]="Delete",e[e.Rename=8]="Rename"}(t.BulkFileOperationType||(t.BulkFileOperationType={}));class w{constructor(e,t){this.uri=e,this.parent=t,this.type=0,this.textEdits=[],this.originalEdits=new Map}addEdit(e,t,i){this.type|=t,this.originalEdits.set(e,i),i instanceof _.ResourceTextEdit?this.textEdits.push(new y(this,i)):8===t&&(this.newUri=i.newResource)}needsConfirmation(){for(let[,e]of this.originalEdits)if(!this.parent.checked.isChecked(e))return!0;return!1}}t.BulkFileOperation=w;class E{constructor(e=E._defaultMetadata){this.metadata=e,this.operationByResource=new Map}static keyOf(e){return(null==e?void 0:e.label)||""}get fileOperations(){return this.operationByResource.values()}}t.BulkCategory=E,E._defaultMetadata=Object.freeze({label:S.localize(0,null),icon:{id:"codicon/symbol-file"},needsConfirmation:!1});let I=class e{constructor(e,t,i){this._bulkEdit=e,this._fileService=t,this.checked=new C,this.fileOperations=[], this.categories=[],this.conflicts=i.createInstance(v.ConflictDetector,e)}static async create(t,i){const n=t.get(g.IInstantiationService).createInstance(e,i);return await n._init()}dispose(){this.checked.dispose(),this.conflicts.dispose()}async _init(){var e,t,i,n,o,s;const r=new Map,a=new Map,l=new f.ResourceMap;for(let c=0;c{let i=b.extUri.getComparisonKey(e,!0),n=t.get(i);!n&&l.has(e)&&(e=l.get(e),i=b.extUri.getComparisonKey(e,!0),n=t.get(i)),n||(n=new w(e,this),t.set(i,n)),n.addEdit(c,u,d)};g(h,r);let p=E.keyOf(d.metadata),m=a.get(p);m||(m=new E(d.metadata),a.set(p,m)),g(h,m.operationByResource)}r.forEach(e=>this.fileOperations.push(e)),a.forEach(e=>this.categories.push(e));for(let e of this.fileOperations)if(1!==e.type){let t=!0;for(const i of e.originalEdits.values())i instanceof _.ResourceFileEdit&&(t=t&&this.checked.isChecked(i));if(!t)for(const i of e.originalEdits.values())this.checked.updateChecked(i,t)}return this.categories.sort((e,t)=>e.metadata.needsConfirmation===t.metadata.needsConfirmation?e.metadata.label.localeCompare(t.metadata.label):e.metadata.needsConfirmation?-1:1),this}getWorkspaceEdit(){const e=[] ;let t=!0;for(let i=0;ih.Range.compareRangesUsingStarts(e.range,t.range))}return[]}getUriOfEdit(e){for(let t of this.fileOperations)for(const i of t.originalEdits.values())if(i===e)return t.uri;throw new Error("invalid edit")}};I=o([r(1,p.IFileService),r(2,g.IInstantiationService)],I),t.BulkFileOperations=I;let x=class e{constructor(t,i,n,o){this._operations=t,this._modeService=i,this._modelService=n,this._textModelResolverService=o,this._disposables=new c.DisposableStore,this._modelPreviewEdits=new Map, this._disposables.add(this._textModelResolverService.registerTextModelContentProvider(e.Schema,this)),this._ready=this._init()}static asPreviewUri(t){return n.URI.from({scheme:e.Schema,path:t.path,query:t.toString()})}static fromPreviewUri(e){return n.URI.parse(e.query)}dispose(){this._disposables.dispose()}async _init(){for(let e of this._operations.fileOperations)await this._applyTextEditsToPreviewModel(e.uri);this._disposables.add(this._operations.checked.onDidChange(e=>{const t=this._operations.getUriOfEdit(e);this._applyTextEditsToPreviewModel(t)}))}async _applyTextEditsToPreviewModel(e){const t=await this._getOrCreatePreviewModel(e);let i=this._modelPreviewEdits.get(t.id);i&&t.applyEdits(i);const n=this._operations.getFileEdits(e),o=t.applyEdits(n,!0);this._modelPreviewEdits.set(t.id,o)}async _getOrCreatePreviewModel(t){const i=e.asPreviewUri(t);let n=this._modelService.getModel(i);if(!n){try{const e=await this._textModelResolverService.createModelReference(t),o=e.object.textEditorModel ;n=this._modelService.createModel(l.createTextBufferFactoryFromSnapshot(o.createSnapshot()),this._modeService.create(o.getLanguageIdentifier().language),i),e.dispose()}catch(e){n=this._modelService.createModel("",this._modeService.createByFilepathOrFirstLine(i),i)}new Promise(async()=>this._disposables.add(await this._textModelResolverService.createModelReference(n.uri)))}return n}async provideTextContent(t){return t.toString()===e.emptyPreview.toString()?this._modelService.createModel("",null,t):(await this._ready,this._modelService.getModel(t))}};x.Schema="vscode-bulkeditpreview",x.emptyPreview=n.URI.from({scheme:x.Schema,fragment:"empty"}),x=o([r(1,s.IModeService),r(2,a.IModelService),r(3,i.ITextModelService)],x),t.BulkEditPreviewProvider=x})),define(e[1623],t([0,1,64,87,173,18,7,2,75,446,25,1130,52,185,17,11,24,10,149,96,143]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.BulkEditNaviLabelProvider=t.BulkEditDelegate=t.TextEditElementRenderer=t.FileElementRenderer=t.CategoryElementRenderer=t.BulkEditIdentityProvider=t.BulkEditAccessibilityProvider=t.BulkEditSorter=t.BulkEditDataSource=t.TextEditElement=t.FileElement=t.CategoryElement=void 0;class w{constructor(e,t){this.parent=e,this.category=t}}t.CategoryElement=w;class E{constructor(e,t){this.parent=e,this.edit=t}isChecked(){let e=this.parent instanceof w?this.parent.parent:this.parent,t=!0;1===this.edit.type&&(t=!this.edit.textEdits.every(t=>!e.checked.isChecked(t.textEdit)));for(let i of this.edit.originalEdits.values())i instanceof y.ResourceFileEdit&&(t=t&&e.checked.isChecked(i));if(this.parent instanceof w&&1===this.edit.type)for(let i of e.categories)for(let n of i.fileOperations)if(n.uri.toString()===this.edit.uri.toString())for(const i of n.originalEdits.values())i instanceof y.ResourceFileEdit&&(t=t&&e.checked.isChecked(i));return t}setChecked(e){let t=this.parent instanceof w?this.parent.parent:this.parent ;for(const i of this.edit.originalEdits.values())t.checked.updateChecked(i,e);if(this.parent instanceof w&&1!==this.edit.type)for(let i of t.categories)for(let n of i.fileOperations)if(n.uri.toString()===this.edit.uri.toString())for(const i of n.originalEdits.values())t.checked.updateChecked(i,e)}isDisabled(){if(this.parent instanceof w&&1===this.edit.type){let e=this.parent.parent,t=!0;for(let i of e.categories)for(let n of i.fileOperations)if(n.uri.toString()===this.edit.uri.toString())for(const i of n.originalEdits.values())i instanceof y.ResourceFileEdit&&(t=t&&e.checked.isChecked(i));return!t}return!1}}t.FileElement=E;class I{constructor(e,t,i,n,o,s,r){this.parent=e,this.idx=t,this.edit=i,this.prefix=n,this.selecting=o,this.inserting=s,this.suffix=r}isChecked(){let e=this.parent.parent;return e instanceof w&&(e=e.parent),e.checked.isChecked(this.edit.textEdit)}setChecked(e){let t=this.parent.parent;if(t instanceof w&&(t=t.parent),t.checked.updateChecked(this.edit.textEdit,e), e)for(const i of this.parent.edit.originalEdits.values())i instanceof y.ResourceFileEdit&&t.checked.updateChecked(i,e)}isDisabled(){return this.parent.isDisabled()}}t.TextEditElement=I;let x=class{constructor(e,t){this._textModelService=e,this._undoRedoService=t,this.groupByFile=!0}hasChildren(e){return e instanceof E?e.edit.textEdits.length>0:!(e instanceof I)}async getChildren(e){if(e instanceof h.BulkFileOperations)return this.groupByFile?e.fileOperations.map(t=>new E(e,t)):e.categories.map(t=>new w(e,t));if(e instanceof w)return[...C.Iterable.map(e.category.fileOperations,t=>new E(e,t))];if(e instanceof E&&e.edit.textEdits.length>0){let t,i;try{const n=await this._textModelService.createModelReference(e.edit.uri);t=n.object.textEditorModel,i=n}catch(e){i=t=new d.TextModel("",d.TextModel.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService)}const n=e.edit.textEdits.map((i,n)=>{const o=a.Range.lift(i.textEdit.textEdit.range);let s=t.getLineTokens(o.startLineNumber),r=23 ;for(let e=s.findTokenIndexAtOffset(o.startColumn)-1;r<50&&e>=0;e--)r=o.startColumn-s.getStartOffset(e);let l=t.getLineTokens(o.endLineNumber),c=0;for(let e=l.findTokenIndexAtOffset(o.endColumn);c<50&&e0)return 8&e.edit.type&&e.edit.newUri?g.localize(1,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0}),this._labelService.getUriLabel(e.edit.newUri,{relative:!0})):2&e.edit.type?g.localize(2,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0})):4&e.edit.type?g.localize(3,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0})):g.localize(4,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0}));if(8&e.edit.type&&e.edit.newUri)return g.localize(5,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0}),this._labelService.getUriLabel(e.edit.newUri,{relative:!0}));if(2&e.edit.type)return g.localize(6,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0}));if(4&e.edit.type)return g.localize(7,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0}))}if(e instanceof I){ if(e.selecting.length>0&&e.inserting.length>0)return g.localize(8,null,e.edit.textEdit.textEdit.range.startLineNumber,e.selecting,e.inserting);if(e.selecting.length>0&&0===e.inserting.length)return g.localize(9,null,e.edit.textEdit.textEdit.range.startLineNumber,e.selecting);if(0===e.selecting.length&&e.inserting.length>0)return g.localize(10,null,e.edit.textEdit.textEdit.range.startLineNumber,e.selecting)}return null}};k=o([r(0,p.ILabelService)],k),t.BulkEditAccessibilityProvider=k;t.BulkEditIdentityProvider=class{getId(e){return e instanceof E?e.edit.uri+(e.parent instanceof w?JSON.stringify(e.parent.category.metadata):""):e instanceof I?e.parent.edit.uri.toString()+e.idx:JSON.stringify(e.category.metadata)}};class D{constructor(e){e.classList.add("category"),this.icon=document.createElement("div"),e.appendChild(this.icon),this.label=new m.IconLabel(e)}}class T{constructor(){this.templateId=T.id}renderTemplate(e){return new D(e)}renderElement(e,t,i){i.icon.style.setProperty("--background-dark",null), i.icon.style.setProperty("--background-light",null);const{metadata:o}=e.element.category;if(f.ThemeIcon.isThemeIcon(o.iconPath)){const e=f.ThemeIcon.asClassName(o.iconPath);i.icon.className=e?`theme-icon ${e}`:""}else b.URI.isUri(o.iconPath)?(i.icon.className="uri-icon",i.icon.style.setProperty("--background-dark",`url("${o.iconPath.toString(!0)}")`),i.icon.style.setProperty("--background-light",`url("${o.iconPath.toString(!0)}")`)):o.iconPath&&(i.icon.className="uri-icon",i.icon.style.setProperty("--background-dark",`url("${o.iconPath.dark.toString(!0)}")`),i.icon.style.setProperty("--background-light",`url("${o.iconPath.light.toString(!0)}")`));i.label.setLabel(o.label,o.description,{descriptionMatches:n.createMatches(e.filterData)})}disposeTemplate(e){e.label.dispose()}}t.CategoryElementRenderer=T,T.id="CategoryElementRenderer";let R=class{constructor(e,t,i){this._labelService=i,this._disposables=new c.DisposableStore,this._localDisposables=new c.DisposableStore, this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),e.appendChild(this._checkbox),this._label=t.create(e,{supportHighlights:!0}),this._details=document.createElement("span"),this._details.className="details",e.appendChild(this._details)}dispose(){this._localDisposables.dispose(),this._disposables.dispose(),this._label.dispose()}set(e,t){if(this._localDisposables.clear(),this._checkbox.checked=e.isChecked(),this._checkbox.disabled=e.isDisabled(),this._localDisposables.add(l.addDisposableListener(this._checkbox,"change",()=>{e.setChecked(this._checkbox.checked)})),8&e.edit.type&&e.edit.newUri)this._label.setResource({resource:e.edit.uri,name:g.localize(11,null,this._labelService.getUriLabel(e.edit.uri,{relative:!0}),this._labelService.getUriLabel(e.edit.newUri,{relative:!0}))},{fileDecorations:{colors:!0,badges:!1}}),this._details.innerText=g.localize(12,null);else{const i={ matches:n.createMatches(t),fileKind:u.FileKind.FILE,fileDecorations:{colors:!0,badges:!1},extraClasses:[]};2&e.edit.type?this._details.innerText=g.localize(13,null):4&e.edit.type?(this._details.innerText=g.localize(14,null),i.extraClasses.push("delete")):this._details.innerText="",this._label.setFile(e.edit.uri,i)}}};R=o([r(2,p.ILabelService)],R);let A=class e{constructor(t,i){this._resourceLabels=t,this._labelService=i,this.templateId=e.id}renderTemplate(e){return new R(e,this._resourceLabels,this._labelService)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}};A.id="FileElementRenderer",A=o([r(1,p.ILabelService)],A),t.FileElementRenderer=A;class M{constructor(e){this._disposables=new c.DisposableStore,this._localDisposables=new c.DisposableStore,e.classList.add("textedit"),this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),e.appendChild(this._checkbox), this._icon=document.createElement("div"),e.appendChild(this._icon),this._label=new s.HighlightedLabel(e,!1)}dispose(){this._localDisposables.dispose(),this._disposables.dispose()}set(e){this._localDisposables.clear(),this._localDisposables.add(l.addDisposableListener(this._checkbox,"change",t=>{e.setChecked(this._checkbox.checked),t.preventDefault()})),e.parent.isChecked(),this._checkbox.checked=e.isChecked(),this._checkbox.disabled=e.isDisabled();let t="";t+=e.prefix,t+=e.selecting,t+=e.inserting,t+=e.suffix;let i,n={start:e.prefix.length,end:e.prefix.length+e.selecting.length,extraClasses:"remove"},o={start:n.end,end:n.end+e.inserting.length,extraClasses:"insert"},{metadata:s}=e.edit.textEdit;s&&s.description?i=g.localize(15,null,s.label,s.description):s&&(i=s.label);const r=null==s?void 0:s.iconPath;if(r)if(this._icon.style.display="block",this._icon.style.setProperty("--background-dark",null),this._icon.style.setProperty("--background-light",null),f.ThemeIcon.isThemeIcon(r)){ const e=f.ThemeIcon.asClassName(r);this._icon.className=e?`theme-icon ${e}`:""}else b.URI.isUri(r)?(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",`url("${r.toString(!0)}")`),this._icon.style.setProperty("--background-light",`url("${r.toString(!0)}")`)):(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",`url("${r.dark.toString(!0)}")`),this._icon.style.setProperty("--background-light",`url("${r.light.toString(!0)}")`));else this._icon.style.display="none";this._label.set(t,[n,o],i,!0),this._icon.title=i||""}}class L{constructor(){this.templateId=L.id}renderTemplate(e){return new M(e)}renderElement({element:e},t,i){i.set(e)}disposeTemplate(e){}}t.TextEditElementRenderer=L,L.id="TextEditElementRenderer";t.BulkEditDelegate=class{getHeight(){return 23}getTemplateId(e){return e instanceof E?A.id:e instanceof I?L.id:T.id}};t.BulkEditNaviLabelProvider=class{getKeyboardNavigationLabel(e){ return e instanceof E?v.basename(e.edit.uri):e instanceof w?e.category.metadata.label:void 0}}})),define(e[447],t([0,1,31,349,10,47,14,21,32,13,46,64]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyModel=t.CallHierarchyProviderRegistry=t.CallHierarchyDirection=void 0,function(e){e.CallsTo="incomingCalls",e.CallsFrom="outgoingCalls"}(t.CallHierarchyDirection||(t.CallHierarchyDirection={})),t.CallHierarchyProviderRegistry=new n.LanguageFeatureRegistry;class u{constructor(e,t=1){this._disposable=e,this._counter=t}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class g{constructor(e,t,i,n){this.id=e,this.provider=t,this.roots=i,this.ref=n,this.root=i[0]}static async create(e,i,n){const[o]=t.CallHierarchyProviderRegistry.ordered(e);if(!o)return;const s=await o.prepareCallHierarchy(e,i,n);return s?new g(s.roots.reduce((e,t)=>e+t._sessionId,""),o,s.roots,new u(s)):void 0}dispose(){ this.ref.release()}fork(e){const t=this;return new class extends g{constructor(){super(t.id,t.provider,[e],t.ref.acquire())}}}async resolveIncomingCalls(e,t){try{const i=await this.provider.provideIncomingCalls(e,t);if(r.isNonEmptyArray(i))return i}catch(e){a.onUnexpectedExternalError(e)}return[]}async resolveOutgoingCalls(e,t){try{const i=await this.provider.provideOutgoingCalls(e,t);if(r.isNonEmptyArray(i))return i}catch(e){a.onUnexpectedExternalError(e)}return[]}}t.CallHierarchyModel=g;const p=new Map;l.CommandsRegistry.registerCommand("_executePrepareCallHierarchy",async(e,...t)=>{const[n,r]=t;c.assertType(o.URI.isUri(n)),c.assertType(s.Position.isIPosition(r));let a,l=e.get(d.IModelService).getModel(n);if(!l){const t=e.get(h.ITextModelService),i=await t.createModelReference(n);l=i.object.textEditorModel,a=i}try{const e=await g.create(l,r,i.CancellationToken.None);return e?(p.set(e.id,e),p.forEach((e,t,i)=>{i.size>10&&(e.dispose(),p.delete(t))}),[e.root]):[]}finally{null==a||a.dispose()}}), l.CommandsRegistry.registerCommand("_executeProvideIncomingCalls",async(e,...t)=>{const[n]=t;c.assertType(!0);const o=p.get(n._sessionId);if(o)return o.resolveIncomingCalls(n,i.CancellationToken.None)}),l.CommandsRegistry.registerCommand("_executeProvideOutgoingCalls",async(e,...t)=>{const[n]=t;c.assertType(!0);const o=p.get(n._sessionId);if(o)return o.resolveOutgoingCalls(n,i.CancellationToken.None)})})),define(e[1624],t([0,1,447,31,87,185,45,24,18,1133]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityProvider=t.VirtualDelegate=t.CallRenderer=t.IdentityProvider=t.Sorter=t.DataSource=t.Call=void 0;class d{constructor(e,t,i,n){this.item=e,this.locations=t,this.model=i,this.parent=n}static compare(e,t){let i=a.compare(e.item.uri.toString(),t.item.uri.toString());return 0===i&&(i=l.Range.compareRangesUsingStarts(e.item.range,t.item.range)),i}}t.Call=d;t.DataSource=class{constructor(e){this.getDirection=e}hasChildren(){return!0}async getChildren(e){ if(e instanceof i.CallHierarchyModel)return e.roots.map(t=>new d(t,void 0,e,void 0));const{model:t,item:o}=e;return"outgoingCalls"===this.getDirection()?(await t.resolveOutgoingCalls(o,n.CancellationToken.None)).map(i=>new d(i.to,i.fromRanges.map(e=>({range:e,uri:o.uri})),t,e)):(await t.resolveIncomingCalls(o,n.CancellationToken.None)).map(i=>new d(i.from,i.fromRanges.map(e=>({range:e,uri:i.from.uri})),t,e))}};t.Sorter=class{compare(e,t){return d.compare(e,t)}};t.IdentityProvider=class{constructor(e){this.getDirection=e}getId(e){let t=this.getDirection()+JSON.stringify(e.item.uri)+JSON.stringify(e.item.range);return e.parent&&(t+=this.getId(e.parent)),t}};class h{constructor(e,t){this.icon=e,this.label=t}}class u{constructor(){this.templateId=u.id}renderTemplate(e){e.classList.add("callhierarchy-element");let t=document.createElement("div");e.appendChild(t);const i=new s.IconLabel(e,{supportHighlights:!0});return new h(t,i)}renderElement(e,t,i){var n ;const{element:s,filterData:a}=e,l=null===(n=s.item.tags)||void 0===n?void 0:n.includes(1);i.icon.className=r.SymbolKinds.toCssClassName(s.item.kind,!0),i.label.setLabel(s.item.name,s.item.detail,{labelEscapeNewLines:!0,matches:o.createMatches(a),strikethrough:l})}disposeTemplate(e){e.label.dispose()}}t.CallRenderer=u,u.id="CallRenderer";t.VirtualDelegate=class{getHeight(e){return 22}getTemplateId(e){return u.id}};t.AccessibilityProvider=class{constructor(e){this.getDirection=e}getWidgetAriaLabel(){return c.localize(0,null)}getAriaLabel(e){return"outgoingCalls"===this.getDirection()?c.localize(1,null,e.item.name):c.localize(2,null,e.item.name)}}})),define(e[1625],t([0,1,14,6,2,240,215,1134,57,35,16,238]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionsContribution=t.editorConfiguration=void 0;const p=Object.freeze({"source.fixAll":{type:"boolean",description:c.localize(0,null)}}),m={oneOf:[{type:"object",properties:p,additionalProperties:{ type:"boolean"}},{type:"array",items:{type:"string"}}],default:{},description:c.localize(1,null),scope:5};t.editorConfiguration=Object.freeze(Object.assign(Object.assign({},g.editorConfigurationBaseNode),{properties:{"editor.codeActionsOnSave":m}}));let v=class extends s.Disposable{constructor(e,t){super(),this._contributedCodeActions=[],this._onDidChangeContributions=this._register(new n.Emitter),e.setHandler(e=>{this._contributedCodeActions=i.flatten(e.map(e=>e.value)),this.updateConfigurationSchema(this._contributedCodeActions),this._onDidChangeContributions.fire()}),t.registerSchemaContribution({getSchemaAdditions:()=>this.getSchemaAdditions(),onDidChange:this._onDidChangeContributions.event})}updateConfigurationSchema(e){const i=Object.assign({},p);for(const[t,n]of this.getSourceActions(e))i[t]={type:"boolean",description:c.localize(2,null,n.title)};m.properties=i,u.Registry.as(d.Extensions.Configuration).notifyConfigurationSchemaUpdated(t.editorConfiguration)}getSourceActions(e){ const t=Object.keys(p).map(e=>new l.CodeActionKind(e)),i=new Map;for(const n of e)for(const e of n.actions){const n=new l.CodeActionKind(e.kind);l.CodeActionKind.Source.contains(n)&&!t.some(e=>e.contains(n))&&i.set(n.value,e)}return i}getSchemaAdditions(){const e=(e,t)=>({if:{properties:{command:{const:e}}},then:{properties:{args:{required:["kind"],properties:{kind:{anyOf:[{enum:t.map(e=>e.kind),enumDescriptions:t.map(e=>{var t;return null!==(t=e.description)&&void 0!==t?t:e.title})},{type:"string"}]}}}}}}),t=e=>{const t=i.flatten(this._contributedCodeActions.map(e=>e.actions.slice())),n=new Map;for(const i of t)!n.has(i.kind)&&e.contains(new l.CodeActionKind(i.kind))&&n.set(i.kind,i);return Array.from(n.values())};return[e(a.codeActionCommandId,t(l.CodeActionKind.Empty)),e(a.refactorCommandId,t(l.CodeActionKind.Refactor)),e(a.sourceActionCommandId,t(l.CodeActionKind.Source))]}};v=o([r(1,h.IKeybindingService)],v),t.CodeActionsContribution=v})),define(e[1626],t([0,1,2,45,215,8]),(function(e,t,i,n,s,a){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionDocumentationContribution=void 0;let l=class extends i.Disposable{constructor(e,t){super(),this.contextKeyService=t,this.contributions=[],this.emptyCodeActionsList={actions:[],dispose:()=>{}},this._register(n.CodeActionProviderRegistry.register("*",this)),e.setHandler(e=>{this.contributions=[];for(const t of e)if(t.value.refactoring)for(const e of t.value.refactoring){const t=a.ContextKeyExpr.deserialize(e.when);t&&this.contributions.push({title:e.title,when:t,command:e.command})}})}async provideCodeActions(e,t,i,n){return this.emptyCodeActionsList}_getAdditionalMenuItems(e,t){return e.only===s.CodeActionKind.Refactor.value||t.some(e=>e.kind&&s.CodeActionKind.Refactor.contains(new s.CodeActionKind(e.kind)))?this.contributions.filter(e=>this.contextKeyService.contextMatchesRules(e.when)).map(e=>({id:e.command,title:e.title})):[]}};l=o([r(1,a.IContextKeyService)],l),t.CodeActionDocumentationContribution=l})), define(e[1627],t([0,1,1137,7,109,395,103,102,2,12,24,10,37,58,569,9,8,5,35,42,27,11,830]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const E=new S.RawContextKey("accessibilityHelpWidgetVisible",!1);let I=class e extends d.Disposable{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(x,this._editor))}static get(t){return t.getContribution(e.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};I.ID="editor.contrib.accessibilityHelpController",I=o([r(1,b.IInstantiationService)],I);let x=class e extends c.Widget{constructor(t,o,r,a,c){super(),this._contextKeyService=o,this._keybindingService=r,this._configurationService=a,this._openerService=c,this._editor=t,this._isVisibleKey=E.bindTo(this._contextKeyService),this._domNode=s.createFastDomNode(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setWidth(e.WIDTH),this._domNode.setHeight(e.HEIGHT), this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=s.createFastDomNode(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(n.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",e=>{this._isVisible&&(e.equals(2083)&&(l.alert(i.localize(0,null)),this._configurationService.updateValue("editor.accessibilitySupport","on",1),e.preventDefault(),e.stopPropagation()),e.equals(2086)&&(l.alert(i.localize(1,null)),this._openerService.open(g.URI.parse("https://go.microsoft.com/fwlink/?linkid=851010")),e.preventDefault(),e.stopPropagation()))})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){ return e.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(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?u.format(t,n.getAriaLabel()):u.format(i,e)}_buildContent(){const e=this._editor.getOptions();let t=i.localize(2,null);t+="\n\n"+i.localize(3,null);const n=this._configurationService.getValue("editor").accessibilitySupport,o=e.get(2),s=h.isMacintosh?i.localize(4,null):i.localize(5,null);switch(n){case"auto":switch(o){case 0:t+="\n\n - "+i.localize(6,null);break;case 2:t+="\n\n - "+i.localize(7,null);break;case 1:t+="\n\n - "+i.localize(8,null),t+=" "+s}break;case"on":t+="\n\n - "+i.localize(9,null);break;case"off":t+="\n\n - "+i.localize(10,null),t+=" "+s} const r=i.localize(11,null),l=i.localize(12,null),c=i.localize(13,null),d=i.localize(14,null);e.get(116)?t+="\n\n - "+this._descriptionForCommand(v.ToggleTabFocusModeAction.ID,r,l):t+="\n\n - "+this._descriptionForCommand(v.ToggleTabFocusModeAction.ID,c,d),t+="\n\n"+(h.isMacintosh?i.localize(15,null):i.localize(16,null)),t+="\n\n"+i.localize(17,null),this._contentDomNode.domNode.appendChild(a.renderFormattedText(t)),this._contentDomNode.domNode.setAttribute("aria-label",t)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,n.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){let t=this._editor.getLayoutInfo();const i=Math.min(t.width-40,e.WIDTH),n=Math.min(t.height-40,e.HEIGHT);this._domNode.setTop(Math.round((t.height-n)/2)),this._domNode.setLeft(Math.round((t.width-i)/2)),this._domNode.setWidth(i),this._domNode.setHeight(n)}} ;x.ID="editor.contrib.accessibilityHelpWidget",x.WIDTH=500,x.HEIGHT=300,x=o([r(1,S.IContextKeyService),r(2,_.IKeybindingService),r(3,f.IConfigurationService),r(4,C.IOpenerService)],x);class k extends p.EditorAction{constructor(){super({id:"editor.action.showAccessibilityHelp",label:i.localize(18,null),alias:"Show Accessibility Help",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let i=I.get(t);i&&i.show()}}p.registerEditorContribution(I.ID,I),p.registerEditorAction(k);const D=p.EditorCommand.bindToContribution(I.get);p.registerEditorCommand(new D({id:"closeAccessibilityHelp",precondition:E,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:m.EditorContextKeys.focus,primary:9,secondary:[1033]}})),w.registerThemingParticipant((e,t)=>{const i=e.getColor(y.editorWidgetBackground);i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${i}; }`);const n=e.getColor(y.editorWidgetForeground) ;i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${n}; }`);const o=e.getColor(y.widgetShadow);o&&t.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${o}; }`);const s=e.getColor(y.contrastBorder);s&&t.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${s}; }`)})})),define(e[1628],t([0,1,1139,7,102,15,313,433,8,36,27,11,219,214,59,831]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleFindReplaceWidget=void 0;const f=i.localize(0,null),S=i.localize(1,null),b=i.localize(2,null),_=i.localize(3,null),C=i.localize(4,null),y=i.localize(5,null),w=i.localize(6,null),E=i.localize(7,null),I=i.localize(8,null),x=i.localize(9,null);let k=class extends s.Widget{constructor(e,t,i,o=new l.FindReplaceState,s){super(),this._contextViewService=e,this._themeService=i,this._state=o,this._isVisible=!1,this._isReplaceVisible=!1,this.foundMatch=!1,this._domNode=document.createElement("div"), this._domNode.classList.add("simple-fr-find-part-wrapper"),this._register(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e)));let r=n.$(".find-replace-progress");this._progressBar=new m.ProgressBar(r),this._register(v.attachProgressBarStyler(this._progressBar,this._themeService)),this._domNode.appendChild(r),this._toggleReplaceBtn=this._register(new c.SimpleButton({label:y,className:"codicon toggle left",onTrigger:()=>{this._isReplaceVisible=!this._isReplaceVisible,this._state.change({isReplaceRevealed:this._isReplaceVisible},!1),this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none"}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._innerFindDomNode=document.createElement("div"),this._innerFindDomNode.classList.add("simple-fr-find-part"),this._findInput=this._register(new p.ContextScopedFindInput(null,this._contextViewService,{label:f,placeholder:S, validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e),null}catch(e){return this.foundMatch=!1,this.updateButtons(this.foundMatch),{content:e.message}}}},t,s)),this._updateHistoryDelayer=new a.Delayer(500),this.oninput(this._findInput.domNode,e=>{this.foundMatch=this.onInputChanged(),this.updateButtons(this.foundMatch),this._delayedUpdateHistory()}),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._state.onFindReplaceStateChange(()=>{this._findInput.setRegex(this._state.isRegex),this._findInput.setWholeWords(this._state.wholeWord),this._findInput.setCaseSensitive(this._state.matchCase),this.findFirst()})), this.prevBtn=this._register(new c.SimpleButton({label:b,className:c.findPreviousMatchIcon.classNames,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new c.SimpleButton({label:_,className:c.findNextMatchIcon.classNames,onTrigger:()=>{this.find(!1)}}));const d=this._register(new c.SimpleButton({label:C,className:c.findCloseIcon.classNames,onTrigger:()=>{this.hide()}}));this._innerFindDomNode.appendChild(this._findInput.domNode),this._innerFindDomNode.appendChild(this.prevBtn.domNode),this._innerFindDomNode.appendChild(this.nextBtn.domNode),this._innerFindDomNode.appendChild(d.domNode),this._domNode.appendChild(this._innerFindDomNode),this.onkeyup(this._innerFindDomNode,e=>{if(e.equals(9))return this.hide(),void e.preventDefault()}),this._focusTracker=this._register(n.trackFocus(this._innerFindDomNode)),this._register(this._focusTracker.onDidFocus(this.onFocusTrackerFocus.bind(this))),this._register(this._focusTracker.onDidBlur(this.onFocusTrackerBlur.bind(this))), this._findInputFocusTracker=this._register(n.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this.onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this.onFindInputFocusTrackerBlur.bind(this))),this._register(n.addDisposableListener(this._innerFindDomNode,"click",e=>{e.stopPropagation()})),this._innerReplaceDomNode=document.createElement("div"),this._innerReplaceDomNode.classList.add("simple-fr-replace-part"),this._replaceInput=this._register(new p.ContextScopedReplaceInput(null,void 0,{label:w,placeholder:E,history:[]},t,!1)),this._innerReplaceDomNode.appendChild(this._replaceInput.domNode),this._replaceInputFocusTracker=this._register(n.trackFocus(this._replaceInput.domNode)),this._register(this._replaceInputFocusTracker.onDidFocus(this.onReplaceInputFocusTrackerFocus.bind(this))),this._register(this._replaceInputFocusTracker.onDidBlur(this.onReplaceInputFocusTrackerBlur.bind(this))), this._domNode.appendChild(this._innerReplaceDomNode),this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none",this._replaceBtn=this._register(new c.SimpleButton({label:I,className:c.findReplaceIcon.classNames,onTrigger:()=>{this.replaceOne()}})),this._replaceAllBtn=this._register(new c.SimpleButton({label:x,className:c.findReplaceAllIcon.classNames,onTrigger:()=>{this.replaceAll()}})),this._innerReplaceDomNode.appendChild(this._replaceBtn.domNode),this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode)}get inputValue(){return this._findInput.getValue()}get replaceValue(){return this._replaceInput.getValue()}get focusTracker(){return this._focusTracker}updateTheme(e){const t={inputActiveOptionBorder:e.getColor(u.inputActiveOptionBorder),inputActiveOptionForeground:e.getColor(u.inputActiveOptionForeground),inputActiveOptionBackground:e.getColor(u.inputActiveOptionBackground),inputBackground:e.getColor(u.inputBackground), inputForeground:e.getColor(u.inputForeground),inputBorder:e.getColor(u.inputBorder),inputValidationInfoBackground:e.getColor(u.inputValidationInfoBackground),inputValidationInfoForeground:e.getColor(u.inputValidationInfoForeground),inputValidationInfoBorder:e.getColor(u.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(u.inputValidationWarningBackground),inputValidationWarningForeground:e.getColor(u.inputValidationWarningForeground),inputValidationWarningBorder:e.getColor(u.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(u.inputValidationErrorBackground),inputValidationErrorForeground:e.getColor(u.inputValidationErrorForeground),inputValidationErrorBorder:e.getColor(u.inputValidationErrorBorder)};this._findInput.style(t);const i={inputActiveOptionBorder:e.getColor(u.inputActiveOptionBorder),inputActiveOptionForeground:e.getColor(u.inputActiveOptionForeground),inputActiveOptionBackground:e.getColor(u.inputActiveOptionBackground), inputBackground:e.getColor(u.inputBackground),inputForeground:e.getColor(u.inputForeground),inputBorder:e.getColor(u.inputBorder),inputValidationInfoBackground:e.getColor(u.inputValidationInfoBackground),inputValidationInfoForeground:e.getColor(u.inputValidationInfoForeground),inputValidationInfoBorder:e.getColor(u.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(u.inputValidationWarningBackground),inputValidationWarningForeground:e.getColor(u.inputValidationWarningForeground),inputValidationWarningBorder:e.getColor(u.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(u.inputValidationErrorBackground),inputValidationErrorForeground:e.getColor(u.inputValidationErrorForeground),inputValidationErrorBorder:e.getColor(u.inputValidationErrorBorder)};this._replaceInput.style(i)}_onStateChanged(e){this._updateButtons()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible) ;let e=this._state.searchString.length>0;this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible)}dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}getDomNode(){return this._domNode}reveal(e){e&&this._findInput.setValue(e),this._isVisible?this._findInput.select():(this._isVisible=!0,this.updateButtons(this.foundMatch),setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this._findInput.select()},0))}focus(){this._findInput.focus()}show(e){e&&!this._isVisible&&this._findInput.setValue(e),this._isVisible=!0,setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this.focus()},0)} showWithReplace(e,t){e&&!this._isVisible&&this._findInput.setValue(e),t&&!this._isVisible&&this._replaceInput.setValue(t),this._isVisible=!0,this._isReplaceVisible=!0,this._state.change({isReplaceRevealed:this._isReplaceVisible},!1),this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none",setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this._updateButtons(),this._replaceInput.focus()},0)}hide(){this._isVisible&&(this._domNode.classList.remove("visible-transition"),this._domNode.setAttribute("aria-hidden","true"),setTimeout(()=>{this._isVisible=!1,this.updateButtons(this.foundMatch),this._domNode.classList.remove("visible")},200))}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}_updateHistory(){this._findInput.inputBox.addToHistory()}_getRegexValue(){return this._findInput.getRegex()}_getWholeWordValue(){ return this._findInput.getWholeWords()}_getCaseSensitiveValue(){return this._findInput.getCaseSensitive()}updateButtons(e){const t=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&t&&e),this.nextBtn.setEnabled(this._isVisible&&t&&e)}};k=o([r(0,h.IContextViewService),r(1,d.IContextKeyService),r(2,g.IThemeService)],k),t.SimpleFindReplaceWidget=k,g.registerThemingParticipant((e,t)=>{const i=e.getColor(u.editorWidgetBackground);i&&t.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { background-color: ${i} !important; }`);const n=e.getColor(u.editorWidgetForeground);n&&t.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { color: ${n}; }`);const o=e.getColor(u.widgetShadow);o&&t.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { box-shadow: 0 2px 8px ${o}; }`)})})),define(e[1629],t([0,1,1140,7,102,15,313,433,8,36,27,11,219,832]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleFindWidget=void 0 ;const m=i.localize(0,null),v=i.localize(1,null),f=i.localize(2,null),S=i.localize(3,null),b=i.localize(4,null);let _=class extends s.Widget{constructor(e,t,i=new l.FindReplaceState,o){super(),this._contextViewService=e,this._state=i,this._isVisible=!1,this.foundMatch=!1,this._findInput=this._register(new p.ContextScopedFindInput(null,this._contextViewService,{label:m,placeholder:v,validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e),null}catch(e){return this.foundMatch=!1,this.updateButtons(this.foundMatch),{content:e.message}}}},t,o)),this._updateHistoryDelayer=new a.Delayer(500),this.oninput(this._findInput.domNode,e=>{this.foundMatch=this.onInputChanged(),this.updateButtons(this.foundMatch),this._delayedUpdateHistory()}),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({ isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._state.onFindReplaceStateChange(()=>{this._findInput.setRegex(this._state.isRegex),this._findInput.setWholeWords(this._state.wholeWord),this._findInput.setCaseSensitive(this._state.matchCase),this.findFirst()})),this.prevBtn=this._register(new c.SimpleButton({label:f,className:c.findPreviousMatchIcon.classNames,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new c.SimpleButton({label:S,className:c.findNextMatchIcon.classNames,onTrigger:()=>{this.find(!1)}}));const s=this._register(new c.SimpleButton({label:b,className:c.findCloseIcon.classNames,onTrigger:()=>{this.hide()}}));this._innerDomNode=document.createElement("div"),this._innerDomNode.classList.add("simple-find-part"),this._innerDomNode.appendChild(this._findInput.domNode),this._innerDomNode.appendChild(this.prevBtn.domNode),this._innerDomNode.appendChild(this.nextBtn.domNode), this._innerDomNode.appendChild(s.domNode),this._domNode=document.createElement("div"),this._domNode.classList.add("simple-find-part-wrapper"),this._domNode.appendChild(this._innerDomNode),this.onkeyup(this._innerDomNode,e=>{if(e.equals(9))return this.hide(),void e.preventDefault()}),this._focusTracker=this._register(n.trackFocus(this._innerDomNode)),this._register(this._focusTracker.onDidFocus(this.onFocusTrackerFocus.bind(this))),this._register(this._focusTracker.onDidBlur(this.onFocusTrackerBlur.bind(this))),this._findInputFocusTracker=this._register(n.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this.onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this.onFindInputFocusTrackerBlur.bind(this))),this._register(n.addDisposableListener(this._innerDomNode,"click",e=>{e.stopPropagation()}))}get inputValue(){return this._findInput.getValue()}get focusTracker(){return this._focusTracker}updateTheme(e){const t={ inputActiveOptionBorder:e.getColor(u.inputActiveOptionBorder),inputActiveOptionForeground:e.getColor(u.inputActiveOptionForeground),inputActiveOptionBackground:e.getColor(u.inputActiveOptionBackground),inputBackground:e.getColor(u.inputBackground),inputForeground:e.getColor(u.inputForeground),inputBorder:e.getColor(u.inputBorder),inputValidationInfoBackground:e.getColor(u.inputValidationInfoBackground),inputValidationInfoForeground:e.getColor(u.inputValidationInfoForeground),inputValidationInfoBorder:e.getColor(u.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(u.inputValidationWarningBackground),inputValidationWarningForeground:e.getColor(u.inputValidationWarningForeground),inputValidationWarningBorder:e.getColor(u.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(u.inputValidationErrorBackground),inputValidationErrorForeground:e.getColor(u.inputValidationErrorForeground),inputValidationErrorBorder:e.getColor(u.inputValidationErrorBorder)};this._findInput.style(t)} dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}getDomNode(){return this._domNode}reveal(e){e&&this._findInput.setValue(e),this._isVisible?this._findInput.select():(this._isVisible=!0,this.updateButtons(this.foundMatch),setTimeout(()=>{this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false"),this._findInput.select()},0))}show(e){e&&!this._isVisible&&this._findInput.setValue(e),this._isVisible=!0,setTimeout(()=>{this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false")},0)}hide(){this._isVisible&&(this._innerDomNode.classList.remove("visible-transition"),this._innerDomNode.setAttribute("aria-hidden","true"),setTimeout(()=>{this._isVisible=!1,this.updateButtons(this.foundMatch),this._innerDomNode.classList.remove("visible")},200))}_delayedUpdateHistory(){ this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}_updateHistory(){this._findInput.inputBox.addToHistory()}_getRegexValue(){return this._findInput.getRegex()}_getWholeWordValue(){return this._findInput.getWholeWords()}_getCaseSensitiveValue(){return this._findInput.getCaseSensitive()}updateButtons(e){const t=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&t&&e),this.nextBtn.setEnabled(this._isVisible&&t&&e)}};_=o([r(0,h.IContextViewService),r(1,d.IContextKeyService)],_),t.SimpleFindWidget=_,g.registerThemingParticipant((e,t)=>{const i=e.getColor(u.editorWidgetBackground);i&&t.addRule(`.monaco-workbench .simple-find-part { background-color: ${i} !important; }`);const n=e.getColor(u.editorWidgetForeground);n&&t.addRule(`.monaco-workbench .simple-find-part { color: ${n}; }`);const o=e.getColor(u.widgetShadow);o&&t.addRule(`.monaco-workbench .simple-find-part { box-shadow: 0 2px 8px ${o}; }`)})})),define(e[1630],t([0,1,1144,48,2,37,9,28,116]),(function(e,t,i,n,s,a,l,c,d){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFileOptimizationsWarner=void 0;let h=class extends s.Disposable{constructor(e,t,o,s){super(),this._editor=e,this._notificationService=t,this._configurationService=o;s.registerStorageKey({key:"editor.contrib.largeFileOptimizationsWarner",version:1}),this._register(this._editor.onDidChangeModel(e=>{const t=this._editor.getModel();if(t&&t.isTooLargeForTokenization()){const e=i.localize(0,null,n.basename(t.uri.path));this._notificationService.prompt(c.Severity.Info,e,[{label:i.localize(1,null),run:()=>{this._configurationService.updateValue("editor.largeFileOptimizations",!1).then(()=>{this._notificationService.info(i.localize(2,null))},e=>{this._notificationService.error(e)})}}],{neverShowAgain:{id:"editor.contrib.largeFileOptimizationsWarner"}})}}))}};h.ID="editor.contrib.largeFileOptimizationsWarner",h=o([r(1,c.INotificationService),r(2,l.IConfigurationService),r(3,d.IStorageKeysSyncRegistryService)],h),t.LargeFileOptimizationsWarner=h, a.registerEditorContribution(h.ID,h)})),define(e[323],t([0,1,2,37]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuPreventer=void 0;class o extends i.Disposable{constructor(e){super(),this._editor=e,this._altListeningMouse=!1,this._altMouseTriggered=!1,this._register(this._editor.onMouseDown(e=>{this._altListeningMouse&&(this._altMouseTriggered=!0)})),this._register(this._editor.onKeyDown(e=>{e.equals(512)&&(this._altListeningMouse||(this._altMouseTriggered=!1),this._altListeningMouse=!0)})),this._register(this._editor.onKeyUp(e=>{e.equals(512)&&(this._altMouseTriggered&&e.preventDefault(),this._altListeningMouse=!1,this._altMouseTriggered=!1)}))}}t.MenuPreventer=o,o.ID="editor.contrib.menuPreventer",n.registerEditorContribution(o.ID,o)})),define(e[448],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionClipboardContributionID=void 0,t.SelectionClipboardContributionID="editor.contrib.selectionClipboard"})), define(e[1631],t([0,1,1148,30,20,9,8,16,70,72,266,47,60,139]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleColumnSelectionAction=void 0;let v=class extends n.Action{constructor(e,t,i,n){super(e,t),this._configurationService=i,this._codeEditorService=n}_getCodeEditor(){const e=this._codeEditorService.getFocusedCodeEditor();return e||this._codeEditorService.getActiveCodeEditor()}async run(){const e=this._configurationService.getValue("editor.columnSelection"),t=this._getCodeEditor();await this._configurationService.updateValue("editor.columnSelection",!e,1);const i=this._configurationService.getValue("editor.columnSelection");if(!t||t!==this._getCodeEditor()||e===i||!t.hasModel())return;const n=t._getViewModel();if(t.getOption(13)){ const e=t.getSelection(),i=new g.Position(e.selectionStartLineNumber,e.selectionStartColumn),o=n.coordinatesConverter.convertModelPositionToViewPosition(i),s=new g.Position(e.positionLineNumber,e.positionColumn),r=n.coordinatesConverter.convertModelPositionToViewPosition(s);u.CoreNavigationCommands.MoveTo.runCoreEditorCommand(n,{position:i,viewPosition:o});const a=m.CursorColumns.visibleColumnFromColumn2(n.cursorConfig,n,r);u.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(n,{position:s,viewPosition:r,doColumnSelect:!0,mouseColumn:a+1})}else{const e=n.getCursorColumnSelectData(),i=m.CursorColumns.columnFromVisibleColumn2(n.cursorConfig,n,e.fromViewLineNumber,e.fromViewVisualColumn),o=n.coordinatesConverter.convertViewPositionToModelPosition(new g.Position(e.fromViewLineNumber,i)),s=m.CursorColumns.columnFromVisibleColumn2(n.cursorConfig,n,e.toViewLineNumber,e.toViewVisualColumn),r=n.coordinatesConverter.convertViewPositionToModelPosition(new g.Position(e.toViewLineNumber,s)) ;t.setSelection(new p.Selection(o.lineNumber,o.column,r.lineNumber,r.column))}}};v.ID="editor.action.toggleColumnSelection",v.LABEL=i.localize(0,null),v=o([r(2,a.IConfigurationService),r(3,h.ICodeEditorService)],v),t.ToggleColumnSelectionAction=v,c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(s.SyncActionDescriptor.from(v),"Toggle Column Selection Mode"),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:v.ID,title:i.localize(1,null),toggled:l.ContextKeyExpr.equals("config.editor.columnSelection",!0)},order:2})})),define(e[1632],t([0,1,1149,30,20,9,8,16,70]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleMinimapAction=void 0;let h=class extends n.Action{constructor(e,t,i){super(e,t),this._configurationService=i}run(){const e=!this._configurationService.getValue("editor.minimap.enabled");return this._configurationService.updateValue("editor.minimap.enabled",e,1)}};h.ID="editor.action.toggleMinimap", h.LABEL=i.localize(0,null),h=o([r(2,a.IConfigurationService)],h),t.ToggleMinimapAction=h,c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(s.SyncActionDescriptor.from(h),"View: Toggle Minimap",d.CATEGORIES.View.value),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarViewMenu,{group:"5_editor",command:{id:h.ID,title:i.localize(1,null),toggled:l.ContextKeyExpr.equals("config.editor.minimap.enabled",!0)},order:2})})),define(e[1633],t([0,1,1150,30,12,20,9,8,16,70,56]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleMultiCursorModifierAction=void 0;let g=class e extends n.Action{constructor(e,t,i){super(e,t),this.configurationService=i}run(){const t="ctrlCmd"===this.configurationService.getValue("editor").multiCursorModifier?"alt":"ctrlCmd";return this.configurationService.updateValue(e.multiCursorModifierConfigurationKey,t,1)}};g.ID="workbench.action.toggleMultiCursorModifier",g.LABEL=i.localize(0,null), g.multiCursorModifierConfigurationKey="editor.multiCursorModifier",g=o([r(2,l.IConfigurationService)],g),t.ToggleMultiCursorModifierAction=g;const p=new c.RawContextKey("multiCursorModifier","altKey");let m=class{constructor(e,t){this.configurationService=e,this._multiCursorModifier=p.bindTo(t),this._update(),e.onDidChangeConfiguration(e=>{e.affectsConfiguration("editor.multiCursorModifier")&&this._update()})}_update(){const e="ctrlCmd"===this.configurationService.getValue("editor").multiCursorModifier?"ctrlCmd":"altKey";this._multiCursorModifier.set(e)}};m=o([r(0,l.IConfigurationService),r(1,c.IContextKeyService)],m),d.Registry.as(u.Extensions.Workbench).registerWorkbenchContribution(m,3),d.Registry.as(h.Extensions.WorkbenchActions).registerWorkbenchAction(a.SyncActionDescriptor.from(g),"Toggle Multi-Cursor Modifier"),a.MenuRegistry.appendMenuItem(a.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:g.ID,title:i.localize(1,null)},when:p.isEqualTo("ctrlCmd"),order:1}), a.MenuRegistry.appendMenuItem(a.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:g.ID,title:s.isMacintosh?i.localize(2,null):i.localize(3,null)},when:p.isEqualTo("altKey"),order:1})})),define(e[1634],t([0,1,1151,30,20,9,8,16,70]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleRenderControlCharacterAction=void 0;let h=class extends n.Action{constructor(e,t,i){super(e,t),this._configurationService=i}run(){let e=!this._configurationService.getValue("editor.renderControlCharacters");return this._configurationService.updateValue("editor.renderControlCharacters",e,1)}};h.ID="editor.action.toggleRenderControlCharacter",h.LABEL=i.localize(0,null),h=o([r(2,a.IConfigurationService)],h),t.ToggleRenderControlCharacterAction=h,c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(s.SyncActionDescriptor.from(h),"View: Toggle Control Characters",d.CATEGORIES.View.value),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarViewMenu,{group:"5_editor", command:{id:h.ID,title:i.localize(1,null),toggled:l.ContextKeyExpr.equals("config.editor.renderControlCharacters",!0)},order:5})})),define(e[1635],t([0,1,1152,30,20,9,8,16,70]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleRenderWhitespaceAction=void 0;let h=class extends n.Action{constructor(e,t,i){super(e,t),this._configurationService=i}run(){let e;return e="none"===this._configurationService.getValue("editor.renderWhitespace")?"all":"none",this._configurationService.updateValue("editor.renderWhitespace",e,1)}};h.ID="editor.action.toggleRenderWhitespace",h.LABEL=i.localize(0,null),h=o([r(2,a.IConfigurationService)],h),t.ToggleRenderWhitespaceAction=h,c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(s.SyncActionDescriptor.from(h),"View: Toggle Render Whitespace",d.CATEGORIES.View.value),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarViewMenu,{group:"5_editor",command:{id:h.ID,title:i.localize(1,null), toggled:l.ContextKeyExpr.notEquals("config.editor.renderWhitespace","none")},order:4})})),define(e[1636],t([0,1,37,72,436,9,8,5,28,26]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkbenchReferencesController=void 0;let u=class extends s.ReferencesController{constructor(e,t,i,n,o,s,r){super(!1,e,t,i,n,o,s,r)}};u=o([r(1,l.IContextKeyService),r(2,n.ICodeEditorService),r(3,d.INotificationService),r(4,c.IInstantiationService),r(5,h.IStorageService),r(6,a.IConfigurationService)],u),t.WorkbenchReferencesController=u,i.registerEditorContribution(s.ReferencesController.ID,u)})),define(e[600],t([0,1,174,2,59]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentFormActions=void 0;t.CommentFormActions=class{constructor(e,t,i){this.container=e,this.actionHandler=t,this.themeService=i,this._buttonElements=[],this._toDispose=new n.DisposableStore,this._actions=[]}setActions(e){this._toDispose.clear(), this._buttonElements.forEach(e=>e.remove());const t=e.getActions({shouldForwardArgs:!0});for(const e of t){const[,t]=e;this._actions=t,t.forEach(e=>{const t=new i.Button(this.container);this._buttonElements.push(t.element),this._toDispose.add(t),this._toDispose.add(o.attachButtonStyler(t,this.themeService)),this._toDispose.add(t.onDidClick(()=>this.actionHandler(e))),t.enabled=e.enabled,t.label=e.label})}}triggerDefaultAction(){if(this._actions.length){let e=this._actions[0];e.enabled&&this.actionHandler(e)}}dispose(){this._toDispose.dispose()}}})),define(e[601],t([0,1,1154,55,129,75,27,11]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentGlyphWidget=t.overviewRulerCommentingRangeForeground=void 0;const l=new n.Color(new n.RGBA(197,197,197,1));t.overviewRulerCommentingRangeForeground=r.registerColor("editorGutter.commentRangeForeground",{dark:l,light:l,hc:l},i.localize(0,null));t.CommentGlyphWidget=class{constructor(e,t){this.commentsDecorations=[], this._commentsOptions=this.createDecorationOptions(),this._editor=e,this.setLineNumber(t)}createDecorationOptions(){const e={isWholeLine:!0,overviewRuler:{color:a.themeColorFromId(t.overviewRulerCommentingRangeForeground),position:o.OverviewRulerLane.Center},linesDecorationsClassName:"comment-range-glyph comment-thread"};return s.ModelDecorationOptions.createDynamic(e)}setLineNumber(e){this._lineNumber=e;let t=[{range:{startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1},options:this._commentsOptions}];this.commentsDecorations=this._editor.deltaDecorations(this.commentsDecorations,t)}getPosition(){const e=this._editor.hasModel()&&this.commentsDecorations&&this.commentsDecorations.length?this._editor.getModel().getDecorationRange(this.commentsDecorations[0]):null;return{position:{lineNumber:e?e.startLineNumber:this._lineNumber,column:1},preference:[0]}}dispose(){this.commentsDecorations&&this._editor.deltaDecorations(this.commentsDecorations,[])}}})), define(e[1637],t([0,1,20,36,94]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentMenus=void 0;let a=class{constructor(e,t){this.menuService=e,this.contextMenuService=t}getCommentThreadTitleActions(e,t){return this.getMenu(i.MenuId.CommentThreadTitle,t)}getCommentThreadActions(e,t){return this.getMenu(i.MenuId.CommentThreadActions,t)}getCommentTitleActions(e,t){return this.getMenu(i.MenuId.CommentTitle,t)}getCommentActions(e,t){return this.getMenu(i.MenuId.CommentActions,t)}getMenu(e,t){const i=this.menuService.createMenu(e,t),n={primary:[],secondary:[]};return s.createAndFillInContextMenuActions(i,{shouldForwardArgs:!0},n,this.contextMenuService,e=>/^inline/.test(e)),i}dispose(){}};a=o([r(0,i.IMenuService),r(1,n.IContextMenuService)],a),t.CommentMenus=a})),define(e[270],t([0,1,5,6,2,31,1637]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentService=t.ICommentService=void 0, t.ICommentService=i.createDecorator("commentService");let c=class extends s.Disposable{constructor(e){super(),this.instantiationService=e,this._onDidSetDataProvider=this._register(new n.Emitter),this.onDidSetDataProvider=this._onDidSetDataProvider.event,this._onDidDeleteDataProvider=this._register(new n.Emitter),this.onDidDeleteDataProvider=this._onDidDeleteDataProvider.event,this._onDidSetResourceCommentInfos=this._register(new n.Emitter),this.onDidSetResourceCommentInfos=this._onDidSetResourceCommentInfos.event,this._onDidSetAllCommentThreads=this._register(new n.Emitter),this.onDidSetAllCommentThreads=this._onDidSetAllCommentThreads.event,this._onDidUpdateCommentThreads=this._register(new n.Emitter),this.onDidUpdateCommentThreads=this._onDidUpdateCommentThreads.event,this._onDidChangeActiveCommentThread=this._register(new n.Emitter),this.onDidChangeActiveCommentThread=this._onDidChangeActiveCommentThread.event,this._onDidChangeActiveCommentingRange=this._register(new n.Emitter), this.onDidChangeActiveCommentingRange=this._onDidChangeActiveCommentingRange.event,this._commentControls=new Map,this._commentMenus=new Map}setActiveCommentThread(e){this._onDidChangeActiveCommentThread.fire(e)}setDocumentComments(e,t){this._onDidSetResourceCommentInfos.fire({resource:e,commentInfos:t})}setWorkspaceComments(e,t){this._onDidSetAllCommentThreads.fire({ownerId:e,commentThreads:t})}removeWorkspaceComments(e){this._onDidSetAllCommentThreads.fire({ownerId:e,commentThreads:[]})}registerCommentController(e,t){this._commentControls.set(e,t),this._onDidSetDataProvider.fire()}unregisterCommentController(e){this._commentControls.delete(e),this._onDidDeleteDataProvider.fire(e)}getCommentController(e){return this._commentControls.get(e)}createCommentThreadTemplate(e,t,i){const n=this._commentControls.get(e);n&&n.createCommentThreadTemplate(t,i)}async updateCommentThreadTemplate(e,t,i){const n=this._commentControls.get(e);n&&await n.updateCommentThreadTemplate(t,i)}disposeCommentThread(e,t){ let i=this.getCommentController(e);i&&i.deleteCommentThreadMain(t)}getCommentMenus(e){if(this._commentMenus.get(e))return this._commentMenus.get(e);let t=this.instantiationService.createInstance(l.CommentMenus);return this._commentMenus.set(e,t),t}updateComments(e,t){const i=Object.assign({},t,{owner:e});this._onDidUpdateCommentThreads.fire(i)}async toggleReaction(e,t,i,n,o){const s=this._commentControls.get(e);if(s)return s.toggleReaction(t,i,n,o,a.CancellationToken.None);throw new Error("Not supported")}hasReactionHandler(e){const t=this._commentControls.get(e);return!!t&&!!t.features.reactionHandler}async getComments(e){let t=[];return this._commentControls.forEach(i=>{t.push(i.getDocumentComments(e,a.CancellationToken.None).catch(e=>(console.log(e),null)))}),Promise.all(t)}async getCommentingRanges(e){let t=[];return this._commentControls.forEach(i=>{t.push(i.getCommentingRanges(e,a.CancellationToken.None))}),(await Promise.all(t)).reduce((e,t)=>(e.push(...t),e),[])}} ;c=o([r(0,i.IInstantiationService)],c),t.CommentService=c})),define(e[1638],t([0,1,1161,7,30,10,100]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactionAction=t.ReactionActionViewItem=t.ToggleReactionsAction=void 0;class a extends o.Action{constructor(e,t){super(a.ID,t||i.localize(0,null),"toggle-reactions",!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return this.toggleDropdownMenu(),Promise.resolve(!0)}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}t.ToggleReactionsAction=a,a.ID="toolbar.toggle.pickReactions";class l extends r.ActionViewItem{constructor(e){super(null,e,{})}updateLabel(){if(!this.label)return;let e=this.getAction();if(e.class&&this.label.classList.add(e.class),e.icon){let t=n.append(this.label,n.$(".reaction-icon"));t.style.display="";let i=s.URI.revive(e.icon);t.style.backgroundImage=`url('${i}')`,t.title=e.label}else{n.append(this.label,n.$("span.reaction-label")).innerText=e.label}if(e.count){ n.append(this.label,n.$("span.reaction-count")).innerText=`${e.count}`}}}t.ReactionActionViewItem=l;class c extends o.Action{constructor(e,t="",i="",n=!0,o,s,r){super(c.ID,t,i,n,o),this.icon=s,this.count=r}}t.ReactionAction=c,c.ID="toolbar.toggle.reaction"})),define(e[602],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentContextKeys=void 0,function(e){e.commentThreadIsEmpty=new i.RawContextKey("commentThreadIsEmpty",!1),e.commentIsEmpty=new i.RawContextKey("commentIsEmpty",!1)}(t.CommentContextKeys||(t.CommentContextKeys={}))})),define(e[603],t([0,1,10,14,1162]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsModel=t.ResourceWithCommentThreads=t.CommentNode=void 0;class s{constructor(e,t,i,n,o){this.replies=[],this.owner=e,this.threadId=t,this.comment=n,this.resource=i,this.range=o,this.isRoot=!1}hasReply(){return this.replies&&0!==this.replies.length}}t.CommentNode=s;class r{constructor(e,t,i){this.owner=e, this.id=t.toString(),this.resource=t,this.commentThreads=i.filter(e=>e.comments&&e.comments.length).map(i=>r.createCommentNode(e,t,i))}static createCommentNode(e,t,i){const{threadId:n,comments:o,range:r}=i,a=o.map(i=>new s(e,n,t,i,r));return a.length>1&&(a[0].replies=a.slice(1,a.length)),a[0].isRoot=!0,a[0]}}t.ResourceWithCommentThreads=r;class a{constructor(){this.resourceCommentThreads=[],this.commentThreadsMap=new Map}setCommentThreads(e,t){this.commentThreadsMap.set(e,this.groupByResource(e,t)),this.resourceCommentThreads=n.flatten([...this.commentThreadsMap.values()])}updateCommentThreads(e){const{owner:t,removed:o,changed:s,added:a}=e;let l=this.commentThreadsMap.get(t)||[];return o.forEach(e=>{const t=l.findIndex(t=>t.id===e.resource),i=l[t],n=i.commentThreads.findIndex(t=>t.threadId===e.threadId);i.commentThreads.splice(n,1),0===i.commentThreads.length&&l.splice(t,1)}),s.forEach(e=>{const n=l.findIndex(t=>t.id===e.resource),o=l[n],s=o.commentThreads.findIndex(t=>t.threadId===e.threadId) ;s>=0?o.commentThreads[s]=r.createCommentNode(t,i.URI.parse(o.id),e):e.comments&&e.comments.length&&o.commentThreads.push(r.createCommentNode(t,i.URI.parse(o.id),e))}),a.forEach(e=>{const n=l.filter(t=>t.resource.toString()===e.resource);if(n.length){const i=n[0];e.comments&&e.comments.length&&i.commentThreads.push(r.createCommentNode(t,i.resource,e))}else l.push(new r(t,i.URI.parse(e.resource),[e]))}),this.commentThreadsMap.set(t,l),this.resourceCommentThreads=n.flatten([...this.commentThreadsMap.values()]),o.length>0||s.length>0||a.length>0}hasCommentThreads(){return!!this.resourceCommentThreads.length}getMessage(){return this.resourceCommentThreads.length?"":o.localize(0,null)}groupByResource(e,t){const o=[],s=new Map;for(const o of n.groupBy(t,a._compareURIs))s.set(o[0].resource,new r(e,i.URI.parse(o[0].resource),o));return s.forEach((e,t,i)=>{o.push(e)}),o}static _compareURIs(e,t){const i=e.resource.toString(),n=t.resource.toString();return in?1:0}}t.CommentsModel=a})), define(e[604],t([0,1,7,1159,256,21,2,42,603,105,35,9,8,69,11,5]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsList=t.CommentNodeRenderer=t.ResourceWithCommentsRenderer=t.CommentsModelVirualDelegate=t.CommentsAsyncDataSource=t.COMMENTS_VIEW_TITLE=t.COMMENTS_VIEW_ID=void 0,t.COMMENTS_VIEW_ID="workbench.panel.comments",t.COMMENTS_VIEW_TITLE="Comments";class S{hasChildren(e){return e instanceof d.CommentsModel||e instanceof d.ResourceWithCommentThreads||e instanceof d.CommentNode&&!!e.replies.length}getChildren(e){return e instanceof d.CommentsModel?Promise.resolve(e.resourceCommentThreads):e instanceof d.ResourceWithCommentThreads?Promise.resolve(e.commentThreads):e instanceof d.CommentNode?Promise.resolve(e.replies):Promise.resolve([])}}t.CommentsAsyncDataSource=S;class b{getHeight(e){return 22}getTemplateId(e){return e instanceof d.ResourceWithCommentThreads?b.RESOURCE_ID:e instanceof d.CommentNode?b.COMMENT_ID:""}} t.CommentsModelVirualDelegate=b,b.RESOURCE_ID="resource-with-comments",b.COMMENT_ID="comment-node";class _{constructor(e){this.labels=e,this.templateId="resource-with-comments"}renderTemplate(e){const t=Object.create(null),n=i.append(e,i.$(".resource-container"));return t.resourceLabel=this.labels.create(n),t}renderElement(e,t,i,n){i.resourceLabel.setFile(e.element.resource)}disposeTemplate(e){e.resourceLabel.dispose()}}t.ResourceWithCommentsRenderer=_;let C=class{constructor(e){this.openerService=e,this.templateId="comment-node"}renderTemplate(e){const t=Object.create(null),n=i.append(e,i.$(".comment-container"));return t.userName=i.append(n,i.$(".user")),t.commentText=i.append(n,i.$(".text")),t.disposables=[],t}renderElement(e,t,o,r){o.userName.textContent=e.element.comment.userName,o.commentText.innerText="";const c=new l.DisposableStore;o.disposables.push(c);const d=s.renderMarkdown(e.element.comment.body,{inline:!0,actionHandler:{callback:e=>{this.openerService.open(e).catch(a.onUnexpectedError)}, disposeables:c}}),h=d.getElementsByTagName("img");for(let e=0;ee.dispose())}};C=o([r(0,c.IOpenerService)],C),t.CommentNodeRenderer=C;let y=class extends m.WorkbenchAsyncDataTree{constructor(e,t,i,n,o,s,r,a,l,c){const h=new b,u=new S;super("CommentsTree",t,h,[r.createInstance(_,e),r.createInstance(C)],u,{accessibilityProvider:i.accessibilityProvider,identityProvider:{getId:e=>e instanceof d.CommentsModel?"root":e instanceof d.ResourceWithCommentThreads?`${e.owner}-${e.id}`:e instanceof d.CommentNode?`${e.owner}-${e.resource.toString()}-${e.threadId}-${e.comment.uniqueIdInThread}`+(e.isRoot?"-root":""):""},expandOnlyOnTwistieClick:e=>!(e instanceof d.CommentsModel||e instanceof d.ResourceWithCommentThreads),collapseByDefault:()=>!1,overrideStyles:i.overrideStyles},n,o,s,a,l,c)}} ;y=o([r(3,p.IContextKeyService),r(4,m.IListService),r(5,v.IThemeService),r(6,f.IInstantiationService),r(7,g.IConfigurationService),r(8,u.IKeybindingService),r(9,h.IAccessibilityService)],y),t.CommentsList=y})),define(e[271],t([0,1,14,122,29,48,17,8,5]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEditorInfoCollection=t.CustomEditorInfo=t.CustomEditorPriority=t.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=t.CONTEXT_CUSTOM_EDITORS=t.ICustomEditorService=void 0,t.ICustomEditorService=l.createDecorator("customEditorService"),t.CONTEXT_CUSTOM_EDITORS=new a.RawContextKey("customEditors",""),t.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=new a.RawContextKey("focusedCustomEditorIsEditable",!1),function(e){e.default="default",e.builtin="builtin",e.option="option"}(t.CustomEditorPriority||(t.CustomEditorPriority={}));class c{constructor(e){this.id=e.id,this.displayName=e.displayName,this.providerDisplayName=e.providerDisplayName,this.priority=e.priority, this.selector=e.selector}matches(e){return this.selector.some(t=>c.selectorMatches(t,e))}static selectorMatches(e,t){if(c.excludedSchemes.has(t.scheme))return!1;if(e.filenamePattern){const i=e.filenamePattern.indexOf(s.posix.sep)>=0?t.path:r.basename(t);if(n.match(e.filenamePattern.toLowerCase(),i.toLowerCase()))return!0}return!1}}t.CustomEditorInfo=c,c.excludedSchemes=new Set([o.Schemas.extension,o.Schemas.webviewPanel]);function d(e){switch(e){case"default":return 3;case"builtin":return 2;case"option":return 1}}t.CustomEditorInfoCollection=class{constructor(e){this.allEditors=i.distinct(e,e=>e.id)}get length(){return this.allEditors.length}get defaultEditor(){return this.allEditors.find(e=>{switch(e.priority){case"default":case"builtin":return this.allEditors.every(t=>t===e||function(e,t){return d(e.priority)d(e.priority)-d(t.priority))[0]}}})), define(e[1639],t([0,1,135]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEditorModelManager=void 0;t.CustomEditorModelManager=class{constructor(){this._references=new Map}async get(e,t){const i=this.key(e,t),n=this._references.get(i);return null==n?void 0:n.model}tryRetain(e,t){const n=this.key(e,t),o=this._references.get(n);if(o)return o.counter++,o.model.then(e=>({object:e,dispose:i.once(()=>{--o.counter<=0&&(o.model.then(e=>e.dispose()),this._references.delete(n))})}))}add(e,t,i){const n=this.key(e,t);if(this._references.get(n))throw new Error("Model already exists");return this._references.set(n,{viewType:t,model:i,counter:0}),this.tryRetain(e,t)}disposeAllModelsForView(e){for(const[t,i]of this._references)i.viewType===e&&(i.model.then(e=>e.dispose()),this._references.delete(t))}key(e,t){return`${e.toString()}@@@${t}`}}})),define(e[1640],t([0,1,27,11,55]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerColors=void 0, t.registerColors=function(){const e=i.registerColor("debugTokenExpression.name",{dark:"#c586c0",light:"#9b46b0",hc:i.foreground},"Foreground color for the token names shown in the debug views (ie. the Variables or Watch view)."),t=i.registerColor("debugTokenExpression.value",{dark:"#cccccc99",light:"#6c6c6ccc",hc:i.foreground},"Foreground color for the token values shown in the debug views (ie. the Variables or Watch view)."),s=i.registerColor("debugTokenExpression.string",{dark:"#ce9178",light:"#a31515",hc:"#f48771"},"Foreground color for strings in the debug views (ie. the Variables or Watch view)."),r=i.registerColor("debugTokenExpression.boolean",{dark:"#4e94ce",light:"#0000ff",hc:"#75bdfe"},"Foreground color for booleans in the debug views (ie. the Variables or Watch view)."),a=i.registerColor("debugTokenExpression.number",{dark:"#b5cea8",light:"#098658",hc:"#89d185"},"Foreground color for numbers in the debug views (ie. the Variables or Watch view)."),l=i.registerColor("debugTokenExpression.error",{ dark:"#f48771",light:"#e51400",hc:"#f48771"},"Foreground color for expression errors in the debug views (ie. the Variables or Watch view) and for error logs shown in the debug console."),c=i.registerColor("debugView.exceptionLabelForeground",{dark:i.foreground,light:"#FFF",hc:i.foreground},"Foreground color for a label shown in the CALL STACK view when the debugger breaks on an exception."),d=i.registerColor("debugView.exceptionLabelBackground",{dark:"#6C2022",light:"#A31515",hc:"#6C2022"},"Background color for a label shown in the CALL STACK view when the debugger breaks on an exception."),h=i.registerColor("debugView.stateLabelForeground",{dark:i.foreground,light:i.foreground,hc:i.foreground},"Foreground color for a label in the CALL STACK view showing the current session's or thread's state."),u=i.registerColor("debugView.stateLabelBackground",{dark:"#88888844",light:"#88888844",hc:"#88888844" },"Background color for a label in the CALL STACK view showing the current session's or thread's state."),g=i.registerColor("debugView.valueChangedHighlight",{dark:"#569CD6",light:"#569CD6",hc:"#569CD6"},"Color used to highlight value changes in the debug views (ie. in the Variables view)."),p=i.registerColor("debugConsole.infoForeground",{dark:i.editorInfoForeground,light:i.editorInfoForeground,hc:i.foreground},"Foreground color for info messages in debug REPL console."),m=i.registerColor("debugConsole.warningForeground",{dark:i.editorWarningForeground,light:i.editorWarningForeground,hc:"#008000"},"Foreground color for warning messages in debug REPL console."),v=i.registerColor("debugConsole.errorForeground",{dark:i.errorForeground,light:i.errorForeground,hc:i.errorForeground},"Foreground color for error messages in debug REPL console."),f=i.registerColor("debugConsole.sourceForeground",{dark:i.foreground,light:i.foreground,hc:i.foreground },"Foreground color for source filenames in debug REPL console."),S=i.registerColor("debugConsoleInputIcon.foreground",{dark:i.foreground,light:i.foreground,hc:i.foreground},"Foreground color for debug console input marker icon.");n.registerThemingParticipant((n,b)=>{const _=n.getColor(i.badgeBackground),C=n.getColor(i.badgeForeground),y=n.getColor(i.listDeemphasizedForeground),w=n.getColor(c),E=n.getColor(d),I=n.getColor(h),x=n.getColor(u),k=n.getColor(g) ;b.addRule(`\n\t\t\t/* Text colour of the call stack row's filename */\n\t\t\t.debug-pane .debug-call-stack .monaco-list-row:not(.selected) .stack-frame > .file .file-name {\n\t\t\t\tcolor: ${y}\n\t\t\t}\n\n\t\t\t/* Line & column number "badge" for selected call stack row */\n\t\t\t.debug-pane .monaco-list-row.selected .line-number {\n\t\t\t\tbackground-color: ${_};\n\t\t\t\tcolor: ${C};\n\t\t\t}\n\n\t\t\t/* Line & column number "badge" for unselected call stack row (basically all other rows) */\n\t\t\t.debug-pane .line-number {\n\t\t\t\tbackground-color: ${_.transparent(.6)};\n\t\t\t\tcolor: ${C.transparent(.6)};\n\t\t\t}\n\n\t\t\t/* State "badge" displaying the active session's current state.\n\t\t\t* Only visible when there are more active debug sessions/threads running.\n\t\t\t*/\n\t\t\t.debug-pane .debug-call-stack .thread > .state.label,\n\t\t\t.debug-pane .debug-call-stack .session > .state.label,\n\t\t\t.debug-pane .monaco-list-row.selected .thread > .state.label,\n\t\t\t.debug-pane .monaco-list-row.selected .session > .state.label {\n\t\t\t\tbackground-color: ${x};\n\t\t\t\tcolor: ${I};\n\t\t\t}\n\n\t\t\t/* Info "badge" shown when the debugger pauses due to a thrown exception. */\n\t\t\t.debug-pane .debug-call-stack-title > .pause-message > .label.exception {\n\t\t\t\tbackground-color: ${E};\n\t\t\t\tcolor: ${w};\n\t\t\t}\n\n\t\t\t/* Animation of changed values in Debug viewlet */\n\t\t\t@keyframes debugViewletValueChanged {\n\t\t\t\t0% { background-color: ${k.transparent(0)} }\n\t\t\t\t5% { background-color: ${k.transparent(.9)} }\n\t\t\t\t100% { background-color: ${k.transparent(.3)} }\n\t\t\t}\n\n\t\t\t.debug-pane .monaco-list-row .expression .value.changed {\n\t\t\t\tbackground-color: ${k.transparent(.3)};\n\t\t\t\tanimation-name: debugViewletValueChanged;\n\t\t\t\tanimation-duration: 1s;\n\t\t\t\tanimation-fill-mode: forwards;\n\t\t\t}\n\t\t`) ;const D=n.getColor(i.contrastBorder);D&&b.addRule(`\n\t\t\t.debug-pane .line-number {\n\t\t\t\tborder: 1px solid ${D};\n\t\t\t}\n\t\t\t`);const T=n.getColor(e),R=n.getColor(t),A=n.getColor(s),M=n.getColor(r),L=n.getColor(l),O=n.getColor(a) ;b.addRule(`\n\t\t\t.monaco-workbench .monaco-list-row .expression .name {\n\t\t\t\tcolor: ${T};\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-list-row .expression .value,\n\t\t\t.monaco-workbench .debug-hover-widget .value {\n\t\t\t\tcolor: ${R};\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-list-row .expression .value.string,\n\t\t\t.monaco-workbench .debug-hover-widget .value.string {\n\t\t\t\tcolor: ${A};\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-list-row .expression .value.boolean,\n\t\t\t.monaco-workbench .debug-hover-widget .value.boolean {\n\t\t\t\tcolor: ${M};\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-list-row .expression .error,\n\t\t\t.monaco-workbench .debug-hover-widget .error,\n\t\t\t.monaco-workbench .debug-pane .debug-variables .scope .error {\n\t\t\t\tcolor: ${L};\n\t\t\t}\n\n\t\t\t.monaco-workbench .monaco-list-row .expression .value.number,\n\t\t\t.monaco-workbench .debug-hover-widget .value.number {\n\t\t\t\tcolor: ${O};\n\t\t\t}\n\t\t`) ;const N=n.getColor(i.inputBorder)||o.Color.fromHex("#80808060"),P=n.getColor(p),F=n.getColor(m),B=n.getColor(v),V=n.getColor(f),W=n.getColor(S);b.addRule(`\n\t\t\t.repl .repl-input-wrapper {\n\t\t\t\tborder-top: 1px solid ${N};\n\t\t\t}\n\n\t\t\t.monaco-workbench .repl .repl-tree .output .expression .value.info {\n\t\t\t\tcolor: ${P};\n\t\t\t}\n\n\t\t\t.monaco-workbench .repl .repl-tree .output .expression .value.warn {\n\t\t\t\tcolor: ${F};\n\t\t\t}\n\n\t\t\t.monaco-workbench .repl .repl-tree .output .expression .value.error {\n\t\t\t\tcolor: ${B};\n\t\t\t}\n\n\t\t\t.monaco-workbench .repl .repl-tree .output .expression .source {\n\t\t\t\tcolor: ${V};\n\t\t\t}\n\n\t\t\t.monaco-workbench .repl .repl-tree .monaco-tl-contents .arrow {\n\t\t\t\tcolor: ${W};\n\t\t\t}\n\t\t`), n.defines(S)||b.addRule("\n\t\t\t\t.monaco-workbench.vs .repl .repl-tree .monaco-tl-contents .arrow {\n\t\t\t\t\topacity: 0.25;\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench.vs-dark .repl .repl-tree .monaco-tl-contents .arrow {\n\t\t\t\t\topacity: 0.4;\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench.hc-black .repl .repl-tree .monaco-tl-contents .arrow {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t")})}})),define(e[1641],t([0,1,6,15,1197]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractDebugAdapter=void 0;t.AbstractDebugAdapter=class{constructor(){this.pendingRequests=new Map,this.queue=[],this._onError=new i.Emitter,this._onExit=new i.Emitter,this.sequence=1}get onError(){return this._onError.event}get onExit(){return this._onExit.event}onMessage(e){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Message' callback")),this.messageCallback=e}onEvent(e){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Event' callback")), this.eventCallback=e}onRequest(e){this.requestCallback&&this._onError.fire(new Error("attempt to set more than one 'Request' callback")),this.requestCallback=e}sendResponse(e){e.seq>0?this._onError.fire(new Error(`attempt to send more than one response for command ${e.command}`)):this.internalSend("response",e)}sendRequest(e,t,i,n){const s={command:e};if(t&&Object.keys(t).length>0&&(s.arguments=t),this.internalSend("request",s),"number"==typeof n){const t=setTimeout(()=>{clearTimeout(t);const i=this.pendingRequests.get(s.seq);if(i){this.pendingRequests.delete(s.seq),i({type:"response",seq:0,request_seq:s.seq,success:!1,command:e,message:o.localize(0,null,n,e)})}},n)}return i&&this.pendingRequests.set(s.seq,i),s.seq}acceptMessage(e){this.messageCallback?this.messageCallback(e):(this.queue.push(e),1===this.queue.length&&this.processQueue())}needsTaskBoundaryBetween(e,t){return"event"!==e.type||"event"!==t.type}async processQueue(){let e;for(;this.queue.length;){ if(e&&!this.needsTaskBoundaryBetween(this.queue[0],e)||await n.timeout(0),!(e=this.queue.shift()))return;switch(e.type){case"event":this.eventCallback&&this.eventCallback(e);break;case"request":this.requestCallback&&this.requestCallback(e);break;case"response":const t=e,i=this.pendingRequests.get(t.request_seq);i&&(this.pendingRequests.delete(t.request_seq),i(t))}}}internalSend(e,t){t.type=e,t.seq=this.sequence++,this.sendMessage(t)}async cancelPendingRequests(){if(0===this.pendingRequests.size)return Promise.resolve();const e=new Map;this.pendingRequests.forEach((t,i)=>e.set(i,t)),await n.timeout(500),e.forEach((e,t)=>{e({type:"response",seq:0,request_seq:t,success:!1,command:"canceled",message:"canceled"}),this.pendingRequests.delete(t)})}getPendingRequestIds(){return Array.from(this.pendingRequests.keys())}dispose(){this.queue=[]}}})),define(e[83],t([0,1,1198,5,8]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.IDebugHelperService=t.DEBUG_HELPER_SERVICE_ID=t.BreakpointWidgetContext=t.IDebugService=t.getStateLabel=t.State=t.INTERNAL_CONSOLE_OPTIONS_SCHEMA=t.DEBUG_SCHEME=t.BREAKPOINT_EDITOR_CONTRIBUTION_ID=t.EDITOR_CONTRIBUTION_ID=t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=t.CONTEXT_SET_VARIABLE_SUPPORTED=t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=t.CONTEXT_DEBUGGERS_AVAILABLE=t.CONTEXT_BREAKPOINTS_EXIST=t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=t.CONTEXT_RESTART_FRAME_SUPPORTED=t.CONTEXT_STEP_BACK_SUPPORTED=t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=t.CONTEXT_CALLSTACK_ITEM_TYPE=t.CONTEXT_BREAKPOINT_SELECTED=t.CONTEXT_EXPRESSION_SELECTED=t.CONTEXT_VARIABLES_FOCUSED=t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=t.CONTEXT_BREAKPOINTS_FOCUSED=t.CONTEXT_IN_BREAKPOINT_WIDGET=t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=t.CONTEXT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_MODE=t.CONTEXT_DEBUG_UX=t.CONTEXT_DEBUG_UX_KEY=t.CONTEXT_DEBUG_STATE=t.CONTEXT_DEBUG_CONFIGURATION_TYPE=t.CONTEXT_DEBUG_TYPE=t.DEBUG_SERVICE_ID=t.REPL_VIEW_ID=t.DEBUG_PANEL_ID=t.BREAKPOINTS_VIEW_ID=t.LOADED_SCRIPTS_VIEW_ID=t.CALLSTACK_VIEW_ID=t.WATCH_VIEW_ID=t.VARIABLES_VIEW_ID=t.VIEWLET_ID=void 0, t.VIEWLET_ID="workbench.view.debug",t.VARIABLES_VIEW_ID="workbench.debug.variablesView",t.WATCH_VIEW_ID="workbench.debug.watchExpressionsView",t.CALLSTACK_VIEW_ID="workbench.debug.callStackView",t.LOADED_SCRIPTS_VIEW_ID="workbench.debug.loadedScriptsView",t.BREAKPOINTS_VIEW_ID="workbench.debug.breakPointsView",t.DEBUG_PANEL_ID="workbench.panel.repl",t.REPL_VIEW_ID="workbench.panel.repl.view",t.DEBUG_SERVICE_ID="debugService",t.CONTEXT_DEBUG_TYPE=new o.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_CONFIGURATION_TYPE=new o.RawContextKey("debugConfigurationType",void 0),t.CONTEXT_DEBUG_STATE=new o.RawContextKey("debugState","inactive"),t.CONTEXT_DEBUG_UX_KEY="debugUx",t.CONTEXT_DEBUG_UX=new o.RawContextKey(t.CONTEXT_DEBUG_UX_KEY,"default"),t.CONTEXT_IN_DEBUG_MODE=new o.RawContextKey("inDebugMode",!1),t.CONTEXT_IN_DEBUG_REPL=new o.RawContextKey("inDebugRepl",!1),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new o.RawContextKey("breakpointWidgetVisible",!1), t.CONTEXT_IN_BREAKPOINT_WIDGET=new o.RawContextKey("inBreakpointWidget",!1),t.CONTEXT_BREAKPOINTS_FOCUSED=new o.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new o.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_VARIABLES_FOCUSED=new o.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new o.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_SELECTED=new o.RawContextKey("breakpointSelected",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new o.RawContextKey("callStackItemType",void 0),t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new o.RawContextKey("loadedScriptsSupported",!1),t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new o.RawContextKey("loadedScriptsItemType",void 0),t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new o.RawContextKey("focusedSessionIsAttach",!1),t.CONTEXT_STEP_BACK_SUPPORTED=new o.RawContextKey("stepBackSupported",!1),t.CONTEXT_RESTART_FRAME_SUPPORTED=new o.RawContextKey("restartFrameSupported",!1), t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new o.RawContextKey("jumpToCursorSupported",!1),t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new o.RawContextKey("stepIntoTargetsSupported",!1),t.CONTEXT_BREAKPOINTS_EXIST=new o.RawContextKey("breakpointsExist",!1),t.CONTEXT_DEBUGGERS_AVAILABLE=new o.RawContextKey("debuggersAvailable",!1),t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new o.RawContextKey("debugProtocolVariableMenuContext",void 0),t.CONTEXT_SET_VARIABLE_SUPPORTED=new o.RawContextKey("debugSetVariableSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new o.RawContextKey("breakWhenValueChangesSupported",!1),t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new o.RawContextKey("variableEvaluateNamePresent",!1),t.EDITOR_CONTRIBUTION_ID="editor.contrib.debug",t.BREAKPOINT_EDITOR_CONTRIBUTION_ID="editor.contrib.breakpoint",t.DEBUG_SCHEME="debug",t.INTERNAL_CONSOLE_OPTIONS_SCHEMA={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:i.localize(0,null)},function(e){ e[e.Inactive=0]="Inactive",e[e.Initializing=1]="Initializing",e[e.Stopped=2]="Stopped",e[e.Running=3]="Running"}(t.State||(t.State={})),t.getStateLabel=function(e){switch(e){case 1:return"initializing";case 2:return"stopped";case 3:return"running";default:return"inactive"}},t.IDebugService=n.createDecorator(t.DEBUG_SERVICE_ID),function(e){e[e.CONDITION=0]="CONDITION",e[e.HIT_COUNT=1]="HIT_COUNT",e[e.LOG_MESSAGE=2]="LOG_MESSAGE"}(t.BreakpointWidgetContext||(t.BreakpointWidgetContext={})),t.DEBUG_HELPER_SERVICE_ID="debugHelperService",t.IDebugHelperService=n.createDecorator(t.DEBUG_HELPER_SERVICE_ID)})),define(e[605],t([0,1,18,83,11,27,1169,6,2]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallStackEditorContribution=t.createDecorationsForStackFrame=void 0;const h={glyphMarginClassName:"codicon-debug-stackframe",stickiness:1},u={glyphMarginClassName:"codicon-debug-stackframe-focused",stickiness:1},g={isWholeLine:!0,className:"debug-top-stack-frame-line", stickiness:1},p={beforeContentClassName:"debug-top-stack-frame-column"},m={isWholeLine:!0,className:"debug-focused-stack-frame-line",stickiness:1};function v(e,t,n){const o=[],s=new i.Range(e.range.startLineNumber,e.range.startColumn,e.range.startLineNumber,1073741824),r=new i.Range(e.range.startLineNumber,e.range.startColumn,e.range.startLineNumber,e.range.startColumn+1),a=e.thread.getTopStackFrame();return e.getId()===(null==a?void 0:a.getId())?(n&&o.push({options:h,range:r}),o.push({options:g,range:s}),t&&t.startLineNumber===e.range.startLineNumber&&t.startColumn!==e.range.startColumn&&o.push({options:p,range:s}),t=s):(n&&o.push({options:u,range:r}),o.push({options:m,range:s})),o}t.createDecorationsForStackFrame=v;let f=class{constructor(e,t){this.editor=e,this.debugService=t,this.toDispose=[],this.decorationIds=[];const i=()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,this.createCallStackDecorations()) ;this.toDispose.push(c.Event.any(this.debugService.getViewModel().onDidFocusStackFrame,this.debugService.getModel().onDidChangeCallStack)(()=>{i()})),this.toDispose.push(this.editor.onDidChangeModel(e=>{e.newModelUrl&&i()}))}createCallStackDecorations(){const e=this.debugService.getViewModel().focusedStackFrame,t=[];return this.debugService.getModel().getSessions().forEach(i=>{const n=i===(null==e?void 0:e.thread.session);i.getAllThreads().forEach(i=>{var o;if(i.stopped){let s=i===(null==e?void 0:e.thread)?e:void 0;if(!s){const e=i.getCallStack();e.length&&(s=e[0])}s&&s.source.uri.toString()===(null===(o=this.editor.getModel())||void 0===o?void 0:o.uri.toString())&&t.push(...v(s,this.topStackFrameRange,n))}})}),t}dispose(){this.editor.deltaDecorations(this.decorationIds,[]),this.toDispose=d.dispose(this.toDispose)}};f=o([r(1,n.IDebugService)],f),t.CallStackEditorContribution=f,s.registerThemingParticipant((e,t)=>{const i=e.getColor(S) ;i&&(t.addRule(`.monaco-editor .view-overlays .debug-top-stack-frame-line { background: ${i}; }`),t.addRule(`.monaco-editor .view-overlays .debug-top-stack-frame-line { background: ${i}; }`));const n=e.getColor(b);n&&t.addRule(`.monaco-editor .view-overlays .debug-focused-stack-frame-line { background: ${n}; }`)});const S=a.registerColor("editor.stackFrameHighlightBackground",{dark:"#ffff0033",light:"#ffff6673",hc:"#ffff0033"},l.localize(0,null)),b=a.registerColor("editor.focusedStackFrameHighlightBackground",{dark:"#7abd7a4d",light:"#cee7ce73",hc:"#7abd7a4d"},l.localize(1,null))})),define(e[1642],t([0,1,6,83,68,2,38]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProgressContribution=void 0;let c=class{constructor(e,t,o){let s;this.toDispose=[];const r=r=>{s&&(s.dispose(),s=void 0),r&&(s=r.onDidProgressStart(async s=>{const a=new Promise(e=>{const t=i.Event.any(i.Event.filter(r.onDidProgressEnd,e=>e.body.progressId===s.body.progressId),r.onDidEndAdapter)(()=>{ t.dispose(),e()})});o.isViewContainerVisible(n.VIEWLET_ID)&&t.withProgress({location:n.VIEWLET_ID},()=>a);const l=e.getConfigurationManager().getDebuggerLabel(r.configuration.type);t.withProgress({location:15,title:s.body.title,cancellable:s.body.cancellable,silent:!0,source:l,delay:500},e=>{let t=0;const i=i=>{let n=void 0;"number"==typeof i.percentage&&(n=i.percentage-t,t+=n),e.report({message:i.message,increment:n,total:"number"==typeof n?100:void 0})};s.body.message&&i(s.body);const n=r.onDidProgressUpdate(e=>{e.body.progressId===s.body.progressId&&i(e.body)});return a.then(()=>n.dispose())},()=>r.cancel(s.body.progressId))}))};this.toDispose.push(e.getViewModel().onDidFocusSession(r)),r(e.getViewModel().focusedSession),this.toDispose.push(e.onWillNewSession(e=>{s||r(e)}))}dispose(){a.dispose(this.toDispose)}};c=o([r(0,n.IDebugService),r(1,s.IProgressService),r(2,l.IViewsService)],c),t.DebugProgressContribution=c})),define(e[1643],t([0,1,6]),(function(e,t,i){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCompoundRoot=void 0;t.DebugCompoundRoot=class{constructor(){this.stopped=!1,this.stopEmitter=new i.Emitter,this.onDidSessionStop=this.stopEmitter.event}sessionStopped(){this.stopped||(this.stopped=!0,this.stopEmitter.fire())}}})),define(e[1644],t([0,1,23]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugTelemetry=void 0;let n=class{constructor(e,t){this.model=e,this.telemetryService=t}logDebugSessionStart(e,t){const i=e.getMainExtensionDescriptor();return this.telemetryService.publicLog("debugSessionStart",{type:e.type,breakpointCount:this.model.getBreakpoints().length,exceptionBreakpoints:this.model.getExceptionBreakpoints(),watchExpressionsCount:this.model.getWatchExpressions().length,extensionName:i.identifier.value,isBuiltin:i.isBuiltin,launchJsonExists:t})}logDebugSessionStop(e,t){const i=this.model.getBreakpoints();return this.telemetryService.publicLog("debugSessionStop",{type:e&&e.configuration.type, success:t.emittedStopped||0===i.length,sessionLengthInSeconds:t.sessionLengthInSeconds,breakpointCount:i.length,watchExpressionsCount:this.model.getWatchExpressions().length})}};n=o([r(1,i.ITelemetryService)],n),t.DebugTelemetry=n})),define(e[189],t([0,1,24,10,48,41,29]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVisibleAndSorted=t.convertToVSCPaths=t.convertToDAPaths=t.isUri=t.getExactExpressionStartAndEnd=t.isDebuggerMainContribution=t.getExtensionHostDebugSession=t.isSessionAttach=t.filterExceptionsFromTelemetry=t.formatPII=void 0;const a=/{([^}]+)}/g;function l(e){let t=e.configuration.type;if(t)return"vslsShare"===t&&(t=e.configuration.adapterProxy.configuration.type),i.equalsIgnoreCase(t,"extensionhost")||i.equalsIgnoreCase(t,"pwa-extensionhost")?e:e.parentSession?l(e.parentSession):void 0}t.formatPII=function(e,t,i){return e.replace(a,(function(e,n){return t&&n.length>0&&"_"!==n[0]?e:i&&i.hasOwnProperty(n)?i[n]:e}))}, t.filterExceptionsFromTelemetry=function(e){const t={};for(const i of Object.keys(e))i.startsWith("!")||(t[i]=e[i]);return t},t.isSessionAttach=function(e){return"attach"===e.configuration.request&&!l(e)},t.getExtensionHostDebugSession=l,t.isDebuggerMainContribution=function(e){return e.type&&(e.label||e.program||e.runtime)},t.getExactExpressionStartAndEnd=function(e,t,i){let n=void 0,o=0,s=/([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g,r=null;for(;r=s.exec(e);){let e=r.index+1,s=e+r[0].length;if(e<=t&&s>=i){n=r[0],o=e;break}}if(n){let e=/\w+/g,t=null;for(;t=e.exec(n);){if(t.index+1+o+t[0].length>=i)break}t&&(n=n.substring(0,e.lastIndex))}return n?{start:o,end:o+n.length-1}:{start:0,end:0}};const c=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;function d(e){return!(!e||!e.match(c))}function h(e){if("string"==typeof e.path)if("number"==typeof e.sourceReference&&e.sourceReference>0);else{if(d(e.path))return n.URI.parse(e.path);if(o.isAbsolute(e.path))return n.URI.file(e.path)}return e.path}function u(e){if("object"==typeof e.path){ const t=n.URI.revive(e.path);if(t)return t.scheme===r.Schemas.file?t.fsPath:t.toString()}return e.path}function g(e,t){switch(e.type){case"event":const i=e;switch(i.event){case"output":case"loadedSource":t(!1,i.body.source);break;case"breakpoint":t(!1,i.body.breakpoint.source)}break;case"request":const n=e;switch(n.command){case"setBreakpoints":case"breakpointLocations":case"source":case"gotoTargets":t(!0,n.arguments.source);break;case"launchVSCode":n.arguments.args.forEach(e=>t(!1,e))}break;case"response":const o=e;if(o.success&&o.body)switch(o.command){case"stackTrace":o.body.stackFrames.forEach(e=>t(!1,e.source));break;case"loadedSources":o.body.sources.forEach(e=>t(!1,e));break;case"scopes":o.body.scopes.forEach(e=>t(!1,e.source));break;case"setFunctionBreakpoints":case"setBreakpoints":o.body.breakpoints.forEach(e=>t(!1,e.source))}}}function p(e,t){return"number"!=typeof e?"number"!=typeof t?0:1:"number"!=typeof t?-1:e-t}t.isUri=d,t.convertToDAPaths=function(e,t){const i=t?h:u,n=s.deepClone(e) ;return g(n,(e,t)=>{e&&t&&(t.path=i(t))}),n},t.convertToVSCPaths=function(e,t){const i=t?h:u,n=s.deepClone(e);return g(n,(e,t)=>{!e&&t&&(t.path=i(t))}),n},t.getVisibleAndSorted=function(e){return e.filter(e=>{var t;return!(null===(t=e.presentation)||void 0===t?void 0:t.hidden)}).sort((e,t)=>e.presentation?t.presentation?e.presentation.group?t.presentation.group?e.presentation.group!==t.presentation.group?e.presentation.group.localeCompare(t.presentation.group):p(e.presentation.order,t.presentation.order):-1:t.presentation.group?1:p(e.presentation.order,t.presentation.order):-1:t.presentation?1:0)}})),define(e[1645],t([0,1,1189,6,41,30,21,189,211,10,182,2]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawDebugSession=void 0;t.RawDebugSession=class{constructor(e,t,i,o,s,r,a){this.telemetryService=i,this.customTelemetryService=o,this.extensionHostDebugService=s,this.openerService=r,this.notificationService=a,this.allThreadsContinued=!0, this._readyForBreakpoints=!1,this.debugAdapterStopped=!1,this.inShutdown=!1,this.terminated=!1,this.firedAdapterExitEvent=!1,this.startTime=0,this.didReceiveStoppedEvent=!1,this._onDidInitialize=new n.Emitter,this._onDidStop=new n.Emitter,this._onDidContinued=new n.Emitter,this._onDidTerminateDebugee=new n.Emitter,this._onDidExitDebugee=new n.Emitter,this._onDidThread=new n.Emitter,this._onDidOutput=new n.Emitter,this._onDidBreakpoint=new n.Emitter,this._onDidLoadedSource=new n.Emitter,this._onDidProgressStart=new n.Emitter,this._onDidProgressUpdate=new n.Emitter,this._onDidProgressEnd=new n.Emitter,this._onDidInvalidated=new n.Emitter,this._onDidCustomEvent=new n.Emitter,this._onDidEvent=new n.Emitter,this._onDidExitAdapter=new n.Emitter,this.toDispose=[],this.debugAdapter=e,this._capabilities=Object.create(null),this.toDispose.push(this.debugAdapter.onError(e=>{this.shutdown(e)})),this.toDispose.push(this.debugAdapter.onExit(e=>{0!==e?this.shutdown(new Error(`exit code: ${e}`)):this.shutdown()})), this.debugAdapter.onEvent(e=>{switch(e.event){case"initialized":this._readyForBreakpoints=!0,this._onDidInitialize.fire(e);break;case"loadedSource":this._onDidLoadedSource.fire(e);break;case"capabilities":if(e.body){const t=e.body.capabilities;this.mergeCapabilities(t)}break;case"stopped":this.didReceiveStoppedEvent=!0,this._onDidStop.fire(e);break;case"continued":this.allThreadsContinued=!1!==e.body.allThreadsContinued,this._onDidContinued.fire(e);break;case"thread":this._onDidThread.fire(e);break;case"output":this._onDidOutput.fire(e);break;case"breakpoint":this._onDidBreakpoint.fire(e);break;case"terminated":this._onDidTerminateDebugee.fire(e);break;case"exit":this._onDidExitDebugee.fire(e);break;case"progressStart":this._onDidProgressStart.fire(e);break;case"progressUpdate":this._onDidProgressUpdate.fire(e);break;case"progressEnd":this._onDidProgressEnd.fire(e);break;case"invalidated":this._onDidInvalidated.fire(e);break;default:this._onDidCustomEvent.fire(e)}this._onDidEvent.fire(e)}), this.debugAdapter.onRequest(e=>this.dispatchRequest(e,t))}get onDidExitAdapter(){return this._onDidExitAdapter.event}get capabilities(){return this._capabilities}get readyForBreakpoints(){return this._readyForBreakpoints}get onDidInitialize(){return this._onDidInitialize.event}get onDidStop(){return this._onDidStop.event}get onDidContinued(){return this._onDidContinued.event}get onDidTerminateDebugee(){return this._onDidTerminateDebugee.event}get onDidExitDebugee(){return this._onDidExitDebugee.event}get onDidThread(){return this._onDidThread.event}get onDidOutput(){return this._onDidOutput.event}get onDidBreakpoint(){return this._onDidBreakpoint.event}get onDidLoadedSource(){return this._onDidLoadedSource.event}get onDidCustomEvent(){return this._onDidCustomEvent.event}get onDidProgressStart(){return this._onDidProgressStart.event}get onDidProgressUpdate(){return this._onDidProgressUpdate.event}get onDidProgressEnd(){return this._onDidProgressEnd.event}get onDidInvalidated(){ return this._onDidInvalidated.event}get onDidEvent(){return this._onDidEvent.event}async start(){if(!this.debugAdapter)return Promise.reject(new Error(i.localize(0,null)));await this.debugAdapter.startSession(),this.startTime=(new Date).getTime()}async initialize(e){const t=await this.send("initialize",e);return t&&this.mergeCapabilities(t.body),t}disconnect(e=!1){return this.shutdown(void 0,e)}async launchOrAttach(e){const t=await this.send(e.request,e);return t&&this.mergeCapabilities(t.body),t}terminate(e=!1){return this.capabilities.supportsTerminateRequest?this.terminated?this.disconnect(e):(this.terminated=!0,this.send("terminate",{restart:e},void 0,2e3)):Promise.reject(new Error("terminated not supported"))}restart(){return this.capabilities.supportsRestartRequest?this.send("restart",null):Promise.reject(new Error("restart not supported"))}async next(e){const t=await this.send("next",e);return this.fireSimulatedContinuedEvent(e.threadId),t}async stepIn(e){const t=await this.send("stepIn",e) ;return this.fireSimulatedContinuedEvent(e.threadId),t}async stepOut(e){const t=await this.send("stepOut",e);return this.fireSimulatedContinuedEvent(e.threadId),t}async continue(e){const t=await this.send("continue",e);return t&&t.body&&void 0!==t.body.allThreadsContinued&&(this.allThreadsContinued=t.body.allThreadsContinued),this.fireSimulatedContinuedEvent(e.threadId,this.allThreadsContinued),t}pause(e){return this.send("pause",e)}terminateThreads(e){return this.capabilities.supportsTerminateThreadsRequest?this.send("terminateThreads",e):Promise.reject(new Error("terminateThreads not supported"))}setVariable(e){return this.capabilities.supportsSetVariable?this.send("setVariable",e):Promise.reject(new Error("setVariable not supported"))}async restartFrame(e,t){if(this.capabilities.supportsRestartFrame){const i=await this.send("restartFrame",e);return this.fireSimulatedContinuedEvent(t),i}return Promise.reject(new Error("restartFrame not supported"))}stepInTargets(e){ return this.capabilities.supportsStepInTargetsRequest?this.send("stepInTargets",e):Promise.reject(new Error("stepInTargets not supported"))}completions(e,t){return this.capabilities.supportsCompletionsRequest?this.send("completions",e,t):Promise.reject(new Error("completions not supported"))}setBreakpoints(e){return this.send("setBreakpoints",e)}setFunctionBreakpoints(e){return this.capabilities.supportsFunctionBreakpoints?this.send("setFunctionBreakpoints",e):Promise.reject(new Error("setFunctionBreakpoints not supported"))}dataBreakpointInfo(e){return this.capabilities.supportsDataBreakpoints?this.send("dataBreakpointInfo",e):Promise.reject(new Error("dataBreakpointInfo not supported"))}setDataBreakpoints(e){return this.capabilities.supportsDataBreakpoints?this.send("setDataBreakpoints",e):Promise.reject(new Error("setDataBreakpoints not supported"))}setExceptionBreakpoints(e){return this.send("setExceptionBreakpoints",e)}breakpointLocations(e){ return this.capabilities.supportsBreakpointLocationsRequest?this.send("breakpointLocations",e):Promise.reject(new Error("breakpointLocations is not supported"))}configurationDone(){return this.capabilities.supportsConfigurationDoneRequest?this.send("configurationDone",null):Promise.reject(new Error("configurationDone not supported"))}stackTrace(e,t){return this.send("stackTrace",e,t)}exceptionInfo(e){return this.capabilities.supportsExceptionInfoRequest?this.send("exceptionInfo",e):Promise.reject(new Error("exceptionInfo not supported"))}scopes(e,t){return this.send("scopes",e,t)}variables(e,t){return this.send("variables",e,t)}source(e){return this.send("source",e)}loadedSources(e){return this.capabilities.supportsLoadedSourcesRequest?this.send("loadedSources",e):Promise.reject(new Error("loadedSources not supported"))}threads(){return this.send("threads",null)}evaluate(e){return this.send("evaluate",e)}async stepBack(e){if(this.capabilities.supportsStepBack){const t=await this.send("stepBack",e) ;return t&&void 0===t.body&&this.fireSimulatedContinuedEvent(e.threadId),t}return Promise.reject(new Error("stepBack not supported"))}async reverseContinue(e){if(this.capabilities.supportsStepBack){const t=await this.send("reverseContinue",e);return t&&void 0===t.body&&this.fireSimulatedContinuedEvent(e.threadId),t}return Promise.reject(new Error("reverseContinue not supported"))}gotoTargets(e){return this.capabilities.supportsGotoTargetsRequest?this.send("gotoTargets",e):Promise.reject(new Error("gotoTargets is not supported"))}async goto(e){if(this.capabilities.supportsGotoTargetsRequest){const t=await this.send("goto",e);return this.fireSimulatedContinuedEvent(e.threadId),t}return Promise.reject(new Error("goto is not supported"))}cancel(e){return this.send("cancel",e)}custom(e,t){return this.send(e,t)}async shutdown(e,t=!1){if(!this.inShutdown){if(this.inShutdown=!0,!this.debugAdapter)return this.stopAdapter(e);try{await this.send("disconnect",{restart:t},void 0,2e3)}catch(e){}finally{this.stopAdapter(e)} }}async stopAdapter(e){try{if(this.debugAdapter){const e=this.debugAdapter;this.debugAdapter=null,await e.stopSession(),this.debugAdapterStopped=!0}}finally{this.fireAdapterExitEvent(e)}}fireAdapterExitEvent(e){if(!this.firedAdapterExitEvent){this.firedAdapterExitEvent=!0;const t={emittedStopped:this.didReceiveStoppedEvent,sessionLengthInSeconds:((new Date).getTime()-this.startTime)/1e3};e&&!this.debugAdapterStopped&&(t.error=e),this._onDidExitAdapter.fire(t)}}async dispatchRequest(e,t){const i={type:"response",seq:0,command:e.command,request_seq:e.seq,success:!0},n=e=>this.debugAdapter&&this.debugAdapter.sendResponse(e);switch(e.command){case"launchVSCode":this.launchVsCode(e.arguments).then(e=>{i.body={rendererDebugPort:e.rendererDebugPort},n(i)},e=>{i.success=!1,i.message=e.message,n(i)});break;case"runInTerminal":try{const o=await t.runInTerminal(e.arguments),s=i;s.body={},"number"==typeof o&&(s.body.shellProcessId=o),n(s)}catch(e){i.success=!1,i.message=e.message,n(i)}break;default:i.success=!1, i.message=`unknown request '${e.command}'`,n(i)}}launchVsCode(e){const t=[];for(let i of e.args){const e=(i.prefix||"")+(i.path||""),n=/^--(.+)=(.+)$/.exec(e);if(n&&3===n.length){const e=n[1];let o=n[2];"file-uri"!==e&&"folder-uri"!==e||a.isUri(i.path)||(o=c.URI.file(o).toString()),t.push(`--${e}=${o}`)}else t.push(e)}let i={};return e.env&&(i=o.mixin(d.env,e.env),Object.keys(i).filter(e=>null===i[e]).forEach(e=>delete i[e])),this.extensionHostDebugService.openExtensionDevelopmentHostWindow(t,i,!!e.debugRenderer)}send(e,t,n,o){return new Promise((s,r)=>{if(!this.debugAdapter)return void(this.inShutdown?s(void 0):r(new Error(i.localize(1,null,e))));let a;const l=this.debugAdapter.sendRequest(e,t,e=>{a&&a.dispose(),e.success?s(e):r(e)},o);n&&(a=n.onCancellationRequested(()=>{a.dispose(),this.capabilities.supportsCancelRequest&&this.cancel({requestId:l})}))}).then(void 0,e=>Promise.reject(this.handleErrorResponse(e)))}handleErrorResponse(e){var t ;if("canceled"===e.command&&"canceled"===e.message)return r.canceled();const n=null===(t=null==e?void 0:e.body)||void 0===t?void 0:t.error,o=(null==e?void 0:e.message)||"";if(n&&n.sendTelemetry){const e=n?a.formatPII(n.format,!0,n.variables):o;this.telemetryDebugProtocolErrorResponse(e)}const d=n?a.formatPII(n.format,!1,n.variables):o,h=null==n?void 0:n.url;if(n&&h){const e=n.urlLabel?n.urlLabel:i.localize(2,null);return l.createErrorWithActions(d,{actions:[new s.Action("debug.moreInfo",e,void 0,!0,()=>(this.openerService.open(c.URI.parse(h)),Promise.resolve(null)))]})}return n&&n.format&&n.showUser&&this.notificationService.error(d),new Error(d)}mergeCapabilities(e){e&&(this._capabilities=o.mixin(this._capabilities,e))}fireSimulatedContinuedEvent(e,t=!1){this._onDidContinued.fire({type:"event",event:"continued",body:{threadId:e,allThreadsContinued:t},seq:void 0})}telemetryDebugProtocolErrorResponse(e){this.telemetryService.publicLogError("debugProtocolErrorResponse",{error:e}), this.customTelemetryService&&this.customTelemetryService.publicLogError("debugProtocolErrorResponse",{error:e})}dispose(){h.dispose(this.toDispose)}}})),define(e[1646],t([0,1,6,83,189]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewModel=void 0;t.ViewModel=class{constructor(e){this.contextKeyService=e,this.firstSessionStart=!0,this._onDidFocusSession=new i.Emitter,this._onDidFocusStackFrame=new i.Emitter,this._onDidSelectExpression=new i.Emitter,this._onWillUpdateViews=new i.Emitter,this.multiSessionView=!1,e.bufferChangeEvents(()=>{this.expressionSelectedContextKey=n.CONTEXT_EXPRESSION_SELECTED.bindTo(e),this.breakpointSelectedContextKey=n.CONTEXT_BREAKPOINT_SELECTED.bindTo(e),this.loadedScriptsSupportedContextKey=n.CONTEXT_LOADED_SCRIPTS_SUPPORTED.bindTo(e),this.stepBackSupportedContextKey=n.CONTEXT_STEP_BACK_SUPPORTED.bindTo(e),this.focusedSessionIsAttach=n.CONTEXT_FOCUSED_SESSION_IS_ATTACH.bindTo(e), this.restartFrameSupportedContextKey=n.CONTEXT_RESTART_FRAME_SUPPORTED.bindTo(e),this.stepIntoTargetsSupported=n.CONTEXT_STEP_INTO_TARGETS_SUPPORTED.bindTo(e),this.jumpToCursorSupported=n.CONTEXT_JUMP_TO_CURSOR_SUPPORTED.bindTo(e),this.setVariableSupported=n.CONTEXT_SET_VARIABLE_SUPPORTED.bindTo(e)})}getId(){return"root"}get focusedSession(){return this._focusedSession}get focusedThread(){return this._focusedThread}get focusedStackFrame(){return this._focusedStackFrame}setFocus(e,t,i,n){const s=this._focusedStackFrame!==e,r=this._focusedSession!==i;this._focusedStackFrame=e,this._focusedThread=t,this._focusedSession=i,this.contextKeyService.bufferChangeEvents(()=>{this.loadedScriptsSupportedContextKey.set(!!i&&!!i.capabilities.supportsLoadedSourcesRequest),this.stepBackSupportedContextKey.set(!!i&&!!i.capabilities.supportsStepBack),this.restartFrameSupportedContextKey.set(!!i&&!!i.capabilities.supportsRestartFrame),this.stepIntoTargetsSupported.set(!!i&&!!i.capabilities.supportsStepInTargetsRequest), this.jumpToCursorSupported.set(!!i&&!!i.capabilities.supportsGotoTargetsRequest),this.setVariableSupported.set(!!i&&!!i.capabilities.supportsSetVariable);const e=!!i&&o.isSessionAttach(i);this.focusedSessionIsAttach.set(e)}),r&&this._onDidFocusSession.fire(i),s&&this._onDidFocusStackFrame.fire({stackFrame:e,explicit:n})}get onDidFocusSession(){return this._onDidFocusSession.event}get onDidFocusStackFrame(){return this._onDidFocusStackFrame.event}getSelectedExpression(){return this.selectedExpression}setSelectedExpression(e){this.selectedExpression=e,this.expressionSelectedContextKey.set(!!e),this._onDidSelectExpression.fire(e)}get onDidSelectExpression(){return this._onDidSelectExpression.event}getSelectedFunctionBreakpoint(){return this.selectedFunctionBreakpoint}updateViews(){this._onWillUpdateViews.fire()}get onWillUpdateViews(){return this._onWillUpdateViews.event}setSelectedFunctionBreakpoint(e){this.selectedFunctionBreakpoint=e,this.breakpointSelectedContextKey.set(!!e)}isMultiSessionView(){ return this.multiSessionView}setMultiSessionView(e){this.multiSessionView=e}}})),define(e[1647],t([0,1,1206,37,58,20,49]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=">Emmet: ";class l extends n.EditorAction{constructor(){super({id:"workbench.action.showEmmetCommands",label:i.localize(0,null),alias:"Show Emmet Commands",precondition:o.EditorContextKeys.writable,menuOpts:{menuId:s.MenuId.MenubarEditMenu,group:"5_insert",title:i.localize(1,null),order:4}})}async run(e,t){e.get(r.IQuickInputService).quickAccess.show(a)}}n.registerEditorAction(l)})),define(e[243],t([0,1,2]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionRecommendations=void 0;class n extends i.Disposable{constructor(){super(...arguments),this._activationPromise=null}get activated(){return null!==this._activationPromise}activate(){return this._activationPromise||(this._activationPromise=this.doActivate()),this._activationPromise}} t.ExtensionRecommendations=n})),define(e[1648],t([0,1,76,243,1208,34,6]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigBasedRecommendations=void 0;let c=class extends n.ExtensionRecommendations{constructor(e,t){super(),this.extensionTipsService=e,this.workspaceContextService=t,this.importantTips=[],this.otherTips=[],this._onDidChangeRecommendations=this._register(new l.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._otherRecommendations=[],this._importantRecommendations=[]}get otherRecommendations(){return this._otherRecommendations}get importantRecommendations(){return this._importantRecommendations}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}async doActivate(){await this.fetch(),this._register(this.workspaceContextService.onDidChangeWorkspaceFolders(e=>this.onWorkspaceFoldersChanged(e)))}async fetch(){const e=this.workspaceContextService.getWorkspace(),t=new Map,i=new Map ;for(const n of e.folders){const e=await this.extensionTipsService.getConfigBasedTips(n.uri);for(const n of e)n.important?t.set(n.extensionId,n):i.set(n.extensionId,n)}this.importantTips=[...t.values()],this.otherTips=[...i.values()].filter(e=>!t.has(e.extensionId)),this._otherRecommendations=this.otherTips.map(e=>this.toExtensionRecommendation(e)),this._importantRecommendations=this.importantTips.map(e=>this.toExtensionRecommendation(e))}async onWorkspaceFoldersChanged(e){if(e.added.length){const e=this.importantTips;await this.fetch(),this.importantTips.some(t=>e.every(e=>t.extensionId!==e.extensionId))&&this._onDidChangeRecommendations.fire()}}toExtensionRecommendation(e){return{extensionId:e.extensionId,reason:{reasonId:3,reasonText:s.localize(0,null)}}}};c=o([r(0,i.IExtensionTipsService),r(1,a.IWorkspaceContextService)],c),t.ConfigBasedRecommendations=c})),define(e[1649],t([0,1,76,243,1210,48]),(function(e,t,i,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.ExeBasedRecommendations=void 0;let l=class extends n.ExtensionRecommendations{constructor(e){super(),this.extensionTipsService=e,this._otherTips=[],this._importantTips=[]}get otherRecommendations(){return this._otherTips.map(e=>this.toExtensionRecommendation(e))}get importantRecommendations(){return this._importantTips.map(e=>this.toExtensionRecommendation(e))}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}getRecommendations(e){return{important:this._importantTips.filter(t=>t.exeName.toLowerCase()===e.toLowerCase()).map(e=>this.toExtensionRecommendation(e)),others:this._otherTips.filter(t=>t.exeName.toLowerCase()===e.toLowerCase()).map(e=>this.toExtensionRecommendation(e))}}async doActivate(){this._otherTips=await this.extensionTipsService.getOtherExecutableBasedTips(),await this.fetchImportantExeBasedRecommendations()}async fetchImportantExeBasedRecommendations(){ return this._importantExeBasedRecommendations||(this._importantExeBasedRecommendations=this.doFetchImportantExeBasedRecommendations()),this._importantExeBasedRecommendations}async doFetchImportantExeBasedRecommendations(){const e=new Map;return this._importantTips=await this.extensionTipsService.getImportantExecutableBasedTips(),this._importantTips.forEach(t=>e.set(t.extensionId.toLowerCase(),t)),e}toExtensionRecommendation(e){return{extensionId:e.extensionId.toLowerCase(),reason:{reasonId:2,reasonText:s.localize(0,null,e.exeFriendlyName||a.basename(e.windowsPath))}}}};l=o([r(0,i.IExtensionTipsService)],l),t.ExeBasedRecommendations=l})),define(e[1650],t([0,1,243,61]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapRecommendations=void 0;let s=class extends i.ExtensionRecommendations{constructor(e){super(),this.productService=e,this._recommendations=[]}get recommendations(){return this._recommendations}async doActivate(){ this.productService.keymapExtensionTips&&(this._recommendations=this.productService.keymapExtensionTips.map(e=>({extensionId:e.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};s=o([r(0,n.IProductService)],s),t.KeymapRecommendations=s})),define(e[449],t([0,1,14,104]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Query=void 0;class o{constructor(e,t,i){this.value=e,this.sortBy=t,this.groupBy=i,this.value=e.trim()}static suggestions(e){const t={sort:["installs","rating","name"],category:n.EXTENSION_CATEGORIES.map(e=>`"${e.toLowerCase()}"`),tag:[""],ext:[""],id:[""]},o=t=>e.indexOf(t)>-1,s=t.sort.some(e=>o(`@sort:${e}`)),r=t.category.some(e=>o(`@category:${e}`));return i.flatten(["installed","outdated","enabled","disabled","builtin","recommended","sort","category","tag","ext","id"].map(e=>s&&"sort"===e||r&&"category"===e?[]:e in t?t[e].map(t=>`@${e}:${t}${""===t?"":" "}`):o(`@${e}`)?[]:[`@${e} `]))}static parse(e){let t="";e=e.replace(/@sort:(\w+)(-\w*)?/g,(e,i,n)=>(t=i, ""));let i="";return e=e.replace(/@group:(\w+)(-\w*)?/g,(e,t,n)=>(i=t,"")),new o(e,t,i)}toString(){let e=this.value;return this.sortBy&&(e=`${e}${e?" ":""}@sort:${this.sortBy}`),this.groupBy&&(e=`${e}${e?" ":""}@group:${this.groupBy}`),e}isValid(){return!/@outdated/.test(this.value)}equals(e){return this.value===e.value&&this.sortBy===e.sortBy}}t.Query=o})),define(e[123],t([0,1,5,2,106]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOGGLE_IGNORE_EXTENSION_ACTION_ID=t.ExtensionContainers=t.CloseExtensionDetailsOnViewChangeKey=t.ShowRecommendationsOnlyOnDemandKey=t.AutoCheckUpdatesConfigurationKey=t.AutoUpdateConfigurationKey=t.ConfigurationKey=t.IExtensionsWorkbenchService=t.SERVICE_ID=t.ExtensionState=t.VIEWLET_ID=void 0,t.VIEWLET_ID="workbench.view.extensions",function(e){e[e.Installing=0]="Installing",e[e.Installed=1]="Installed",e[e.Uninstalling=2]="Uninstalling",e[e.Uninstalled=3]="Uninstalled"}(t.ExtensionState||(t.ExtensionState={})), t.SERVICE_ID="extensionsWorkbenchService",t.IExtensionsWorkbenchService=i.createDecorator(t.SERVICE_ID),t.ConfigurationKey="extensions",t.AutoUpdateConfigurationKey="extensions.autoUpdate",t.AutoCheckUpdatesConfigurationKey="extensions.autoCheckUpdates",t.ShowRecommendationsOnlyOnDemandKey="extensions.showRecommendationsOnlyOnDemand",t.CloseExtensionDetailsOnViewChangeKey="extensions.closeExtensionDetailsOnViewChange";let a=class extends n.Disposable{constructor(e,t){super(),this.containers=e,this._register(t.onChange(this.update,this))}set extension(e){this.containers.forEach(t=>t.extension=e)}update(e){for(const t of this.containers)e&&t.extension?s.areSameExtensions(t.extension.identifier,e.identifier)&&(t.extension.server&&e.server&&t.extension.server!==e.server?t.updateWhenCounterExtensionChanges&&t.update():t.extension=e):t.update()}};a=o([r(1,t.IExtensionsWorkbenchService)],a),t.ExtensionContainers=a,t.TOGGLE_IGNORE_EXTENSION_ACTION_ID="workbench.extensions.action.toggleIgnoreExtension"})), define(e[606],t([0,1,1226,76]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionsConfigurationInitialContent=t.ExtensionsConfigurationSchema=t.ExtensionsConfigurationSchemaId=void 0,t.ExtensionsConfigurationSchemaId="vscode://schemas/extensions",t.ExtensionsConfigurationSchema={id:t.ExtensionsConfigurationSchemaId,allowComments:!0,allowTrailingCommas:!0,type:"object",title:i.localize(0,null),additionalProperties:!1,properties:{recommendations:{type:"array",description:i.localize(1,null),items:{type:"string",pattern:n.EXTENSION_IDENTIFIER_PATTERN,errorMessage:i.localize(2,null)}},unwantedRecommendations:{type:"array",description:i.localize(3,null),items:{type:"string",pattern:n.EXTENSION_IDENTIFIER_PATTERN,errorMessage:i.localize(4,null)}}}}, t.ExtensionsConfigurationInitialContent=["{","\t// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.","\t// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp","","\t// List of extensions which should be recommended for users of this workspace.",'\t"recommendations": [',"\t\t","\t],","\t// List of extensions recommended by VS Code that should not be recommended for users of this workspace.",'\t"unwantedRecommendations": [',"\t\t","\t]","}"].join("\n")})),define(e[367],t([0,1,29,10,1227,43,106]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionsInput=void 0;class a extends s.EditorInput{constructor(e){super(),this.extension=e}get resource(){return n.URI.from({scheme:i.Schemas.extension,path:this.extension.identifier.id})}getTypeId(){return a.ID}getName(){return o.localize(0,null,this.extension.displayName)}supportsSplitEditor(){return!1}matches(e){ return!!super.matches(e)||e instanceof a&&r.areSameExtensions(this.extension.identifier,e.extension.identifier)}}t.ExtensionsInput=a,a.ID="workbench.extensions.input2"})),define(e[1651],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExternalTerminalService=void 0,t.IExternalTerminalService=i.createDecorator("nativeTerminalService")})),define(e[324],t([0,1,10,136,48,67,24,14,2,95,6,17]),(function(e,t,i,n,s,r,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewExplorerItem=t.ExplorerItem=t.ExplorerModel=void 0;t.ExplorerModel=class{constructor(e,t){this.contextService=e,this._onDidChangeRoots=new h.Emitter;const i=()=>this._roots=this.contextService.getWorkspace().folders.map(e=>new g(e.uri,t,void 0,!0,!1,e.name));i(),this._listener=this.contextService.onDidChangeWorkspaceFolders(()=>{i(),this._onDidChangeRoots.fire()})}get roots(){return this._roots}get onDidChangeRoots(){return this._onDidChangeRoots.event}findAll(e){ return l.coalesce(this.roots.map(t=>t.find(e)))}findClosest(e){const t=this.contextService.getWorkspaceFolder(e);if(t){const i=this.roots.find(e=>e.resource.toString()===t.uri.toString());if(i)return i.find(e)}return null}dispose(){c.dispose(this._listener)}};class g{constructor(e,t,i,n,o,s=u.basenameOrAuthority(e),r,a=!1){this.resource=e,this.fileService=t,this._parent=i,this._isDirectory=n,this._isSymbolicLink=o,this._name=s,this._mtime=r,this._unknown=a,this.isError=!1,this._isExcluded=!1,this._isDirectoryResolved=!1}get isExcluded(){return!!this._isExcluded||!!this._parent&&this._parent.isExcluded}set isExcluded(e){this._isExcluded=e}get isDirectoryResolved(){return this._isDirectoryResolved}get isSymbolicLink(){return!!this._isSymbolicLink}get isDirectory(){return!!this._isDirectory}get isReadonly(){return this.fileService.hasCapability(this.resource,2048)}get mtime(){return this._mtime}get name(){return this._name}get isUnknown(){return this._unknown}get parent(){return this._parent}get root(){ return this._parent?this._parent.root:this}get children(){return new Map}updateName(e){this._parent&&this._parent.removeChild(this),this._name=e,this._parent&&this._parent.addChild(this)}getId(){return this.resource.toString()}get isRoot(){return this===this.root}static create(e,t,i,n){const o=new g(t.resource,e,i,t.isDirectory,t.isSymbolicLink,t.name,t.mtime,!t.isFile&&!t.isDirectory);if(o.isDirectory&&(o._isDirectoryResolved=!!t.children||!!n&&n.some(e=>u.isEqualOrParent(e,o.resource)),t.children))for(let i=0,s=t.children.length;i{i.set(e.resource,e)}),t.children.clear(),e.children.forEach(e=>{const n=i.get(e.resource);n?(g.mergeLocalWithDisk(e,n),t.addChild(n),i.delete(e.resource)):t.addChild(e)}),i.forEach(e=>{e instanceof p&&t.addChild(e)})}}addChild(e){e._parent=this,e.updateResource(!1),this.children.set(this.getPlatformAwareName(e.name),e)}getChild(e){return this.children.get(this.getPlatformAwareName(e))}async fetchChildren(e){if(!this._isDirectoryResolved){const t="modified"===e;try{const e=await this.fileService.resolve(this.resource,{resolveSingleChildDescendants:!0,resolveMetadata:t}),i=g.create(this.fileService,e,this);g.mergeLocalWithDisk(i,this)}catch(e){throw this.isError=!0,e}this._isDirectoryResolved=!0}const t=[];return this.children.forEach(e=>{t.push(e)}),t}removeChild(e){this.children.delete(this.getPlatformAwareName(e.name))}forgetChildren(){this.children.clear(),this._isDirectoryResolved=!1}getPlatformAwareName(e){ return this.fileService.hasCapability(this.resource,1024)?e:e.toLowerCase()}move(e){this._parent&&this._parent.removeChild(this),e.removeChild(this),e.addChild(this),this.updateResource(!0)}updateResource(e){this._parent&&(this.resource=u.joinPath(this._parent.resource,this.name)),e&&this.isDirectory&&this.children.forEach(e=>{e.updateResource(!0)})}rename(e){this.updateName(e.name),this._mtime=e.mtime,this.updateResource(!0)}find(e){const t=!this.fileService.hasCapability(e,1024);return e&&this.resource.scheme===e.scheme&&a.equalsIgnoreCase(this.resource.authority,e.authority)&&(t?a.startsWithIgnoreCase(e.path,this.resource.path):e.path.startsWith(this.resource.path))?this.findByPath(a.rtrim(e.path,s.posix.sep),this.resource.path.length,t):null}findByPath(e,t,i){if(n.isEqual(a.rtrim(this.resource.path,s.posix.sep),e,i))return this;if(this.isDirectory){for(;tthis.onDidChangeWorkspaceFolders(e))),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onDidChangeWorkbenchState())), this._register(this.configurationService.onDidChangeConfiguration(e=>this.onDidChangeConfiguration(e))),this._register(this.fileService.onError(e=>this.onError(e)))}onDidChangeWorkspaceFolders(e){for(const t of e.removed)this.unwatchWorkspace(t.uri);for(const t of e.added)this.watchWorkspace(t.uri)}onDidChangeWorkbenchState(){this.refresh()}onDidChangeConfiguration(e){e.affectsConfiguration("files.watcherExclude")&&this.refresh()}onError(e){const t=e.toString();d.onUnexpectedError(t),t.indexOf("System.MissingMethodException")>=0&&this.notificationService.prompt(h.Severity.Warning,u.localize(0,null),[{label:u.localize(1,null),run:()=>this.openerService.open(n.URI.parse("https://go.microsoft.com/fwlink/?LinkId=786533"))}],{sticky:!0,neverShowAgain:{id:"ignoreNetVersionError",isSecondary:!0,scope:h.NeverShowAgainScope.WORKSPACE}}),t.indexOf("ENOSPC")>=0&&this.notificationService.prompt(h.Severity.Warning,u.localize(2,null),[{label:u.localize(3,null), run:()=>this.openerService.open(n.URI.parse("https://go.microsoft.com/fwlink/?linkid=867693"))}],{sticky:!0,neverShowAgain:{id:"ignoreEnospcError",isSecondary:!0,scope:h.NeverShowAgainScope.WORKSPACE}})}watchWorkspace(e){var t;const i=[],n=this.configurationService.getValue({resource:e});if(null===(t=n.files)||void 0===t?void 0:t.watcherExclude)for(const e in n.files.watcherExclude)!0===n.files.watcherExclude[e]&&i.push(e);const o=this.fileService.watch(e,{recursive:!0,excludes:i});this.watches.set(e,o)}unwatchWorkspace(e){this.watches.has(e)&&(i.dispose(this.watches.get(e)),this.watches.delete(e))}refresh(){this.unwatchWorkspaces();for(const e of this.contextService.getWorkspace().folders)this.watchWorkspace(e.uri)}unwatchWorkspaces(){this.watches.forEach(e=>i.dispose(e)),this.watches.clear()}dispose(){super.dispose(),this.unwatchWorkspaces()}};p=o([r(0,a.IFileService),r(1,s.IConfigurationService),r(2,l.IWorkspaceContextService),r(3,h.INotificationService),r(4,g.IOpenerService)],p),t.WorkspaceWatcher=p})), define(e[1653],t([0,1,10,1492,76,5,42,61]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebIssueService=t.IWebIssueService=void 0,t.IWebIssueService=a.createDecorator("webIssueService");let d=class{constructor(e,t,i){this.extensionManagementService=e,this.openerService=t,this.productService=i}async openReporter(e){let t=this.productService.reportIssueUrl;if(e.extensionId){const i=await this.getExtensionGitHubUrl(e.extensionId);i&&(t=i+"/issues/new")}if(t)return this.openerService.open(i.URI.parse(t)).then(e=>{});throw new Error(`Unable to find issue reporting url for ${e.extensionId}`)}async getExtensionGitHubUrl(e){var t,i;let o="";const s=(await this.extensionManagementService.getInstalled(1)).filter(t=>t.identifier.id===e)[0],r=null===(t=null==s?void 0:s.manifest.bugs)||void 0===t?void 0:t.url,a=null===(i=null==s?void 0:s.manifest.repository)||void 0===i?void 0:i.url ;return r&&r.match(/^https?:\/\/github\.com\/(.*)/)?o=n.normalizeGitHubUrl(r):a&&a.match(/^https?:\/\/github\.com\/(.*)/)&&(o=n.normalizeGitHubUrl(a)),o}};d=o([r(0,s.IExtensionManagementService),r(1,l.IOpenerService),r(2,c.IProductService)],d),t.WebIssueService=d})),define(e[1654],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenIssueReporterActionId=void 0,t.OpenIssueReporterActionId="workbench.action.openIssueReporter"})),define(e[1655],t([0,1,1252,20,32,33,61,16,70,56,1653,1654]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let p=class{constructor(e){if(this.productService=e,e.reportIssueUrl){const e=i.localize(0,null);s.CommandsRegistry.registerCommand(g.OpenIssueReporterActionId,(function(e,t){let i;return t&&(Array.isArray(t)?[i]=t:i=t.extensionId),e.get(u.IWebIssueService).openReporter({extensionId:i})}));const t={id:g.OpenIssueReporterActionId,title:{value:e,original:"Report Issue"}, category:d.CATEGORIES.Help};n.MenuRegistry.appendMenuItem(n.MenuId.CommandPalette,{command:t})}}};p=o([r(0,l.IProductService)],p),c.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(p,1),s.CommandsRegistry.registerCommand("_issues.getSystemStatus",e=>i.localize(1,null)),a.registerSingleton(u.IWebIssueService,u.WebIssueService,!0)})),define(e[450],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userDataSyncLogChannelId=t.telemetryLogChannelId=t.extHostLogChannelId=t.rendererLogChannelId=t.sharedLogChannelId=t.mainLogChannelId=void 0,t.mainLogChannelId="mainLog",t.sharedLogChannelId="sharedLog",t.rendererLogChannelId="rendererLog",t.extHostLogChannelId="extHostLog",t.telemetryLogChannelId="telemetryLog",t.userDataSyncLogChannelId="userDataSyncLog"})),define(e[607],t([0,1,293,306,45]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderMarkdownDocument=void 0,t.renderMarkdownDocument=async function(e,t,s){ const r=await async function(e,t,s){let r=[];const a=new i.Renderer;return a.code=(e,i)=>{const n=s.getModeIdForLanguageName(i);return n&&r.push(t.whenInstalledExtensionsRegistered().then(()=>(s.triggerMode(n),o.TokenizationRegistry.getPromise(n)))),""},i(e,{renderer:a}),await Promise.all(r),a.code=(e,t)=>{const i=s.getModeIdForLanguageName(t);return`${n.tokenizeToString(e,i?o.TokenizationRegistry.get(i):void 0)}`},a}(e,t,s);return i(e,{renderer:r})}})),define(e[244],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={MARKERS_CONTAINER_ID:"workbench.panel.markers",MARKERS_VIEW_ID:"workbench.panel.markers.view",MARKERS_VIEW_STORAGE_ID:"workbench.panel.markers",MARKER_COPY_ACTION_ID:"problems.action.copy",MARKER_COPY_MESSAGE_ACTION_ID:"problems.action.copyMessage",RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID:"problems.action.copyRelatedInformationMessage",FOCUS_PROBLEMS_FROM_FILTER:"problems.action.focusProblemsFromFilter", MARKERS_VIEW_FOCUS_FILTER:"problems.action.focusFilter",MARKERS_VIEW_CLEAR_FILTER_TEXT:"problems.action.clearFilterText",MARKERS_VIEW_SHOW_MULTILINE_MESSAGE:"problems.action.showMultilineMessage",MARKERS_VIEW_SHOW_SINGLELINE_MESSAGE:"problems.action.showSinglelineMessage",MARKER_OPEN_ACTION_ID:"problems.action.open",MARKER_OPEN_SIDE_ACTION_ID:"problems.action.openToSide",MARKER_SHOW_PANEL_ID:"workbench.action.showErrorsWarnings",MARKER_SHOW_QUICK_FIX:"problems.action.showQuickFixes",TOGGLE_MARKERS_VIEW_ACTION_ID:"workbench.actions.view.toggleProblems",MarkersViewSmallLayoutContextKey:new i.RawContextKey("problemsView.smallLayout",!1),MarkerFocusContextKey:new i.RawContextKey("problemFocus",!1),MarkerViewFilterFocusContextKey:new i.RawContextKey("problemsFilterFocus",!1),RelatedInformationFocusContextKey:new i.RawContextKey("relatedInformationFocus",!1)}})),define(e[608],t([0,1,87,122,24,17]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterOptions=void 0;class r{ constructor(e="",t=[],i=!1,r=!1,a=!1){this.filter=e,this.showWarnings=!1,this.showErrors=!1,this.showInfos=!1,this.textFilter="",e=e.trim(),this.showWarnings=i,this.showErrors=r,this.showInfos=a;const l=Array.isArray(t)?t:[],c=Array.isArray(t)?n.getEmptyExpression():t,d=n.getEmptyExpression();if(e){const t=n.splitGlobAware(e,",").map(e=>e.trim()).filter(e=>!!e.length);for(const e of t)e.startsWith("!")?this.setPattern(c,o.ltrim(e,"!")):(this.setPattern(d,e),this.textFilter+=` ${e}`)}this.excludesMatcher=new s.ResourceGlobMatcher(c,l),this.includesMatcher=new s.ResourceGlobMatcher(d,[]),this.textFilter=this.textFilter.trim()}setPattern(e,t){"."===t[0]&&(t="*"+t),e[`**/${t}/**`]=!0,e[`**/${t}`]=!0}}t.FilterOptions=r,r._filter=i.matchesFuzzy2,r._messageFilter=i.matchesFuzzy})),define(e[368],t([0,1,17,18,107,14,67,6,133,13]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";function d(e,t){let[i]=e.markers,[n]=t.markers,s=0;return i&&n&&(s=o.MarkerSeverity.compare(i.marker.severity,n.marker.severity)), 0===s&&(s=e.path.localeCompare(t.path)||e.name.localeCompare(t.name)),s}Object.defineProperty(t,"__esModule",{value:!0}),t.MarkersModel=t.RelatedInformation=t.Marker=t.ResourceMarkers=t.compareMarkersByUri=void 0,t.compareMarkersByUri=function(e,t){return i.extUri.compare(e.resource,t.resource)};class h{constructor(e,t){this.id=e,this.resource=t,this._markersMap=new r.ResourceMap,this._total=0,this.path=this.resource.fsPath,this.name=i.basename(this.resource)}get markers(){return this._cachedMarkers||(this._cachedMarkers=s.mergeSort(s.flatten([...this._markersMap.values()]),h._compareMarkers)),this._cachedMarkers}has(e){return this._markersMap.has(e)}set(e,t){this.delete(e),s.isNonEmptyArray(t)&&(this._markersMap.set(e,t),this._total+=t.length,this._cachedMarkers=void 0)}delete(e){let t=this._markersMap.get(e);t&&(this._total-=t.length,this._cachedMarkers=void 0,this._markersMap.delete(e))}get total(){return this._total}static _compareMarkers(e,t){ return o.MarkerSeverity.compare(e.marker.severity,t.marker.severity)||i.extUri.compare(e.resource,t.resource)||n.Range.compareRangesUsingStarts(e.marker,t.marker)}}t.ResourceMarkers=h;class u{constructor(e,t,i=[]){this.id=e,this.marker=t,this.relatedInformation=i}get resource(){return this.marker.resource}get range(){return this.marker}get lines(){return this._lines||(this._lines=this.marker.message.split(/\r\n|\r|\n/g)),this._lines}toString(){return JSON.stringify(Object.assign(Object.assign({},this.marker),{resource:this.marker.resource.path,relatedInformation:this.relatedInformation.length?this.relatedInformation.map(e=>Object.assign(Object.assign({},e.raw),{resource:e.raw.resource.path})):void 0}),null,"\t")}}t.Marker=u;class g{constructor(e,t,i){this.id=e,this.marker=t,this.raw=i}}t.RelatedInformation=g;t.MarkersModel=class{constructor(){this.cachedSortedResources=void 0,this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._total=0,this.resourcesByUri=new Map} get resourceMarkers(){return this.cachedSortedResources||(this.cachedSortedResources=[...this.resourcesByUri.values()].sort(d)),this.cachedSortedResources}get total(){return this._total}getResourceMarkers(e){return c.withUndefinedAsNull(this.resourcesByUri.get(i.extUri.getComparisonKey(e,!0)))}setResourceMarkers(e){const t={added:new Set,removed:new Set,updated:new Set};for(const[n,r]of e){const e=i.extUri.getComparisonKey(n,!0);let a=this.resourcesByUri.get(e);if(s.isNonEmptyArray(r)){if(a)t.updated.add(a);else{const i=this.id(n.toString());a=new h(i,n.with({fragment:null})),this.resourcesByUri.set(e,a),t.added.add(a)}const i=new Map,s=r.map(e=>{const t=o.IMarkerData.makeKey(e),n=i.get(t)||0;i.set(t,n+1);const s=this.id(a.id,t,n,e.resource.toString());let r=void 0;return e.relatedInformation&&(r=e.relatedInformation.map((t,i)=>new g(this.id(s,t.resource.toString(),t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn,i),e,t))),new u(s,e,r)});this._total-=a.total,a.set(n,s),this._total+=a.total }else a&&(this._total-=a.total,a.delete(n),this._total+=a.total,0===a.total?(this.resourcesByUri.delete(e),t.removed.add(a)):t.updated.add(a))}this.cachedSortedResources=void 0,(t.added.size||t.removed.size||t.updated.size)&&this._onDidChange.fire(t)}id(...e){const t=new l.Hasher;for(const i of e)t.hash(i);return`${t.value}`}dispose(){this._onDidChange.dispose(),this.resourcesByUri.clear()}}})),define(e[369],t([0,1,1262,17,107]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{}t.default=s,s.MARKERS_PANEL_TOGGLE_LABEL=i.localize(0,null),s.MARKERS_PANEL_SHOW_LABEL=i.localize(1,null),s.PROBLEMS_PANEL_CONFIGURATION_TITLE=i.localize(2,null),s.PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL=i.localize(3,null),s.PROBLEMS_PANEL_CONFIGURATION_SHOW_CURRENT_STATUS=i.localize(4,null),s.MARKERS_PANEL_TITLE_PROBLEMS=i.localize(5,null),s.MARKERS_PANEL_NO_PROBLEMS_BUILT=i.localize(6,null),s.MARKERS_PANEL_NO_PROBLEMS_ACTIVE_FILE_BUILT=i.localize(7,null), s.MARKERS_PANEL_NO_PROBLEMS_FILTERS=i.localize(8,null),s.MARKERS_PANEL_ACTION_TOOLTIP_MORE_FILTERS=i.localize(9,null),s.MARKERS_PANEL_FILTER_LABEL_SHOW_ERRORS=i.localize(10,null),s.MARKERS_PANEL_FILTER_LABEL_SHOW_WARNINGS=i.localize(11,null),s.MARKERS_PANEL_FILTER_LABEL_SHOW_INFOS=i.localize(12,null),s.MARKERS_PANEL_FILTER_LABEL_EXCLUDED_FILES=i.localize(13,null),s.MARKERS_PANEL_FILTER_LABEL_ACTIVE_FILE=i.localize(14,null),s.MARKERS_PANEL_ACTION_TOOLTIP_FILTER=i.localize(15,null),s.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX=i.localize(16,null),s.MARKERS_PANEL_FILTER_ARIA_LABEL=i.localize(17,null),s.MARKERS_PANEL_FILTER_PLACEHOLDER=i.localize(18,null),s.MARKERS_PANEL_FILTER_ERRORS=i.localize(19,null),s.MARKERS_PANEL_FILTER_WARNINGS=i.localize(20,null),s.MARKERS_PANEL_FILTER_INFOS=i.localize(21,null),s.MARKERS_PANEL_SINGLE_ERROR_LABEL=i.localize(22,null),s.MARKERS_PANEL_MULTIPLE_ERRORS_LABEL=e=>i.localize(23,null,""+e),s.MARKERS_PANEL_SINGLE_WARNING_LABEL=i.localize(24,null), s.MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL=e=>i.localize(25,null,""+e),s.MARKERS_PANEL_SINGLE_INFO_LABEL=i.localize(26,null),s.MARKERS_PANEL_MULTIPLE_INFOS_LABEL=e=>i.localize(27,null,""+e),s.MARKERS_PANEL_SINGLE_UNKNOWN_LABEL=i.localize(28,null),s.MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=e=>i.localize(29,null,""+e),s.MARKERS_PANEL_AT_LINE_COL_NUMBER=(e,t)=>i.localize(30,null,""+e,""+t),s.MARKERS_TREE_ARIA_LABEL_RESOURCE=(e,t,n)=>i.localize(31,null,e,t,n),s.MARKERS_TREE_ARIA_LABEL_MARKER=e=>{const t=e.relatedInformation.length?i.localize(32,null,e.relatedInformation.length):"";switch(e.marker.severity){case o.MarkerSeverity.Error:return e.marker.source?i.localize(33,null,e.marker.source,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t):i.localize(34,null,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t);case o.MarkerSeverity.Warning: return e.marker.source?i.localize(35,null,e.marker.source,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t):i.localize(36,null,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t,t);case o.MarkerSeverity.Info:return e.marker.source?i.localize(37,null,e.marker.source,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t):i.localize(38,null,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t);default:return e.marker.source?i.localize(39,null,e.marker.source,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t):i.localize(40,null,e.marker.message,e.marker.startLineNumber,e.marker.startColumn,t)}},s.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION=e=>i.localize(41,null,e.message,e.startLineNumber,e.startColumn,n.basename(e.resource)),s.SHOW_ERRORS_WARNINGS_ACTION_LABEL=i.localize(42,null)})),define(e[451],t([0,1,15,7,30,36,369,244,11,59,2,78,27,1261,5,219,8,6,38,44,100,302]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.QuickFixActionViewItem=t.QuickFixAction=t.MarkersFilterActionViewItem=t.MarkersFilters=t.ShowProblemsPanelAction=void 0;let E=class extends s.Action{constructor(e,t,i){super(e,t),this.viewsService=i}run(){return this.viewsService.openView(c.default.MARKERS_VIEW_ID,!0)}};E.ID="workbench.action.problems.focus",E.LABEL=l.default.MARKERS_PANEL_SHOW_LABEL,E=o([r(2,_.IViewsService)],E),t.ShowProblemsPanelAction=E;class I extends u.Disposable{constructor(e){super(),this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event,this._showWarnings=!0,this._showErrors=!0,this._showInfos=!0,this._layout=new n.Dimension(0,0),this._filterText=e.filterText,this._showErrors=e.showErrors,this._showWarnings=e.showWarnings,this._showInfos=e.showInfos,this._excludedFiles=e.excludedFiles,this._activeFile=e.activeFile,this.filterHistory=e.filterHistory,this._layout=e.layout}get filterText(){return this._filterText}set filterText(e){ this._filterText!==e&&(this._filterText=e,this._onDidChange.fire({filterText:!0}))}get excludedFiles(){return this._excludedFiles}set excludedFiles(e){this._excludedFiles!==e&&(this._excludedFiles=e,this._onDidChange.fire({excludedFiles:!0}))}get activeFile(){return this._activeFile}set activeFile(e){this._activeFile!==e&&(this._activeFile=e,this._onDidChange.fire({activeFile:!0}))}get showWarnings(){return this._showWarnings}set showWarnings(e){this._showWarnings!==e&&(this._showWarnings=e,this._onDidChange.fire({showWarnings:!0}))}get showErrors(){return this._showErrors}set showErrors(e){this._showErrors!==e&&(this._showErrors=e,this._onDidChange.fire({showErrors:!0}))}get showInfos(){return this._showInfos}set showInfos(e){this._showInfos!==e&&(this._showInfos=e,this._onDidChange.fire({showInfos:!0}))}get layout(){return this._layout}set layout(e){this._layout.width===e.width&&this._layout.height===e.height||(this._layout=e,this._onDidChange.fire({layout:!0}))}}t.MarkersFilters=I ;let x=class extends w.DropdownMenuActionViewItem{constructor(e,t,i,n){super(e,{getActions:()=>this.getActions()},n,{actionRunner:i,classNames:e.class,anchorAlignmentProvider:()=>1}),this.filters=t}render(e){super.render(e),this.updateChecked()}getActions(){return[{checked:this.filters.showErrors,class:void 0,enabled:!0,id:"showErrors",label:l.default.MARKERS_PANEL_FILTER_LABEL_SHOW_ERRORS,run:async()=>this.filters.showErrors=!this.filters.showErrors,tooltip:"",dispose:()=>null},{checked:this.filters.showWarnings,class:void 0,enabled:!0,id:"showWarnings",label:l.default.MARKERS_PANEL_FILTER_LABEL_SHOW_WARNINGS,run:async()=>this.filters.showWarnings=!this.filters.showWarnings,tooltip:"",dispose:()=>null},{checked:this.filters.showInfos,class:void 0,enabled:!0,id:"showInfos",label:l.default.MARKERS_PANEL_FILTER_LABEL_SHOW_INFOS,run:async()=>this.filters.showInfos=!this.filters.showInfos,tooltip:"",dispose:()=>null},new s.Separator,{checked:this.filters.activeFile,class:void 0,enabled:!0,id:"activeFile", label:l.default.MARKERS_PANEL_FILTER_LABEL_ACTIVE_FILE,run:async()=>this.filters.activeFile=!this.filters.activeFile,tooltip:"",dispose:()=>null},{checked:this.filters.excludedFiles,class:void 0,enabled:!0,id:"useFilesExclude",label:l.default.MARKERS_PANEL_FILTER_LABEL_EXCLUDED_FILES,run:async()=>this.filters.excludedFiles=!this.filters.excludedFiles,tooltip:"",dispose:()=>null}]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};x=o([r(3,a.IContextMenuService)],x);let k=class extends y.BaseActionViewItem{constructor(e,t,n,o,r,a){super(null,e),this.filterController=t,this.instantiationService=n,this.contextViewService=o,this.themeService=r,this.container=null,this.filterInputBox=null,this.filterBadge=null,this.focusContextKey=c.default.MarkerViewFilterFocusContextKey.bindTo(a),this.delayedFilterUpdate=new i.Delayer(400),this._register(u.toDisposable(()=>this.delayedFilterUpdate.cancel())),this._register(t.onDidFocusFilter(()=>this.focus())), this._register(t.onDidClearFilterText(()=>this.clearFilterText())),this.filtersAction=new s.Action("markersFiltersAction",l.default.MARKERS_PANEL_ACTION_TOOLTIP_MORE_FILTERS,"markers-filters codicon-filter"),this.filtersAction.checked=this.hasFiltersChanged(),this._register(t.filters.onDidChange(e=>this.onDidFiltersChange(e)))}render(e){this.container=e,this.container.classList.add("markers-panel-action-filter-container"),this.element=n.append(this.container,n.$("")),this.element.className=this.class,this.createInput(this.element),this.createControls(this.element),this.updateClass(),this.adjustInputBox()}focus(){this.filterInputBox&&this.filterInputBox.focus()}clearFilterText(){this.filterInputBox&&(this.filterInputBox.value="")}onDidFiltersChange(e){this.filtersAction.checked=this.hasFiltersChanged(),e.layout&&this.updateClass()}hasFiltersChanged(){ return!this.filterController.filters.showErrors||!this.filterController.filters.showWarnings||!this.filterController.filters.showInfos||this.filterController.filters.excludedFiles||this.filterController.filters.activeFile}createInput(e){this.filterInputBox=this._register(this.instantiationService.createInstance(f.ContextScopedHistoryInputBox,e,this.contextViewService,{placeholder:l.default.MARKERS_PANEL_FILTER_PLACEHOLDER,ariaLabel:l.default.MARKERS_PANEL_FILTER_ARIA_LABEL,history:this.filterController.filters.filterHistory})),this._register(h.attachInputBoxStyler(this.filterInputBox,this.themeService)),this.filterInputBox.value=this.filterController.filters.filterText,this._register(this.filterInputBox.onDidChange(e=>this.delayedFilterUpdate.trigger(()=>this.onDidInputChange(this.filterInputBox)))),this._register(this.filterController.filters.onDidChange(e=>{e.filterText&&(this.filterInputBox.value=this.filterController.filters.filterText)})), this._register(n.addStandardDisposableListener(this.filterInputBox.inputElement,n.EventType.KEY_DOWN,e=>this.onInputKeyDown(e,this.filterInputBox))),this._register(n.addStandardDisposableListener(e,n.EventType.KEY_DOWN,this.handleKeyboardEvent)),this._register(n.addStandardDisposableListener(e,n.EventType.KEY_UP,this.handleKeyboardEvent)),this._register(n.addStandardDisposableListener(this.filterInputBox.inputElement,n.EventType.CLICK,e=>{e.stopPropagation(),e.preventDefault()}));const t=this._register(n.trackFocus(this.filterInputBox.inputElement));this._register(t.onDidFocus(()=>this.focusContextKey.set(!0))),this._register(t.onDidBlur(()=>this.focusContextKey.set(!1))),this._register(u.toDisposable(()=>this.focusContextKey.reset()))}createControls(e){const t=n.append(e,n.$(".markers-panel-filter-controls"));this.createBadge(t),this.createFilters(t)}createBadge(e){const t=this.filterBadge=n.append(e,n.$(".markers-panel-filter-badge"));this._register(h.attachStylerCallback(this.themeService,{ badgeBackground:p.badgeBackground,badgeForeground:p.badgeForeground,contrastBorder:p.contrastBorder},e=>{const i=e.badgeBackground?e.badgeBackground.toString():"",n=e.badgeForeground?e.badgeForeground.toString():"",o=e.contrastBorder?e.contrastBorder.toString():"";t.style.backgroundColor=i,t.style.borderWidth=o?"1px":"",t.style.borderStyle=o?"solid":"",t.style.borderColor=o,t.style.color=n})),this.updateBadge(),this._register(this.filterController.onDidChangeFilterStats(()=>this.updateBadge()))}createFilters(e){this._register(new g.ActionBar(e,{actionViewItemProvider:e=>{if(e.id===this.filtersAction.id)return this.instantiationService.createInstance(x,e,this.filterController.filters,this.actionRunner)}})).push(this.filtersAction,{icon:!0,label:!1})}onDidInputChange(e){e.addToHistory(),this.filterController.filters.filterText=e.value,this.filterController.filters.filterHistory=e.getHistory()}updateBadge(){if(this.filterBadge){const{total:e,filtered:t}=this.filterController.getFilterStats() ;this.filterBadge.classList.toggle("hidden",e===t||0===e),this.filterBadge.textContent=m.localize(0,null,t,e),this.adjustInputBox()}}adjustInputBox(){this.element&&this.filterInputBox&&this.filterBadge&&(this.filterInputBox.inputElement.style.paddingRight=this.element.classList.contains("small")||this.filterBadge.classList.contains("hidden")?"25px":"150px")}handleKeyboardEvent(e){(e.equals(10)||e.equals(15)||e.equals(17)||e.equals(9))&&e.stopPropagation()}onInputKeyDown(e,t){let i=!1;e.equals(9)&&(this.clearFilterText(),i=!0),i&&(e.stopPropagation(),e.preventDefault())}updateClass(){this.element&&this.container&&(this.element.className=this.class,this.container.classList.toggle("grow",this.element.classList.contains("grow")),this.adjustInputBox())}get class(){return this.filterController.filters.layout.width>600?"markers-panel-action-filter grow":this.filterController.filters.layout.width<400?"markers-panel-action-filter small":"markers-panel-action-filter"}} ;k=o([r(2,v.IInstantiationService),r(3,a.IContextViewService),r(4,d.IThemeService),r(5,S.IContextKeyService)],k),t.MarkersFilterActionViewItem=k;class D extends s.Action{constructor(e){super(D.ID,l.default.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX,D.CLASS,!1),this.marker=e,this._onShowQuickFixes=this._register(new b.Emitter),this.onShowQuickFixes=this._onShowQuickFixes.event,this._quickFixes=[]}get quickFixes(){return this._quickFixes}set quickFixes(e){this._quickFixes=e,this.enabled=this._quickFixes.length>0}autoFixable(e){this.class=e?D.AUTO_FIX_CLASS:D.CLASS}run(){return this._onShowQuickFixes.fire(),Promise.resolve()}}t.QuickFixAction=D,D.ID="workbench.actions.problems.quickfix",D.CLASS="markers-panel-action-quickfix "+C.Codicon.lightBulb.classNames,D.AUTO_FIX_CLASS=D.CLASS+" autofixable";let T=class extends y.ActionViewItem{constructor(e,t){super(null,e,{icon:!0,label:!1}),this.contextMenuService=t}onClick(e){n.EventHelper.stop(e,!0),this.showQuickFixes()}showQuickFixes(){if(!this.element)return ;if(!this.isEnabled())return;const e=n.getDomNodePagePosition(this.element),t=this.getAction().quickFixes;t.length&&this.contextMenuService.showContextMenu({getAnchor:()=>({x:e.left+10,y:e.top+e.height+4}),getActions:()=>t})}};T=o([r(1,a.IContextMenuService)],T),t.QuickFixActionViewItem=T,d.registerThemingParticipant((e,t)=>{const i=e.getColor(p.inputActiveOptionBorder);i&&t.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { border-color: ${i}; }`);const n=e.getColor(p.inputActiveOptionForeground);n&&t.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { color: ${n}; }`);const o=e.getColor(p.inputActiveOptionBackground);o&&t.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { background-color: ${o}; }`)})})),define(e[178],t([0,1]),(function(e,t){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.COLLAPSED_INDICATOR_HEIGHT=t.CELL_OUTPUT_PADDING=t.EDITOR_BOTTOM_PADDING_WITHOUT_STATUSBAR=t.EDITOR_BOTTOM_PADDING=t.EDITOR_TOP_PADDING=t.CELL_BOTTOM_MARGIN=t.CELL_TOP_MARGIN=t.CELL_STATUSBAR_HEIGHT=t.BOTTOM_CELL_TOOLBAR_HEIGHT=t.BOTTOM_CELL_TOOLBAR_GAP=t.EDITOR_TOOLBAR_HEIGHT=t.CODE_CELL_LEFT_MARGIN=t.CELL_RUN_GUTTER=t.CELL_MARGIN=t.SCROLLABLE_ELEMENT_PADDING_TOP=void 0,t.SCROLLABLE_ELEMENT_PADDING_TOP=20,t.CELL_MARGIN=8,t.CELL_RUN_GUTTER=28,t.CODE_CELL_LEFT_MARGIN=32,t.EDITOR_TOOLBAR_HEIGHT=0,t.BOTTOM_CELL_TOOLBAR_GAP=18,t.BOTTOM_CELL_TOOLBAR_HEIGHT=50,t.CELL_STATUSBAR_HEIGHT=22,t.CELL_TOP_MARGIN=6,t.CELL_BOTTOM_MARGIN=6,t.EDITOR_TOP_PADDING=12,t.EDITOR_BOTTOM_PADDING=4,t.EDITOR_BOTTOM_PADDING_WITHOUT_STATUSBAR=12,t.CELL_OUTPUT_PADDING=14,t.COLLAPSED_INDICATOR_HEIGHT=24})),define(e[452],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DIFF_CELL_MARGIN=void 0,t.DIFF_CELL_MARGIN=16})), define(e[609],t([0,1,6,2,452,312]),(function(e,t,i,n,o,s){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CellDiffViewModel=t.PropertyFoldingState=void 0,function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed"}(r=t.PropertyFoldingState||(t.PropertyFoldingState={}));class a extends n.Disposable{constructor(e,t,n,o){super(),this.original=e,this.modified=t,this.type=n,this.editorEventDispatcher=o,this._layoutInfoEmitter=new i.Emitter,this.onDidLayoutChange=this._layoutInfoEmitter.event,this.metadataFoldingState=r.Collapsed,this.outputFoldingState=r.Collapsed,this._register(this.editorEventDispatcher.onDidChangeLayout(e=>{this._layoutInfoEmitter.fire({outerWidth:e.value.width})}))}getComputedCellContainerWidth(e,t,i){return i?e.width-2*o.DIFF_CELL_MARGIN+(t?s.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0)-2:(e.width-2*o.DIFF_CELL_MARGIN+(t?s.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0))/2-18-2}}t.CellDiffViewModel=a})),define(e[127],t([0,1,8,43]),(function(e,t,i,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveNotebookEditor=t.getVisibleCells=t.reduceCellRanges=t.cellRangesEqual=t.CursorAtBoundary=t.CellFocusMode=t.CellEditState=t.CellRevealPosition=t.CellRevealType=t.isCodeCellRenderTemplate=t.NotebookEditorOptions=t.CodeCellLayoutState=t.NOTEBOOK_HAS_MULTIPLE_KERNELS=t.EXPAND_CELL_CONTENT_COMMAND_ID=t.NOTEBOOK_CELL_OUTPUT_COLLAPSED=t.NOTEBOOK_CELL_INPUT_COLLAPSED=t.NOTEBOOK_CELL_HAS_OUTPUTS=t.NOTEBOOK_CELL_RUN_STATE=t.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE=t.NOTEBOOK_CELL_RUNNABLE=t.NOTEBOOK_CELL_EDITOR_FOCUSED=t.NOTEBOOK_CELL_FOCUSED=t.NOTEBOOK_CELL_EDITABLE=t.NOTEBOOK_CELL_TYPE=t.NOTEBOOK_VIEW_TYPE=t.NOTEBOOK_EDITOR_EXECUTING_NOTEBOOK=t.NOTEBOOK_EDITOR_RUNNABLE=t.NOTEBOOK_EDITOR_EDITABLE=t.NOTEBOOK_OUTPUT_FOCUSED=t.NOTEBOOK_CELL_LIST_FOCUSED=t.NOTEBOOK_EDITOR_FOCUSED=t.NOTEBOOK_IS_ACTIVE_EDITOR=t.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED=void 0,t.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED=new i.RawContextKey("notebookFindWidgetFocused",!1), t.NOTEBOOK_IS_ACTIVE_EDITOR=i.ContextKeyExpr.equals("activeEditor","workbench.editor.notebook"),t.NOTEBOOK_EDITOR_FOCUSED=new i.RawContextKey("notebookEditorFocused",!1),t.NOTEBOOK_CELL_LIST_FOCUSED=new i.RawContextKey("notebookCellListFocused",!1),t.NOTEBOOK_OUTPUT_FOCUSED=new i.RawContextKey("notebookOutputFocused",!1),t.NOTEBOOK_EDITOR_EDITABLE=new i.RawContextKey("notebookEditable",!0),t.NOTEBOOK_EDITOR_RUNNABLE=new i.RawContextKey("notebookRunnable",!0),t.NOTEBOOK_EDITOR_EXECUTING_NOTEBOOK=new i.RawContextKey("notebookExecuting",!1),t.NOTEBOOK_VIEW_TYPE=new i.RawContextKey("notebookViewType",void 0),t.NOTEBOOK_CELL_TYPE=new i.RawContextKey("notebookCellType",void 0),t.NOTEBOOK_CELL_EDITABLE=new i.RawContextKey("notebookCellEditable",!1),t.NOTEBOOK_CELL_FOCUSED=new i.RawContextKey("notebookCellFocused",!1),t.NOTEBOOK_CELL_EDITOR_FOCUSED=new i.RawContextKey("notebookCellEditorFocused",!1),t.NOTEBOOK_CELL_RUNNABLE=new i.RawContextKey("notebookCellRunnable",!1), t.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE=new i.RawContextKey("notebookCellMarkdownEditMode",!1),t.NOTEBOOK_CELL_RUN_STATE=new i.RawContextKey("notebookCellRunState",void 0),t.NOTEBOOK_CELL_HAS_OUTPUTS=new i.RawContextKey("notebookCellHasOutputs",!1),t.NOTEBOOK_CELL_INPUT_COLLAPSED=new i.RawContextKey("notebookCellInputIsCollapsed",!1),t.NOTEBOOK_CELL_OUTPUT_COLLAPSED=new i.RawContextKey("notebookCellOutputIsCollapsed",!1),t.EXPAND_CELL_CONTENT_COMMAND_ID="notebook.cell.expandCellContent",t.NOTEBOOK_HAS_MULTIPLE_KERNELS=new i.RawContextKey("notebookHasMultipleKernels",!1),function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Estimated=1]="Estimated",e[e.FromCache=2]="FromCache",e[e.Measured=3]="Measured"}(t.CodeCellLayoutState||(t.CodeCellLayoutState={}));class o extends n.EditorOptions{constructor(e){super(),this.overwrite(e),this.cellOptions=e.cellOptions}with(e){return new o(Object.assign(Object.assign({},this),e))}}function s(e){if(!e.length)return[];const t=e.sort((e,t)=>e.start-t.start),i=[] ;let n=t[0].start,o=t[0].end+1;for(let e=0,s=t.length;eo?(i.push({start:n,end:o-1}),n=s.start,o=s.end+1):s.end+1>o&&(o=s.end+1)}return i.push({start:n,end:o-1}),i}t.NotebookEditorOptions=o,t.isCodeCellRenderTemplate=function(e){return!!e.runToolbar},function(e){e[e.Line=0]="Line",e[e.Range=1]="Range"}(t.CellRevealType||(t.CellRevealType={})),function(e){e[e.Top=0]="Top",e[e.Center=1]="Center"}(t.CellRevealPosition||(t.CellRevealPosition={})),function(e){e[e.Preview=0]="Preview",e[e.Editing=1]="Editing"}(t.CellEditState||(t.CellEditState={})),function(e){e[e.Container=0]="Container",e[e.Editor=1]="Editor"}(t.CellFocusMode||(t.CellFocusMode={})),function(e){e[e.None=0]="None",e[e.Top=1]="Top",e[e.Bottom=2]="Bottom",e[e.Both=3]="Both"}(t.CursorAtBoundary||(t.CursorAtBoundary={})),t.cellRangesEqual=function(e,t){if(e=s(e),t=s(t),e.length!==t.length)return!1;for(let i=0;i{this.removeEntry(e)}}}getEntries(e){const t=this._entries.get(e);return t?Array.from(t.values()):[]}}t.NotebookCellStatusBarService=s})),define(e[453],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookEditorExtensionsRegistry=t.registerNotebookContribution=void 0;class i{constructor(){this.editorContributions=[]}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}}i.INSTANCE=new i,t.registerNotebookContribution=function(e,t){i.INSTANCE.registerEditorContribution(e,t)},function(e){e.getEditorContributions=function(){return i.INSTANCE.getEditorContributions()}}(t.NotebookEditorExtensionsRegistry||(t.NotebookEditorExtensionsRegistry={}))})), define(e[454],t([0,1,1274,57,222,16]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateNotebookKernelProvideAssociationSchema=t.notebookKernelProviderAssociationsConfigurationNode=t.viewTypeSchamaAddition=t.notebookKernelProviderAssociationsSettingId=t.NotebookViewTypesExtensionRegistry=t.NotebookKernelProviderAssociationRegistry=void 0;class r{}t.NotebookKernelProviderAssociationRegistry=r,r.extensionIds=[],r.extensionDescriptions=[];class a{}t.NotebookViewTypesExtensionRegistry=a,a.viewTypes=[],a.viewTypeDescriptions=[],t.notebookKernelProviderAssociationsSettingId="notebook.kernelProviderAssociations",t.viewTypeSchamaAddition={type:"string",enum:[]},t.notebookKernelProviderAssociationsConfigurationNode=Object.assign(Object.assign({},o.workbenchConfigurationNodeBase),{properties:{[t.notebookKernelProviderAssociationsSettingId]:{type:"array",markdownDescription:i.localize(0,null),items:{type:"object",defaultSnippets:[{body:{viewType:"$1",kernelProvider:"$2"}}], properties:{viewType:{type:["string","null"],default:null,enum:a.viewTypes,markdownEnumDescriptions:a.viewTypeDescriptions},kernelProvider:{type:["string","null"],default:null,enum:r.extensionIds,markdownEnumDescriptions:r.extensionDescriptions}}}}}}),t.updateNotebookKernelProvideAssociationSchema=function(){s.Registry.as(n.Extensions.Configuration).notifyConfigurationSchemaUpdated(t.notebookKernelProviderAssociationsConfigurationNode)},s.Registry.as(n.Extensions.Configuration).registerConfiguration(t.notebookKernelProviderAssociationsConfigurationNode)})),define(e[370],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookRegistry=void 0,t.NotebookRegistry=new class{constructor(){this.outputTransforms=[]}registerOutputTransform(e,t,i){this.outputTransforms.push({id:e,kind:t,ctor:i})}getOutputTransformContributions(){return this.outputTransforms.slice(0)}}})),define(e[1657],t([0,1,370,21]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0 }),t.OutputRenderer=void 0;t.OutputRenderer=class{constructor(e,t){this.instantiationService=t,this._contributions={},this._mimeTypeMapping={};const o=i.NotebookRegistry.getOutputTransformContributions();for(const t of o)try{const i=this.instantiationService.createInstance(t.ctor,e);this._contributions[t.id]=i,this._mimeTypeMapping[t.kind]=i}catch(e){n.onUnexpectedError(e)}}renderNoop(e,t){const i=document.createElement("p");return i.innerText=`No renderer could be found for output. It has the following output type: ${e.outputKind}`,t.appendChild(i),{type:0,hasDynamicHeight:!1}}render(e,t,i,n){const o=this._mimeTypeMapping[e.outputKind];return o?o.render(e,t,i,n):this.renderNoop(e,t)}}})),define(e[1658],t([0,1,30,20,2,100]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAndFillInActionBarActionsWithVerticalSeparators=t.VerticalSeparatorViewItem=t.VerticalSeparator=void 0;class r extends i.Action{constructor(e){ super(r.ID,e,e?"verticalSeparator text":"verticalSeparator"),this.checked=!1,this.enabled=!1}}t.VerticalSeparator=r,r.ID="vs.actions.verticalSeparator";class a extends s.BaseActionViewItem{render(e){e.classList.add("verticalSeparator")}}t.VerticalSeparatorViewItem=a,t.createAndFillInActionBarActionsWithVerticalSeparators=function(e,t,s,a,l){const c=e.getActions(t);return function(e,t,o,s=!1,a=(e=>"navigation"===e)){for(const l of e){let[e,c]=l;o&&(c=c.map(e=>e instanceof n.MenuItemAction&&e.alt?e.alt:e));const d=a(e);if(d){const e=Array.isArray(t)?t:t.primary;e.length>0&&e.push(new r),e.push(...c)}if(!d||s){const e=Array.isArray(t)?t:t.secondary;e.length>0&&e.push(new i.Separator),e.push(...c)}}}(c,s,!1,a,l),function(e){const t=new o.DisposableStore;for(const[,i]of e)for(const e of i)t.add(e);return t}(c)}})),define(e[1659],t([0,1,20]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CellMenus=void 0;let n=class{constructor(e){this.menuService=e}getCellTitleMenu(e){ return this.getMenu(i.MenuId.NotebookCellTitle,e)}getCellInsertionMenu(e){return this.getMenu(i.MenuId.NotebookCellBetween,e)}getCellTopInsertionMenu(e){return this.getMenu(i.MenuId.NotebookCellListTop,e)}getMenu(e,t){return this.menuService.createMenu(e,t)}};n=o([r(0,i.IMenuService)],n),t.CellMenus=n})),define(e[610],t([0,1,7,94,183]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodiconActionViewItem=void 0;class s extends n.MenuEntryActionViewItem{constructor(e,t,i,n){super(e,t,i,n),this._action=e}updateLabel(){var e;this.options.label&&this.label&&i.reset(this.label,...o.renderCodicons(null!==(e=this._commandAction.label)&&void 0!==e?e:""))}}t.CodiconActionViewItem=s})),define(e[611],t([0,1,256,42,50,21,306,6,2,45]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownRenderer=void 0;let u=class extends d.Disposable{constructor(e,t,i){super(),this._baseUrl=e,this._modeService=t,this._openerService=i, this._onDidUpdateRender=this._register(new c.Emitter),this.onDidUpdateRender=this._onDidUpdateRender.event}getOptions(e){return{baseUrl:this._baseUrl,codeBlockRenderer:(e,t)=>{let i=null;return i=this._modeService.getModeIdForLanguageName(e||""),this._modeService.triggerMode(i||""),Promise.resolve(!0).then(e=>{const n=h.TokenizationRegistry.getPromise(i||"");return n?n.then(e=>l.tokenizeToString(t,e)):l.tokenizeToString(t,void 0)}).then(e=>`${e}`)},codeBlockRenderCallback:()=>this._onDidUpdateRender.fire(),actionHandler:{callback:e=>{this._openerService.open(e,{fromUserGesture:!0}).catch(a.onUnexpectedError)},disposeables:e}}}render(e){const t=new d.DisposableStore;let n;return{element:n=e?i.renderMarkdown(e,this.getOptions(t),{gfm:!0}):document.createElement("span"),dispose:()=>t.dispose()}}};u=o([r(1,s.IModeService),r(2,n.IOpenerService)],u),t.MarkdownRenderer=u})),define(e[612],t([0,1,7,2,400]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.getResizesObserver=t.BrowserResizeObserver=void 0;class s extends n.Disposable{constructor(e,t,n){super(),this.referenceDomElement=e,this.width=-1,this.height=-1,this.observer=new ResizeObserver(t=>{for(const o of t)o.target===e&&o.contentRect&&(this.width===o.contentRect.width&&this.height===o.contentRect.height||(this.width=o.contentRect.width,this.height=o.contentRect.height,i.scheduleAtNextAnimationFrame(()=>{n()})))})}getWidth(){return this.width}getHeight(){return this.height}startObserving(){this.observer.observe(this.referenceDomElement)}stopObserving(){this.observer.unobserve(this.referenceDomElement)}dispose(){this.observer.disconnect(),super.dispose()}}t.BrowserResizeObserver=s,t.getResizesObserver=function(e,t,i){return ResizeObserver?new s(e,t,i):new o.ElementSizeObserver(e,t,i)}})),define(e[1660],t([0,1]),(function(e,t){"use strict";function i(){const e=acquireVsCodeApi(),t=async(t,i)=>{try{const n=await fetch(t),o=await n.blob(),s=new FileReader;s.addEventListener("load",()=>{const t=s.result ;e.postMessage({__vscode_notebook_message:!0,type:"clicked-data-url",data:t,downloadName:i})}),s.readAsDataURL(o)}catch(e){console.error(e.message)}};document.body.addEventListener("click",e=>{if(e&&e.view&&e.view.document)for(let i=e.target;i;i=i.parentNode)if(i instanceof HTMLAnchorElement&&i.href){i.href.startsWith("blob:")&&t(i.href,i.download),e.preventDefault();break}});const i=["type","src","nonce","noModule","async"],n=new Map;function o(e){const t=document.getElementById(e);if(t){const e=t.querySelector('[tabindex="0"], [href], button, input, option, select, textarea');null==e||e.focus()}}function s(t,i,n){const s=document.createElement("div");return s.tabIndex=0,s.addEventListener("focus",()=>{e.postMessage({__vscode_notebook_message:!0,type:"focus-editor",id:i,focusNext:n}),setTimeout(()=>{o(t)},50)}),s}const r=Symbol("dontEmit");function a(e=(()=>void 0)){const t=new Set;return{fire(e){for(const i of[...t])i.fn.call(i.thisArg,e)},event(i,n,o){const s={fn:i,thisArg:n},r={dispose:()=>{t.delete(s), e(t)}};return t.add(s),e(t),o instanceof Array?o.push(r):o&&o.add(r),r}}}function l(e,t){let i;const n=a(o=>{o.size&&!i?i=e.event(e=>{const i=t(e);i!==r&&n.fire(i)}):i&&!o.size&&i.dispose()});return n.event}const c=a(),d=a(),h=a(),u=(e,t)=>"*"===e||t===e||"undefined"===t;window.acquireNotebookRendererApi=t=>{if(!t||"string"!=typeof t)throw new Error(`acquireNotebookRendererApi should be called your renderer type as a string, got: ${t}.`);return{postMessage(i){e.postMessage({__vscode_notebook_message:!0,type:"customRendererMessage",rendererId:t,message:i})},setState(i){e.setState(Object.assign(Object.assign({},e.getState()),{[t]:i}))},getState(){const i=e.getState();return"object"==typeof i&&i?i[t]:void 0},onDidReceiveMessage:l(h,([e,i])=>e===t?i:r),onWillDestroyOutput:l(c,([e,i])=>u(t,e)?i:r),onDidCreateOutput:l(d,([e,i])=>u(t,e)?i:r)}};const g=new Map,p=new Map,m=(e,t)=>{const i=p.get(e.outputId),n=i?i.then(()=>t(e)):t(e);if(void 0===n)return;const o=n.then(()=>{p.get(e.outputId)===o&&p.delete(e.outputId)}) ;p.set(e.outputId,o)};window.addEventListener("wheel",t=>{t.defaultPrevented||function(e){for(let t=e.target;t;t=t.parentNode){if(!(t instanceof Element)||"container"===t.id)return!1;if(e.deltaY<0&&t.scrollTop>0)return!0;if(e.deltaY>0&&t.scrollTop+t.clientHeight{const r=t;switch(r.data.type){case"html":m(r.data,async t=>{const o=await Promise.all(t.requiredPreloads.map(e=>g.get(e.uri)));if(!p.has(t.outputId))return;let r=document.getElementById(t.cellId);const a=t.outputId;if(!r){const e=document.getElementById("container"),i=s(t.cellId,a);e.appendChild(i);const n=document.createElement("div");n.id=t.cellId,e.appendChild(n),r=n;const o=s(t.cellId,a,!0);e.appendChild(o)}const l=document.createElement("div");l.style.position="absolute",l.style.top=t.top+"px", l.style.left=t.left+"px",l.style.width="calc(100% - "+t.left+"px)",l.style.minHeight="32px",l.id=a,function(t,i){t.addEventListener("mouseenter",()=>{e.postMessage({__vscode_notebook_message:!0,type:"mouseenter",id:i,data:{}})}),t.addEventListener("mouseleave",()=>{e.postMessage({__vscode_notebook_message:!0,type:"mouseleave",id:i,data:{}})})}(l,a);const c=t.content;if(1===c.type)l.innerHTML=c.htmlContent,r.appendChild(l),(e=>{const t=Array.from(e.getElementsByTagName("script"));for(let n=0;n!!e)){l.innerText="Error loading preloads:";const e=document.createElement("ul");for(const t of o)if(t){const i=document.createElement("li");i.innerText=t,e.appendChild(i)}l.appendChild(e),r.appendChild(l)}else d.fire([t.apiNamespace,{element:l,output:c.output,mimeType:c.mimeType, outputId:a}]),r.appendChild(l);((t,i)=>{var o;const s=new ResizeObserver(t=>{for(const n of t){if(!document.body.contains(n.target))return;n.target.id===i&&n.contentRect&&e.postMessage({__vscode_notebook_message:!0,type:"dimension",id:i,data:{height:n.contentRect.height+2*__outputNodePadding__}})}});s.observe(t),n.has(i)&&(null===(o=n.get(i))||void 0===o||o.disconnect()),n.set(i,s)})(l,a),e.postMessage({__vscode_notebook_message:!0,type:"dimension",id:a,data:{height:l.clientHeight}}),r.style.display=t.initiallyHidden?"none":"block"});break;case"view-scroll":for(let e=0;e{e.disconnect()}),n.clear();break;case"clearOutput":const t=document.getElementById(r.data.outputId);p.delete(r.data.outputId), t&&t.parentNode&&(c.fire([r.data.apiNamespace,{outputId:r.data.outputId}]),t.parentNode.removeChild(t));break;case"hideOutput":m(r.data,({outputId:e})=>{var t;const i=null===(t=document.getElementById(e))||void 0===t?void 0:t.parentElement;i&&(i.style.display="none")});break;case"showOutput":m(r.data,({outputId:t,top:i})=>{const n=document.getElementById(t);n&&(n.parentElement.style.display="block",n.style.top=i+"px",e.postMessage({__vscode_notebook_message:!0,type:"dimension",id:t,data:{height:n.clientHeight}}))});break;case"preload":const a=r.data.resources,l=document.getElementById("__vscode_preloads");for(let e=0;e{n.addEventListener("load",()=>e(void 0)),n.addEventListener("error",()=>e(`Network error loading ${i}, does the path exist?`))}))}break;case"focus-output":o(r.data.cellId);break;case"decorations":{const e=document.getElementById(r.data.cellId) ;r.data.addedClassNames.forEach(t=>{null==e||e.classList.add(t)}),r.data.removedClassNames.forEach(t=>{null==e||e.classList.remove(t)})}break;case"customRendererMessage":h.fire([r.data.rendererId,r.data.message])}}),e.postMessage({__vscode_notebook_message:!0,type:"initialized"})}Object.defineProperty(t,"__esModule",{value:!0}),t.preloadsScriptStr=void 0;t.preloadsScriptStr=e=>`(${i})()`.replace(/__outputNodePadding__/g,`${e}`)})),define(e[1661],t([0,1,127]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitCellEdit=t.JoinCellEdit=void 0;t.JoinCellEdit=class{constructor(e,t,i,n,o,s,r,a,l){this.resource=e,this.index=t,this.direction=i,this.cell=n,this.selections=o,this.inverseRange=s,this.insertContent=r,this.removedCell=a,this.editingDelegate=l,this.type=0,this.label="Join Cell",this._deletedRawCell=this.removedCell.model}async undo(){var e ;if(!this.editingDelegate.insertCell||!this.editingDelegate.createCellViewModel)throw new Error("Notebook Insert Cell not implemented for Undo/Redo");await this.cell.resolveTextModel(),null===(e=this.cell.textModel)||void 0===e||e.applyEdits([{range:this.inverseRange,text:""}]),this.cell.setSelections(this.selections);const t=this.editingDelegate.createCellViewModel(this._deletedRawCell);"above"===this.direction?(this.editingDelegate.insertCell(this.index,this._deletedRawCell,[t.handle]),t.focusMode=i.CellFocusMode.Editor):(this.editingDelegate.insertCell(this.index,t.model,[this.cell.handle]),this.cell.focusMode=i.CellFocusMode.Editor)}async redo(){var e;if(!this.editingDelegate.deleteCell)throw new Error("Notebook Delete Cell not implemented for Undo/Redo");await this.cell.resolveTextModel(),null===(e=this.cell.textModel)||void 0===e||e.applyEdits([{range:this.inverseRange,text:this.insertContent}]),this.editingDelegate.deleteCell(this.index,[this.cell.handle]),this.cell.focusMode=i.CellFocusMode.Editor}} ;t.SplitCellEdit=class{constructor(e,t,i,n,o,s,r,a){this.resource=e,this.index=t,this.cell=i,this.selections=n,this.cellContents=o,this.language=s,this.cellKind=r,this.editingDelegate=a,this.type=0,this.label="Join Cell"}async undo(){if(!this.editingDelegate.deleteCell)throw new Error("Notebook Delete Cell not implemented for Undo/Redo");await this.cell.resolveTextModel(),this.cell.textModel.applyEdits([{range:this.cell.textModel.getFullModelRange(),text:this.cellContents.join("")}]),this.cell.setSelections(this.selections);for(let e=1;e{for(let t=0;t{this.editingDelegate.insertCell(e[0],t,this.beforeHandles)})})}redo(){if(!this.editingDelegate.deleteCell||!this.editingDelegate.insertCell)throw new Error("Notebook Insert/Delete Cell not implemented for Undo/Redo");this.diffs.reverse().forEach(e=>{for(let t=0;t{this.editingDelegate.insertCell(e[0],t,this.endHandles)})})}};t.CellMetadataEdit=class{constructor(e,t,i,n,o){this.resource=e,this.index=t,this.oldMetadata=i,this.newMetadata=n,this.editingDelegate=o,this.type=0,this.label="Update Cell Metadata"}undo(){this.editingDelegate.updateCellMetadata&&this.editingDelegate.updateCellMetadata(this.index,this.oldMetadata)}redo(){ this.editingDelegate.updateCellMetadata&&this.editingDelegate.updateCellMetadata(this.index,this.newMetadata)}}})),define(e[1663],t([0,1,6,553,18,2,133]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookCellTextModel=void 0;class a extends s.Disposable{constructor(e,t,n,o,s,r,a,l,c){super(),this.uri=e,this.handle=t,this._source=n,this._language=o,this.cellKind=s,this.transientOptions=l,this._modelService=c,this._onDidChangeOutputs=new i.Emitter,this.onDidChangeOutputs=this._onDidChangeOutputs.event,this._onDidChangeContent=new i.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeMetadata=new i.Emitter,this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidChangeLanguage=new i.Emitter,this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._hash=null,this._outputs=r,this._metadata=a||{}}get outputs(){return this._outputs}get metadata(){return this._metadata}set metadata(e){this._metadata=e,this._hash=null, this._onDidChangeMetadata.fire()}get language(){return this._language}set language(e){this._language=e,this._hash=null,this._onDidChangeLanguage.fire(e)}get textBuffer(){if(this._textBuffer)return this._textBuffer;const e=new n.PieceTreeTextBufferBuilder;e.acceptChunk(this._source);const t=e.finish(!0);return this._textBuffer=t.create(1),this._register(this._textBuffer.onDidChangeContent(()=>{this._hash=null,this._onDidChangeContent.fire()})),this._textBuffer}getValue(){const e=this.getFullModelRange();return"\n"===this.textBuffer.getEOL()?this.textBuffer.getValueInRange(e,1):this.textBuffer.getValueInRange(e,2)}getHashValue(){return null!==this._hash?this._hash:(this._hash=r.hash([r.hash(this.language),r.hash(this.getValue()),this._getPersisentMetadata,this.transientOptions.transientOutputs?[]:this._outputs]),this._hash)}_getPersisentMetadata(){let e={};const t=this.transientOptions.transientMetadata,i=new Set([...Object.keys(this.metadata)]);for(let n of i)t[n]||(e[n]=this.metadata[n]);return e} getTextLength(){return this.textBuffer.getLength()}getFullModelRange(){const e=this.textBuffer.getLineCount();return new o.Range(1,1,e,this.textBuffer.getLineLength(e)+1)}spliceNotebookCellOutputs(e){e.reverse().forEach(e=>{this.outputs.splice(e[0],e[1],...e[2])}),this._onDidChangeOutputs.fire(e)}getEvaluatedMetadata(e){var t,i,n,o,s,r;const a=null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.editable)&&void 0!==i?i:e.cellEditable,l=null!==(o=null===(n=this.metadata)||void 0===n?void 0:n.runnable)&&void 0!==o?o:e.cellRunnable,c=null!==(r=null===(s=this.metadata)||void 0===s?void 0:s.hasExecutionOrder)&&void 0!==r?r:e.cellHasExecutionOrder;return Object.assign(Object.assign({},this.metadata||{}),{editable:a,runnable:l,hasExecutionOrder:c})}async resolveTextModelRef(){return await this._modelService.createModelReference(this.uri)}dispose(){super.dispose()}}t.NotebookCellTextModel=a})),define(e[455],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.INotebookCellStatusBarService=void 0,t.INotebookCellStatusBarService=i.createDecorator("notebookCellStatusBarService")})),define(e[91],t([0,1,122,92,29,48,12,8]),(function(e,t,i,n,o,s,r,a){"use strict";var l,c;Object.defineProperty(t,"__esModule",{value:!0}),t.CellStatusbarAlignment=t.NotebookTextDiffEditorPreview=t.ShowCellStatusBarKey=t.CellToolbarLocKey=t.DisplayOrderKey=t.CellSequence=t.notebookDocumentFilterMatch=t.isDocumentExcludePattern=t.NotebookEditorPriority=t.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=t.diff=t.sortMimeTypes=t.mimeTypeSupportedByCore=t.CellUri=t.getCellUndoRedoComparisonKey=t.CellEditType=t.NotebookCellsChangeType=t.outputHasDynamicHeight=t.RenderOutputType=t.addIdToOutput=t.isTransformedDisplayOutput=t.MimeTypeRendererResolver=t.NotebookCellRunState=t.notebookDocumentMetadataDefaults=t.NotebookRunState=t.BUILTIN_RENDERER_ID=t.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=t.NOTEBOOK_DISPLAY_ORDER=t.CellOutputKind=t.CellKind=void 0,function(e){e[e.Markdown=1]="Markdown",e[e.Code=2]="Code" }(t.CellKind||(t.CellKind={})),function(e){e[e.Text=1]="Text",e[e.Error=2]="Error",e[e.Rich=3]="Rich"}(l=t.CellOutputKind||(t.CellOutputKind={})),t.NOTEBOOK_DISPLAY_ORDER=["application/json","application/javascript","text/html","image/svg+xml","text/markdown","image/png","image/jpeg","text/plain"],t.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=["text/markdown","application/json","text/plain","text/html","image/svg+xml","image/png","image/jpeg"],t.BUILTIN_RENDERER_ID="_builtin",function(e){e[e.Running=1]="Running",e[e.Idle=2]="Idle"}(c=t.NotebookRunState||(t.NotebookRunState={})),t.notebookDocumentMetadataDefaults={editable:!0,runnable:!0,cellEditable:!0,cellRunnable:!0,cellHasExecutionOrder:!0,displayOrder:t.NOTEBOOK_DISPLAY_ORDER,custom:{},runState:c.Idle},function(e){e[e.Running=1]="Running",e[e.Idle=2]="Idle",e[e.Success=3]="Success",e[e.Error=4]="Error"}(t.NotebookCellRunState||(t.NotebookCellRunState={})),function(e){e[e.Core=0]="Core",e[e.Active=1]="Active",e[e.Lazy=2]="Lazy" }(t.MimeTypeRendererResolver||(t.MimeTypeRendererResolver={})),t.isTransformedDisplayOutput=function(e){return e.outputKind===l.Rich&&!!e.outputId};t.addIdToOutput=(e,t=n.generateUuid())=>e.outputKind===l.Rich?Object.assign(Object.assign({},e),{outputId:t}):e,function(e){e[e.None=0]="None",e[e.Html=1]="Html",e[e.Extension=2]="Extension"}(t.RenderOutputType||(t.RenderOutputType={}));var d;function h(e,t){return r.isWindows&&(e=e.replace(/\//g,"\\"),t=t.replace(/\//g,"\\")),i.match(e,t)}function u(e,t,i,n){let o=0;for(let i=0;i2!==e.type&&e.hasDynamicHeight,function(e){e[e.ModelChange=1]="ModelChange",e[e.Move=2]="Move",e[e.CellClearOutput=3]="CellClearOutput", e[e.CellsClearOutput=4]="CellsClearOutput",e[e.ChangeLanguage=5]="ChangeLanguage",e[e.Initialize=6]="Initialize",e[e.ChangeCellMetadata=7]="ChangeCellMetadata",e[e.Output=8]="Output",e[e.ChangeCellContent=9]="ChangeCellContent",e[e.ChangeDocumentMetadata=10]="ChangeDocumentMetadata",e[e.Unknown=11]="Unknown"}(t.NotebookCellsChangeType||(t.NotebookCellsChangeType={})),function(e){e[e.Replace=1]="Replace",e[e.Output=2]="Output",e[e.Metadata=3]="Metadata",e[e.CellLanguage=4]="CellLanguage",e[e.DocumentMetadata=5]="DocumentMetadata",e[e.OutputsSplice=6]="OutputsSplice",e[e.Move=7]="Move",e[e.Unknown=8]="Unknown",e[e.CellContent=9]="CellContent"}(t.CellEditType||(t.CellEditType={})),t.getCellUndoRedoComparisonKey=function(e){const t=d.parse(e);return t?t.notebook.toString():e.toString()},function(e){e.scheme=o.Schemas.vscodeNotebookCell;const t=/^\d{7,}/;e.generate=function(t,i){return t.with({scheme:e.scheme,fragment:`${i.toString().padStart(7,"0")}${t.scheme!==o.Schemas.file?t.scheme:""}`})}, e.generateCellMetadataUri=function(e,t){return e.with({scheme:o.Schemas.vscode,authority:"vscode-notebook-cell-metadata",fragment:`${t.toString().padStart(7,"0")}${e.scheme!==o.Schemas.file?e.scheme:""}`})},e.parse=function(i){if(i.scheme!==e.scheme)return;const n=t.exec(i.fragment);return n?{handle:Number(n[0]),notebook:i.with({scheme:i.fragment.substr(n[0].length)||o.Schemas.file,fragment:null})}:void 0}}(d=t.CellUri||(t.CellUri={})),t.mimeTypeSupportedByCore=function(e){return["application/json","application/javascript","text/html","image/svg+xml","text/markdown","image/png","image/jpeg","text/plain","text/x-javascript"].indexOf(e)>-1},t.sortMimeTypes=function(e,t,i,n){return e.sort((e,o)=>u(e,t,i,n)-u(o,t,i,n))},t.diff=function(e,t,i,n=((e,t)=>e===t)){const o=[];function s(e,t,i){if(0===t&&0===i.length)return;const n=o[o.length-1];n&&n.start+n.deleteCount===e?(n.deleteCount+=t,n.toInsert.push(...i)):o.push({start:e,deleteCount:t,toInsert:i})}let r=0,a=0;for(;;){if(r===e.length){s(r,0,t.slice(a));break} if(a===t.length){s(r,e.length-r,[]);break}const o=e[r],l=t[a];n(o,l)?(r+=1,a+=1):i(l)?(s(r,1,[]),r+=1):(s(r,0,[l]),a+=1)}return o},t.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=new a.RawContextKey("notebookEditorCursorAtBoundary","none"),function(e){e.default="default",e.option="option"}(t.NotebookEditorPriority||(t.NotebookEditorPriority={})),t.isDocumentExcludePattern=g,t.notebookDocumentFilterMatch=function(e,t,n){if(Array.isArray(e.viewType)&&e.viewType.indexOf(t)>=0)return!0;if(e.viewType===t)return!0;if(e.filenamePattern){let t=g(e.filenamePattern)?e.filenamePattern.include:e.filenamePattern,o=g(e.filenamePattern)?e.filenamePattern.exclude:void 0;if(i.match(t,s.basename(n.fsPath).toLowerCase()))return!o||!i.match(o,s.basename(n.fsPath).toLowerCase())}return!1};t.CellSequence=class{constructor(e){this.textModel=e}getElements(){const e=new Int32Array(this.textModel.cells.length);for(let t=0;te.line?1:this._charactere._character?1:0}translate(e,t=0){if(null===e||null===t)throw s.illegalArgument();let i;return void 0===e?i=0:"number"==typeof e?i=e:(i="number"==typeof e.lineDelta?e.lineDelta:0,t="number"==typeof e.characterDelta?e.characterDelta:0),0===i&&0===t?this:new S(this.line+i,this.character+t)}with(e,t=this.character){if(null===e||null===t)throw s.illegalArgument();let i;return void 0===e?i=this.line:"number"==typeof e?i=e:(i="number"==typeof e.line?e.line:this.line,t="number"==typeof e.character?e.character:this.character),i===this.line&&t===this.character?this:new S(i,t)} toJSON(){return{line:this.line,character:this.character}}};L=S=o([A],L),t.Position=L;let O=b=class{constructor(e,t,i,n){let o,s;if("number"==typeof e&&"number"==typeof t&&"number"==typeof i&&"number"==typeof n?(o=new L(e,t),s=new L(i,n)):e instanceof L&&t instanceof L&&(o=e,s=t),!o||!s)throw new Error("Invalid arguments");o.isBefore(s)?(this._start=o,this._end=s):(this._start=s,this._end=o)}static isRange(e){return e instanceof b||!!e&&(L.isPosition(e.start)&&L.isPosition(e.end))}get start(){return this._start}get end(){return this._end}contains(e){return e instanceof b?this.contains(e._start)&&this.contains(e._end):e instanceof L&&(!e.isBefore(this._start)&&!this._end.isBefore(e))}isEqual(e){return this._start.isEqual(e._start)&&this._end.isEqual(e._end)}intersection(e){const t=L.Max(e.start,this._start),i=L.Min(e.end,this._end);if(!t.isAfter(i))return new b(t,i)}union(e){if(this.contains(e))return this;if(e.contains(this))return e;const t=L.Min(e.start,this._start),i=L.Max(e.end,this.end);return new b(t,i)} get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(e,t=this.end){if(null===e||null===t)throw s.illegalArgument();let i;return e?L.isPosition(e)?i=e:(i=e.start||this.start,t=e.end||this.end):i=this.start,i.isEqual(this._start)&&t.isEqual(this.end)?this:new b(i,t)}toJSON(){return[this.start,this.end]}};O=b=o([A],O),t.Range=O;let N=_=class extends O{constructor(e,t,i,n){let o,s;if("number"==typeof e&&"number"==typeof t&&"number"==typeof i&&"number"==typeof n?(o=new L(e,t),s=new L(i,n)):e instanceof L&&t instanceof L&&(o=e,s=t),!o||!s)throw new Error("Invalid arguments");super(o,s),this._anchor=o,this._active=s}static isSelection(e){return e instanceof _||!!e&&(O.isRange(e)&&L.isPosition(e.anchor)&&L.isPosition(e.active)&&"boolean"==typeof e.isReversed)}get anchor(){return this._anchor}get active(){return this._active}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor }}};N=_=o([A],N),t.Selection=N;t.ResolvedAuthority=class{constructor(e,t){if("string"!=typeof e||0===e.length)throw s.illegalArgument("host");if("number"!=typeof t||0===t||Math.round(t)!==t)throw s.illegalArgument("port");this.host=e,this.port=Math.round(t)}};class P extends Error{constructor(e,t=p.RemoteAuthorityResolverErrorCode.Unknown,i){super(e),this._message=e,this._code=t,this._detail=i,"function"==typeof Object.setPrototypeOf&&Object.setPrototypeOf(this,P.prototype)}static NotAvailable(e,t){return new P(e,p.RemoteAuthorityResolverErrorCode.NotAvailable,t)}static TemporarilyNotAvailable(e){return new P(e,p.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable)}}t.RemoteAuthorityResolverError=P,function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.EndOfLine||(t.EndOfLine={})),function(e){e[e.Replace=1]="Replace",e[e.Append=2]="Append",e[e.Prepend=3]="Prepend"}(t.EnvironmentVariableMutatorType||(t.EnvironmentVariableMutatorType={}));let F=C=class{constructor(e,t){this._range=e,this._newText=t} static isTextEdit(e){return e instanceof C||!!e&&(O.isRange(e)&&"string"==typeof e.newText)}static replace(e,t){return new C(e,t)}static insert(e,t){return C.replace(new O(e,e),t)}static delete(e){return C.replace(e,"")}static setEndOfLine(e){const t=new C(new O(new L(0,0),new L(0,0)),"");return t.newEol=e,t}get range(){return this._range}set range(e){if(e&&!O.isRange(e))throw s.illegalArgument("range");this._range=e}get newText(){return this._newText||""}set newText(e){if(e&&"string"!=typeof e)throw s.illegalArgument("newText");this._newText=e}get newEol(){return this._newEol}set newEol(e){if(e&&"number"!=typeof e)throw s.illegalArgument("newEol");this._newEol=e}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};F=C=o([A],F),t.TextEdit=F,function(e){e[e.File=1]="File",e[e.Text=2]="Text",e[e.Cell=3]="Cell"}(t.FileEditType||(t.FileEditType={}));let B=class{constructor(){this._edits=new Array}_allEntries(){return this._edits}renameFile(e,t,i,n){this._edits.push({_type:1,from:e,to:t, options:i,metadata:n})}createFile(e,t,i){this._edits.push({_type:1,from:void 0,to:e,options:t,metadata:i})}deleteFile(e,t,i){this._edits.push({_type:1,from:e,to:void 0,options:t,metadata:i})}replaceNotebookMetadata(e,t,i){this._edits.push({_type:3,metadata:i,uri:e,notebookMetadata:t})}replaceNotebookCells(e,t,i,n,o){(t!==i||n.length>0)&&this._edits.push({_type:3,metadata:o,uri:e,edit:{editType:1,index:t,count:i-t,cells:n.map(e=>Object.assign(Object.assign({},e),{outputs:e.outputs.map(e=>m.addIdToOutput(e))}))}})}replaceNotebookCellOutput(e,t,i,n){this._edits.push({_type:3,metadata:n,uri:e,edit:{editType:2,index:t,outputs:i.map(e=>We.isNotebookCellOutput(e)?m.addIdToOutput(e.toJSON()):m.addIdToOutput(e))}})}replaceNotebookCellMetadata(e,t,i,n){this._edits.push({_type:3,metadata:n,uri:e,edit:{editType:3,index:t,metadata:i}})}replace(e,t,i,n){this._edits.push({_type:2,uri:e,edit:new F(t,i),metadata:n})}insert(e,t,i,n){this.replace(e,new O(t,t),i,n)}delete(e,t,i){this.replace(e,t,"",i)}has(e){ return this._edits.some(t=>2===t._type&&t.uri.toString()===e.toString())}set(e,t){if(t)for(const i of t)i&&this._edits.push({_type:2,uri:e,edit:i});else{for(let t=0;te.replace(/\$|}|\\|,/g,"\\$&")).join(",");return this.value+="${",this.value+=t,this.value+="|",this.value+=i,this.value+="|}",this}appendVariable(e,t){if("function"==typeof t){const e=new y;e._tabstop=this._tabstop,t(e),this._tabstop=e._tabstop,t=e.value}else"string"==typeof t&&(t=t.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=e,t&&(this.value+=":",this.value+=t),this.value+="}",this}};var W;V=y=o([A],V),t.SnippetString=V,function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(t.DiagnosticTag||(t.DiagnosticTag={})),function(e){e[e.Hint=3]="Hint",e[e.Information=2]="Information",e[e.Warning=1]="Warning",e[e.Error=0]="Error"}(W=t.DiagnosticSeverity||(t.DiagnosticSeverity={})) ;let z=w=class{constructor(e,t){if(this.uri=e,t)if(t instanceof O)this.range=t;else{if(!(t instanceof L))throw new Error("Illegal argument");this.range=new O(t,t)}else;}static isLocation(e){return e instanceof w||!!e&&(O.isRange(e.range)&&c.URI.isUri(e.uri))}toJSON(){return{uri:this.uri,range:this.range}}};z=w=o([A],z),t.Location=z;let U=class{constructor(e,t){this.location=e,this.message=t}static is(e){return!!e&&("string"==typeof e.message&&e.location&&O.isRange(e.location.range)&&c.URI.isUri(e.location.uri))}static isEqual(e,t){return e===t||!(!e||!t)&&(e.message===t.message&&e.location.range.isEqual(t.location.range)&&e.location.uri.toString()===t.location.uri.toString())}};U=o([A],U),t.DiagnosticRelatedInformation=U;let K=class{constructor(e,t,i=W.Error){if(!O.isRange(e))throw new TypeError("range must be set");if(!t)throw new TypeError("message must be set");this.range=e,this.message=t,this.severity=i}toJSON(){return{severity:W[this.severity],message:this.message,range:this.range,source:this.source, code:this.code}}static isEqual(e,t){return e===t||!(!e||!t)&&(e.message===t.message&&e.severity===t.severity&&e.code===t.code&&e.severity===t.severity&&e.source===t.source&&e.range.isEqual(t.range)&&i.equals(e.tags,t.tags)&&i.equals(e.relatedInformation,t.relatedInformation,U.isEqual))}};K=o([A],K),t.Diagnostic=K;let H=class{constructor(e,t){if(!e)throw new Error("Illegal argument, contents must be defined");Array.isArray(e)?this.contents=e:(r.isMarkdownString(e),this.contents=[e]),this.range=t}};var G;H=o([A],H),t.Hover=H,function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(G=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));let $=class{constructor(e,t=G.Text){this.range=e,this.kind=t}toJSON(){return{range:this.range,kind:G[this.kind]}}};var j;$=o([A],$),t.DocumentHighlight=$,function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field", e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(j=t.SymbolKind||(t.SymbolKind={})),function(e){e[e.Deprecated=1]="Deprecated"}(t.SymbolTag||(t.SymbolTag={}));let q=E=class{constructor(e,t,i,n,o){this.name=e,this.kind=t,this.containerName=o,"string"==typeof i&&(this.containerName=i),n instanceof z?this.location=n:i instanceof O&&(this.location=new z(n,i)),E.validate(this)}static validate(e){if(!e.name)throw new Error("name must not be falsy")}toJSON(){return{name:this.name,kind:j[this.kind],location:this.location,containerName:this.containerName}}};q=E=o([A],q),t.SymbolInformation=q;let Y=I=class{ constructor(e,t,i,n,o){this.name=e,this.detail=t,this.kind=i,this.range=n,this.selectionRange=o,this.children=[],I.validate(this)}static validate(e){if(!e.name)throw new Error("name must not be falsy");if(!e.range.contains(e.selectionRange))throw new Error("selectionRange must be contained in fullRange");e.children&&e.children.forEach(I.validate)}};Y=I=o([A],Y),t.DocumentSymbol=Y,function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(t.CodeActionTrigger||(t.CodeActionTrigger={}));let X=class{constructor(e,t){this.title=e,this.kind=t}};X=o([A],X),t.CodeAction=X;let Q=x=class{constructor(e){this.value=e}append(e){return new x(this.value?this.value+x.sep+e:e)}intersects(e){return this.contains(e)||e.contains(this)}contains(e){return this.value===e.value||e.value.startsWith(this.value+x.sep)}};Q.sep=".",Q=x=o([A],Q),t.CodeActionKind=Q,Q.Empty=new Q(""),Q.QuickFix=Q.Empty.append("quickfix"),Q.Refactor=Q.Empty.append("refactor"),Q.RefactorExtract=Q.Refactor.append("extract"), Q.RefactorInline=Q.Refactor.append("inline"),Q.RefactorRewrite=Q.Refactor.append("rewrite"),Q.Source=Q.Empty.append("source"),Q.SourceOrganizeImports=Q.Source.append("organizeImports"),Q.SourceFixAll=Q.Source.append("fixAll");let J=class{constructor(e,t){if(this.range=e,this.parent=t,t&&!t.range.contains(this.range))throw new Error("Invalid argument: parent must contain this range")}};J=o([A],J),t.SelectionRange=J;t.CallHierarchyItem=class{constructor(e,t,i,n,o,s){this.kind=e,this.name=t,this.detail=i,this.uri=n,this.range=o,this.selectionRange=s}};t.CallHierarchyIncomingCall=class{constructor(e,t){this.fromRanges=t,this.from=e}};t.CallHierarchyOutgoingCall=class{constructor(e,t){this.fromRanges=t,this.to=e}};let Z=class{constructor(e,t){this.range=e,this.command=t}get isResolved(){return!!this.command}};Z=o([A],Z),t.CodeLens=Z;t.CodeInset=class{constructor(e,t){this.range=e,this.height=t}};let ee=k=class{constructor(e,t=!1){this.value=null!=e?e:"",this.supportThemeIcons=t}appendText(e){ return this.value+=(this.supportThemeIcons?n.escapeCodicons(e):e).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&").replace(/\n/,"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t=""){return this.value+="\n```",this.value+=t,this.value+="\n",this.value+=e,this.value+="\n```\n",this}static isMarkdownString(e){return e instanceof k||e&&e.appendCodeblock&&e.appendMarkdown&&e.appendText&&void 0!==e.value}};ee=k=o([A],ee),t.MarkdownString=ee;let te=class{constructor(e,t){this.label=e,this.documentation=t}};te=o([A],te),t.ParameterInformation=te;let ie=class{constructor(e,t){this.label=e,this.documentation=t,this.parameters=[]}};ie=o([A],ie),t.SignatureInformation=ie;let ne=class{constructor(){this.activeSignature=0,this.activeParameter=0,this.signatures=[]}};var oe;ne=o([A],ne),t.SignatureHelp=ne,function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){ e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e[e.Text=0]="Text",e[e.Method=1]="Method",e[e.Function=2]="Function",e[e.Constructor=3]="Constructor",e[e.Field=4]="Field",e[e.Variable=5]="Variable",e[e.Class=6]="Class",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Unit=10]="Unit",e[e.Value=11]="Value",e[e.Enum=12]="Enum",e[e.Keyword=13]="Keyword",e[e.Snippet=14]="Snippet",e[e.Color=15]="Color",e[e.File=16]="File",e[e.Reference=17]="Reference",e[e.Folder=18]="Folder",e[e.EnumMember=19]="EnumMember",e[e.Constant=20]="Constant",e[e.Struct=21]="Struct",e[e.Event=22]="Event",e[e.Operator=23]="Operator",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue"}(oe=t.CompletionItemKind||(t.CompletionItemKind={})),function(e){e[e.Deprecated=1]="Deprecated"}(t.CompletionItemTag||(t.CompletionItemTag={})) ;let se=class{constructor(e,t){this.label=e,this.kind=t}toJSON(){return{label:this.label,label2:this.label2,kind:this.kind&&oe[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}}};se=o([A],se),t.CompletionItem=se;let re=class{constructor(e=[],t=!1){this.items=e,this.isIncomplete=t}};re=o([A],re),t.CompletionList=re,function(e){e[e.Active=-1]="Active",e[e.Beside=-2]="Beside",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Three=3]="Three",e[e.Four=4]="Four",e[e.Five=5]="Five",e[e.Six=6]="Six",e[e.Seven=7]="Seven",e[e.Eight=8]="Eight",e[e.Nine=9]="Nine"}(t.ViewColumn||(t.ViewColumn={})),function(e){e[e.Left=1]="Left",e[e.Right=2]="Right"}(t.StatusBarAlignment||(t.StatusBarAlignment={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative"}(t.TextEditorLineNumbersStyle||(t.TextEditorLineNumbersStyle={})),function(e){e[e.Manual=1]="Manual", e[e.AfterDelay=2]="AfterDelay",e[e.FocusOut=3]="FocusOut"}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})),function(e){e[e.Default=0]="Default",e[e.InCenter=1]="InCenter",e[e.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",e[e.AtTop=3]="AtTop"}(t.TextEditorRevealType||(t.TextEditorRevealType={})),function(e){e[e.Keyboard=1]="Keyboard",e[e.Mouse=2]="Mouse",e[e.Command=3]="Command"}(t.TextEditorSelectionChangeKind||(t.TextEditorSelectionChangeKind={})),function(e){e[e.OpenOpen=0]="OpenOpen",e[e.ClosedClosed=1]="ClosedClosed",e[e.OpenClosed=2]="OpenClosed",e[e.ClosedOpen=3]="ClosedOpen"}(t.DecorationRangeBehavior||(t.DecorationRangeBehavior={})),function(e){e.fromValue=function(t){switch(t){case"keyboard":return e.Keyboard;case"mouse":return e.Mouse;case"api":return e.Command}}}(t.TextEditorSelectionChangeKind||(t.TextEditorSelectionChangeKind={}));let ae=class{constructor(e,t){if(t&&!c.URI.isUri(t))throw s.illegalArgument("target");if(!O.isRange(e)||e.isEmpty)throw s.illegalArgument("range") ;this.range=e,this.target=t}};ae=o([A],ae),t.DocumentLink=ae;let le=class{constructor(e,t,i,n){this.red=e,this.green=t,this.blue=i,this.alpha=n}};le=o([A],le),t.Color=le;let ce=class{constructor(e,t){if(t&&!(t instanceof le))throw s.illegalArgument("color");if(!O.isRange(e)||e.isEmpty)throw s.illegalArgument("range");this.range=e,this.color=t}};ce=o([A],ce),t.ColorInformation=ce;let de=class{constructor(e){if(!e||"string"!=typeof e)throw s.illegalArgument("label");this.label=e}};de=o([A],de),t.ColorPresentation=de,function(e){e[e.RGB=0]="RGB",e[e.HEX=1]="HEX",e[e.HSL=2]="HSL"}(t.ColorFormat||(t.ColorFormat={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information"}(t.SourceControlInputBoxValidationType||(t.SourceControlInputBoxValidationType={})),function(e){e[e.Always=1]="Always",e[e.Silent=2]="Silent",e[e.Never=3]="Never"}(t.TaskRevealKind||(t.TaskRevealKind={})),function(e){e[e.Shared=1]="Shared",e[e.Dedicated=2]="Dedicated",e[e.New=3]="New" }(t.TaskPanelKind||(t.TaskPanelKind={}));let he=D=class{constructor(e,t){if("string"!=typeof e)throw s.illegalArgument("name");if("string"!=typeof t)throw s.illegalArgument("name");this._id=e}static from(e){switch(e){case"clean":return D.Clean;case"build":return D.Build;case"rebuild":return D.Rebuild;case"test":return D.Test;default:return}}get id(){return this._id}};function ue(e){let t="";for(let i=0;i0)for(let t of this._args)e.push(t);return ue(e)}};ge=o([A],ge),t.ProcessExecution=ge;let pe=class{constructor(e,t,i){if(this._args=[],Array.isArray(t)){if(!e)throw s.illegalArgument("command can't be undefined or null");if("string"!=typeof e&&"string"!=typeof e.value)throw s.illegalArgument("command");this._command=e,this._args=t,this._options=i}else{if("string"!=typeof e)throw s.illegalArgument("commandLine");this._commandLine=e,this._options=t}}get commandLine(){return this._commandLine}set commandLine(e){if("string"!=typeof e)throw s.illegalArgument("commandLine");this._commandLine=e}get command(){return this._command?this._command:""}set command(e){if("string"!=typeof e&&"string"!=typeof e.value)throw s.illegalArgument("command");this._command=e}get args(){return this._args}set args(e){this._args=e||[]}get options(){ return this._options}set options(e){this._options=e}computeId(){const e=[];if(e.push("shell"),void 0!==this._commandLine&&e.push(this._commandLine),void 0!==this._command&&e.push("string"==typeof this._command?this._command:this._command.value),this._args&&this._args.length>0)for(let t of this._args)e.push("string"==typeof t?t:t.value);return ue(e)}};var me;pe=o([A],pe),t.ShellExecution=pe,function(e){e[e.Escape=1]="Escape",e[e.Strong=2]="Strong",e[e.Weak=3]="Weak"}(t.ShellQuoting||(t.ShellQuoting={})),function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace"}(me=t.TaskScope||(t.TaskScope={}));class ve{constructor(e){this._callback=e}computeId(){return"customExecution"+u.generateUuid()}set callback(e){this._callback=e}get callback(){return this._callback}}t.CustomExecution=ve;let fe=T=class{constructor(e,t,i,n,o,s){let r;this.__deprecated=!1,this._definition=this.definition=e,"string"==typeof t?(this._name=this.name=t,this._source=this.source=i,this.execution=n,r=o, this.__deprecated=!0):(t===me.Global||me.Workspace,this.target=t,this._name=this.name=i,this._source=this.source=n,this.execution=o,r=s),"string"==typeof r?(this._problemMatchers=[r],this._hasDefinedMatchers=!0):Array.isArray(r)?(this._problemMatchers=r,this._hasDefinedMatchers=!0):(this._problemMatchers=[],this._hasDefinedMatchers=!1),this._isBackground=!1,this._presentationOptions=Object.create(null),this._runOptions=Object.create(null)}get _id(){return this.__id}set _id(e){this.__id=e}get _deprecated(){return this.__deprecated}clear(){void 0!==this.__id&&(this.__id=void 0,this._scope=void 0,this.computeDefinitionBasedOnExecution())}computeDefinitionBasedOnExecution(){this._execution instanceof ge?this._definition={type:T.ProcessType,id:this._execution.computeId()}:this._execution instanceof pe?this._definition={type:T.ShellType,id:this._execution.computeId()}:this._execution instanceof ve?this._definition={type:T.ExtensionCallbackType,id:this._execution.computeId()}:this._definition={type:T.EmptyType, id:u.generateUuid()}}get definition(){return this._definition}set definition(e){if(null==e)throw s.illegalArgument("Kind can't be undefined or null");this.clear(),this._definition=e}get scope(){return this._scope}set target(e){this.clear(),this._scope=e}get name(){return this._name}set name(e){if("string"!=typeof e)throw s.illegalArgument("name");this.clear(),this._name=e}get execution(){return this._execution}set execution(e){null===e&&(e=void 0),this.clear(),this._execution=e;const t=this._definition.type;T.EmptyType!==t&&T.ProcessType!==t&&T.ShellType!==t&&T.ExtensionCallbackType!==t||this.computeDefinitionBasedOnExecution()}get problemMatchers(){return this._problemMatchers}set problemMatchers(e){if(!Array.isArray(e))return this.clear(),this._problemMatchers=[],void(this._hasDefinedMatchers=!1);this.clear(),this._problemMatchers=e,this._hasDefinedMatchers=!0}get hasDefinedMatchers(){return this._hasDefinedMatchers}get isBackground(){return this._isBackground}set isBackground(e){!0!==e&&!1!==e&&(e=!1), this.clear(),this._isBackground=e}get source(){return this._source}set source(e){if("string"!=typeof e||0===e.length)throw s.illegalArgument("source must be a string of length > 0");this.clear(),this._source=e}get group(){return this._group}set group(e){null===e&&(e=void 0),this.clear(),this._group=e}get detail(){return this._detail}set detail(e){null===e&&(e=void 0),this._detail=e}get presentationOptions(){return this._presentationOptions}set presentationOptions(e){null==e&&(e=Object.create(null)),this.clear(),this._presentationOptions=e}get runOptions(){return this._runOptions}set runOptions(e){null==e&&(e=Object.create(null)),this.clear(),this._runOptions=e}};fe.ExtensionCallbackType="customExecution",fe.ProcessType="process",fe.ShellType="shell",fe.EmptyType="$empty",fe=T=o([A],fe),t.Task=fe,function(e){e[e.SourceControl=1]="SourceControl",e[e.Window=10]="Window",e[e.Notification=15]="Notification"}(t.ProgressLocation||(t.ProgressLocation={}));let Se=class{constructor(e,t=be.None){this.collapsibleState=t, c.URI.isUri(e)?this.resourceUri=e:this.label=e}};var be;Se=o([A],Se),t.TreeItem=Se,function(e){e[e.None=0]="None",e[e.Collapsed=1]="Collapsed",e[e.Expanded=2]="Expanded"}(be=t.TreeItemCollapsibleState||(t.TreeItemCollapsibleState={}));let _e=class{constructor(e,t){this.id=e,this.themeColor=t}};_e=o([A],_e),t.ThemeIcon=_e,_e.File=new _e("file"),_e.Folder=new _e("folder");let Ce=class{constructor(e){this.id=e}};Ce=o([A],Ce),t.ThemeColor=Ce,function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.WorkspaceFolder=3]="WorkspaceFolder"}(t.ConfigurationTarget||(t.ConfigurationTarget={}));let ye=class{constructor(e,t){if(!("string"==typeof e||e&&c.URI.isUri(e.uri)))throw s.illegalArgument("base");if("string"!=typeof t)throw s.illegalArgument("pattern");"string"==typeof e?this.base=e:(this.baseFolder=e.uri,this.base=e.uri.fsPath),this.pattern=t}};ye=o([A],ye),t.RelativePattern=ye;let we=class{constructor(e,t,i,n){this.enabled="boolean"!=typeof e||e,"string"==typeof t&&(this.condition=t), "string"==typeof i&&(this.hitCondition=i),"string"==typeof n&&(this.logMessage=n)}get id(){return this._id||(this._id=u.generateUuid()),this._id}};we=o([A],we),t.Breakpoint=we;let Ee=class extends we{constructor(e,t,i,n,o){if(super(t,i,n,o),null===e)throw s.illegalArgument("location");this.location=e}};Ee=o([A],Ee),t.SourceBreakpoint=Ee;let Ie=class extends we{constructor(e,t,i,n,o){if(super(t,i,n,o),!e)throw s.illegalArgument("functionName");this.functionName=e}};Ie=o([A],Ie),t.FunctionBreakpoint=Ie;let xe=class extends we{constructor(e,t,i,n,o,r,a){if(super(n,o,r,a),!t)throw s.illegalArgument("dataId");this.label=e,this.dataId=t,this.canPersist=i}};xe=o([A],xe),t.DataBreakpoint=xe;let ke=class{constructor(e,t,i){this.command=e,this.args=t||[],this.options=i}};ke=o([A],ke),t.DebugAdapterExecutable=ke;let De=class{constructor(e,t){this.port=e,this.host=t}};De=o([A],De),t.DebugAdapterServer=De;let Te=class{constructor(e){this.path=e}};Te=o([A],Te),t.DebugAdapterNamedPipeServer=Te;let Re=class{constructor(e){ this.implementation=e}};Re=o([A],Re),t.DebugAdapterInlineImplementation=Re;let Ae=class{constructor(e,t){this.range=e,this.expression=t}};Ae=o([A],Ae),t.EvaluatableExpression=Ae,function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error",e[e.Critical=6]="Critical",e[e.Off=7]="Off"}(t.LogLevel||(t.LogLevel={})),function(e){e[e.Changed=1]="Changed",e[e.Created=2]="Created",e[e.Deleted=3]="Deleted"}(t.FileChangeType||(t.FileChangeType={}));let Me=R=class extends Error{constructor(e,t=g.FileSystemProviderErrorCode.Unknown,i){var n;super(c.URI.isUri(e)?e.toString(!0):e),this.code=null!==(n=null==i?void 0:i.name)&&void 0!==n?n:"Unknown",g.markAsFileSystemProviderError(this,t),"function"==typeof Object.setPrototypeOf&&Object.setPrototypeOf(this,R.prototype),"function"==typeof Error.captureStackTrace&&"function"==typeof i&&Error.captureStackTrace(this,i)}static FileExists(e){return new R(e,g.FileSystemProviderErrorCode.FileExists,R.FileExists)} static FileNotFound(e){return new R(e,g.FileSystemProviderErrorCode.FileNotFound,R.FileNotFound)}static FileNotADirectory(e){return new R(e,g.FileSystemProviderErrorCode.FileNotADirectory,R.FileNotADirectory)}static FileIsADirectory(e){return new R(e,g.FileSystemProviderErrorCode.FileIsADirectory,R.FileIsADirectory)}static NoPermissions(e){return new R(e,g.FileSystemProviderErrorCode.NoPermissions,R.NoPermissions)}static Unavailable(e){return new R(e,g.FileSystemProviderErrorCode.Unavailable,R.Unavailable)}};Me=R=o([A],Me),t.FileSystemError=Me;let Le=class{constructor(e,t,i){this.start=e,this.end=t,this.kind=i}};Le=o([A],Le),t.FoldingRange=Le,function(e){e[e.Comment=1]="Comment",e[e.Imports=2]="Imports",e[e.Region=3]="Region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e[e.Collapsed=0]="Collapsed",e[e.Expanded=1]="Expanded"}(t.CommentThreadCollapsibleState||(t.CommentThreadCollapsibleState={})),function(e){e[e.Editing=0]="Editing",e[e.Preview=1]="Preview"}(t.CommentMode||(t.CommentMode={})) ;t.SemanticTokensLegend=class{constructor(e,t=[]){this.tokenTypes=e,this.tokenModifiers=t}};class Oe{constructor(e){if(this._prevLine=0,this._prevChar=0,this._dataIsSortedAndDeltaEncoded=!0,this._data=[],this._dataLen=0,this._tokenTypeStrToInt=new Map,this._tokenModifierStrToInt=new Map,this._hasLegend=!1,e){this._hasLegend=!0;for(let t=0,i=e.tokenTypes.length;t>>0}this._pushEncoded(n,o,s,r,a)}_pushEncoded(e,t,i,n,o){if(this._dataIsSortedAndDeltaEncoded&&(e0&&0===(s-=this._prevLine)&&(r-=this._prevChar),this._data[this._dataLen++]=s,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=n,this._data[this._dataLen++]=o,this._prevLine=e, this._prevChar=t}static _sortAndDeltaEncode(e){let t=[];const i=e.length/5|0;for(let e=0;e{const n=e[5*t],o=e[5*i];if(n===o){return e[5*t+1]-e[5*i+1]}return n-o});const n=new Uint32Array(e.length);let o=0,s=0;for(let r=0;r{this.recompute()})),this._viewModelStore.add(this._viewModel.onDidChangeSelection(()=>{const e=this._viewModel.selectionHandles.map(e=>this._viewModel.getCellIndex(this._viewModel.getCellByHandle(e)));let t=!1;e.forEach(e=>{let i=this.regions.findRange(e+1);for(;-1!==i;)this._regions.isCollapsed(i)&&e>this._regions.getStartLineNumber(i)-1&&(this._regions.setCollapsed(i,!1),t=!0),i=this._regions.getParentIndex(i)}),t&&this._onDidFoldingRegionChanges.fire()})),this.recompute()}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[] ;for(let s=n,r=this._regions.length;s0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e=0;){let e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}setCollapsed(e,t){this._regions.setCollapsed(e,t)}recompute(){const e=this._viewModel.viewCells,t=[];for(let i=0;i{let o=void 0;for(let e=n+1;ee.start!==e.end),n=s.sanitizeRanges(i,5e3);let o=0;const a=()=>{for(;o=e))break;n.setCollapsed(l,t===e),l++}}c=a()}for(;lthis._viewModel.setTrackedRange(e,null,3)),this._foldingRangeDecorationIds=d.map(e=>this._viewModel.setTrackedRange(null,e,3)).filter(e=>null!==e),this._regions=n,this._onDidFoldingRegionChanges.fire()}getMemento(){const e=[];let t=0;for(;t=e))break;this._regions.setCollapsed(t,n===e),t++}}i++}for(;t{const i=a.CellUri.parse(e) ;return(null==i?void 0:i.notebook.toString())===t.notebook.toString()},this._markerService):void 0}};c=o([r(0,l.IMarkerService),r(1,s.IMarkerNavigationService)],c),i.Registry.as(n.Extensions.Workbench).registerWorkbenchContribution(c,2)})),define(e[1665],t([0,1,7,2,5,609,452,178,140,312,183,46,50,253,164,91,133,217,36,20,610,35,28,94,8]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModifiedCell=t.InsertCell=t.DeletedCell=void 0;const k={padding:{top:12,bottom:12},scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},renderLineHighlightOnlyWhenFocus:!0,overviewRulerLanes:0,selectOnLineNumbers:!1,wordWrap:"off",lineNumbers:"off",lineDecorationsWidth:0,glyphMargin:!1,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderValidationDecorations:"on",renderLineHighlight:"none",readOnly:!0},D=Object.assign(Object.assign({},k),{ glyphMargin:!0,enableSplitViewResizing:!1,renderIndicators:!1,readOnly:!1});let T=class extends n.Disposable{constructor(e,t,i,n,o,s,r,a,l){super(),this.cell=e,this.metadataHeaderContainer=t,this.notebookEditor=i,this.accessor=n,this.contextMenuService=o,this.keybindingService=s,this.notificationService=r,this.menuService=a,this.contextKeyService=l}buildHeader(){let e=this.accessor.checkIfModified(this.cell);this._foldingIndicator=i.append(this.metadataHeaderContainer,i.$(".property-folding-indicator")),this._foldingIndicator.classList.add(this.accessor.prefix),this._updateFoldingIcon();const t=i.append(this.metadataHeaderContainer,i.$("div.property-status"));this._statusSpan=i.append(t,i.$("span")),e?(this._statusSpan.textContent=this.accessor.changedLabel,this._statusSpan.style.fontWeight="bold",this.metadataHeaderContainer.classList.add("modified")):this._statusSpan.textContent=this.accessor.unChangedLabel;const n=i.append(this.metadataHeaderContainer,i.$("div.property-toolbar")) ;if(this._toolbar=new b.ToolBar(n,this.contextMenuService,{actionViewItemProvider:e=>{if(e instanceof C.MenuItemAction){return new y.CodiconActionViewItem(e,this.keybindingService,this.notificationService,this.contextMenuService)}}}),this._toolbar.context={cell:this.cell},this._menu=this.menuService.createMenu(this.accessor.menuId,this.contextKeyService),e){const e=[];I.createAndFillInActionBarActions(this._menu,{shouldForwardArgs:!0},e),this._toolbar.setActions(e)}this._register(this.notebookEditor.onMouseUp(e=>{if(!e.event.target)return;const t=e.event.target;if(t.classList.contains("codicon-chevron-down")||t.classList.contains("codicon-chevron-right")){const i=t.parentElement;if(!i)return;if(!i.classList.contains(this.accessor.prefix))return;if(!i.classList.contains("property-folding-indicator"))return;if(e.target===this.cell){const e=this.accessor.getFoldingState(this.cell) ;this.accessor.updateFoldingState(this.cell,e===a.PropertyFoldingState.Expanded?a.PropertyFoldingState.Collapsed:a.PropertyFoldingState.Expanded),this._updateFoldingIcon(),this.accessor.updateInfoRendering()}}})),this._updateFoldingIcon(),this.accessor.updateInfoRendering()}refresh(){if(this.accessor.checkIfModified(this.cell)){this._statusSpan.textContent=this.accessor.changedLabel,this._statusSpan.style.fontWeight="bold",this.metadataHeaderContainer.classList.add("modified");const e=[];I.createAndFillInActionBarActions(this._menu,void 0,e),this._toolbar.setActions(e)}else this._statusSpan.textContent=this.accessor.unChangedLabel,this._statusSpan.style.fontWeight="normal",this._toolbar.setActions([])}_updateFoldingIcon(){this.accessor.getFoldingState(this.cell)===a.PropertyFoldingState.Collapsed?i.reset(this._foldingIndicator,...u.renderCodicons("$(chevron-right)")):i.reset(this._foldingIndicator,...u.renderCodicons("$(chevron-down)"))}} ;T=o([r(4,_.IContextMenuService),r(5,w.IKeybindingService),r(6,E.INotificationService),r(7,C.IMenuService),r(8,x.IContextKeyService)],T);class R extends n.Disposable{constructor(e,t,i,o,s,r,a){super(),this.notebookEditor=e,this.cell=t,this.templateData=i,this.style=o,this.instantiationService=s,this.modeService=r,this.modelService=a,this._layoutInfo={editorHeight:0,editorMargin:0,metadataHeight:0,metadataStatusHeight:25,outputHeight:0,outputStatusHeight:25,bodyMargin:32},this._metadataEditorDisposeStore=new n.DisposableStore,this._outputEditorDisposeStore=new n.DisposableStore,this._register(this._metadataEditorDisposeStore),this.initData(),this.buildBody(i.container),this._register(t.onDidLayoutChange(e=>this.onDidLayoutChange(e)))}buildBody(e){var t;const n=i.$(".cell-body");switch(i.append(e,n),this._diffEditorContainer=i.$(".cell-diff-editor-container"),this.style){case"left":n.classList.add("left");break;case"right":n.classList.add("right");break;default:n.classList.add("full")} i.append(n,this._diffEditorContainer),this._diagonalFill=i.append(n,i.$(".diagonal-fill")),this.styleContainer(this._diffEditorContainer);const o=i.append(this._diffEditorContainer,i.$(".source-container"));this.buildSourceEditor(o),this._metadataHeaderContainer=i.append(this._diffEditorContainer,i.$(".metadata-header-container")),this._metadataInfoContainer=i.append(this._diffEditorContainer,i.$(".metadata-info-container"));const s=e=>{var t,i,n,o,s;return"delete"!==e.type&&"insert"!==e.type&&S.hash(this._getFormatedMetadataJSON((null===(t=e.original)||void 0===t?void 0:t.metadata)||{},null===(i=e.original)||void 0===i?void 0:i.language))!==S.hash(this._getFormatedMetadataJSON(null!==(o=null===(n=e.modified)||void 0===n?void 0:n.metadata)&&void 0!==o?o:{},null===(s=e.modified)||void 0===s?void 0:s.language))};if(s(this.cell)&&(this.cell.metadataFoldingState=a.PropertyFoldingState.Expanded), this._metadataHeader=this.instantiationService.createInstance(T,this.cell,this._metadataHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateMetadataRendering.bind(this),checkIfModified:e=>s(e),getFoldingState:e=>e.metadataFoldingState,updateFoldingState:(e,t)=>{e.metadataFoldingState=t},unChangedLabel:"Metadata",changedLabel:"Metadata changed",prefix:"metadata",menuId:C.MenuId.NotebookDiffCellMetadataTitle}),this._register(this._metadataHeader),this._metadataHeader.buildHeader(),null===(t=this.notebookEditor.textModel)||void 0===t?void 0:t.transientOptions.transientOutputs)return this._layoutInfo.outputHeight=0,this._layoutInfo.outputStatusHeight=0,void this.layout({});this._outputHeaderContainer=i.append(this._diffEditorContainer,i.$(".output-header-container")),this._outputInfoContainer=i.append(this._diffEditorContainer,i.$(".output-info-container"));const r=e=>{var t,i,n,o ;return"delete"!==e.type&&"insert"!==e.type&&!this.notebookEditor.textModel.transientOptions.transientOutputs&&"modified"===e.type&&S.hash(null!==(i=null===(t=e.original)||void 0===t?void 0:t.outputs)&&void 0!==i?i:[])!==S.hash(null!==(o=null===(n=e.modified)||void 0===n?void 0:n.outputs)&&void 0!==o?o:[])};r(this.cell)&&(this.cell.outputFoldingState=a.PropertyFoldingState.Expanded),this._outputHeader=this.instantiationService.createInstance(T,this.cell,this._outputHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateOutputRendering.bind(this),checkIfModified:e=>r(e),getFoldingState:e=>e.outputFoldingState,updateFoldingState:(e,t)=>{e.outputFoldingState=t},unChangedLabel:"Outputs",changedLabel:"Outputs changed",prefix:"output",menuId:C.MenuId.NotebookDiffCellOutputsTitle}),this._register(this._outputHeader),this._outputHeader.buildHeader()}updateMetadataRendering(){this.cell.metadataFoldingState===a.PropertyFoldingState.Expanded?(this._metadataInfoContainer.style.display="block", this._metadataEditorContainer&&this._metadataEditor?(this._layoutInfo.metadataHeight=this._metadataEditor.getContentHeight(),this.layout({metadataEditor:!0})):(this._metadataEditorContainer=i.append(this._metadataInfoContainer,i.$(".metadata-editor-container")),this._buildMetadataEditor())):(this._metadataInfoContainer.style.display="none",this._metadataEditorDisposeStore.clear(),this._layoutInfo.metadataHeight=0,this.layout({}))}updateOutputRendering(){this.cell.outputFoldingState===a.PropertyFoldingState.Expanded?(this._outputInfoContainer.style.display="block",this._outputEditorContainer&&this._outputEditor?(this._layoutInfo.outputHeight=this._outputEditor.getContentHeight(),this.layout({outputEditor:!0})):(this._outputEditorContainer=i.append(this._outputInfoContainer,i.$(".output-editor-container")),this._buildOutputEditor())):(this._outputInfoContainer.style.display="none",this._outputEditorDisposeStore.clear(),this._layoutInfo.outputHeight=0,this.layout({}))}_getFormatedMetadataJSON(e,t){let i={} ;if(this.notebookEditor.textModel){const t=this.notebookEditor.textModel.transientOptions.transientMetadata,n=new Set([...Object.keys(e)]);for(let o of n)t[o]||(i[o]=e[o])}else i=e;const n=JSON.stringify(Object.assign({language:t},i)),o=m.format(n,void 0,{});return v.applyEdits(n,o)}_applySanitizedMetadataChanges(e,t){let i={},n=void 0;try{const o=JSON.parse(t),s=new Set([...Object.keys(o)]);for(let t of s)switch(t){case"breakpointMargin":case"editable":case"hasExecutionOrder":case"inputCollapsed":case"outputCollapsed":case"runnable":"boolean"==typeof o[t]?i[t]=o[t]:i[t]=e[t];break;case"executionOrder":case"lastRunDuration":"number"==typeof o[t]?i[t]=o[t]:i[t]=e[t];break;case"runState":"number"==typeof o[t]&&[1,2,3,4].indexOf(o[t])>=0?i[t]=o[t]:i[t]=e[t];break;case"statusMessage":"string"==typeof o[t]?i[t]=o[t]:i[t]=e[t];break;default:"language"===t&&(n=o[t]),i[t]=o[t]}if(void 0!==n&&n!==this.cell.modified.language){const e=this.notebookEditor.textModel.cells.indexOf(this.cell.modified) ;this.notebookEditor.textModel.applyEdits(this.notebookEditor.textModel.versionId,[{editType:4,index:e,language:n}],!0,void 0,()=>void 0)}const r=this.notebookEditor.textModel.cells.indexOf(this.cell.modified);if(r<0)return;this.notebookEditor.textModel.applyEdits(this.notebookEditor.textModel.versionId,[{editType:3,index:r,metadata:i}],!0,void 0,()=>void 0)}catch(e){}}_buildMetadataEditor(){var e,t,i,n,o;if("modified"===this.cell.type||"unchanged"===this.cell.type){const s=this._getFormatedMetadataJSON((null===(e=this.cell.original)||void 0===e?void 0:e.metadata)||{},null===(t=this.cell.original)||void 0===t?void 0:t.language),r=this._getFormatedMetadataJSON((null===(i=this.cell.modified)||void 0===i?void 0:i.metadata)||{},null===(n=this.cell.modified)||void 0===n?void 0:n.language);this._metadataEditor=this.instantiationService.createInstance(h.DiffEditorWidget,this._metadataEditorContainer,Object.assign(Object.assign({},D),{overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(), readOnly:!1,originalEditable:!1,ignoreTrimWhitespace:!1})),null===(o=this._metadataEditorContainer)||void 0===o||o.classList.add("diff");const l=this.modeService.create("json"),c=this.modelService.createModel(s,l,f.CellUri.generateCellMetadataUri(this.cell.original.uri,this.cell.original.handle),!1),d=this.modelService.createModel(r,l,f.CellUri.generateCellMetadataUri(this.cell.modified.uri,this.cell.modified.handle),!1);this._metadataEditor.setModel({original:c,modified:d}),this._register(c),this._register(d),this._layoutInfo.metadataHeight=this._metadataEditor.getContentHeight(),this.layout({metadataEditor:!0}),this._register(this._metadataEditor.onDidContentSizeChange(e=>{e.contentHeightChanged&&this.cell.metadataFoldingState===a.PropertyFoldingState.Expanded&&(this._layoutInfo.metadataHeight=e.contentHeight,this.layout({metadataEditor:!0}))}));let u=!1;return this._register(d.onDidChangeContent(()=>{u=!0;const e=d.getValue();this._applySanitizedMetadataChanges(this.cell.modified.metadata,e), this._metadataHeader.refresh(),u=!1})),void this._register(this.cell.modified.onDidChangeMetadata(()=>{var e,t;if(u)return;const i=this._getFormatedMetadataJSON((null===(e=this.cell.modified)||void 0===e?void 0:e.metadata)||{},null===(t=this.cell.modified)||void 0===t?void 0:t.language);d.setValue(i)}))}this._metadataEditor=this.instantiationService.createInstance(d.CodeEditorWidget,this._metadataEditorContainer,Object.assign(Object.assign({},k),{dimension:{width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:0},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!1}),{}) ;const s=this.modeService.create("jsonc"),r=this._getFormatedMetadataJSON("insert"===this.cell.type?this.cell.modified.metadata||{}:this.cell.original.metadata||{}),l="insert"===this.cell.type?this.cell.modified.uri:this.cell.original.uri,c="insert"===this.cell.type?this.cell.modified.handle:this.cell.original.handle,u=f.CellUri.generateCellMetadataUri(l,c),g=this.modelService.createModel(r,s,u,!1);this._metadataEditor.setModel(g),this._register(g),this._layoutInfo.metadataHeight=this._metadataEditor.getContentHeight(),this.layout({metadataEditor:!0}),this._register(this._metadataEditor.onDidContentSizeChange(e=>{e.contentHeightChanged&&this.cell.metadataFoldingState===a.PropertyFoldingState.Expanded&&(this._layoutInfo.metadataHeight=e.contentHeight,this.layout({metadataEditor:!0}))}))}_getFormatedOutputJSON(e){const t=JSON.stringify(e),i=m.format(t,void 0,{});return v.applyEdits(t,i)}_buildOutputEditor(){var e,t,i ;if(("modified"===this.cell.type||"unchanged"===this.cell.type)&&!this.notebookEditor.textModel.transientOptions.transientOutputs){const n=this._getFormatedOutputJSON((null===(e=this.cell.original)||void 0===e?void 0:e.outputs)||[]),o=this._getFormatedOutputJSON((null===(t=this.cell.modified)||void 0===t?void 0:t.outputs)||[]);if(n!==o){this._outputEditor=this.instantiationService.createInstance(h.DiffEditorWidget,this._outputEditorContainer,Object.assign(Object.assign({},D),{overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!0,ignoreTrimWhitespace:!1})),null===(i=this._outputEditorContainer)||void 0===i||i.classList.add("diff");const e=this.modeService.create("json"),t=this.modelService.createModel(n,e,void 0,!0),s=this.modelService.createModel(o,e,void 0,!0);return this._outputEditor.setModel({original:t,modified:s}),this._layoutInfo.outputHeight=this._outputEditor.getContentHeight(),this.layout({outputEditor:!0}),this._register(this._outputEditor.onDidContentSizeChange(e=>{ e.contentHeightChanged&&this.cell.outputFoldingState===a.PropertyFoldingState.Expanded&&(this._layoutInfo.outputHeight=e.contentHeight,this.layout({outputEditor:!0}))})),void this._register(this.cell.modified.onDidChangeOutputs(()=>{var e;const t=this._getFormatedOutputJSON((null===(e=this.cell.modified)||void 0===e?void 0:e.outputs)||[]);s.setValue(t),this._outputHeader.refresh()}))}}this._outputEditor=this.instantiationService.createInstance(d.CodeEditorWidget,this._outputEditorContainer,Object.assign(Object.assign({},k),{dimension:{width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:0},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode()}),{});const n=this.modeService.create("json"),o=this._getFormatedOutputJSON(this.notebookEditor.textModel.transientOptions?[]:"insert"===this.cell.type?this.cell.modified.outputs||[]:this.cell.original.outputs||[]),s=this.modelService.createModel(o,n,void 0,!0);this._outputEditor.setModel(s), this._layoutInfo.outputHeight=this._outputEditor.getContentHeight(),this.layout({outputEditor:!0}),this._register(this._outputEditor.onDidContentSizeChange(e=>{e.contentHeightChanged&&this.cell.outputFoldingState===a.PropertyFoldingState.Expanded&&(this._layoutInfo.outputHeight=e.contentHeight,this.layout({outputEditor:!0}))}))}layoutNotebookCell(){this.notebookEditor.layoutNotebookCell(this.cell,this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin)}}let A=class extends R{constructor(e,t,i,n,o,s){super(e,t,i,"left",s,n,o),this.notebookEditor=e,this.cell=t,this.templateData=i,this.modeService=n,this.modelService=o,this.instantiationService=s}initData(){}styleContainer(e){e.classList.add("removed")}buildSourceEditor(e){ const t=this.cell.original,n=t.textBuffer.getLineCount()*(this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17)+c.EDITOR_TOP_PADDING+c.EDITOR_BOTTOM_PADDING,o=i.append(e,i.$(".editor-container"));this._editor=this.instantiationService.createInstance(d.CodeEditorWidget,o,Object.assign(Object.assign({},k),{dimension:{width:(this.notebookEditor.getLayoutInfo().width-2*l.DIFF_CELL_MARGIN)/2-18,height:n},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode()}),{}),this._layoutInfo.editorHeight=n,this._register(this._editor.onDidContentSizeChange(e=>{e.contentHeightChanged&&(this._layoutInfo.editorHeight=e.contentHeight,this.layout({editorHeight:!0}))})),t.resolveTextModelRef().then(e=>{this._register(e);const t=e.object.textEditorModel;this._editor.setModel(t),this._layoutInfo.editorHeight=this._editor.getContentHeight(),this.layout({editorHeight:!0})})}onDidLayoutChange(e){void 0!==e.outerWidth&&this.layout({outerWidth:!0})}layout(e){var t,i ;(e.editorHeight||e.outerWidth)&&this._editor.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this._layoutInfo.editorHeight}),(e.metadataEditor||e.outerWidth)&&(null===(t=this._metadataEditor)||void 0===t||t.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this._layoutInfo.metadataHeight})),(e.outputEditor||e.outerWidth)&&(null===(i=this._outputEditor)||void 0===i||i.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this._layoutInfo.outputHeight})),this.layoutNotebookCell()}};A=o([r(3,p.IModeService),r(4,g.IModelService),r(5,s.IInstantiationService)],A),t.DeletedCell=A;let M=class extends R{constructor(e,t,i,n,o,s){super(e,t,i,"right",n,o,s),this.notebookEditor=e,this.cell=t,this.templateData=i,this.instantiationService=n,this.modeService=o,this.modelService=s}initData(){}styleContainer(e){e.classList.add("inserted")}buildSourceEditor(e){ const t=this.cell.modified,n=t.textBuffer.getLineCount()*(this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17)+c.EDITOR_TOP_PADDING+c.EDITOR_BOTTOM_PADDING,o=i.append(e,i.$(".editor-container"));this._editor=this.instantiationService.createInstance(d.CodeEditorWidget,o,Object.assign(Object.assign({},k),{dimension:{width:(this.notebookEditor.getLayoutInfo().width-2*l.DIFF_CELL_MARGIN)/2-18,height:n},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!1}),{}),this._layoutInfo.editorHeight=n,this._register(this._editor.onDidContentSizeChange(e=>{e.contentHeightChanged&&(this._layoutInfo.editorHeight=e.contentHeight,this.layout({editorHeight:!0}))})),t.resolveTextModelRef().then(e=>{this._register(e);const t=e.object.textEditorModel;this._editor.setModel(t),this._layoutInfo.editorHeight=this._editor.getContentHeight(),this.layout({editorHeight:!0})})}onDidLayoutChange(e){void 0!==e.outerWidth&&this.layout({outerWidth:!0})}layout(e){var t,i ;(e.editorHeight||e.outerWidth)&&this._editor.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this._layoutInfo.editorHeight}),(e.metadataEditor||e.outerWidth)&&(null===(t=this._metadataEditor)||void 0===t||t.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:this._layoutInfo.metadataHeight})),(e.outputEditor||e.outerWidth)&&(null===(i=this._outputEditor)||void 0===i||i.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:this._layoutInfo.outputHeight})),this.layoutNotebookCell()}};M=o([r(3,s.IInstantiationService),r(4,p.IModeService),r(5,g.IModelService)],M),t.InsertCell=M;let L=class extends R{constructor(e,t,i,n,o,s){super(e,t,i,"full",n,o,s),this.notebookEditor=e,this.cell=t,this.templateData=i,this.instantiationService=n,this.modeService=o,this.modelService=s}initData(){}styleContainer(e){}buildSourceEditor(e){ const t=this.cell.modified.textBuffer.getLineCount()*(this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17)+c.EDITOR_TOP_PADDING+c.EDITOR_BOTTOM_PADDING;this._editorContainer=i.append(e,i.$(".editor-container")),this._editor=this.instantiationService.createInstance(h.DiffEditorWidget,this._editorContainer,Object.assign(Object.assign({},D),{overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),originalEditable:!1,ignoreTrimWhitespace:!1})),this._editorContainer.classList.add("diff"),this._editor.layout({width:this.notebookEditor.getLayoutInfo().width-2*l.DIFF_CELL_MARGIN,height:t}),this._editorContainer.style.height=`${t}px`,this._register(this._editor.onDidContentSizeChange(e=>{e.contentHeightChanged&&(this._layoutInfo.editorHeight=e.contentHeight,this.layout({editorHeight:!0}))})),this._initializeSourceDiffEditor()}async _initializeSourceDiffEditor(){ const e=this.cell.original,t=this.cell.modified,i=await e.resolveTextModelRef(),n=await t.resolveTextModelRef(),o=i.object.textEditorModel,s=n.object.textEditorModel;this._register(i),this._register(n),this._editor.setModel({original:o,modified:s});const r=this._editor.getContentHeight();this._layoutInfo.editorHeight=r,this.layout({editorHeight:!0})}onDidLayoutChange(e){void 0!==e.outerWidth&&this.layout({outerWidth:!0})}layout(e){var t,i;(e.editorHeight||e.outerWidth)&&(this._editorContainer.style.height=`${this._layoutInfo.editorHeight}px`,this._editor.layout()),(e.metadataEditor||e.outerWidth)&&this._metadataEditorContainer&&(this._metadataEditorContainer.style.height=`${this._layoutInfo.metadataHeight}px`,null===(t=this._metadataEditor)||void 0===t||t.layout()),(e.outputEditor||e.outerWidth)&&this._outputEditorContainer&&(this._outputEditorContainer.style.height=`${this._layoutInfo.outputHeight}px`,null===(i=this._outputEditor)||void 0===i||i.layout()),this.layoutNotebookCell()}} ;L=o([r(3,s.IInstantiationService),r(4,p.IModeService),r(5,g.IModelService)],L),t.ModifiedCell=L})),define(e[1666],t([0,1,7,2,9,5,35,69,11,12,1665,854]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookTextDiffList=t.CellDiffRenderer=t.NotebookCellTextDiffListDelegate=void 0;let g=class{constructor(e){this.configurationService=e}getHeight(e){return 100}hasDynamicHeight(e){return!1}getTemplateId(e){return p.TEMPLATE_ID}};g=o([r(0,s.IConfigurationService)],g),t.NotebookCellTextDiffListDelegate=g;let p=class e{constructor(e,t){this.notebookEditor=e,this.instantiationService=t}get templateId(){return e.TEMPLATE_ID}renderTemplate(e){return{container:e,elementDisposables:new n.DisposableStore}}renderElement(e,t,i,n){switch(i.container.innerText="",e.type){case"unchanged":return void i.elementDisposables.add(this.instantiationService.createInstance(u.ModifiedCell,this.notebookEditor,e,i));case"delete": return void i.elementDisposables.add(this.instantiationService.createInstance(u.DeletedCell,this.notebookEditor,e,i));case"insert":return void i.elementDisposables.add(this.instantiationService.createInstance(u.InsertCell,this.notebookEditor,e,i));case"modified":return void i.elementDisposables.add(this.instantiationService.createInstance(u.ModifiedCell,this.notebookEditor,e,i))}}disposeTemplate(e){e.container.innerText=""}disposeElement(e,t,i){i.elementDisposables.clear()}};p.TEMPLATE_ID="cell_diff",p=o([r(1,a.IInstantiationService)],p),t.CellDiffRenderer=p;let m=class extends c.WorkbenchList{constructor(e,t,i,n,o,s,r,a,l,c){super(e,t,i,n,s,o,r,a,l,c)}style(e){const t=this.view.domId;this.styleElement||(this.styleElement=i.createStyleSheet(this.view.domNode));const n=t&&`.${t}`,o=[] ;e.listBackground&&(e.listBackground.isOpaque()?o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows { background: ${e.listBackground}; }`):h.isMacintosh||console.warn(`List with id '${t}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${e.listFocusForeground}; }`), e.listActiveSelectionBackground&&(o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`), e.listFocusAndSelectionForeground&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusBackground&&(o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)), e.listInactiveSelectionForeground&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&o.push(`.monaco-list${n}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`), e.listFocusOutline&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&o.push(`\n\t\t\t\t.monaco-list${n}.drop-target,\n\t\t\t\t.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`), e.listFilterWidgetBackground&&o.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&o.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&o.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&o.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`);const s=o.join("\n");s!==this.styleElement.textContent&&(this.styleElement.textContent=s)}};m=o([r(6,c.IListService),r(7,d.IThemeService),r(8,s.IConfigurationService),r(9,l.IKeybindingService)],m),t.NotebookTextDiffList=m})),define(e[1667],t([0,1,7,338,6,2,12,18,299,9,35,69,11,127,91,195,178]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookCellList=void 0;let b=class extends g.WorkbenchList{constructor(e,t,n,o,r,l,c,d,h,u,g){super(e,n,o,r,c,l,d,h,u,g), this.listUser=e,this._previousFocusedElements=[],this._localDisposableStore=new a.DisposableStore,this._viewModelStore=new a.DisposableStore,this._onDidRemoveOutput=new s.Emitter,this.onDidRemoveOutput=this._onDidRemoveOutput.event,this._onDidHideOutput=new s.Emitter,this.onDidHideOutput=this._onDidHideOutput.event,this._viewModel=null,this._hiddenRangeIds=[],this.hiddenRangesPrefixSum=null,this._onDidChangeVisibleRanges=new s.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._visibleRanges=[],this._isDisposed=!1,this._isInLayout=!1,m.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(!0),this._focusNextPreviousDelegate=c.focusNextPreviousDelegate,this._previousFocusedElements=this.getFocusedElements(),this._localDisposableStore.add(this.onDidChangeFocus(e=>{this._previousFocusedElements.forEach(t=>{e.elements.indexOf(t)<0&&t.onDeselect()}),this._previousFocusedElements=e.elements, document.activeElement&&document.activeElement.classList.contains("webview")&&super.domFocus()}));const p=v.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.bindTo(l);p.set("none");let S=null,b=null;const _=e=>{switch(e.cursorAtBoundary()){case m.CursorAtBoundary.Both:p.set("both");break;case m.CursorAtBoundary.Top:p.set("top");break;case m.CursorAtBoundary.Bottom:p.set("bottom");break;default:p.set("none")}};this._localDisposableStore.add(this.onDidChangeFocus(e=>{if(e.elements.length){null==S||S.dispose(),null==b||b.dispose();const t=e.elements[0];return S=t.onDidChangeState(e=>{e.selectionChanged&&_(t)}),b=t.onDidChangeEditorAttachState(()=>{t.editorAttached&&_(t)}),void _(t)}p.set("none")})),this._localDisposableStore.add(this.view.onMouseDblClick(()=>{var e;const t=this.getFocusedElements()[0];t&&t.cellKind===v.CellKind.Markdown&&!(null===(e=t.metadata)||void 0===e?void 0:e.inputCollapsed)&&(t.editState=m.CellEditState.Editing,t.focusMode=m.CellFocusMode.Editor)}));const C=()=>{if(!this.view.length)return ;const e=this.getViewScrollTop(),t=this.getViewScrollBottom(),i=f.clamp(this.view.indexAt(e),0,this.view.length-1),n=this.view.element(i),o=this._viewModel.getCellIndex(n),s=f.clamp(this.view.indexAt(t),0,this.view.length-1),r=this.view.element(s),a=this._viewModel.getCellIndex(r);if(a-o==s-i)this.visibleRanges=[{start:o,end:a}];else{let e=[];const t=[];let n=i,r=o;for(;n<=s;){const i=this.hiddenRangesPrefixSum.getAccumulatedValue(n);i===r+1?(e.length&&(e[e.length-1]===r-1?t.push({start:e[e.length-1],end:r}):t.push({start:e[e.length-1],end:e[e.length-1]})),e.push(r),n++,r++):(e.length&&(e[e.length-1]===r-1?t.push({start:e[e.length-1],end:r}):t.push({start:e[e.length-1],end:e[e.length-1]})),e.push(r),n++,r=i)}e.length&&t.push({start:e[e.length-1],end:e[e.length-1]}),this.visibleRanges=m.reduceCellRanges(t)}};this._localDisposableStore.add(this.view.onDidChangeContentHeight(()=>{this._isInLayout&&i.scheduleAtNextAnimationFrame(()=>{C()}),C()})),this._localDisposableStore.add(this.view.onDidScroll(()=>{ this._isInLayout&&i.scheduleAtNextAnimationFrame(()=>{C()}),C()}))}get onWillScroll(){return this.view.onWillScroll}get rowsContainer(){return this.view.containerDomNode}get visibleRanges(){return this._visibleRanges}set visibleRanges(e){m.cellRangesEqual(this._visibleRanges,e)||(this._visibleRanges=e,this._onDidChangeVisibleRanges.fire())}get isDisposed(){return this._isDisposed}elementAt(e){if(!this.view.length)return;const t=this.view.indexAt(e),i=f.clamp(t,0,this.view.length-1);return this.element(i)}elementHeight(e){const t=this._getViewIndexUpperBound(e);if(void 0===t||t<0||t>=this.length)throw this._getViewIndexUpperBound(e),new n.ListError(this.listUser,`Invalid index ${t}`);return this.view.elementHeight(t)}detachViewModel(){this._viewModelStore.clear(),this._viewModel=null,this.hiddenRangesPrefixSum=null}attachViewModel(e){this._viewModel=e,this._viewModelStore.add(e.onDidChangeViewCells(e=>{if(this._isDisposed)return ;const t=this._hiddenRangeIds.map(e=>this._viewModel.getTrackedRange(e)).filter(e=>null!==e),n=m.getVisibleCells(this._viewModel.viewCells,t),o=[],s=new Set;for(let e=0;es.has(e.uri.toString()));e.synchronous?r.reverse().forEach(e=>{const t=[],i=[];for(let n=e.start;nthis._onDidHideOutput.fire(e)),i.forEach(e=>this._onDidRemoveOutput.fire(e))}):this._viewModelStore.add(i.scheduleAtNextAnimationFrame(()=>{this._isDisposed||r.reverse().forEach(e=>{const t=[],i=[];for(let n=e.start;nthis._onDidHideOutput.fire(e)),i.forEach(e=>this._onDidRemoveOutput.fire(e))})}))})),this._viewModelStore.add(e.onDidChangeSelection(()=>{const t=e.selectionHandles.map(t=>e.getCellByHandle(t)).filter(e=>!!e).map(e=>this._getViewIndexUpperBound(e));this.setFocus(t,void 0,!0)}));const t=e.getHiddenRanges();this.setHiddenAreas(t,!1);const n=m.reduceCellRanges(t),o=e.viewCells.slice(0);n.reverse().forEach(e=>{o.splice(e.start,e.end-e.start+1)}),this.splice2(0,0,o)}clear(){super.splice(0,this.length)}setHiddenAreas(e,t){if(!this._viewModel)return!1;const i=m.reduceCellRanges(e),n=this._hiddenRangeIds.map(e=>this._viewModel.getTrackedRange(e)).filter(e=>null!==e);if(i.length===n.length){let e=!1;for(let t=0;tthis._viewModel.setTrackedRange(e,null,3));const o=i.map(e=>this._viewModel.setTrackedRange(null,e,3)).filter(e=>null!==e) ;this._hiddenRangeIds=o;let s=0,r=0;const a=[];for(;r{n.add(e.uri.toString())});const o=m.getVisibleCells(this._viewModel.viewCells,t);v.diff(i,o,e=>n.has(e.uri.toString())).reverse().forEach(e=>{const t=[],i=[];for(let n=e.start;nthis._onDidHideOutput.fire(e)),i.forEach(e=>this._onDidRemoveOutput.fire(e))})}splice2(e,t,n=[]){if(e<0||e>this.view.length)return ;const o=i.isAncestor(document.activeElement,this.rowsContainer);super.splice(e,t,n),o&&this.domFocus();const s=[];this._viewModel.selectionHandles.forEach(e=>{this._viewModel.hasCell(e)&&s.push(e)}),!s.length&&this._viewModel.viewCells.length&&(this._viewModel.selectionHandles=[this._viewModel.viewCells[0].handle])}getViewIndex(e){const t=this._viewModel.getCellIndex(e);if(!this.hiddenRangesPrefixSum)return t;const i=this.hiddenRangesPrefixSum.getIndexOf(t);return 0!==i.remainder?t>=this.hiddenRangesPrefixSum.getTotalValue()?t-(this.hiddenRangesPrefixSum.getTotalValue()-this.hiddenRangesPrefixSum.getCount()):void 0:i.index}_getViewIndexUpperBound(e){const t=this._viewModel.getCellIndex(e);if(!this.hiddenRangesPrefixSum)return t;const i=this.hiddenRangesPrefixSum.getIndexOf(t);return 0!==i.remainder&&t>=this.hiddenRangesPrefixSum.getTotalValue()?t-(this.hiddenRangesPrefixSum.getTotalValue()-this.hiddenRangesPrefixSum.getCount()):i.index}focusElement(e){const t=this._getViewIndexUpperBound(e) ;t>=0&&this.setFocus([t])}selectElement(e){this._viewModel&&(this._viewModel.selectionHandles=[e.handle]);const t=this._getViewIndexUpperBound(e);t>=0&&(this.setSelection([t]),this.setFocus([t]))}focusNext(e,t,i,n){this._focusNextPreviousDelegate.onFocusNext(()=>super.focusNext(e,t,i,n))}focusPrevious(e,t,i,n){this._focusNextPreviousDelegate.onFocusPrevious(()=>super.focusPrevious(e,t,i,n))}setFocus(e,t,i){e.length&&(this._viewModel&&!i&&(this._viewModel.selectionHandles=e.map(e=>this.element(e)).map(e=>e.handle)),super.setFocus(e,t))}revealElementInView(e){const t=this._getViewIndexUpperBound(e);t>=0&&this._revealInView(t)}revealElementInCenterIfOutsideViewport(e){const t=this._getViewIndexUpperBound(e);t>=0&&this._revealInCenterIfOutsideViewport(t)}revealElementInCenter(e){const t=this._getViewIndexUpperBound(e);t>=0&&this._revealInCenter(t)}async revealElementLineInViewAsync(e,t){const i=this._getViewIndexUpperBound(e);if(i>=0)return this._revealLineInViewAsync(i,t)} async revealElementLineInCenterAsync(e,t){const i=this._getViewIndexUpperBound(e);if(i>=0)return this._revealLineInCenterAsync(i,t)}async revealElementLineInCenterIfOutsideViewportAsync(e,t){const i=this._getViewIndexUpperBound(e);if(i>=0)return this._revealLineInCenterIfOutsideViewportAsync(i,t)}async revealElementRangeInViewAsync(e,t){const i=this._getViewIndexUpperBound(e);if(i>=0)return this._revealRangeInView(i,t)}async revealElementRangeInCenterAsync(e,t){const i=this._getViewIndexUpperBound(e);if(i>=0)return this._revealRangeInCenterAsync(i,t)}async revealElementRangeInCenterIfOutsideViewportAsync(e,t){const i=this._getViewIndexUpperBound(e);if(i>=0)return this._revealRangeInCenterIfOutsideViewportAsync(i,t)}domElementOfElement(e){const t=this._getViewIndexUpperBound(e);return t>=0?this.view.domElement(t):null}focusView(){this.view.domNode.focus()}getAbsoluteTopOfElement(e){const t=this._getViewIndexUpperBound(e);if(void 0===t||t<0||t>=this.length)throw this._getViewIndexUpperBound(e), new n.ListError(this.listUser,`Invalid index ${t}`);return this.view.elementTop(t)}triggerScrollFromMouseWheelEvent(e){this.view.triggerScrollFromMouseWheelEvent(e)}updateElementHeight2(e,t){const i=this._getViewIndexUpperBound(e);if(void 0===i||i<0||i>=this.length)return;const n=this.getFocus();this.view.updateElementHeight(i,t,n.length?n[0]:null)}domFocus(){const e=this.getFocusedElements()[0],t=e&&this.domElementOfElement(e);document.activeElement&&t&&t.contains(document.activeElement)||!l.isMacintosh&&document.activeElement&&i.findParentWithClass(document.activeElement,"context-view")||super.domFocus()}getViewScrollTop(){return this.view.getScrollTop()}getViewScrollBottom(){return this.getViewScrollTop()+this.view.renderHeight-S.SCROLLABLE_ELEMENT_PADDING_TOP}_revealRange(e,t,i,n,o){const s=this.view.element(e),r=this.getViewScrollTop(),a=this.getViewScrollBottom(),l=s.getPositionScrollTopOffset(t.startLineNumber,t.startColumn),c=this.view.elementTop(e)+l ;ca?this.view.setScrollTop(r+c-a+30):n&&(o?this.view.setScrollTop(r+c-a+30):this.view.setScrollTop(c-30)),i===m.CellRevealType.Range&&s.revealRangeInCenter(t)}async _revealRangeInternalAsync(e,t,i){const n=this.getViewScrollTop(),o=this.getViewScrollBottom(),s=this.view.elementTop(e),r=this.view.element(e);if(!r.editorAttached){const a=this.view.elementHeight(e);let l=!1;return s+ao&&(this.view.setScrollTop(s-this.view.renderHeight/2),l=!0),new Promise((e,t)=>{r.onDidChangeEditorAttachState(()=>{r.editorAttached?e():t()})}).then(()=>{this._revealRange(e,t,i,!0,l)})}this._revealRange(e,t,i,!1,!1)}async _revealLineInViewAsync(e,t){return this._revealRangeInternalAsync(e,new c.Range(t,1,t,1),m.CellRevealType.Line)}async _revealRangeInView(e,t){return this._revealRangeInternalAsync(e,t,m.CellRevealType.Range)}async _revealRangeInCenterInternalAsync(e,t,i){const n=(e,t,i)=>{ const n=this.view.element(e),o=n.getPositionScrollTopOffset(t.startLineNumber,t.startColumn),s=this.view.elementTop(e)+o;this.view.setScrollTop(s-this.view.renderHeight/2),i===m.CellRevealType.Range&&n.revealRangeInCenter(t)},o=this.view.elementTop(e);this.view.setScrollTop(o-this.view.renderHeight/2);const s=this.view.element(e);if(!s.editorAttached)return _(s).then(()=>n(e,t,i));n(e,t,i)}async _revealLineInCenterAsync(e,t){return this._revealRangeInCenterInternalAsync(e,new c.Range(t,1,t,1),m.CellRevealType.Line)}_revealRangeInCenterAsync(e,t){return this._revealRangeInCenterInternalAsync(e,t,m.CellRevealType.Range)}async _revealRangeInCenterIfOutsideViewportInternalAsync(e,t,i){const n=(e,t,i)=>{const n=this.view.element(e),o=n.getPositionScrollTopOffset(t.startLineNumber,t.startColumn),s=this.view.elementTop(e)+o;this.view.setScrollTop(s-this.view.renderHeight/2),i===m.CellRevealType.Range&&n.revealRangeInCenter(t) },o=this.getViewScrollTop(),s=this.getViewScrollBottom(),r=this.view.elementTop(e),a=this.view.element(e),l=r+a.getPositionScrollTopOffset(t.startLineNumber,t.startColumn);if(ls){this.view.setScrollTop(l-this.view.renderHeight/2);const o=this.view.elementTop(e)+a.getPositionScrollTopOffset(t.startLineNumber,t.startColumn);if(this.view.setScrollTop(o-this.view.renderHeight/2),!a.editorAttached)return _(a).then(()=>n(e,t,i))}else{if(!a.editorAttached)return _(a).then(()=>n(e,t,i));a.revealRangeInCenter(t)}}async _revealLineInCenterIfOutsideViewportAsync(e,t){return this._revealRangeInCenterIfOutsideViewportInternalAsync(e,new c.Range(t,1,t,1),m.CellRevealType.Line)}async _revealRangeInCenterIfOutsideViewportAsync(e,t){return this._revealRangeInCenterIfOutsideViewportInternalAsync(e,t,m.CellRevealType.Range)}_revealInternal(e,t,i){if(e>=this.view.length)return;const n=this.getViewScrollTop(),o=this.getViewScrollBottom(),s=this.view.elementTop(e),r=this.view.elementHeight(e)+s ;if(t&&s>=n&&so&&s>(n+o)/2))return;const a=i===m.CellRevealPosition.Top?s:s-this.view.renderHeight/2;this.view.setScrollTop(a);const l=this.view.elementTop(e),c=i===m.CellRevealPosition.Top?l:l-this.view.renderHeight/2;this.view.setScrollTop(c)}_revealInView(e){this._revealInternal(e,!0,m.CellRevealPosition.Top)}_revealInCenter(e){this._revealInternal(e,!1,m.CellRevealPosition.Center)}_revealInCenterIfOutsideViewport(e){this._revealInternal(e,!0,m.CellRevealPosition.Center)}setCellSelection(e,t){const i=e;i.editorAttached?i.setSelection(t):_(i).then(()=>{i.setSelection(t)})}style(e){const t=this.view.domId;this.styleElement||(this.styleElement=i.createStyleSheet(this.view.domNode));const n=t&&`.${t}`,o=[] ;e.listBackground&&(e.listBackground.isOpaque()?o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows { background: ${e.listBackground}; }`):l.isMacintosh||console.warn(`List with id '${t}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${e.listFocusForeground}; }`), e.listActiveSelectionBackground&&(o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&o.push(`.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`), e.listFocusAndSelectionForeground&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusBackground&&(o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)), e.listInactiveSelectionForeground&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&o.push(`.monaco-list${n}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`), e.listFocusOutline&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&o.push(`.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&o.push(`\n\t\t\t\t.monaco-list${n}.drop-target,\n\t\t\t\t.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${n} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`), e.listFilterWidgetBackground&&o.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&o.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&o.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&o.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`);const s=o.join("\n");s!==this.styleElement.textContent&&(this.styleElement.textContent=s)}layout(e,t){this._isInLayout=!0,super.layout(e,t),this._isInLayout=!1}dispose(){this._isDisposed=!0,this._viewModelStore.dispose(),this._localDisposableStore.dispose(),super.dispose()}};function _(e){return new Promise((t,i)=>{s.Event.once(e.onDidChangeEditorAttachState)(()=>e.editorAttached?t():i())})}b=o([r(7,g.IListService),r(8,p.IThemeService),r(9,h.IConfigurationService),r(10,u.IKeybindingService)],b),t.NotebookCellList=b})), define(e[1668],t([0,1,7,91,370]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});o.NotebookRegistry.registerOutputTransform("notebook.output.stream",n.CellOutputKind.Text,class{constructor(e){}render(e,t){const n=i.$(".output-stream");return n.innerText=e.text,t.appendChild(n),{type:0,hasDynamicHeight:!1}}dispose(){}})})),define(e[614],t([0,1,7,99,15,2,12,178,127,91]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CellDragAndDropController=t.GLOBAL_DRAG_CLASS=t.DRAGGING_CLASS=void 0;const d=i.$;t.DRAGGING_CLASS="cell-dragging",t.GLOBAL_DRAG_CLASS="global-drag-active";class h extends s.Disposable{constructor(e,t){super(),this.notebookEditor=e,this.isScrolling=!1,this.listInsertionIndicator=i.append(t,d(".cell-list-insertion-indicator")),this._register(n.domEvent(document.body,i.EventType.DRAG_START,!0)(this.onGlobalDragStart.bind(this))), this._register(n.domEvent(document.body,i.EventType.DRAG_END,!0)(this.onGlobalDragEnd.bind(this)));const s=(t,n)=>{this._register(i.addDisposableListener(e.getDomNode(),t,e=>{const t=this.toCellDragEvent(e);t&&n(t)}))};s(i.EventType.DRAG_OVER,e=>{e.browserEvent.preventDefault(),this.onCellDragover(e)}),s(i.EventType.DROP,e=>{e.browserEvent.preventDefault(),this.onCellDrop(e)}),s(i.EventType.DRAG_LEAVE,e=>{e.browserEvent.preventDefault(),this.onCellDragLeave(e)}),this.scrollingDelayer=new o.Delayer(200)}setList(e){this.list=e,this.list.onWillScroll(e=>{e.scrollTopChanged&&(this.setInsertIndicatorVisibility(!1),this.isScrolling=!0,this.scrollingDelayer.trigger(()=>{this.isScrolling=!1}))})}setInsertIndicatorVisibility(e){this.listInsertionIndicator.style.opacity=e?"1":"0"}toCellDragEvent(e){const t=this.notebookEditor.getDomNode().getBoundingClientRect().top,i=this.list.scrollTop+e.clientY-t,n=this.list.elementAt(i);if(!n)return;const o=this.list.getAbsoluteTopOfElement(n),s=this.list.elementHeight(n);return{ browserEvent:e,draggedOverCell:n,cellTop:o,cellHeight:s,dragPosRatio:(i-o)/s}}clearGlobalDragState(){this.notebookEditor.getDomNode().classList.remove(t.GLOBAL_DRAG_CLASS)}onGlobalDragStart(){this.notebookEditor.getDomNode().classList.add(t.GLOBAL_DRAG_CLASS)}onGlobalDragEnd(){this.notebookEditor.getDomNode().classList.remove(t.GLOBAL_DRAG_CLASS)}onCellDragover(e){if(!e.browserEvent.dataTransfer)return;if(!this.currentDraggedCell)return void(e.browserEvent.dataTransfer.dropEffect="none");if(this.isScrolling||this.currentDraggedCell===e.draggedOverCell)return void this.setInsertIndicatorVisibility(!1);const t=("above"===this.getDropInsertDirection(e)?e.cellTop:e.cellTop+e.cellHeight)-this.list.scrollTop+a.BOTTOM_CELL_TOOLBAR_GAP/2;t>=0?(this.listInsertionIndicator.style.top=`${t}px`,this.setInsertIndicatorVisibility(!0)):this.setInsertIndicatorVisibility(!1)}getDropInsertDirection(e){return e.dragPosRatio<.5?"above":"below"}onCellDrop(e){const t=this.currentDraggedCell ;if(this.isScrolling||this.currentDraggedCell===e.draggedOverCell)return;let i=[t],n=[this.notebookEditor.viewModel.getCellIndex(t),1];if(t.cellKind===c.CellKind.Markdown){const e=this.notebookEditor.viewModel.getCellIndex(t),o=this.notebookEditor.viewModel.getNextVisibleCellIndex(e);o>e+1&&(i=this.notebookEditor.viewModel.viewCells.slice(e,o),n=[e,o-e])}this.dragCleanup();const o=e.browserEvent.ctrlKey&&!r.isMacintosh||e.browserEvent.altKey&&r.isMacintosh,s=this.getDropInsertDirection(e),l=("above"===s?e.cellTop:e.cellTop+e.cellHeight)-this.list.scrollTop+a.BOTTOM_CELL_TOOLBAR_GAP/2,d=this.notebookEditor.getDomNode().getBoundingClientRect().height;if(!(l<0||l>d))if(o)this.copyCells(i,e.draggedOverCell,s);else{const t=this.notebookEditor.viewModel;let i=t.getCellIndex(e.draggedOverCell);if("below"===s){const n=t.getCellIndex(e.draggedOverCell);i=t.getNextVisibleCellIndex(n)}this.notebookEditor.moveCellsToIdx(n[0],n[1],i)}}onCellDragLeave(e){ e.browserEvent.relatedTarget&&i.isAncestor(e.browserEvent.relatedTarget,this.notebookEditor.getDomNode())||this.setInsertIndicatorVisibility(!1)}dragCleanup(){this.currentDraggedCell&&(this.currentDraggedCell.dragging=!1,this.currentDraggedCell=void 0),this.setInsertIndicatorVisibility(!1)}registerDragHandle(e,o,s,r){const a=e.container;s.setAttribute("draggable","true"),e.disposables.add(n.domEvent(s,i.EventType.DRAG_END)(()=>{a.classList.remove(t.DRAGGING_CLASS),this.dragCleanup()})),e.disposables.add(n.domEvent(s,i.EventType.DRAG_START)(i=>{if(!i.dataTransfer)return;this.currentDraggedCell=e.currentRenderedCell,this.currentDraggedCell.dragging=!0;const n=r();o.parentElement.appendChild(n),i.dataTransfer.setDragImage(n,0,0),setTimeout(()=>o.parentElement.removeChild(n),0),a.classList.add(t.DRAGGING_CLASS)}))}copyCells(e,t,i){this.notebookEditor.textModel.pushStackElement("Copy Cells",void 0);let n=void 0,o=l.CellEditState.Preview;for(let s=0;so.delete(this.viewCell))),this._register(t.onDidChangeState(e=>{ e.editStateChanged?(this.localDisposables.clear(),this.viewUpdate()):e.contentChanged&&this.viewUpdate()})),this._register(t.model.onDidChangeMetadata(()=>{this.viewUpdate()})),this._register(f.getResizesObserver(this.markdownContainer,void 0,()=>{t.editState===u.CellEditState.Preview&&(this.viewCell.renderedMarkdownHeight=i.container.clientHeight)})).startObserving();const a=()=>{t.focusMode===u.CellFocusMode.Editor&&this.focusEditorIfNeeded(),i.container.classList.toggle("cell-editor-focus",t.focusMode===u.CellFocusMode.Editor)};this._register(t.onDidChangeState(e=>{e.focusModeChanged&&a()})),a(),this.foldingState=t.foldingState,this.setFoldingIndicator(),this._register(t.onDidChangeState(e=>{if(!e.foldingStateChanged)return;const i=t.foldingState;i!==this.foldingState&&(this.foldingState=i,this.setFoldingIndicator())})),this._register(t.onDidChangeLayout(e=>{var i;const n=null===(i=this.editor)||void 0===i?void 0:i.getLayoutInfo() ;e.outerWidth&&this.viewCell.editState===u.CellEditState.Editing&&n&&n.width!==t.layoutInfo.editorWidth?this.onCellEditorWidthChange():(e.totalHeight||e.outerWidth)&&this.relayoutCell()})),this._register(t.onCellDecorationsChanged(e=>{e.added.forEach(e=>{e.className&&i.rootContainer.classList.add(e.className)}),e.removed.forEach(e=>{e.className&&i.rootContainer.classList.remove(e.className)})})),t.getCellDecorations().forEach(e=>{e.className&&i.rootContainer.classList.add(e.className)}),this.viewUpdate()}viewUpdate(){var e;(null===(e=this.viewCell.metadata)||void 0===e?void 0:e.inputCollapsed)?this.viewUpdateCollapsed():this.viewCell.editState===u.CellEditState.Editing?this.viewUpdateEditing():this.viewUpdatePreview()}viewUpdateCollapsed(){i.show(this.templateData.collapsedPart),i.hide(this.editorPart),i.hide(this.markdownContainer),this.templateData.container.classList.toggle("collapsed",!0),this.viewCell.renderedMarkdownHeight=0}viewUpdateEditing(){var e;let t;if(i.show(this.editorPart), i.hide(this.markdownContainer),i.hide(this.templateData.collapsedPart),this.templateData.container.classList.toggle("collapsed",!1),this.editor)t=this.editor.getContentHeight(),this.viewCell.attachTextEditor(this.editor),this.focusEditorIfNeeded(),this.bindEditorListeners(),this.editor.layout({width:this.viewCell.layoutInfo.editorWidth,height:t});else{const i=this.viewCell.layoutInfo.editorWidth,o=this.viewCell.lineCount,r=(null===(e=this.viewCell.layoutInfo.fontInfo)||void 0===e?void 0:e.lineHeight)||17;t=Math.max(o,1)*r+h.EDITOR_TOP_PADDING+h.EDITOR_BOTTOM_PADDING,this.templateData.editorContainer.innerText="";const a=this.contextKeyService.createScoped(),l=this.instantiationService.createChild(new m.ServiceCollection([p.IContextKeyService,a]));v.EditorContextKeys.inCompositeEditor.bindTo(a).set(!0),this.editor=l.createInstance(c.CodeEditorWidget,this.templateData.editorContainer,Object.assign(Object.assign({},this.editorOptions),{dimension:{width:i,height:t}}),{}), this.templateData.currentEditor=this.editor;const d=new s.CancellationTokenSource;this._register({dispose(){d.dispose(!0)}}),n.raceCancellation(this.viewCell.resolveTextModel(),d.token).then(e=>{if(!e)return;this.editor.setModel(e),this.focusEditorIfNeeded();const n=this.editor.getContentHeight();n!==t&&(this.editor.layout({width:i,height:n}),t=n),this.viewCell.attachTextEditor(this.editor),this.viewCell.editState===u.CellEditState.Editing&&this.focusEditorIfNeeded(),this.bindEditorListeners(),this.viewCell.editorHeight=t})}this.viewCell.editorHeight=t,this.focusEditorIfNeeded(),this.renderedEditors.set(this.viewCell,this.editor)}viewUpdatePreview(){this.viewCell.detachTextEditor(),i.hide(this.editorPart),i.hide(this.templateData.collapsedPart),i.show(this.markdownContainer),this.templateData.container.classList.toggle("collapsed",!1),this.renderedEditors.delete(this.viewCell),this.markdownContainer.innerText="",this.viewCell.clearHTML();const e=this.viewCell.getMarkdownRenderer(),t=this.viewCell.getHTML() ;t&&this.markdownContainer.appendChild(t),this.editor?(this.viewCell.renderedMarkdownHeight=this.templateData.container.clientHeight,this.relayoutCell()):(this.localDisposables.add(e.onDidUpdateRender(()=>{this.viewCell.renderedMarkdownHeight=this.templateData.container.clientHeight,this.relayoutCell()})),this.localDisposables.add(this.viewCell.textBuffer.onDidChangeContent(()=>{this.markdownContainer.innerText="",this.viewCell.clearHTML();const e=this.viewCell.getHTML();e&&this.markdownContainer.appendChild(e)})),this.viewCell.renderedMarkdownHeight=this.templateData.container.clientHeight,this.relayoutCell())}focusEditorIfNeeded(){var e;this.viewCell.focusMode===u.CellFocusMode.Editor&&this.notebookEditor.hasFocus()&&(null===(e=this.editor)||void 0===e||e.focus())}layoutEditor(e){var t;null===(t=this.editor)||void 0===t||t.layout(e),this.templateData.statusBar.layout(e.width)}onCellEditorWidthChange(){const e=this.editor.getContentHeight();this.layoutEditor({width:this.viewCell.layoutInfo.editorWidth, height:e}),this.viewCell.editorHeight=e,this.relayoutCell()}relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight)}updateEditorOptions(e){this.editorOptions=e,this.editor&&this.editor.updateOptions(this.editorOptions)}setFoldingIndicator(){switch(this.foldingState){case g.CellFoldingState.None:this.templateData.foldingIndicator.innerText="";break;case g.CellFoldingState.Collapsed:i.reset(this.templateData.foldingIndicator,...a.renderCodicons("$(chevron-right)"));break;case g.CellFoldingState.Expanded:i.reset(this.templateData.foldingIndicator,...a.renderCodicons("$(chevron-down)"))}}bindEditorListeners(){this.localDisposables.add(this.editor.onDidContentSizeChange(e=>{const t=this.editor.getLayoutInfo();e.contentHeightChanged&&(this.viewCell.editorHeight=e.contentHeight,this.editor.layout({width:t.width,height:e.contentHeight}))})),this.localDisposables.add(this.editor.onDidChangeCursorSelection(e=>{if("restoreState"===e.source)return ;const t=this.editor.getSelection();t&&this.notebookEditor.revealLineInViewAsync(this.viewCell,t.positionLineNumber)}));const e=()=>this.viewCell.focusMode=this.editor.hasWidgetFocus()?u.CellFocusMode.Editor:u.CellFocusMode.Container;this.localDisposables.add(this.editor.onDidFocusEditorWidget(()=>{e()})),this.localDisposables.add(this.editor.onDidBlurEditorWidget(()=>{e()})),e()}dispose(){this.viewCell.detachTextEditor(),super.dispose()}};S=o([r(5,p.IContextKeyService),r(6,d.IInstantiationService)],S),t.StatefulMarkdownCell=S})),define(e[615],t([0,1,6,2,18,296,178,127,91]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCellViewModel=void 0;class c extends n.Disposable{constructor(e,t,n,o){super(),this.viewType=e,this.model=t,this.id=n,this._configurationService=o,this._onDidChangeEditorAttachState=new i.Emitter,this.onDidChangeEditorAttachState=this._onDidChangeEditorAttachState.event,this._onDidChangeState=this._register(new i.Emitter), this.onDidChangeState=this._onDidChangeState.event,this._editState=a.CellEditState.Preview,this._focusMode=a.CellFocusMode.Container,this._cursorChangeListener=null,this._editorViewStates=null,this._resolvedCellDecorations=new Map,this._cellDecorationsChanged=new i.Emitter,this.onCellDecorationsChanged=this._cellDecorationsChanged.event,this._resolvedDecorations=new Map,this._lastDecorationId=0,this._textModel=void 0,this._dragging=!1,this._register(t.onDidChangeLanguage(()=>{this._onDidChangeState.fire({languageChanged:!0})})),this._register(t.onDidChangeMetadata(()=>{this._onDidChangeState.fire({metadataChanged:!0})})),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(l.ShowCellStatusBarKey)&&this.layoutChange({})}))}get handle(){return this.model.handle}get uri(){return this.model.uri}get lineCount(){return this.model.textBuffer.getLineCount()}get metadata(){return this.model.metadata}get language(){return this.model.language}get editState(){ return this._editState}set editState(e){e!==this._editState&&(this._editState=e,this._onDidChangeState.fire({editStateChanged:!0}),this._editState===a.CellEditState.Preview&&(this.focusMode=a.CellFocusMode.Container))}get focusMode(){return this._focusMode}set focusMode(e){this._focusMode=e,this._onDidChangeState.fire({focusModeChanged:!0})}get editorAttached(){return!!this._textEditor}get textModel(){return this._textModel}set textModel(e){this._textModel=e}hasModel(){return!!this._textModel}get dragging(){return this._dragging}set dragging(e){this._dragging=e}getEditorStatusbarHeight(){return this._configurationService.getValue(l.ShowCellStatusBarKey)?r.CELL_STATUSBAR_HEIGHT:0}assertTextModelAttached(){return!(!this.textModel||!this._textEditor||this._textEditor.getModel()!==this.textModel)}attachTextEditor(e){if(!e.hasModel())throw new Error("Invalid editor: model is missing");this._textEditor!==e?(this._textEditor=e,this.textModel=this._textEditor.getModel()||void 0, this._editorViewStates&&this._restoreViewState(this._editorViewStates),this._resolvedDecorations.forEach((e,t)=>{if(t.startsWith("_lazy_")){const i=this._textEditor.deltaDecorations([],[e.options]);this._resolvedDecorations.get(t).id=i[0]}else{const i=this._textEditor.deltaDecorations([],[e.options]);this._resolvedDecorations.get(t).id=i[0]}}),this._cursorChangeListener=this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})}),this._onDidChangeState.fire({selectionChanged:!0}),this._onDidChangeEditorAttachState.fire()):null===this._cursorChangeListener&&(this._cursorChangeListener=this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})}),this._onDidChangeState.fire({selectionChanged:!0}))}detachTextEditor(){var e;this.saveViewState(),this._resolvedDecorations.forEach(e=>{var t;const i=e.id;i&&(null===(t=this._textEditor)||void 0===t||t.deltaDecorations([i],[]))}),this._textEditor=void 0,this.textModel=void 0, null===(e=this._cursorChangeListener)||void 0===e||e.dispose(),this._cursorChangeListener=null,this._onDidChangeEditorAttachState.fire()}getText(){return this.model.getValue()}getTextLength(){return this.model.getTextLength()}saveViewState(){this._textEditor&&(this._editorViewStates=this._textEditor.saveViewState())}saveEditorViewState(){return this._textEditor&&(this._editorViewStates=this._textEditor.saveViewState()),this._editorViewStates}restoreEditorViewState(e,t){this._editorViewStates=e}_restoreViewState(e){var t;e&&(null===(t=this._textEditor)||void 0===t||t.restoreViewState(e))}addModelDecoration(e){if(!this._textEditor){const t=++this._lastDecorationId,i=`_lazy_${this.id};${t}`;return this._resolvedDecorations.set(i,{options:e}),i}const t=this._textEditor.deltaDecorations([],[e]);return this._resolvedDecorations.set(t[0],{id:t[0],options:e}),t[0]}removeModelDecoration(e){const t=this._resolvedDecorations.get(e);this._textEditor&&t&&void 0!==t.id&&this._textEditor.deltaDecorations([t.id],[]), this._resolvedDecorations.delete(e)}deltaModelDecorations(e,t){return e.forEach(e=>{this.removeModelDecoration(e)}),t.map(e=>this.addModelDecoration(e))}_removeCellDecoration(e){const t=this._resolvedCellDecorations.get(e);t&&(this._cellDecorationsChanged.fire({added:[],removed:[t]}),this._resolvedCellDecorations.delete(e))}_addCellDecoration(e){const t=++this._lastDecorationId,i=`_cell_${this.id};${t}`;return this._resolvedCellDecorations.set(i,e),this._cellDecorationsChanged.fire({added:[e],removed:[]}),i}getCellDecorations(){return[...this._resolvedCellDecorations.values()]}deltaCellDecorations(e,t){return e.forEach(e=>{this._removeCellDecoration(e)}),t.map(e=>this._addCellDecoration(e))}revealRangeInCenter(e){var t;null===(t=this._textEditor)||void 0===t||t.revealRangeInCenter(e,1)}setSelection(e){var t;null===(t=this._textEditor)||void 0===t||t.setSelection(e)}setSelections(e){var t;e.length&&(null===(t=this._textEditor)||void 0===t||t.setSelections(e))}getSelections(){var e ;return(null===(e=this._textEditor)||void 0===e?void 0:e.getSelections())||[]}getSelectionsStartPosition(){var e;if(this._textEditor){const e=this._textEditor.getSelections();return null==e?void 0:e.map(e=>e.getStartPosition())}{const t=null===(e=this._editorViewStates)||void 0===e?void 0:e.cursorState;return null==t?void 0:t.map(e=>e.selectionStart)}}getLineScrollTopOffset(e){return this._textEditor?this._textEditor.getTopForLineNumber(e)+r.EDITOR_TOP_PADDING:0}getPositionScrollTopOffset(e,t){return this._textEditor?this._textEditor.getTopForPosition(e,t)+r.EDITOR_TOP_PADDING:0}cursorAtBoundary(){if(!this._textEditor)return a.CursorAtBoundary.None;if(!this.textModel)return a.CursorAtBoundary.None;const e=this._textEditor.getSelection();if(!e||!e.isEmpty())return a.CursorAtBoundary.None ;const t=this._textEditor.getTopForPosition(1,1),i=this._textEditor.getTopForPosition(this.textModel.getLineCount(),this.textModel.getLineLength(this.textModel.getLineCount())),n=this._textEditor.getTopForPosition(e.startLineNumber,e.startColumn);return n===i?n===t?a.CursorAtBoundary.Both:a.CursorAtBoundary.Bottom:n===t?a.CursorAtBoundary.Top:a.CursorAtBoundary.None}get textBuffer(){return this.model.textBuffer}cellStartFind(e,t){let i=[];if(this.assertTextModelAttached())i=this.textModel.findMatches(e,!1,t.regex||!1,t.caseSensitive||!1,t.wholeWord&&t.wordSeparators||null,!1);else{const n=this.textBuffer.getLineCount(),r=new o.Range(1,1,n,this.textBuffer.getLineLength(n)+1),a=new s.SearchParams(e,t.regex||!1,t.caseSensitive||!1,t.wholeWord&&t.wordSeparators||null).parseSearchRequest();if(!a)return null;i=this.textBuffer.findMatchesLineByLine(r,a,!1,1e3)}return i}getEvaluatedMetadata(e){var t,i,n,o,s,r ;const a=null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.editable)&&void 0!==i?i:e.cellEditable,l=null!==(o=null===(n=this.metadata)||void 0===n?void 0:n.runnable)&&void 0!==o?o:e.cellRunnable,c=null!==(r=null===(s=this.metadata)||void 0===s?void 0:s.hasExecutionOrder)&&void 0!==r?r:e.cellHasExecutionOrder;return Object.assign(Object.assign({},this.metadata||{}),{editable:a,runnable:l,hasExecutionOrder:c})}dispose(){super.dispose()}toJSON(){return{handle:this.handle}}}t.BaseCellViewModel=c})),define(e[616],t([0,1,6,92,299,9,178,127,91,615]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeCellViewModel=void 0;let u=class extends h.BaseCellViewModel{constructor(e,t,o,s,r){super(e,t,n.generateUuid(),r),this.viewType=e,this.model=t,this.eventDispatcher=s,this.cellKind=d.CellKind.Code,this._onDidChangeOutputs=new i.Emitter,this.onDidChangeOutputs=this._onDidChangeOutputs.event,this._outputCollection=[],this._selfSizeMonitoring=!1,this._outputsTop=null, this._onDidChangeLayout=new i.Emitter,this.onDidChangeLayout=this._onDidChangeLayout.event,this._editorHeight=0,this._hoveringOutput=!1,this._hasFindResult=this._register(new i.Emitter),this.hasFindResult=this._hasFindResult.event,this._register(this.model.onDidChangeOutputs(e=>{e.reverse().forEach(e=>{this._outputCollection.splice(e[0],e[1],...e[2].map(()=>0))}),this._outputsTop=null,this._onDidChangeOutputs.fire(e)})),this._outputCollection=new Array(this.model.outputs.length),this._layoutInfo={fontInfo:(null==o?void 0:o.fontInfo)||null,editorHeight:0,editorWidth:o?this.computeEditorWidth(o.width):0,outputContainerOffset:0,outputTotalHeight:0,totalHeight:0,indicatorHeight:0,bottomToolbarOffset:0,layoutState:c.CodeCellLayoutState.Uninitialized}}set selfSizeMonitoring(e){this._selfSizeMonitoring=e}get selfSizeMonitoring(){return this._selfSizeMonitoring}get outputs(){return this.model.outputs}set editorHeight(e){this._editorHeight=e,this.layoutChange({editorHeight:!0})}get editorHeight(){ throw new Error("editorHeight is write-only")}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(e){this._hoveringOutput=e,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get layoutInfo(){return this._layoutInfo}computeEditorWidth(e){return e-(l.CODE_CELL_LEFT_MARGIN+2*l.CELL_MARGIN+l.CELL_RUN_GUTTER)}layoutChange(e){var t,i,n,o,s,r,a;this._ensureOutputsTop();let d=(null===(t=this.metadata)||void 0===t?void 0:t.outputCollapsed)?l.COLLAPSED_INDICATOR_HEIGHT:this._outputsTop.getTotalValue();if(null===(i=this.metadata)||void 0===i?void 0:i.inputCollapsed){d=(null===(r=this.metadata)||void 0===r?void 0:r.inputCollapsed)&&this.metadata.outputCollapsed?0:d ;const t=l.COLLAPSED_INDICATOR_HEIGHT+d,i=l.CELL_TOP_MARGIN+l.COLLAPSED_INDICATOR_HEIGHT,n=l.CELL_TOP_MARGIN+l.COLLAPSED_INDICATOR_HEIGHT+l.CELL_BOTTOM_MARGIN+l.BOTTOM_CELL_TOOLBAR_GAP+d,o=n-l.BOTTOM_CELL_TOOLBAR_GAP-l.BOTTOM_CELL_TOOLBAR_HEIGHT/2,s=void 0!==e.outerWidth?this.computeEditorWidth(e.outerWidth):null===(a=this._layoutInfo)||void 0===a?void 0:a.editorWidth;this._layoutInfo={fontInfo:e.font||null,editorHeight:this._layoutInfo.editorHeight,editorWidth:s,outputContainerOffset:i,outputTotalHeight:d,totalHeight:n,indicatorHeight:t,bottomToolbarOffset:o,layoutState:this._layoutInfo.layoutState}}else{let t,i,r;e.editorHeight||this._layoutInfo.layoutState!==c.CodeCellLayoutState.FromCache?e.editorHeight||this._layoutInfo.layoutState===c.CodeCellLayoutState.Measured?(i=this._editorHeight,r=this.computeTotalHeight(this._editorHeight,d),t=c.CodeCellLayoutState.Measured):(i=this.estimateEditorHeight(null===(o=e.font)||void 0===o?void 0:o.lineHeight),r=this.computeTotalHeight(i,d), t=c.CodeCellLayoutState.Estimated):(i=this.estimateEditorHeight(null===(n=e.font)||void 0===n?void 0:n.lineHeight),r=this._layoutInfo.totalHeight,t=c.CodeCellLayoutState.FromCache);const a=this.getEditorStatusbarHeight(),h=i+a+d,u=l.EDITOR_TOOLBAR_HEIGHT+l.CELL_TOP_MARGIN+i+a,g=r-l.BOTTOM_CELL_TOOLBAR_GAP-l.BOTTOM_CELL_TOOLBAR_HEIGHT/2,p=void 0!==e.outerWidth?this.computeEditorWidth(e.outerWidth):null===(s=this._layoutInfo)||void 0===s?void 0:s.editorWidth;this._layoutInfo={fontInfo:e.font||null,editorHeight:i,editorWidth:p,outputContainerOffset:u,outputTotalHeight:d,totalHeight:r,indicatorHeight:h,bottomToolbarOffset:g,layoutState:t}}(e.editorHeight||e.outputHeight)&&(e.totalHeight=!0),this._fireOnDidChangeLayout(e)}_fireOnDidChangeLayout(e){this._onDidChangeLayout.fire(e)}restoreEditorViewState(e,t){super.restoreEditorViewState(e),void 0!==t&&this._layoutInfo.layoutState!==c.CodeCellLayoutState.Measured&&(this._layoutInfo={fontInfo:this._layoutInfo.fontInfo,editorHeight:this._layoutInfo.editorHeight, editorWidth:this._layoutInfo.editorWidth,outputContainerOffset:this._layoutInfo.outputContainerOffset,outputTotalHeight:this._layoutInfo.outputTotalHeight,totalHeight:t,indicatorHeight:this._layoutInfo.indicatorHeight,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,layoutState:c.CodeCellLayoutState.FromCache})}hasDynamicHeight(){return!1}firstLine(){return this.getText().split("\n")[0]}getHeight(e){if(this._layoutInfo.layoutState===c.CodeCellLayoutState.Uninitialized){const t=this.estimateEditorHeight(e);return this.computeTotalHeight(t,0)}return this._layoutInfo.totalHeight}estimateEditorHeight(e=20){return this.lineCount*e+l.EDITOR_TOP_PADDING+l.EDITOR_BOTTOM_PADDING}computeTotalHeight(e,t){return l.EDITOR_TOOLBAR_HEIGHT+l.CELL_TOP_MARGIN+e+this.getEditorStatusbarHeight()+t+l.BOTTOM_CELL_TOOLBAR_GAP+l.CELL_BOTTOM_MARGIN}async resolveTextModel(){if(!this.textModel){const e=await this.model.resolveTextModelRef();this.textModel=e.object.textEditorModel,this._register(e), this._register(this.textModel.onDidChangeContent(()=>{this.editState!==c.CellEditState.Editing&&(this.editState=c.CellEditState.Editing,this._onDidChangeState.fire({contentChanged:!0}))}))}return this.textModel}onDeselect(){this.editState=c.CellEditState.Preview}updateOutputHeight(e,t){if(e>=this._outputCollection.length)throw new Error("Output index out of range!");this._outputCollection[e]=t,this._ensureOutputsTop(),this._outputsTop.changeValue(e,t)&&this.layoutChange({outputHeight:!0})}getOutputOffsetInContainer(e){if(this._ensureOutputsTop(),e>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getAccumulatedValue(e-1)}getOutputOffset(e){return this.layoutInfo.outputContainerOffset+this.getOutputOffsetInContainer(e)}spliceOutputHeights(e,t,i){if(this._ensureOutputsTop(),this._outputsTop.removeValues(e,t),i.length){const t=new Uint32Array(i.length);for(let e=0;e{r.emit([new d.NotebookCellStateChangedEvent(e,this)])}))}get layoutInfo(){return this._layoutInfo}set renderedMarkdownHeight(e){const t=e+l.BOTTOM_CELL_TOOLBAR_GAP;this.totalHeight=t}set totalHeight(e){e!==this.layoutInfo.totalHeight&&this.layoutChange({totalHeight:e})}get totalHeight(){throw new Error("MarkdownCellViewModel.totalHeight is write only")}set editorHeight(e){this._editorHeight=e,this.totalHeight=this._editorHeight+l.CELL_TOP_MARGIN+l.CELL_BOTTOM_MARGIN+l.BOTTOM_CELL_TOOLBAR_GAP+this.getEditorStatusbarHeight()}get editorHeight(){throw new Error("MarkdownCellViewModel.editorHeight is write only")}get foldingState(){return this.foldingDelegate.getFoldingState(this.foldingDelegate.getCellIndex(this))} triggerfoldingStateChange(){this._onDidChangeState.fire({foldingStateChanged:!0})}computeEditorWidth(e){return e-2*l.CELL_MARGIN-l.CODE_CELL_LEFT_MARGIN}layoutChange(e){var t;if(null===(t=this.metadata)||void 0===t?void 0:t.inputCollapsed){const t=void 0!==e.outerWidth?this.computeEditorWidth(e.outerWidth):this._layoutInfo.editorWidth,i=l.CELL_TOP_MARGIN+l.COLLAPSED_INDICATOR_HEIGHT+l.BOTTOM_CELL_TOOLBAR_GAP+l.CELL_BOTTOM_MARGIN;e.totalHeight=i,this._layoutInfo={fontInfo:e.font||this._layoutInfo.fontInfo,editorWidth:t,editorHeight:this._editorHeight,bottomToolbarOffset:i-l.BOTTOM_CELL_TOOLBAR_GAP-l.BOTTOM_CELL_TOOLBAR_HEIGHT/2,totalHeight:i}}else{const t=void 0!==e.outerWidth?this.computeEditorWidth(e.outerWidth):this._layoutInfo.editorWidth,i=void 0===e.totalHeight?this._layoutInfo.totalHeight:e.totalHeight;this._layoutInfo={fontInfo:e.font||this._layoutInfo.fontInfo,editorWidth:t,editorHeight:this._editorHeight,bottomToolbarOffset:i-l.BOTTOM_CELL_TOOLBAR_GAP-l.BOTTOM_CELL_TOOLBAR_HEIGHT/2,totalHeight:i}} this._onDidChangeLayout.fire(e)}restoreEditorViewState(e,t){super.restoreEditorViewState(e),void 0!==t&&(this._layoutInfo={fontInfo:this._layoutInfo.fontInfo,editorWidth:this._layoutInfo.editorWidth,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,totalHeight:t,editorHeight:this._editorHeight},this.layoutChange({}))}hasDynamicHeight(){return!1}getHeight(e){return 0===this._layoutInfo.totalHeight?100:this._layoutInfo.totalHeight}clearHTML(){this._html=null}getHTML(){if(this.cellKind===h.CellKind.Markdown){if(this._html)return this._html;const e=this.getMarkdownRenderer();if(0===this.getText().length){const e=document.createElement("p");e.className="emptyMarkdownPlaceholder",e.innerText=s.localize(0,null),this._html=e}else this._html=e.render({value:this.getText(),isTrusted:!0}).element;return this._html}return null}async resolveTextModel(){if(!this.textModel){const e=await this.model.resolveTextModelRef();this.textModel=e.object.textEditorModel,this._register(e), this._register(this.textModel.onDidChangeContent(()=>{this._html=null,this._onDidChangeState.fire({contentChanged:!0})}))}return this.textModel}onDeselect(){}getMarkdownRenderer(){return this._mdRenderer}startFind(e,t){const i=super.cellStartFind(e,t);return null===i?null:{cell:this,matches:i}}};u=o([r(6,a.IConfigurationService)],u),t.MarkdownCellViewModel=u})),define(e[618],t([0,1,91,127,616,617,2]),(function(e,t,i,n,o,s,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CellContextKeyManager=void 0;class a extends r.Disposable{constructor(e,t,i,o){super(),this.contextKeyService=e,this.notebookEditor=t,this.notebookTextModel=i,this.element=o,this.elementDisposables=new r.DisposableStore,this.contextKeyService.bufferChangeEvents(()=>{this.cellType=n.NOTEBOOK_CELL_TYPE.bindTo(this.contextKeyService),this.viewType=n.NOTEBOOK_VIEW_TYPE.bindTo(this.contextKeyService),this.cellEditable=n.NOTEBOOK_CELL_EDITABLE.bindTo(this.contextKeyService), this.cellFocused=n.NOTEBOOK_CELL_FOCUSED.bindTo(this.contextKeyService),this.cellEditorFocused=n.NOTEBOOK_CELL_EDITOR_FOCUSED.bindTo(this.contextKeyService),this.cellRunnable=n.NOTEBOOK_CELL_RUNNABLE.bindTo(this.contextKeyService),this.markdownEditMode=n.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.bindTo(this.contextKeyService),this.cellRunState=n.NOTEBOOK_CELL_RUN_STATE.bindTo(this.contextKeyService),this.cellHasOutputs=n.NOTEBOOK_CELL_HAS_OUTPUTS.bindTo(this.contextKeyService),this.cellContentCollapsed=n.NOTEBOOK_CELL_INPUT_COLLAPSED.bindTo(this.contextKeyService),this.cellOutputCollapsed=n.NOTEBOOK_CELL_OUTPUT_COLLAPSED.bindTo(this.contextKeyService),this.updateForElement(o)})}updateForElement(e){this.elementDisposables.clear(),this.elementDisposables.add(e.onDidChangeState(e=>this.onDidChangeState(e))),e instanceof o.CodeCellViewModel&&this.elementDisposables.add(e.onDidChangeOutputs(()=>this.updateForOutputs())),this.elementDisposables.add(e.model.onDidChangeMetadata(()=>this.updateForCollapseState())), this.elementDisposables.add(this.notebookEditor.onDidChangeActiveCell(()=>this.updateForFocusState())),this.element=e,this.element instanceof s.MarkdownCellViewModel?this.cellType.set("markdown"):this.element instanceof o.CodeCellViewModel&&this.cellType.set("code"),this.contextKeyService.bufferChangeEvents(()=>{this.updateForFocusState(),this.updateForMetadata(),this.updateForEditState(),this.updateForCollapseState(),this.updateForOutputs(),this.viewType.set(this.element.viewType)})}onDidChangeState(e){this.contextKeyService.bufferChangeEvents(()=>{e.metadataChanged&&this.updateForMetadata(),e.editStateChanged&&this.updateForEditState(),e.focusModeChanged&&this.updateForFocusState()})}updateForFocusState(){const e=this.notebookEditor.getActiveCell();this.cellFocused.set(this.notebookEditor.getActiveCell()===this.element),e===this.element?this.cellEditorFocused.set(this.element.focusMode===n.CellFocusMode.Editor):this.cellEditorFocused.set(!1)}updateForMetadata(){var e ;const t=this.element.getEvaluatedMetadata(this.notebookTextModel.metadata);this.cellEditable.set(!!t.editable),this.cellRunnable.set(!!t.runnable);const n=null!==(e=t.runState)&&void 0!==e?e:i.NotebookCellRunState.Idle;this.cellRunState.set(i.NotebookCellRunState[n])}updateForEditState(){this.element instanceof s.MarkdownCellViewModel?this.markdownEditMode.set(this.element.editState===n.CellEditState.Editing):this.markdownEditMode.set(!1)}updateForCollapseState(){var e,t;this.cellContentCollapsed.set(!!(null===(e=this.element.metadata)||void 0===e?void 0:e.inputCollapsed)),this.cellOutputCollapsed.set(!!(null===(t=this.element.metadata)||void 0===t?void 0:t.outputCollapsed))}updateForOutputs(){this.element instanceof o.CodeCellViewModel?this.cellHasOutputs.set(this.element.outputs.length>0):this.cellHasOutputs.set(!1)}}t.CellContextKeyManager=a})),define(e[1670],t([0,1,21,6,2,24,143,18,535,75,5,149,127,616,371,456,617,91,611,17,47,1661,552,305]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v,f,S,b,_,C,y,w,E,I){ "use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCellViewModel=t.NotebookViewModel=void 0;const x=()=>{throw new Error("Invalid change accessor")};class k{constructor(){this._decorationsTree=new d.IntervalTree}intervalSearch(e,t,i,n,o){return this._decorationsTree.intervalSearch(e,t,i,n,o)}search(e,t,i,n){return this._decorationsTree.search(e,t,n)}collectNodesFromOwner(e){return this._decorationsTree.collectNodesFromOwner(e)}collectNodesPostOrder(){return this._decorationsTree.collectNodesPostOrder()}insert(e){this._decorationsTree.insert(e)}delete(e){this._decorationsTree.delete(e)}resolveNode(e,t){this._decorationsTree.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree.acceptReplace(e,t,i,n)}}const D=[h.ModelDecorationOptions.register({stickiness:0}),h.ModelDecorationOptions.register({stickiness:1}),h.ModelDecorationOptions.register({stickiness:2}),h.ModelDecorationOptions.register({stickiness:3})];function T(e){ return e instanceof h.ModelDecorationOptions?e:h.ModelDecorationOptions.createDynamic(e)}let R=0,A=class extends s.Disposable{constructor(e,t,i,o,r,l,c){super(),this.viewType=e,this._notebook=t,this.eventDispatcher=i,this._layoutInfo=o,this._instantiationService=r,this._bulkEditService=l,this._undoService=c,this._localStore=this._register(new s.DisposableStore),this._viewCells=[],this._handleToViewCellMapping=new Map,this._onDidChangeViewCells=this._register(new n.Emitter),this._lastNotebookEditResource=[],this._onDidChangeSelection=this._register(new n.Emitter),this._selections=[],this._decorationsTree=new k,this._decorations=Object.create(null),this._lastDecorationId=0,this._foldingRanges=null,this._hiddenRanges=[],this._focused=!0,this._decorationIdToCellMap=new Map,R++,this.id="$notebookViewModel"+R,this._instanceId=a.singleLetterHash(R);const d=(e,t)=>{const i=e.map(e=>[e[0],e[1],e[2].map(e=>M(this._instantiationService,this,e))]);i.reverse().forEach(e=>{const t=this._viewCells.splice(e[0],e[1],...e[2]) ;this._decorationsTree.acceptReplace(e[0],e[1],e[2].length,!0),t.forEach(e=>{this._handleToViewCellMapping.delete(e.handle),e.dispose()}),e[2].forEach(e=>{this._handleToViewCellMapping.set(e.handle,e),this._localStore.add(e)})}),this._onDidChangeViewCells.fire({synchronous:t,splices:i});let n=[];if(this.selectionHandles.length){const e=this.selectionHandles[0],t=this._viewCells.indexOf(this.getCellByHandle(e));n=[e];let o=0;for(let s=0;st){n=[e];break}if(s[0]+s[1]>e){n=[this._viewCells[s[0]+o].handle];break}}}}this.selectionHandles=n};this._register(this._notebook.onDidChangeContent(e=>{for(let t=0;t{e.rawEvents.forEach(e=>{e.kind===b.NotebookCellsChangeType.ChangeDocumentMetadata&&this.eventDispatcher.emit([new v.NotebookMetadataChangedEvent(this._notebook.metadata)])}),e.endSelections&&this.updateSelectionsFromEdits(e.endSelections)})),this._register(this.eventDispatcher.onDidChangeLayout(e=>{this._layoutInfo=e.value,this._viewCells.forEach(t=>{t.cellKind===b.CellKind.Markdown?(e.source.width||e.source.fontInfo)&&t.layoutChange({outerWidth:e.value.width,font:e.value.fontInfo}):void 0!==e.source.width&&t.layoutChange({outerWidth:e.value.width,font:e.value.fontInfo})})})),this._viewCells=this._notebook.cells.map(e=>M(this._instantiationService,this,e)),this._viewCells.forEach(e=>{this._handleToViewCellMapping.set(e.handle,e)})}get viewCells(){return this._viewCells}set viewCells(e){throw new Error("NotebookViewModel.viewCells is readonly")}get length(){return this._viewCells.length}get notebookDocument(){return this._notebook}get resolvedLanguages(){ return this._notebook.resolvedLanguages}get uri(){return this._notebook.uri}get metadata(){return this._notebook.metadata}get onDidChangeViewCells(){return this._onDidChangeViewCells.event}get lastNotebookEditResource(){return this._lastNotebookEditResource.length?this._lastNotebookEditResource[this._lastNotebookEditResource.length-1]:null}get layoutInfo(){return this._layoutInfo}get onDidChangeSelection(){return this._onDidChangeSelection.event}get selectionHandles(){return this._selections}set selectionHandles(e){(function(e,t){if(e.length!==t.length)return!1;for(let i=0;i{e.cellKind===b.CellKind.Markdown&&e.triggerfoldingStateChange()})}getHiddenRanges(){return this._hiddenRanges}hide(){this._viewCells.forEach(e=>{""!==e.getText()&&(e.editState=p.CellEditState.Preview)})}getCellByHandle(e){return this._handleToViewCellMapping.get(e)} getCellIndex(e){return this._viewCells.indexOf(e)}getNearestVisibleCellIndexUpwards(e){for(let t=this._hiddenRanges.length-1;t>=0;t--){const i=this._hiddenRanges[t],n=i.start-1,o=i.end;if(!(n>e)){if(n<=e&&o>=e)return e;break}}return e}getNextVisibleCellIndex(e){for(let t=0;t{const t=this._decorationIdToCellMap.get(e);if(void 0!==t){ const i=this.getCellByHandle(t);null==i||i.deltaCellDecorations([e],[])}});const i=[];return t.forEach(e=>{const t=this.getCellByHandle(e.handle),n=(null==t?void 0:t.deltaCellDecorations([],[e.options]))||[];n.forEach(t=>{this._decorationIdToCellMap.set(t,e.handle)}),i.push(...n)}),i}createCell(e,t,i,n,o,s,r,a=!0,l=[]){const c=l.map(e=>e.handle);return this._notebook.applyEdits(this._notebook.versionId,[{editType:1,index:e,count:0,cells:[{cellKind:n,language:i,outputs:s,metadata:o,source:t}]}],r,c,()=>void 0),this._viewCells[e]}deleteCell(e,t,i=!0){const n=this.selectionHandles.length?this._viewCells.indexOf(this.getCellByHandle(this.selectionHandles[0])):null;let o=[];if(this.selectionHandles.length){const t=this.selectionHandles[0];o=e===n?n1?[this._viewCells[n-1].handle]:[]:[t]}this._notebook.applyEdits(this._notebook.versionId,[{editType:1,index:e,count:1,cells:[]}],t,this.selectionHandles,()=>o,i)}moveCellToIdx(e,t,i,n,o=!0){ const s=this.viewCells[e];return!!s&&(this._notebook.applyEdits(this._notebook.versionId,[{editType:7,index:e,length:t,newIdx:i}],n,void 0,()=>[s.handle]),!0)}_pushIfAbsent(e,t){const i=e.length>0?e[e.length-1]:void 0;i&&i.lineNumber===t.lineNumber&&i.column===t.column||e.push(t)}_splitPointsToBoundaries(e,t){const i=[],n=t.getLineCount(),o=e=>t.getLineLength(e);e=e.sort((e,t)=>{const i=e.lineNumber-t.lineNumber,n=e.column-t.column;return 0!==i?i:n}),this._pushIfAbsent(i,new y.Position(1,1));for(let t of e)o(t.lineNumber)+1===t.column&&1!==t.column&&t.lineNumber2?i:null}_computeCellLinesContents(e,t){const i=this._splitPointsToBoundaries(t,e.textBuffer);if(!i)return null;const n=[];for(let t=1;t0){if(await t.resolveTextModel(),!t.hasModel())return null;const n=this._computeCellLinesContents(t,i);if(n){const i=t.getSelections(),o=t.language,s=t.cellKind;this._notebook.applyEdits(this._notebook.versionId,[{editType:9,index:e,range:void 0,text:n[0]},{editType:1,index:e+1,count:0,cells:n.slice(1).map(e=>({cellKind:s,language:o,source:e,outputs:[],metadata:{}}))}],!0,void 0,()=>this.selectionHandles,!1),this._undoService.pushElement(new w.SplitCellEdit(this.uri,e,t,i,n,o,s,{createCell:(e,t,i,n,o,s)=>this.createCell(e,t,i,n,o,s,!0,!1),deleteCell:e=>{this.deleteCell(e,!0,!1)}}))}}return null}async joinNotebookCells(e,t,i){var n,o,s,r;const a=this.viewCells[e];if(!this.metadata.editable)return null;if(!a.getEvaluatedMetadata(this.notebookDocument.metadata).editable)return null;if(i&&a.cellKind!==i)return null ;if(0===e&&"above"===t)return null;if(e===this.length-1&&"below"===t)return null;if("above"===t){const s=this.viewCells[e-1];if(i&&s.cellKind!==i)return null;if(!s.getEvaluatedMetadata(this.notebookDocument.metadata).editable)return null;if(await s.resolveTextModel(),!s.hasModel())return null;const r=[a.handle],l=(null!==(o=null===(n=a.textModel)||void 0===n?void 0:n.getEOL())&&void 0!==o?o:"")+a.getText(),d=s.textModel.getLineCount(),h=s.textModel.getLineLength(d),u={range:new c.Range(d,h+1,d,h+1),text:l},g=s.getSelections();s.textModel.applyEdits([u]);const p=E.PieceTreeTextBuffer._getInverseEditRange(u.range,u.text);return await this.deleteCell(e,!0,!1),this._undoService.pushElement(new w.JoinCellEdit(this.uri,e,t,s,g,p,l,a,{insertCell:(e,t,i)=>{this.createCell(e,t.getValue(),t.language,t.cellKind,t.metadata,t.outputs,!0,!1)},deleteCell:e=>{this.deleteCell(e,!0,!1)},createCellViewModel:e=>M(this._instantiationService,this,e)})),this.selectionHandles=r,{cell:s,deletedCells:[a]}}{const n=this.viewCells[e+1] ;if(i&&n.cellKind!==i)return null;if(!n.getEvaluatedMetadata(this.notebookDocument.metadata).editable)return null;if(await a.resolveTextModel(),!a.hasModel())return null;const o=(null!==(r=null===(s=a.textModel)||void 0===s?void 0:s.getEOL())&&void 0!==r?r:"")+n.getText(),l=a.textModel.getLineCount(),d=a.textModel.getLineLength(l),h={range:new c.Range(l,d+1,l,d+1),text:o},u=a.getSelections();a.textModel.applyEdits([h]);const g=E.PieceTreeTextBuffer._getInverseEditRange(h.range,h.text);return await this.deleteCell(e+1,!0,!1),this._undoService.pushElement(new w.JoinCellEdit(this.uri,e+1,t,a,u,g,o,n,{insertCell:(e,t,i)=>{this.createCell(e,t.getValue(),t.language,t.cellKind,t.metadata,t.outputs,!0,!1)},deleteCell:e=>{this.deleteCell(e,!0,!1)},createCellViewModel:e=>M(this._instantiationService,this,e)})),{cell:a,deletedCells:[n]}}}getEditorViewState(){const e={};this._viewCells.forEach((t,i)=>{t.editState===p.CellEditState.Editing&&(e[i]=!0)});const t={};return this._viewCells.map(e=>({handle:e.model.handle, state:e.saveEditorViewState()})).forEach((e,i)=>{e.state&&(t[i]=e.state)}),{editingCells:e,editorViewStates:t}}restoreEditorViewState(e){e&&this._viewCells.forEach((t,i)=>{const n=e.editingCells&&e.editingCells[i],o=e.editorViewStates&&e.editorViewStates[i];t.editState=n?p.CellEditState.Editing:p.CellEditState.Preview;const s=e.cellTotalHeights?e.cellTotalHeights[i]:void 0;t.restoreEditorViewState(o,s)})}changeModelDecorations(e){const t={deltaDecorations:(e,t)=>this._deltaModelDecorationsImpl(e,t)};let n=null;try{n=e(t)}catch(e){i.onUnexpectedError(e)}return t.deltaDecorations=x,n}_deltaModelDecorationsImpl(e,t){const i=new Map;e.forEach(e=>{const t=e.ownerId;if(!i.has(t)){const e=this._viewCells.find(e=>e.handle===t);e&&i.set(t,{cell:e,oldDecorations:[],newDecorations:[]})}const n=i.get(t);n&&(n.oldDecorations=e.decorations)}),t.forEach(e=>{const t=e.ownerId;if(!i.has(t)){const e=this._viewCells.find(e=>e.handle===t);e&&i.set(t,{cell:e,oldDecorations:[],newDecorations:[]})}const n=i.get(t) ;n&&(n.newDecorations=e.decorations)});const n=[];return i.forEach((e,t)=>{const i=e.cell.deltaModelDecorations(e.oldDecorations,e.newDecorations);n.push({ownerId:t,decorations:i})}),n}find(e,t){const i=[];return this._viewCells.forEach(n=>{const o=n.startFind(e,t);o&&i.push(o)}),i}replaceOne(e,t,i){const n=e;return this._lastNotebookEditResource.push(n.uri),n.resolveTextModel().then(()=>{this._bulkEditService.apply([new l.ResourceTextEdit(e.uri,{range:t,text:i})],{quotableLabel:"Notebook Replace"})})}async replaceAll(e,t){if(!e.length)return;const i=[];return this._lastNotebookEditResource.push(e[0].cell.uri),e.forEach(e=>{e.matches.forEach(n=>{i.push({edit:{range:n.range,text:t},resource:e.cell.uri})})}),Promise.all(e.map(e=>e.cell.resolveTextModel())).then(async()=>{this._bulkEditService.apply(l.ResourceEdit.convert({edits:i}),{quotableLabel:"Notebook Replace All"})})}async withElement(e,t){ const i=this._viewCells.filter(t=>e.matchesResource(t.uri)),n=await Promise.all(i.map(e=>e.model.resolveTextModelRef()));await t(),n.forEach(e=>e.dispose())}async undo(){if(!this.metadata.editable)return;const e=this._undoService.getElements(this.uri),t=e.past.length?e.past[e.past.length-1]:void 0;return t&&t instanceof I.SingleModelEditStackElement||t instanceof I.MultiModelEditStackElement?(await this.withElement(t,async()=>{await this._undoService.undo(this.uri)}),t instanceof I.SingleModelEditStackElement?[t.resource]:t.resources):(await this._undoService.undo(this.uri),[])}async redo(){if(!this.metadata.editable)return;const e=this._undoService.getElements(this.uri).future[0];return e&&e instanceof I.SingleModelEditStackElement||e instanceof I.MultiModelEditStackElement?(await this.withElement(e,async()=>{await this._undoService.redo(this.uri)}),e instanceof I.SingleModelEditStackElement?[e.resource]:e.resources):(await this._undoService.redo(this.uri),[])}equal(e){return this._notebook===e}dispose(){ this._localStore.clear(),this._viewCells.forEach(e=>{e.dispose()}),super.dispose()}};function M(e,t,i){if(i.cellKind===b.CellKind.Code)return e.createInstance(m.CodeCellViewModel,t.viewType,i,t.layoutInfo,t.eventDispatcher);{const n=e.createInstance(_.MarkdownRenderer,C.dirname(t.uri));return e.createInstance(S.MarkdownCellViewModel,t.viewType,i,t.layoutInfo,t,t.eventDispatcher,n)}}A=o([r(4,u.IInstantiationService),r(5,l.IBulkEditService),r(6,g.IUndoRedoService)],A),t.NotebookViewModel=A,t.createCellViewModel=M})),define(e[1671],t([0,1,1280,6,2,1663,91,149,1662,64,50,393,133]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookTextModel=t.NotebookOperationManager=t.NotebookTextModelSnapshot=void 0;class m{constructor(e){this._model=e,this._index=-1}read(){if(-1===this._index)return this._index++,`{ "metadata": ${JSON.stringify(this._model.metadata)}, "languages": ${JSON.stringify(this._model.languages)}, "cells": [` ;if(this._index=0;e--)await this._operations[e].undo();this._delayedEmitter.endDeferredEmit(this._beginSelectionState)}async redo(){ this._delayedEmitter.beginDeferredEmit();for(let e=0;e{this._increaseVersionId()},this),this._operationManager=new f(this._undoService,i,this._eventEmitter)}get languages(){return this._languages}get resolvedLanguages(){return this._allLanguages?this._modeService.getRegisteredModes():this._languages}get cells(){return this._cells}get versionId(){return this._versionId} _initialize(e){this._cells=[],this._versionId=0;const t=e.map(e=>{const t=this._cellhandlePool++,i=l.CellUri.generate(this.uri,t);return new a.NotebookCellTextModel(i,t,e.source,e.language,e.cellKind,e.outputs||[],e.metadata,this.transientOptions,this._modelService)});for(let e=0;e{this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ChangeCellContent,transient:!1},!0)});this._cellListeners.set(t[e].handle,i)}this._cells.splice(0,0,...t)}dispose(){this._onWillDispose.fire(),s.dispose(this._cellListeners.values()),s.dispose(this._cells),super.dispose()}pushStackElement(e,t){this._operationManager.pushStackElement(e,t)}applyEdits(e,t,i,n,o,s=!0){if(e!==this._versionId)return!1;this._eventEmitter.beginDeferredEmit(),this.pushStackElement("edit",n);const r=t.map((e,t)=>({edit:e,end:5===e.editType||8===e.editType?void 0:1===e.editType?e.index+e.count:e.index,originalIndex:t })).sort((e,t)=>void 0===e.end?-1:void 0===t.end?-1:t.end-e.end||t.originalIndex-e.originalIndex);for(const{edit:e}of r)switch(e.editType){case 1:this._replaceCells(e.index,e.count,e.cells,i,s);break;case 2:this._assertIndex(e.index);const t=this._cells[e.index];this._spliceNotebookCellOutputs2(t.handle,e.outputs,s);break;case 6:{this._assertIndex(e.index);const t=this._cells[e.index];this._spliceNotebookCellOutputs(t.handle,e.splices,s);break}case 3:this._assertIndex(e.index),this._changeCellMetadata(this._cells[e.index].handle,e.metadata,s);break;case 4:this._assertIndex(e.index),this._changeCellLanguage(this._cells[e.index].handle,e.language,s);break;case 5:this._updateNotebookMetadata(e.metadata,s);break;case 7:this._moveCellToIdx(e.index,e.length,e.newIdx,i,s,void 0,void 0);break;case 9:this._replaceCellContent(this._cells[e.index],e.range,e.text);break;case 8:this._handleUnknownChange()}const a=o();return this.pushStackElement("edit",a),this._eventEmitter.endDeferredEmit(a),!0}createSnapshot(e){ return new m(this)}handleUnknownUndoableEdit(e,t,n){this._operationManager.pushEditOperation({type:0,resource:this.uri,label:null!=e?e:i.localize(0,null),undo:async()=>{t()},redo:async()=>{n()}},void 0,void 0),this._eventEmitter.emit({kind:l.NotebookCellsChangeType.Unknown,transient:!1},!0)}_handleUnknownChange(){this._eventEmitter.emit({kind:l.NotebookCellsChangeType.Unknown,transient:!1},!0)}_replaceCells(e,t,i,n,o){var s;if(0===t&&0===i.length)return;const r=this._cells.slice(0),c=new Map(this._mapping);for(let i=e;i{const t=this._cellhandlePool++,i=l.CellUri.generate(this.uri,t),n=new a.NotebookCellTextModel(i,t,e.source,e.language,e.cellKind,e.outputs||[],e.metadata,this.transientOptions,this._modelService),o=n.onDidChangeContent(()=>{this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ChangeCellContent,transient:!1},!0)}) ;return this._cellListeners.set(n.handle,o),this._mapping.set(n.handle,n),n});this._cells.splice(e,t,...h);const u=l.diff(r,this._cells,e=>c.has(e.handle)).map(e=>[e.start,e.deleteCount,e.toInsert]),g=u.map(e=>{const t=r.slice(e[0],e[0]+e[1]);return[e[0],t,e[2]]});o&&this._operationManager.pushEditOperation(new d.SpliceCellsEdit(this.uri,g,{insertCell:(e,t,i)=>{this._insertNewCell(e,[t],!0,i)},deleteCell:(e,t)=>{this._removeCell(e,1,!0,t)}},void 0,void 0),void 0,void 0),this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ModelChange,changes:u,transient:!1},n)}_increaseVersionId(){this._versionId=this._versionId+1}updateLanguages(e){const t=e.find(e=>"*"===e);this._allLanguages=void 0!==t,this._languages=e;const i=this.resolvedLanguages;i.length&&this._cells.length&&(this._cells[0].language=i[0])}_updateNotebookMetadata(e,t){const i=this.metadata;if(this.metadata=e,t){const t=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Notebook Metadata"} get resource(){return t.uri}undo(){t._updateNotebookMetadata(i,!1)}redo(){t._updateNotebookMetadata(e,!1)}},void 0,void 0)}this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ChangeDocumentMetadata,metadata:this.metadata,transient:!1},!0)}_insertNewCell(e,t,i,n){for(let e=0;e{this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ChangeCellContent,transient:!1},!0)});this._cellListeners.set(t[e].handle,i)}this._cells.splice(e,0,...t),this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ModelChange,changes:[[e,0,t]],transient:!1},i,n)}_removeCell(e,t,i,n){var o;for(let i=e;it.handle===e);if(!n)return;const o=this._isCellMetadataChanged(n.metadata,t);if(o){if(i){const e=this._cells.indexOf(n);this._operationManager.pushEditOperation(new d.CellMetadataEdit(this.uri,e,Object.freeze(n.metadata),Object.freeze(t),{updateCellMetadata:(e,t)=>{const i=this._cells[e];i&&this._changeCellMetadata(i.handle,t,!1)}}),void 0,void 0)}n.metadata=t}else n.metadata=t;this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ChangeCellMetadata, index:this._cells.indexOf(n),metadata:n.metadata,transient:!o},!0)}_changeCellLanguage(e,t,i){const n=this._mapping.get(e);if(!n||n.language===t)return;const o=n.language;if(n.language=t,i){const e=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Cell Language"}get resource(){return e.uri}undo(){e._changeCellLanguage(n.handle,o,!1)}redo(){e._changeCellLanguage(n.handle,t,!1)}},void 0,void 0)}this._eventEmitter.emit({kind:l.NotebookCellsChangeType.ChangeLanguage,index:this._cells.indexOf(n),language:t,transient:!1},!0)}_spliceNotebookCellOutputs2(e,t,i){const n=this._mapping.get(e);if(!n)return;const o=new g.LcsDiff(new _(n.outputs),new _(t)).ComputeDiff(!1).changes.map(e=>[e.originalStart,e.originalLength,t.slice(e.modifiedStart,e.modifiedStart+e.modifiedLength)]);this._spliceNotebookCellOutputs(e,o,i)}_spliceNotebookCellOutputs(e,t,i){var n;const o=this._mapping.get(e);o&&(o.spliceNotebookCellOutputs(t),this._eventEmitter.emit({ kind:l.NotebookCellsChangeType.Output,index:this._cells.indexOf(o),outputs:null!==(n=o.outputs)&&void 0!==n?n:[],transient:this.transientOptions.transientOutputs},!0))}_moveCellToIdx(e,t,i,n,o,s,r){o&&this._operationManager.pushEditOperation(new d.MoveCellEdit(this.uri,e,t,i,{moveCell:(e,t,i,n,o)=>{this._moveCellToIdx(e,t,i,!0,!1,n,o)}},s,r),s,r),this._assertIndex(e),this._assertIndex(i);const a=this._cells.splice(e,t);return this._cells.splice(i,0,...a),this._eventEmitter.emit({kind:l.NotebookCellsChangeType.Move,index:e,length:t,newIdx:i,cells:a,transient:!1},n,r),!0}async _replaceCellContent(e,t,i){const n=await e.resolveTextModelRef(),o=n.object.textEditorModel;o.applyEdits([{range:t||o.getFullModelRange(),text:i}],!1),n.dispose()}_assertIndex(e){if(e<0||e>=this._cells.length)throw new Error(`model index out of range ${e}`)}};b=o([r(7,c.IUndoRedoService),r(8,h.ITextModelService),r(9,u.IModeService)],b),t.NotebookTextModel=b;class _{constructor(e){this.outputs=e}getElements(){return this.outputs.map(e=>{ switch(e.outputKind){case l.CellOutputKind.Rich:return p.hash([e.outputKind,e.metadata,e.data]);case l.CellOutputKind.Error:return p.hash([e.outputKind,e.ename,e.evalue,e.traceback]);case l.CellOutputKind.Text:return p.hash([e.outputKind,e.text])}})}}})),define(e[1672],t([0,1,122,17]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookOutputRendererInfo=void 0;t.NotebookOutputRendererInfo=class{constructor(e){this.preloads=[],this.id=e.id,this.extensionId=e.extension.identifier,this.extensionLocation=e.extension.extensionLocation,this.entrypoint=n.joinPath(this.extensionLocation,e.entrypoint),this.displayName=e.displayName,this.mimeTypes=e.mimeTypes,this.mimeTypeGlobs=this.mimeTypes.map(e=>i.parse(e))}matches(e){return this.mimeTypeGlobs.some(t=>t(e))||this.mimeTypes.some(t=>t===e)}}})),define(e[1673],t([0,1,122,48,91]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookProviderInfo=void 0;class s{constructor(e){var t ;this.id=e.id,this.displayName=e.displayName,this._selectors=(null===(t=e.selectors)||void 0===t?void 0:t.map(e=>({include:e.filenamePattern,exclude:e.excludeFileNamePattern||""})))||[],this.priority=e.priority,this.providerExtensionId=e.providerExtensionId,this.providerDescription=e.providerDescription,this.providerDisplayName=e.providerDisplayName,this.providerExtensionLocation=e.providerExtensionLocation,this.dynamicContribution=e.dynamicContribution,this.exclusive=e.exclusive,this._options={transientMetadata:{},transientOutputs:!1}}get selectors(){return this._selectors}get options(){return this._options}update(e){e.selectors&&(this._selectors=e.selectors),e.options&&(this._options=e.options)}matches(e){var t;return null===(t=this.selectors)||void 0===t?void 0:t.some(t=>s.selectorMatches(t,e))}static selectorMatches(e,t){if("string"==typeof e&&i.match(e.toLowerCase(),n.basename(t.fsPath).toLowerCase()))return!0;if(i.isRelativePattern(e)&&i.match(e,n.basename(t.fsPath).toLowerCase()))return!0 ;if(!o.isDocumentExcludePattern(e))return!1;let s=e.include,r=e.exclude;return!!i.match(s,n.basename(t.fsPath).toLowerCase())&&(!r||!i.match(r,n.basename(t.fsPath).toLowerCase()))}}t.NotebookProviderInfo=s})),define(e[146],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INotebookService=void 0,t.INotebookService=i.createDecorator("notebookService")})),define(e[1674],t([0,1,7,74,15,31,2,50,1278,49,178,127,612,91,146]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeCell=void 0;let f=class extends l.Disposable{constructor(e,t,i,n,o,r){var l,c;super(),this.notebookEditor=e,this.viewCell=t,this.templateData=i,this.notebookService=n,this.quickInputService=o,this._modeService=r,this.outputResizeListeners=new Map,this.outputElements=new Map,this._timer=null ;const d=this.viewCell.layoutInfo.editorWidth,h=this.viewCell.lineCount,p=(null===(l=this.viewCell.layoutInfo.fontInfo)||void 0===l?void 0:l.lineHeight)||17,m=0===this.viewCell.layoutInfo.editorHeight?h*p+u.EDITOR_TOP_PADDING+u.EDITOR_BOTTOM_PADDING:this.viewCell.layoutInfo.editorHeight;this.layoutEditor({width:d,height:m});const v=new a.CancellationTokenSource;this._register({dispose(){v.dispose(!0)}}),s.raceCancellation(t.resolveTextModel(),v.token).then(n=>{var o,s,r;if(n&&i.editor){i.editor.setModel(n),t.attachTextEditor(i.editor),e.getActiveCell()===t&&t.focusMode===g.CellFocusMode.Editor&&this.notebookEditor.hasFocus()&&(null===(o=i.editor)||void 0===o||o.focus());const a=null===(s=i.editor)||void 0===s?void 0:s.getContentHeight();void 0!==a&&a!==m&&this.onCellHeightChange(a),this.notebookEditor.getActiveCell()===this.viewCell&&t.focusMode===g.CellFocusMode.Editor&&this.notebookEditor.hasFocus()&&(null===(r=i.editor)||void 0===r||r.focus())}});const f=()=>{var e ;t.focusMode===g.CellFocusMode.Editor&&(null===(e=i.editor)||void 0===e||e.focus()),i.container.classList.toggle("cell-editor-focus",t.focusMode===g.CellFocusMode.Editor)},S=()=>{this.viewUpdate()};this._register(t.onDidChangeState(e=>{e.focusModeChanged&&f()})),f(),null===(c=i.editor)||void 0===c||c.updateOptions({readOnly:!t.getEvaluatedMetadata(e.viewModel.metadata).editable}),this._register(t.onDidChangeState(n=>{var o;n.metadataChanged&&(null===(o=i.editor)||void 0===o||o.updateOptions({readOnly:!t.getEvaluatedMetadata(e.viewModel.metadata).editable}),this.viewCell.layoutChange({}),S(),this.relayoutCell())})),this._register(t.onDidChangeState(e=>{var n,o;if(e.languageChanged){const e=this._modeService.create(t.language);null===(o=null===(n=i.editor)||void 0===n?void 0:n.getModel())||void 0===o||o.setMode(e.languageIdentifier)}})),this._register(t.onDidChangeLayout(e=>{if(void 0!==e.outerWidth){i.editor.getLayoutInfo().width!==t.layoutInfo.editorWidth&&this.onCellWidthChange()}})), this._register(i.editor.onDidContentSizeChange(e=>{e.contentHeightChanged&&this.viewCell.layoutInfo.editorHeight!==e.contentHeight&&this.onCellHeightChange(e.contentHeight)})),this._register(i.editor.onDidChangeCursorSelection(e=>{if("restoreState"===e.source)return;const n=i.editor.getSelection();n&&this.notebookEditor.revealLineInViewAsync(t,n.positionLineNumber)})),this._register(t.onDidChangeOutputs(e=>{if(!e.length)return;const n=this.viewCell.layoutInfo.outputTotalHeight;this.viewCell.outputs.length?this.templateData.outputContainer.style.display="block":this.templateData.outputContainer.style.display="none",e.reverse().forEach(e=>{t.spliceOutputHeights(e[0],e[1],e[2].map(e=>0))});const o=[];this.outputElements.forEach((e,i)=>{var n,s;t.outputs.indexOf(i)<0&&(o.push(i),null===(s=null===(n=this.templateData)||void 0===n?void 0:n.outputContainer)||void 0===s||s.removeChild(e.element),this.notebookEditor.removeInset(i))}),o.forEach(e=>{this.outputElements.delete(e),this.outputResizeListeners.delete(e)}) ;let s=void 0;[...this.viewCell.outputs].reverse().forEach(e=>{var t;if(this.outputElements.has(e))return void(s=this.outputElements.get(e).element);const i=this.viewCell.outputs.indexOf(e);this.renderOutput(e,i,s),s=null===(t=this.outputElements.get(e))||void 0===t?void 0:t.element});const r=i.editor.getContentHeight();t.editorHeight=r,0===n||0===this.viewCell.outputs.length?this.relayoutCell():this.relayoutCellDebounced()})),this._register(t.onDidChangeLayout(()=>{this.outputElements.forEach((e,i)=>{const n=t.outputs.indexOf(i);if(n>=0){const t=this.viewCell.getOutputOffsetInContainer(n);e.element.style.top=`${t}px`}})})),this._register(t.onCellDecorationsChanged(e=>{e.added.forEach(e=>{e.className&&i.rootContainer.classList.add(e.className),e.outputClassName&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[e.outputClassName],[])}),e.removed.forEach(e=>{e.className&&i.rootContainer.classList.remove(e.className), e.outputClassName&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[],[e.outputClassName])})})),t.getCellDecorations().forEach(e=>{e.className&&i.rootContainer.classList.add(e.className),e.outputClassName&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[e.outputClassName],[])}),this._register(i.editor.onMouseDown(e=>{e.event.rightButton&&e.event.preventDefault()}));const b=()=>t.focusMode=i.editor.hasWidgetFocus()?g.CellFocusMode.Editor:g.CellFocusMode.Container;if(this._register(i.editor.onDidFocusEditorWidget(()=>{b()})),this._register(i.editor.onDidBlurEditorWidget(()=>{b()})),b(),t.outputs.length>0){let e=!1;0!==this.viewCell.layoutInfo.totalHeight&&this.viewCell.layoutInfo.editorHeight>m&&(e=!0,this.relayoutCell()),this.templateData.outputContainer.style.display="block";for(let e=0;e{const i=this.outputElements.get(e);i&&0===i.renderResult.type&&!i.renderResult.hasDynamicHeight&&this.viewCell.updateOutputHeight(t,i.element.clientHeight)})}onCellHeightChange(e){ const t=this.templateData.editor.getLayoutInfo();this.viewCell.editorHeight=e,this.relayoutCell(),this.layoutEditor({width:t.width,height:e})}getNotebookUri(){var e;return null===(e=m.CellUri.parse(this.viewCell.uri))||void 0===e?void 0:e.notebook}renderOutput(e,t,o){var s,r;if(this.viewCell.metadata.outputCollapsed)return;this.outputResizeListeners.has(e)||this.outputResizeListeners.set(e,new l.DisposableStore);const a=document.createElement("div");let c=void 0;if(e.outputKind===m.CellOutputKind.Rich){const t=e;if(t.orderedMimeTypes.length>1){a.style.position="relative";const o=i.$(".multi-mimetype-output");o.classList.add("codicon","codicon-code"),o.tabIndex=0,o.title=d.localize(0,null,t.orderedMimeTypes.map(e=>e.mimeType).join(", ")),a.appendChild(o),this.outputResizeListeners.get(e).add(i.addStandardDisposableListener(o,"mousedown",async e=>{e.leftButton&&(e.preventDefault(),e.stopPropagation(),await this.pickActiveMimeTypeRenderer(t))})), this.outputResizeListeners.get(e).add(i.addDisposableListener(o,i.EventType.KEY_DOWN,async e=>{const i=new n.StandardKeyboardEvent(e);(i.equals(3)||i.equals(10))&&(e.preventDefault(),e.stopPropagation(),await this.pickActiveMimeTypeRenderer(t))}))}const o=e.orderedMimeTypes[e.pickedMimeTypeIndex],s=i.$(".output-inner-container");if(i.append(a,s),o.rendererId!==m.BUILTIN_RENDERER_ID){const t=this.notebookService.getRendererInfo(o.rendererId);c=t?{type:2,renderer:t,source:e,mimeType:o.mimeType}:this.notebookEditor.getOutputRenderer().render(e,s,o.mimeType,this.getNotebookUri())}else c=this.notebookEditor.getOutputRenderer().render(e,s,o.mimeType,this.getNotebookUri())}else{const t=i.$(".output-inner-container");i.append(a,t),c=this.notebookEditor.getOutputRenderer().render(e,t,void 0,this.getNotebookUri())}if(c){if(this.outputElements.set(e,{element:a,renderResult:c}), o?null===(s=this.templateData.outputContainer)||void 0===s||s.insertBefore(a,o):null===(r=this.templateData.outputContainer)||void 0===r||r.appendChild(a),0!==c.type?(this.viewCell.selfSizeMonitoring=!0,this.notebookEditor.createInset(this.viewCell,c,this.viewCell.getOutputOffset(t))):(a.classList.add("foreground","output-element"),a.style.position="absolute"),m.outputHasDynamicHeight(c)){this.viewCell.selfSizeMonitoring=!0;const i=a.clientHeight,n={width:this.viewCell.layoutInfo.editorWidth,height:i},o=p.getResizesObserver(a,n,()=>{if(this.templateData.outputContainer&&document.body.contains(this.templateData.outputContainer)){const t=Math.ceil(o.getHeight());if(i===t)return;const n=this.viewCell.outputs.indexOf(e);if(n<0)return;this.viewCell.updateOutputHeight(n,t),this.relayoutCell()}});o.startObserving(),this.outputResizeListeners.get(e).add(o),this.viewCell.updateOutputHeight(t,i)}else if(0===c.type){const e=Math.ceil(a.clientHeight);this.viewCell.updateOutputHeight(t,e) ;const i=this.viewCell.getOutputOffsetInContainer(t);a.style.top=`${i}px`}}else this.viewCell.updateOutputHeight(t,0)}generateRendererInfo(e){if(void 0===e||e===m.BUILTIN_RENDERER_ID)return d.localize(1,null);const t=this.notebookService.getRendererInfo(e);if(t){return`${""!==t.displayName?t.displayName:t.id} (${t.extensionId.value})`}return d.localize(2,null)}async pickActiveMimeTypeRenderer(e){var t,i,n,o,s;const r=e.pickedMimeTypeIndex,a=e.orderedMimeTypes.map((e,t)=>({label:e.mimeType,id:e.mimeType,index:t,picked:t===r,detail:this.generateRendererInfo(e.rendererId),description:t===r?d.localize(3,null):void 0})),l=this.quickInputService.createQuickPick();l.items=a,l.activeItems=a.filter(e=>!!e.picked),l.placeholder=d.localize(4,null);const c=await new Promise(e=>{l.onDidAccept(()=>{e(1===l.selectedItems.length?l.selectedItems[0].index:void 0),l.dispose()}),l.show()});if(void 0!==c&&c!==r){ const r=this.viewCell.outputs.indexOf(e),a=r+1{this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight),this._timer=null},200)}dispose(){this.viewCell.detachTextEditor(),this.outputResizeListeners.forEach(e=>{e.dispose()}), this.templateData.focusIndicatorLeft.style.height="initial",super.dispose()}};f=o([r(3,v.INotebookService),r(4,h.IQuickInputService),r(5,c.IModeService)],f),t.CodeCell=f})),define(e[619],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INotebookEditorWorkerService=t.ID_NOTEBOOK_EDITOR_WORKER_SERVICE=void 0,t.ID_NOTEBOOK_EDITOR_WORKER_SERVICE="notebookEditorWorkerService",t.INotebookEditorWorkerService=i.createDecorator(t.ID_NOTEBOOK_EDITOR_WORKER_SERVICE)})),define(e[1675],t([0,1,2,398,399,91,146]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookWorkerClient=t.EditorWorkerHost=t.NotebookEditorModelManager=t.WorkerManager=t.NotebookEditorWorkerServiceImpl=void 0;let c=class extends i.Disposable{constructor(e){super(),this._workerManager=this._register(new d(e))}canComputeDiff(e,t){throw new Error("Method not implemented.")}computeDiff(e,t){return this._workerManager.withWorker().then(i=>i.computeDiff(e,t))}} ;c=o([r(0,l.INotebookService)],c),t.NotebookEditorWorkerServiceImpl=c;class d extends i.Disposable{constructor(e){super(),this._notebookService=e,this._editorWorkerClient=null}withWorker(){return this._editorWorkerClient||(this._editorWorkerClient=new g(this._notebookService,"notebookEditorWorkerService")),Promise.resolve(this._editorWorkerClient)}}t.WorkerManager=d;class h extends i.Disposable{constructor(e,t){super(),this._proxy=e,this._notebookService=t,this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null)}ensureSyncedResources(e){for(const t of e){let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_beginModelSync(e){let t=this._notebookService.listNotebookDocuments().find(t=>t.uri.toString()===e.toString());if(!t)return;let n=e.toString();this._proxy.acceptNewModel(t.uri.toString(),{cells:t.cells.map(e=>({handle:e.handle,uri:e.uri,source:e.getValue(), eol:e.textBuffer.getEOL(),language:e.language,cellKind:e.cellKind,outputs:e.outputs,metadata:e.metadata})),languages:t.languages,metadata:t.metadata});const o=new i.DisposableStore,s=e=>({handle:e.handle,uri:e.uri,source:e.textBuffer.getLinesContent(),eol:e.textBuffer.getEOL(),language:e.language,cellKind:e.cellKind,outputs:e.outputs,metadata:e.metadata});o.add(t.onDidChangeContent(e=>{const t=e.rawEvents.map(t=>{return t.kind===a.NotebookCellsChangeType.ModelChange||t.kind===a.NotebookCellsChangeType.Initialize?{kind:t.kind,versionId:e.versionId,changes:t.changes.map(e=>[e[0],e[1],e[2].map(e=>s(e))])}:t.kind===a.NotebookCellsChangeType.Move?{kind:t.kind,index:t.index,length:t.length,newIdx:t.newIdx,versionId:e.versionId,cells:t.cells.map(e=>s(e))}:t});this._proxy.acceptModelChanged(n.toString(),{rawEvents:t,versionId:e.versionId})})),o.add(t.onWillDispose(()=>{this._stopModelSync(n)})),o.add(i.toDisposable(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=o}_stopModelSync(e){ let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],i.dispose(t)}}t.NotebookEditorModelManager=h;class u{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}t.EditorWorkerHost=u;class g extends i.Disposable{constructor(e,t){super(),this._notebookService=e,this._workerFactory=new s.DefaultWorkerFactory(t),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}computeDiff(e,t){return this._withSyncedResources([e,t]).then(i=>i.computeDiff(e.toString(),t.toString()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new h(e,this._notebookService))),this._modelManager}_withSyncedResources(e){return this._getProxy().then(t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t))}_getOrCreateWorker(){if(!this._worker)try{ this._worker=this._register(new n.SimpleWorkerClient(this._workerFactory,"vs/workbench/contrib/notebook/common/services/notebookSimpleWorker",new u(this)))}catch(e){throw e}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>{throw e})}}t.NotebookWorkerClient=g})),define(e[190],t([0,1,5,8]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOutputService=t.CONTEXT_OUTPUT_SCROLL_LOCK=t.CONTEXT_ACTIVE_LOG_OUTPUT=t.CONTEXT_IN_OUTPUT=t.MAX_OUTPUT_LENGTH=t.OUTPUT_SERVICE_ID=t.OUTPUT_VIEW_ID=t.LOG_MODE_ID=t.LOG_SCHEME=t.LOG_MIME=t.OUTPUT_MODE_ID=t.OUTPUT_SCHEME=t.OUTPUT_MIME=void 0,t.OUTPUT_MIME="text/x-code-output",t.OUTPUT_SCHEME="output",t.OUTPUT_MODE_ID="Log",t.LOG_MIME="text/x-code-log-output",t.LOG_SCHEME="log",t.LOG_MODE_ID="log",t.OUTPUT_VIEW_ID="workbench.panel.output",t.OUTPUT_SERVICE_ID="outputService",t.MAX_OUTPUT_LENGTH=1e6,t.CONTEXT_IN_OUTPUT=new n.RawContextKey("inOutput",!1), t.CONTEXT_ACTIVE_LOG_OUTPUT=new n.RawContextKey("activeLogOutput",!1),t.CONTEXT_OUTPUT_SCROLL_LOCK=new n.RawContextKey("outputView.scrollLock",!1),t.IOutputService=i.createDecorator(t.OUTPUT_SERVICE_ID)})),define(e[1676],t([0,1,1253,20,35,70,450,190]),(function(e,t,i,n,o,s,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends n.Action2{constructor(){super({id:"workbench.action.toggleKeybindingsLog",title:{value:i.localize(0,null),original:"Toggle Keyboard Shortcuts Troubleshooting"},category:s.CATEGORIES.Developer,f1:!0})}run(e){if(e.get(o.IKeybindingService).toggleLogging()){e.get(a.IOutputService).showChannel(r.rendererLogChannelId)}}}n.registerAction2(l)})),define(e[1677],t([0,1,15,46,45,34,190,1496,2]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutputLinkProvider=void 0;let h=class e{constructor(t,n){this.contextService=t,this.modelService=n, this.disposeWorkerScheduler=new i.RunOnceScheduler(()=>this.disposeWorker(),e.DISPOSE_WORKER_TIME),this.registerListeners(),this.updateLinkProviderWorker()}registerListeners(){this.contextService.onDidChangeWorkspaceFolders(()=>this.updateLinkProviderWorker())}updateLinkProviderWorker(){this.contextService.getWorkspace().folders.length>0?this.linkProviderRegistration||(this.linkProviderRegistration=s.LinkProviderRegistry.register([{language:l.OUTPUT_MODE_ID,scheme:"*"},{language:l.LOG_MODE_ID,scheme:"*"}],{provideLinks:async e=>{const t=await this.provideLinks(e.uri);return t&&{links:t}}})):(d.dispose(this.linkProviderRegistration),this.linkProviderRegistration=void 0),this.disposeWorker(),this.disposeWorkerScheduler.cancel()}getOrCreateWorker(){if(this.disposeWorkerScheduler.schedule(),!this.worker){const e={workspaceFolders:this.contextService.getWorkspace().folders.map(e=>e.uri.toString())};this.worker=c.createWebWorker(this.modelService,{moduleId:"vs/workbench/contrib/output/common/outputLinkComputer", createData:e,label:"outputLinkComputer"})}return this.worker}async provideLinks(e){return(await this.getOrCreateWorker().withSyncedResources([e])).computeLinks(e.toString())}disposeWorker(){this.worker&&(this.worker.dispose(),this.worker=void 0)}};h.DISPOSE_WORKER_TIME=18e4,h=o([r(0,a.IWorkspaceContextService),r(1,n.IModelService)],h),t.OutputLinkProvider=h})),define(e[620],t([0,1,1299]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.knownTermMappings=t.knownAcronyms=t.tocData=t.commonlyUsedData=void 0,t.commonlyUsedData={id:"commonlyUsed",label:i.localize(0,null),settings:["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations"]},t.tocData={id:"root",label:"root",children:[{id:"editor",label:i.localize(1,null),settings:["editor.*"],children:[{id:"editor/cursor",label:i.localize(2,null), settings:["editor.cursor*"]},{id:"editor/find",label:i.localize(3,null),settings:["editor.find.*"]},{id:"editor/font",label:i.localize(4,null),settings:["editor.font*"]},{id:"editor/format",label:i.localize(5,null),settings:["editor.format*"]},{id:"editor/diffEditor",label:i.localize(6,null),settings:["diffEditor.*"]},{id:"editor/minimap",label:i.localize(7,null),settings:["editor.minimap.*"]},{id:"editor/suggestions",label:i.localize(8,null),settings:["editor.*suggest*"]},{id:"editor/files",label:i.localize(9,null),settings:["files.*"]}]},{id:"workbench",label:i.localize(10,null),settings:["workbench.*"],children:[{id:"workbench/appearance",label:i.localize(11,null),settings:["workbench.activityBar.*","workbench.*color*","workbench.fontAliasing","workbench.iconTheme","workbench.sidebar.location","workbench.*.visible","workbench.tips.enabled","workbench.tree.*","workbench.view.*"]},{id:"workbench/breadcrumbs",label:i.localize(12,null),settings:["breadcrumbs.*"]},{id:"workbench/editor", label:i.localize(13,null),settings:["workbench.editor.*"]},{id:"workbench/settings",label:i.localize(14,null),settings:["workbench.settings.*"]},{id:"workbench/zenmode",label:i.localize(15,null),settings:["zenmode.*"]},{id:"workbench/screencastmode",label:i.localize(16,null),settings:["screencastMode.*"]}]},{id:"window",label:i.localize(17,null),settings:["window.*"],children:[{id:"window/newWindow",label:i.localize(18,null),settings:["window.*newwindow*"]}]},{id:"features",label:i.localize(19,null),children:[{id:"features/explorer",label:i.localize(20,null),settings:["explorer.*","outline.*"]},{id:"features/search",label:i.localize(21,null),settings:["search.*"]},{id:"features/debug",label:i.localize(22,null),settings:["debug.*","launch"]},{id:"features/scm",label:i.localize(23,null),settings:["scm.*"]},{id:"features/extensions",label:i.localize(24,null),settings:["extensions.*"]},{id:"features/terminal",label:i.localize(25,null),settings:["terminal.*"]},{id:"features/task",label:i.localize(26,null), settings:["task.*"]},{id:"features/problems",label:i.localize(27,null),settings:["problems.*"]},{id:"features/output",label:i.localize(28,null),settings:["output.*"]},{id:"features/comments",label:i.localize(29,null),settings:["comments.*"]},{id:"features/remote",label:i.localize(30,null),settings:["remote.*"]},{id:"features/timeline",label:i.localize(31,null),settings:["timeline.*"]},{id:"features/notebook",label:i.localize(32,null),settings:["notebook.*"]}]},{id:"application",label:i.localize(33,null),children:[{id:"application/http",label:i.localize(34,null),settings:["http.*"]},{id:"application/keyboard",label:i.localize(35,null),settings:["keyboard.*"]},{id:"application/update",label:i.localize(36,null),settings:["update.*"]},{id:"application/telemetry",label:i.localize(37,null),settings:["telemetry.*"]},{id:"application/settingsSync",label:i.localize(38,null),settings:["settingsSync.*","sync.*"]}]}]},t.knownAcronyms=new Set, ["css","html","scss","less","json","js","ts","ie","id","php","scm"].forEach(e=>t.knownAcronyms.add(e)),t.knownTermMappings=new Map,t.knownTermMappings.set("power shell","PowerShell"),t.knownTermMappings.set("powershell","PowerShell"),t.knownTermMappings.set("javascript","JavaScript"),t.knownTermMappings.set("typescript","TypeScript")})),define(e[223],t([0,1,5,8]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.KEYBOARD_LAYOUT_OPEN_PICKER=t.EXTENSION_SETTING_TAG=t.MODIFIED_SETTING_TAG=t.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS=t.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS=t.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS=t.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR=t.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND=t.KEYBINDINGS_EDITOR_COMMAND_COPY=t.KEYBINDINGS_EDITOR_COMMAND_RESET=t.KEYBINDINGS_EDITOR_COMMAND_REMOVE=t.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN=t.KEYBINDINGS_EDITOR_COMMAND_DEFINE=t.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE=t.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS=t.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=t.KEYBINDINGS_EDITOR_COMMAND_SEARCH=t.CONTEXT_KEYBINDING_FOCUS=t.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=t.CONTEXT_KEYBINDINGS_EDITOR=t.CONTEXT_SETTINGS_ROW_FOCUS=t.CONTEXT_TOC_ROW_FOCUS=t.CONTEXT_SETTINGS_SEARCH_FOCUS=t.CONTEXT_SETTINGS_JSON_EDITOR=t.CONTEXT_SETTINGS_EDITOR=t.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU=t.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=t.IPreferencesSearchService=void 0, t.IPreferencesSearchService=i.createDecorator("preferencesSearchService"),t.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="settings.action.clearSearchResults",t.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU="settings.action.showContextMenu",t.CONTEXT_SETTINGS_EDITOR=new n.RawContextKey("inSettingsEditor",!1),t.CONTEXT_SETTINGS_JSON_EDITOR=new n.RawContextKey("inSettingsJSONEditor",!1),t.CONTEXT_SETTINGS_SEARCH_FOCUS=new n.RawContextKey("inSettingsSearch",!1),t.CONTEXT_TOC_ROW_FOCUS=new n.RawContextKey("settingsTocRowFocus",!1),t.CONTEXT_SETTINGS_ROW_FOCUS=new n.RawContextKey("settingRowFocus",!1),t.CONTEXT_KEYBINDINGS_EDITOR=new n.RawContextKey("inKeybindings",!1),t.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=new n.RawContextKey("inKeybindingsSearch",!1),t.CONTEXT_KEYBINDING_FOCUS=new n.RawContextKey("keybindingFocus",!1),t.KEYBINDINGS_EDITOR_COMMAND_SEARCH="keybindings.editor.searchKeybindings",t.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="keybindings.editor.clearSearchResults", t.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS="keybindings.editor.recordSearchKeys",t.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE="keybindings.editor.toggleSortByPrecedence",t.KEYBINDINGS_EDITOR_COMMAND_DEFINE="keybindings.editor.defineKeybinding",t.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN="keybindings.editor.defineWhenExpression",t.KEYBINDINGS_EDITOR_COMMAND_REMOVE="keybindings.editor.removeKeybinding",t.KEYBINDINGS_EDITOR_COMMAND_RESET="keybindings.editor.resetKeybinding",t.KEYBINDINGS_EDITOR_COMMAND_COPY="keybindings.editor.copyKeybindingEntry",t.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND="keybindings.editor.copyCommandKeybindingEntry",t.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR="keybindings.editor.showConflicts",t.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS="keybindings.editor.focusKeybindings",t.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS="keybindings.editor.showDefaultKeybindings",t.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS="keybindings.editor.showUserKeybindings",t.MODIFIED_SETTING_TAG="modified", t.EXTENSION_SETTING_TAG="ext:",t.KEYBOARD_LAYOUT_OPEN_PICKER="workbench.action.openKeyboardLayoutPicker"})),define(e[1678],t([0,1,93,47,18]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartSnippetInserter=void 0;t.SmartSnippetInserter=class{static hasOpenBrace(e){for(;17!==e.scan();){if(1===e.getToken())return!0}return!1}static offsetToPosition(e,t){let i=0;const o=e.getEOL().length,s=e.getLineCount();for(let r=1;r<=s;r++){const s=i+(e.getLineContent(r).length+o);if(s>t)return new n.Position(r,t-i+1);i=s}return new n.Position(s,e.getLineMaxColumn(s))}static insertSnippet(e,t){const s=e.getValueLengthInRange(new o.Range(1,1,t.lineNumber,t.column));let r;!function(e){e[e.INVALID=0]="INVALID",e[e.AFTER_OBJECT=1]="AFTER_OBJECT",e[e.BEFORE_OBJECT=2]="BEFORE_OBJECT"}(r||(r={}));let a=r.INVALID,l=-1,c=r.INVALID;const d=i.createScanner(e.getValue());let h=0,u=0;const g=(e,t)=>{t!==r.INVALID&&1===h&&0===u?(a=t,l=e,c=t):a!==r.INVALID&&(a=r.INVALID,l=d.getTokenOffset())} ;for(;17!==d.scan();){const t=d.getPosition();let i=!1;switch(d.getToken()){case 3:i=!0,h++,g(t,r.BEFORE_OBJECT);break;case 4:i=!0,h--,g(t,r.INVALID);break;case 5:i=!0,g(t,r.BEFORE_OBJECT);break;case 1:i=!0,u++,g(t,r.INVALID);break;case 2:i=!0,u--,g(t,r.AFTER_OBJECT);break;case 15:case 14:i=!0}if(t>=s&&(a!==r.INVALID||-1!==l)){let n,o;return a!==r.INVALID?(n=i?t:d.getTokenOffset(),o=a):(n=l,o=c),o===r.AFTER_OBJECT?{position:this.offsetToPosition(e,n),prepend:",",append:""}:(d.setPosition(n),{position:this.offsetToPosition(e,n),prepend:"",append:this.hasOpenBrace(d)?",":""})}}const p=e.getLineCount();return{position:new n.Position(p,e.getLineMaxColumn(p)),prepend:"\n[",append:"]"}}}})),define(e[1679],t([0,1,6,2]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlFinder=void 0;class o extends n.Disposable{constructor(e){super(),this._onDidMatchLocalUrl=new i.Emitter,this.onDidMatchLocalUrl=this._onDidMatchLocalUrl.event,this.listeners=new Map,e.terminalInstances.forEach(e=>{ this.listeners.set(e,e.onData(e=>{this.processData(e)}))}),this._register(e.onInstanceCreated(e=>{this.listeners.set(e,e.onData(e=>{this.processData(e)}))})),this._register(e.onInstanceDisposed(e=>{this.listeners.delete(e)}))}dispose(){super.dispose();const e=this.listeners.values();for(const t of e)t.dispose()}processData(e){((e=e.replace(o.terminalCodesRegex,"")).match(o.localUrlRegex)||[]).forEach(t=>{const i=new URL(t);if(i){const t=parseFloat(i.port);if(!isNaN(t)&&Number.isInteger(t)&&t>0&&t<=65535){let n=i.hostname;if("0.0.0.0"!==n&&"127.0.0.1"!==n&&(n="localhost"),9229!==t&&e.startsWith("Debugger listening on"))return;this._onDidMatchLocalUrl.fire({port:t,host:n})}}})}}t.UrlFinder=o,o.terminalCodesRegex=/(?:\u001B|\u009B)[\[\]()#;?]*(?:(?:(?:[a-zA-Z0-9]*(?:;[a-zA-Z0-9]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-PR-TZcf-ntqry=><~]))/g,o.localUrlRegex=/\b\w{2,20}:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|:\d{2,5})[\w\-\.\~:\/\?\#[\]\@!\$&\(\)\*\+\,\;\=]*/gim})), define(e[1680],t([0,1,195,7,234,6,2,9]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SashSizeController=t.maxSize=t.minSize=void 0,t.minSize=4,t.maxSize=20;let d=class extends l.Disposable{constructor(e){super(),this.configurationService=e,this.configurationName="workbench.sash.size",this.stylesheet=n.createStyleSheet(),this._register(l.toDisposable(()=>this.stylesheet.remove()));const t=a.Event.filter(e.onDidChangeConfiguration,e=>e.affectsConfiguration(this.configurationName));this._register(t(this.onDidChangeSizeConfiguration,this)),this.onDidChangeSizeConfiguration()}onDidChangeSizeConfiguration(){var e;const n=i.clamp(null!==(e=this.configurationService.getValue(this.configurationName))&&void 0!==e?e:t.minSize,t.minSize,t.maxSize) ;this.stylesheet.textContent=`\n\t\t\t.monaco-sash.vertical { cursor: ew-resize; top: 0; width: ${n}px; height: 100%; }\n\t\t\t.monaco-sash.horizontal { cursor: ns-resize; left: 0; width: 100%; height: ${n}px; }\n\t\t\t.monaco-sash:not(.disabled).orthogonal-start::before, .monaco-sash:not(.disabled).orthogonal-end::after { content: ' '; height: ${2*n}px; width: ${2*n}px; z-index: 100; display: block; cursor: all-scroll; position: absolute; }\n\t\t\t.monaco-sash.orthogonal-start.vertical::before { left: -${n/2}px; top: -${n}px; }\n\t\t\t.monaco-sash.orthogonal-end.vertical::after { left: -${n/2}px; bottom: -${n}px; }\n\t\t\t.monaco-sash.orthogonal-start.horizontal::before { top: -${n/2}px; left: -${n}px; }\n\t\t\t.monaco-sash.orthogonal-end.horizontal::after { top: -${n/2}px; right: -${n}px; }`,s.setGlobalSashSize(n)}};d=o([r(0,c.IConfigurationService)],d),t.SashSizeController=d})),define(e[1681],t([0,1,1314,57,16,222,56,1680,80]),(function(e,t,i,n,o,s,r,a,l){"use strict";Object.defineProperty(t,"__esModule",{ value:!0}),o.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(a.SashSizeController,3),o.Registry.as(n.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},s.workbenchConfigurationNodeBase),{properties:{"workbench.sash.size":{type:"number",default:l.isIPad?a.maxSize:a.minSize,minimum:a.minSize,maximum:a.maxSize,description:i.localize(0,null)}}}))})),define(e[457],t([0,1,2,30,94,14,100,183,17,96,7]),(function(e,t,i,n,o,s,r,a,l,c,d){"use strict";function h(e){return!!e.provider&&!!e.elements}Object.defineProperty(t,"__esModule",{value:!0}),t.getRepositoryVisibilityActions=t.StatusBarActionViewItem=t.StatusBarAction=t.collectContextMenuActions=t.connectPrimaryMenuToInlineActionBar=t.connectPrimaryMenu=t.isSCMResource=t.isSCMResourceGroup=t.isSCMInput=t.isSCMRepository=void 0,t.isSCMRepository=function(e){return!!e.provider&&"function"==typeof e.setSelected},t.isSCMInput=function(e){return!!e.validateInput&&"string"==typeof e.value},t.isSCMResourceGroup=h, t.isSCMResource=function(e){return!!e.sourceUri&&h(e.resourceGroup)};const u=(e,t)=>e.id===t.id;function g(e,t,n){let r=i.Disposable.None,a=[],l=[];const c=()=>{const i=[],c=[],d=o.createAndFillInActionBarActions(e,{shouldForwardArgs:!0},{primary:i,secondary:c},n);s.equals(a,i,u)&&s.equals(l,c,u)?d.dispose():(r=d,a=i,l=c,t(i,c))};return c(),i.combinedDisposable(e.onDidChange(c),i.toDisposable(()=>r.dispose()))}t.connectPrimaryMenu=g,t.connectPrimaryMenuToInlineActionBar=function(e,t){return g(e,e=>{t.clear(),t.push(e,{icon:!0,label:!1})},e=>/^inline/.test(e))},t.collectContextMenuActions=function(e,t){const i=[];return[i,o.createAndFillInContextMenuActions(e,{shouldForwardArgs:!0},{primary:[],secondary:i},t,e=>/^inline/.test(e))]};class p extends n.Action{constructor(e,t){super(`statusbaraction{${e.id}}`,e.title,"",!0),this.command=e,this.commandService=t,this.tooltip=e.tooltip||""}run(){return this.commandService.executeCommand(this.command.id,...this.command.arguments||[])}}t.StatusBarAction=p ;class m extends r.ActionViewItem{constructor(e){super(null,e,{})}updateLabel(){this.options.label&&this.label&&d.reset(this.label,...a.renderCodicons(this.getAction().label))}}t.StatusBarActionViewItem=m,t.getRepositoryVisibilityActions=function(e,t){const i=new Set,o=e.repositories.map(e=>{const o=e.provider.rootUri?l.basename(e.provider.rootUri):e.provider.label,s=new n.Action("scm.repository.toggleVisibility",o,void 0,!0,async()=>{t.toggleVisibility(e)});return t.isVisible(e)&&(s.checked=!0,i.add(s)),s});return 1===i.size&&(c.Iterable.first(i.values()).enabled=!1),o}})),define(e[170],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISCMViewService=t.InputValidationType=t.ISCMService=t.REPOSITORIES_VIEW_PANE_ID=t.VIEW_PANE_ID=t.VIEWLET_ID=void 0,t.VIEWLET_ID="workbench.view.scm",t.VIEW_PANE_ID="workbench.scm",t.REPOSITORIES_VIEW_PANE_ID="workbench.scm.repositories",t.ISCMService=i.createDecorator("scm"),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning", e[e.Information=2]="Information"}(t.InputValidationType||(t.InputValidationType={})),t.ISCMViewService=i.createDecorator("scmView")})),define(e[1682],t([0,1,6,2,8,20,94,170,14,5,131,294]),(function(e,t,i,n,s,a,l,c,d,h,u){"use strict";function g(e,t){return e.id===t.id}Object.defineProperty(t,"__esModule",{value:!0}),t.SCMMenus=t.SCMRepositoryMenus=t.SCMTitleMenu=void 0;let p=class{constructor(e,t){this._actions=[],this._secondaryActions=[],this._onDidChangeTitle=new i.Emitter,this.onDidChangeTitle=this._onDidChangeTitle.event,this.listener=n.Disposable.None,this.disposables=new n.DisposableStore,this.menu=e.createMenu(a.MenuId.SCMTitle,t),this.disposables.add(this.menu),this.menu.onDidChange(this.updateTitleActions,this,this.disposables),this.updateTitleActions()}get actions(){return this._actions}get secondaryActions(){return this._secondaryActions}updateTitleActions(){const e=[],t=[],i=l.createAndFillInActionBarActions(this.menu,{shouldForwardArgs:!0},{primary:e,secondary:t}) ;d.equals(e,this._actions,g)&&d.equals(t,this._secondaryActions,g)?i.dispose():(this.listener.dispose(),this.listener=i,this._actions=e,this._secondaryActions=t,this._onDidChangeTitle.fire())}dispose(){this.menu.dispose(),this.listener.dispose()}};p=o([r(0,a.IMenuService),r(1,s.IContextKeyService)],p),t.SCMTitleMenu=p;class m{constructor(e,t){this.contextKeyService=e,this.menuService=t}get resourceGroupMenu(){return this._resourceGroupMenu||(this._resourceGroupMenu=this.menuService.createMenu(a.MenuId.SCMResourceGroupContext,this.contextKeyService)),this._resourceGroupMenu}get resourceFolderMenu(){return this._resourceFolderMenu||(this._resourceFolderMenu=this.menuService.createMenu(a.MenuId.SCMResourceFolderContext,this.contextKeyService)),this._resourceFolderMenu}getResourceMenu(e){if(void 0===e.contextValue)return this.genericResourceMenu||(this.genericResourceMenu=this.menuService.createMenu(a.MenuId.SCMResourceContext,this.contextKeyService)),this.genericResourceMenu ;this.contextualResourceMenus||(this.contextualResourceMenus=new Map);let t=this.contextualResourceMenus.get(e.contextValue);if(!t){const i=this.contextKeyService.createScoped();i.createKey("scmResourceState",e.contextValue);const n=this.menuService.createMenu(a.MenuId.SCMResourceContext,i);t={menu:n,dispose(){n.dispose(),i.dispose()}},this.contextualResourceMenus.set(e.contextValue,t)}return t.menu}dispose(){var e,t,i;null===(e=this.resourceGroupMenu)||void 0===e||e.dispose(),null===(t=this.genericResourceMenu)||void 0===t||t.dispose(),this.contextualResourceMenus&&(n.dispose(this.contextualResourceMenus.values()),this.contextualResourceMenus.clear(),this.contextualResourceMenus=void 0),null===(i=this.resourceFolderMenu)||void 0===i||i.dispose(),this.contextKeyService.dispose()}}let v=class{constructor(e,t,i,o){var r;this.menuService=o,this.resourceGroups=[],this.resourceGroupMenusItems=new Map,this.disposables=new n.DisposableStore,this.contextKeyService=t.createScoped(), this.contextKeyService.createKey("scmProvider",e.contextValue),this.contextKeyService.createKey("scmProviderRootUri",null===(r=e.rootUri)||void 0===r?void 0:r.toString()),this.contextKeyService.createKey("scmProviderHasRootUri",!!e.rootUri);const a=new u.ServiceCollection([s.IContextKeyService,this.contextKeyService]);i=i.createChild(a),this.titleMenu=i.createInstance(p),e.groups.onDidSplice(this.onDidSpliceGroups,this,this.disposables),this.onDidSpliceGroups({start:0,deleteCount:0,toInsert:e.groups.elements})}get repositoryMenu(){return this._repositoryMenu||(this._repositoryMenu=this.menuService.createMenu(a.MenuId.SCMSourceControl,this.contextKeyService),this.disposables.add(this._repositoryMenu)),this._repositoryMenu}getResourceGroupMenu(e){return this.getOrCreateResourceGroupMenusItem(e).resourceGroupMenu}getResourceMenu(e){return this.getOrCreateResourceGroupMenusItem(e.resourceGroup).getResourceMenu(e)}getResourceFolderMenu(e){return this.getOrCreateResourceGroupMenusItem(e).resourceFolderMenu} getOrCreateResourceGroupMenusItem(e){let t=this.resourceGroupMenusItems.get(e);if(!t){const i=this.contextKeyService.createScoped();i.createKey("scmProvider",e.provider.contextValue),i.createKey("scmResourceGroup",e.id),t=new m(i,this.menuService),this.resourceGroupMenusItems.set(e,t)}return t}onDidSpliceGroups({start:e,deleteCount:t,toInsert:i}){const n=this.resourceGroups.splice(e,t,...i);for(const e of n){const t=this.resourceGroupMenusItems.get(e);null==t||t.dispose(),this.resourceGroupMenusItems.delete(e)}}dispose(){this.disposables.dispose(),this.resourceGroupMenusItems.forEach(e=>e.dispose())}};v=o([r(1,s.IContextKeyService),r(2,h.IInstantiationService),r(3,a.IMenuService)],v),t.SCMRepositoryMenus=v;let f=class{constructor(e,t){this.instantiationService=t,this.disposables=new n.DisposableStore,this.menus=new Map,this.titleMenu=t.createInstance(p),e.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables)}onDidRemoveRepository(e){const t=this.menus.get(e.provider);null==t||t.dispose(), this.menus.delete(e.provider)}getRepositoryMenus(e){let t=this.menus.get(e);if(!t){const i=this.instantiationService.createInstance(v,e),n=()=>{i.dispose(),this.menus.delete(e)};t={menus:i,dispose:n},this.menus.set(e,t)}return t.menus}dispose(){this.disposables.dispose()}};f=o([r(0,c.ISCMService),r(1,h.IInstantiationService)],f),t.SCMMenus=f})),define(e[621],t([0,1,17,2,7,170,213,36,32,11,457,59,217,294]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepositoryRenderer=void 0;let m=class e{constructor(e,t,i,n,o){this.actionViewItemProvider=e,this.scmViewService=t,this.commandService=i,this.contextMenuService=n,this.themeService=o}get templateId(){return e.TEMPLATE_ID}renderTemplate(e){e.classList.contains("monaco-tl-contents")&&e.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-twistie") ;const t=s.append(e,s.$(".scm-provider")),i=s.append(t,s.$(".label")),o=s.append(i,s.$("span.name")),r=s.append(i,s.$("span.description")),a=s.append(t,s.$(".actions")),c=new p.ToolBar(a,this.contextMenuService,{actionViewItemProvider:this.actionViewItemProvider}),d=s.append(t,s.$(".count")),h=new l.CountBadge(d),u=g.attachBadgeStyler(h,this.themeService),m=c.onDidChangeDropdownVisibility(e=>t.classList.toggle("active",e));return{label:i,name:o,description:r,countContainer:d,count:h,toolBar:c,disposable:n.Disposable.None,templateDisposable:n.combinedDisposable(m,c,u)}}renderElement(e,t,o,s){o.disposable.dispose();const r=new n.DisposableStore,a=u.isSCMRepository(e)?e:e.element;a.provider.rootUri?(o.label.title=`${a.provider.label}: ${a.provider.rootUri.fsPath}`,o.name.textContent=i.basename(a.provider.rootUri),o.description.textContent=a.provider.label):(o.label.title=a.provider.label,o.name.textContent=a.provider.label,o.description.textContent="");let l=[],c=[],d=[];const h=()=>{ o.toolBar.setActions([...l,...c],d)},g=()=>{const e=a.provider.statusBarCommands||[];l=e.map(e=>new u.StatusBarAction(e,this.commandService)),h();const t=a.provider.count||0;o.countContainer.setAttribute("data-count",String(t)),o.count.setCount(t)};r.add(a.provider.onDidChange(g,null)),g();const p=this.scmViewService.menus.getRepositoryMenus(a.provider);r.add(u.connectPrimaryMenu(p.titleMenu.menu,(e,t)=>{c=e,d=t,h()})),o.toolBar.context=a.provider,o.disposable=r}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(e,t,i){i.disposable.dispose()}disposeTemplate(e){e.disposable.dispose(),e.templateDisposable.dispose()}};m.TEMPLATE_ID="repository",m=o([r(1,a.ISCMViewService),r(2,d.ICommandService),r(3,c.IContextMenuService),r(4,h.IThemeService)],m),t.RepositoryRenderer=m})),define(e[1683],t([0,1,2,6,170,96,5,1682]),(function(e,t,i,n,s,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCMViewService=void 0;let d=class{constructor(e,t){ this.scmService=e,this.disposables=new i.DisposableStore,this._visibleRepositoriesSet=new Set,this._visibleRepositories=[],this._onDidChangeRepositories=new n.Emitter,this._onDidSetVisibleRepositories=new n.Emitter,this.onDidChangeVisibleRepositories=n.Event.any(this._onDidSetVisibleRepositories.event,n.Event.debounce(this._onDidChangeRepositories.event,(e,t)=>e?{added:a.Iterable.concat(e.added,t.added),removed:a.Iterable.concat(e.removed,t.removed)}:t,0)),this.menus=t.createInstance(c.SCMMenus),e.onDidAddRepository(this.onDidAddRepository,this,this.disposables),e.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables);for(const t of e.repositories)this.onDidAddRepository(t)}get visibleRepositories(){return this._visibleRepositories}set visibleRepositories(e){const t=new Set(e),i=new Set,n=new Set;for(const t of e)this._visibleRepositoriesSet.has(t)||i.add(t);for(const e of this._visibleRepositories)t.has(e)||n.add(e);0===i.size&&0===n.size||(this._visibleRepositories=e, this._visibleRepositoriesSet=t,this._onDidSetVisibleRepositories.fire({added:i,removed:n}))}onDidAddRepository(e){this._visibleRepositories.push(e),this._visibleRepositoriesSet.add(e),this._onDidChangeRepositories.fire({added:[e],removed:a.Iterable.empty()})}onDidRemoveRepository(e){const t=this._visibleRepositories.indexOf(e);if(t>-1){let i=a.Iterable.empty();if(this._visibleRepositories.splice(t,1),this._visibleRepositoriesSet.delete(e),0===this._visibleRepositories.length&&this.scmService.repositories.length>0){const e=this.scmService.repositories[0];this._visibleRepositories.push(e),this._visibleRepositoriesSet.add(e),i=[e]}this._onDidChangeRepositories.fire({added:i,removed:[e]})}}isVisible(e){return this._visibleRepositoriesSet.has(e)}toggleVisibility(e,t){if(void 0===t)t=!this.isVisible(e);else if(this.isVisible(e)===t)return;if(t)this.visibleRepositories=[...this.visibleRepositories,e];else{const t=this.visibleRepositories.indexOf(e) ;t>-1&&(this.visibleRepositories=[...this.visibleRepositories.slice(0,t),...this.visibleRepositories.slice(t+1)])}}dispose(){this.disposables.dispose(),this._onDidChangeRepositories.dispose(),this._onDidSetVisibleRepositories.dispose()}};d=o([r(0,s.ISCMService),r(1,l.IInstantiationService)],d),t.SCMViewService=d})),define(e[1684],t([0,1,2,6,39,8,26]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCMService=void 0;let c=class{constructor(e,t){if(this.repository=e,this.storageService=t,this._value="",this._onDidChange=new n.Emitter,this.onDidChange=this._onDidChange.event,this._placeholder="",this._onDidChangePlaceholder=new n.Emitter,this.onDidChangePlaceholder=this._onDidChangePlaceholder.event,this._visible=!0,this._onDidChangeVisibility=new n.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._validateInput=()=>Promise.resolve(void 0),this._onDidChangeValidateInput=new n.Emitter, this.onDidChangeValidateInput=this._onDidChangeValidateInput.event,this.repository.provider.rootUri){const e=`scm/input:${this.repository.provider.label}:${this.repository.provider.rootUri.path}`;this._value=this.storageService.get(e,1,"")}}get value(){return this._value}set value(e){if(e!==this._value){if(this._value=e,this.repository.provider.rootUri){const t=`scm/input:${this.repository.provider.label}:${this.repository.provider.rootUri.path}`;this.storageService.store(t,e,1)}this._onDidChange.fire(e)}}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this._onDidChangePlaceholder.fire(e)}get visible(){return this._visible}set visible(e){this._visible=e,this._onDidChangeVisibility.fire(e)}get validateInput(){return this._validateInput}set validateInput(e){this._validateInput=e,this._onDidChangeValidateInput.fire()}};c=o([r(1,l.IStorageService)],c);let d=class{constructor(e,t,i){this.provider=e,this.disposable=t,this.storageService=i,this._selected=!1, this._onDidChangeSelection=new n.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.input=new c(this,this.storageService)}get selected(){return this._selected}setSelected(e){this._selected!==e&&(this._selected=e,this._onDidChangeSelection.fire(e))}dispose(){this.disposable.dispose(),this.provider.dispose()}};d=o([r(2,l.IStorageService)],d);let h=class{constructor(e,t,i){this.logService=e,this.storageService=i,this._providerIds=new Set,this._repositories=[],this._onDidSelectRepository=new n.Emitter,this.onDidSelectRepository=this._onDidSelectRepository.event,this._onDidAddProvider=new n.Emitter,this.onDidAddRepository=this._onDidAddProvider.event,this._onDidRemoveProvider=new n.Emitter,this.onDidRemoveRepository=this._onDidRemoveProvider.event,this.providerCount=t.createKey("scm.providerCount",0)}get repositories(){return[...this._repositories]}registerSCMProvider(e){if(this.logService.trace("SCMService#registerSCMProvider"), this._providerIds.has(e.id))throw new Error(`SCM Provider ${e.id} already exists.`);this._providerIds.add(e.id);const t=i.toDisposable(()=>{const t=this._repositories.indexOf(o);t<0||(s.dispose(),this._providerIds.delete(e.id),this._repositories.splice(t,1),this._onDidRemoveProvider.fire(o),this._selectedRepository===o&&this.select(this._repositories[0]),this.providerCount.set(this._repositories.length))}),o=new d(e,t,this.storageService),s=n.Event.map(n.Event.filter(o.onDidChangeSelection,e=>e),e=>o)(this.select,this);return this._repositories.push(o),this._onDidAddProvider.fire(o),this._selectedRepository||o.setSelected(!0),this.providerCount.set(this._repositories.length),o}select(e){this._selectedRepository&&this._selectedRepository.setSelected(!1),this._selectedRepository=e,this._onDidSelectRepository.fire(this._selectedRepository)}};h=o([r(0,s.ILogService),r(1,a.IContextKeyService),r(2,l.IStorageService)],h),t.SCMService=h})), define(e[622],t([0,1,1322,7,102,216,6,11,59,219,8,44]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExcludePatternInputWidget=t.PatternInputWidget=void 0;let p=class extends s.Widget{constructor(e,t,n=Object.create(null),o,s){super(),this.contextViewProvider=t,this.themeService=o,this.contextKeyService=s,this._onSubmit=this._register(new l.Emitter),this.onSubmit=this._onSubmit.event,this._onCancel=this._register(new l.Emitter),this.onCancel=this._onCancel.event,this.width=n.width||100,this.placeholder=n.placeholder||"",this.ariaLabel=n.ariaLabel||i.localize(0,null),this.render(n),e.appendChild(this.domNode)}dispose(){super.dispose(),this.inputFocusTracker&&this.inputFocusTracker.dispose()}setWidth(e){this.width=e,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){ this.inputBox.focus()}inputHasFocus(){return this.inputBox.hasFocus()}setInputWidth(){this.inputBox.width=this.width-this.getSubcontrolsWidth()-2}getSubcontrolsWidth(){return 0}getHistory(){return this.inputBox.getHistory()}clearHistory(){this.inputBox.clearHistory()}clear(){this.setValue("")}onSearchSubmit(){this.inputBox.addToHistory()}showNextTerm(){this.inputBox.showNextValue()}showPreviousTerm(){this.inputBox.showPreviousValue()}style(e){this.inputBox.style(e)}render(e){this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",n.addClass(this.domNode,"monaco-findInput"),this.inputBox=new h.ContextScopedHistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.ariaLabel||"",validationOptions:{validation:void 0},history:e.history||[]},this.contextKeyService),this._register(d.attachInputBoxStyler(this.inputBox,this.themeService)),this._register(this.inputBox.onDidChange(()=>this._onSubmit.fire(!0))), this.inputFocusTracker=n.trackFocus(this.inputBox.inputElement),this.onkeyup(this.inputBox.inputElement,e=>this.onInputKeyUp(e));const t=document.createElement("div");t.className="controls",this.renderSubcontrols(t),this.domNode.appendChild(t),this.setInputWidth()}renderSubcontrols(e){}onInputKeyUp(e){switch(e.keyCode){case 3:return this.onSearchSubmit(),void this._onSubmit.fire(!1);case 9:return void this._onCancel.fire()}}};p.OPTION_CHANGE="optionChange",p=o([r(3,c.IThemeService),r(4,u.IContextKeyService)],p),t.PatternInputWidget=p;let m=class extends p{constructor(e,t,i=Object.create(null),n,o){super(e,t,i,n,o),this._onChangeIgnoreBoxEmitter=this._register(new l.Emitter),this.onChangeIgnoreBox=this._onChangeIgnoreBoxEmitter.event}dispose(){super.dispose(),this.useExcludesAndIgnoreFilesBox.dispose()}useExcludesAndIgnoreFiles(){return this.useExcludesAndIgnoreFilesBox.checked}setUseExcludesAndIgnoreFiles(e){this.useExcludesAndIgnoreFilesBox.checked=e}getSubcontrolsWidth(){ return super.getSubcontrolsWidth()+this.useExcludesAndIgnoreFilesBox.width()}renderSubcontrols(e){this.useExcludesAndIgnoreFilesBox=this._register(new a.Checkbox({icon:g.Codicon.exclude,actionClassName:"useExcludesAndIgnoreFiles",title:i.localize(1,null),isChecked:!0})),this._register(this.useExcludesAndIgnoreFilesBox.onChange(e=>{this._onChangeIgnoreBoxEmitter.fire(),e||this.inputBox.focus()})),this._register(d.attachCheckboxStyler(this.useExcludesAndIgnoreFilesBox,this.themeService)),e.appendChild(this.useExcludesAndIgnoreFilesBox.domNode),super.renderSubcontrols(e)}};m=o([r(3,c.IThemeService),r(4,u.IContextKeyService)],m),t.ExcludePatternInputWidget=m})),define(e[245],t([0,1,44]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.searchGotoFileIcon=t.searchNewEditorIcon=t.searchViewIcon=t.searchStopIcon=t.searchClearIcon=t.searchExpandAllIcon=t.searchCollapseAllIcon=t.searchRefreshIcon=t.searchRemoveIcon=t.searchReplaceIcon=t.searchReplaceAllIcon=t.searchShowReplaceIcon=t.searchHideReplaceIcon=t.searchShowContextIcon=t.searchDetailsIcon=void 0,t.searchDetailsIcon=i.registerIcon("search-details",i.Codicon.ellipsis),t.searchShowContextIcon=i.registerIcon("search-show-context",i.Codicon.listSelection),t.searchHideReplaceIcon=i.registerIcon("search-hide-replace",i.Codicon.chevronRight),t.searchShowReplaceIcon=i.registerIcon("search-show-replace",i.Codicon.chevronDown),t.searchReplaceAllIcon=i.registerIcon("search-replace-all",i.Codicon.replaceAll),t.searchReplaceIcon=i.registerIcon("search-replace",i.Codicon.replace),t.searchRemoveIcon=i.registerIcon("search-remove",i.Codicon.close),t.searchRefreshIcon=i.registerIcon("search-refresh",i.Codicon.refresh), t.searchCollapseAllIcon=i.registerIcon("search-collapse-results",i.Codicon.collapseAll),t.searchExpandAllIcon=i.registerIcon("search-expand-results",i.Codicon.expandAll),t.searchClearIcon=i.registerIcon("search-clear-results",i.Codicon.clearAll),t.searchStopIcon=i.Codicon.searchStop,t.searchViewIcon=i.Codicon.search,t.searchNewEditorIcon=i.registerIcon("search-new-editor",i.Codicon.newFile),t.searchGotoFileIcon=i.registerIcon("search-goto-file",i.Codicon.goToFile)})),define(e[1685],t([0,1,212,41]),(function(e,t,i,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FileQueryCacheState=void 0,function(e){e[e.Created=1]="Created",e[e.Loading=2]="Loading",e[e.Loaded=3]="Loaded",e[e.Errored=4]="Errored",e[e.Disposed=5]="Disposed"}(o||(o={}));t.FileQueryCacheState=class{constructor(e,t,s,r){if(this.cacheQuery=e,this.loadFn=t,this.disposeFn=s,this.previousCacheState=r,this._cacheKey=i.defaultGenerator.nextId(),this.query=this.cacheQuery(this._cacheKey),this.loadingPhase=o.Created, this.previousCacheState){const e=Object.assign({},this.query,{cacheKey:null}),t=Object.assign({},this.previousCacheState.query,{cacheKey:null});n.equals(e,t)||(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}get cacheKey(){return this.loadingPhase!==o.Loaded&&this.previousCacheState?this.previousCacheState.cacheKey:this._cacheKey}get isLoaded(){const e=this.loadingPhase===o.Loaded;return e||!this.previousCacheState?e:this.previousCacheState.isLoaded}get isUpdating(){const e=this.loadingPhase===o.Loading;return e||!this.previousCacheState?e:this.previousCacheState.isUpdating}load(){return this.isUpdating?this:(this.loadingPhase=o.Loading,this.loadPromise=(async()=>{try{await this.loadFn(this.query),this.loadingPhase=o.Loaded,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}catch(e){throw this.loadingPhase=o.Errored,e}})(),this)}dispose(){this.loadPromise?(async()=>{try{await this.loadPromise}catch(e){}this.loadingPhase=o.Disposed, this.disposeFn(this._cacheKey)})():this.loadingPhase=o.Disposed,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}})),define(e[246],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.MatchFocusKey=t.FolderFocusKey=t.FileFocusKey=t.FileMatchOrFolderMatchWithResourceFocusKey=t.FileMatchOrFolderMatchFocusKey=t.FileMatchOrMatchFocusKey=t.FirstMatchFocusKey=t.HasSearchResults=t.ReplaceActiveKey=t.PatternExcludesFocusedKey=t.PatternIncludesFocusedKey=t.ReplaceInputBoxFocusedKey=t.SearchInputBoxFocusedKey=t.InputBoxFocusedKey=t.SearchViewFocusedKey=t.SearchViewVisibleKey=t.RevealInSideBarForSearchResults=t.AddCursorsAtSearchResults=t.ToggleRegexCommandId=t.ToggleWholeWordCommandId=t.ToggleCaseSensitiveCommandId=t.CloseReplaceWidgetActionId=t.ReplaceAllInFolderActionId=t.ReplaceAllInFileActionId=t.ReplaceActionId=t.FocusSearchListCommandID=t.ClearSearchHistoryCommandId=t.OpenInEditorCommandId=t.CopyAllCommandId=t.CopyMatchCommandId=t.CopyPathCommandId=t.RemoveActionId=t.CancelActionId=t.OpenMatchToSide=t.OpenMatch=t.FocusSearchFromResults=t.FocusActiveEditorCommandId=t.FindInFilesActionId=void 0,t.FindInFilesActionId="workbench.action.findInFiles", t.FocusActiveEditorCommandId="search.action.focusActiveEditor",t.FocusSearchFromResults="search.action.focusSearchFromResults",t.OpenMatch="search.action.openResult",t.OpenMatchToSide="search.action.openResultToSide",t.CancelActionId="search.action.cancel",t.RemoveActionId="search.action.remove",t.CopyPathCommandId="search.action.copyPath",t.CopyMatchCommandId="search.action.copyMatch",t.CopyAllCommandId="search.action.copyAll",t.OpenInEditorCommandId="search.action.openInEditor",t.ClearSearchHistoryCommandId="search.action.clearHistory",t.FocusSearchListCommandID="search.action.focusSearchList",t.ReplaceActionId="search.action.replace",t.ReplaceAllInFileActionId="search.action.replaceAllInFile",t.ReplaceAllInFolderActionId="search.action.replaceAllInFolder",t.CloseReplaceWidgetActionId="closeReplaceInFilesWidget",t.ToggleCaseSensitiveCommandId="toggleSearchCaseSensitive",t.ToggleWholeWordCommandId="toggleSearchWholeWord",t.ToggleRegexCommandId="toggleSearchRegex", t.AddCursorsAtSearchResults="addCursorsAtSearchResults",t.RevealInSideBarForSearchResults="search.action.revealInSideBar",t.SearchViewVisibleKey=new i.RawContextKey("searchViewletVisible",!0),t.SearchViewFocusedKey=new i.RawContextKey("searchViewletFocus",!1),t.InputBoxFocusedKey=new i.RawContextKey("inputBoxFocus",!1),t.SearchInputBoxFocusedKey=new i.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new i.RawContextKey("replaceInputBoxFocus",!1),t.PatternIncludesFocusedKey=new i.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new i.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new i.RawContextKey("replaceActive",!1),t.HasSearchResults=new i.RawContextKey("hasSearchResult",!1),t.FirstMatchFocusKey=new i.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new i.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new i.RawContextKey("fileMatchOrFolderMatchFocus",!1), t.FileMatchOrFolderMatchWithResourceFocusKey=new i.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),t.FileFocusKey=new i.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new i.RawContextKey("folderMatchFocus",!1),t.MatchFocusKey=new i.RawContextKey("matchFocus",!1)})),define(e[325],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IReplaceService=void 0,t.IReplaceService=i.createDecorator("replaceService")})),define(e[458],t([0,1,6,26,13,5]),(function(e,t,i,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchHistoryService=t.ISearchHistoryService=void 0,t.ISearchHistoryService=a.createDecorator("searchHistoryService");let l=class e{constructor(e){this.storageService=e,this._onDidClearHistory=new i.Emitter,this.onDidClearHistory=this._onDidClearHistory.event}clearHistory(){this.storageService.remove(e.SEARCH_HISTORY_KEY,1),this._onDidClearHistory.fire()}load(){let t;const i=this.storageService.get(e.SEARCH_HISTORY_KEY,1);if(i)try{ t=JSON.parse(i)}catch(e){}return t||{}}save(t){s.isEmptyObject(t)?this.storageService.remove(e.SEARCH_HISTORY_KEY,1):this.storageService.store(e.SEARCH_HISTORY_KEY,JSON.stringify(t),1)}};l.SEARCH_HISTORY_KEY="workbench.search.history",l=o([r(0,n.IStorageService)],l),t.SearchHistoryService=l})),define(e[326],t([0,1,8]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenEditorCommandId=t.OpenNewEditorCommandId=t.SearchEditorID=t.SearchEditorFindMatchClass=t.SearchEditorScheme=t.InSearchEditor=void 0,t.InSearchEditor=new i.RawContextKey("inSearchEditor",!1),t.SearchEditorScheme="search-editor",t.SearchEditorFindMatchClass="seaarchEditorFindMatch",t.SearchEditorID="workbench.editor.searchEditor",t.OpenNewEditorCommandId="search.action.openNewEditor",t.OpenEditorCommandId="search.action.openEditor"})),define(e[272],t([0,1,16,126,1339,5]),(function(e,t,i,n,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISnippetsService=void 0, t.ISnippetsService=s.createDecorator("snippetService");const r={prefix:{description:o.localize(0,null),type:["string","array"]},body:{markdownDescription:o.localize(1,null),type:["string","array"],items:{type:"string"}},description:{description:o.localize(2,null),type:["string","array"]}},a={id:"vscode://schemas/snippets",allowComments:!0,allowTrailingCommas:!0,defaultSnippets:[{label:o.localize(3,null),body:{"${1:snippetName}":{prefix:"${2:prefix}",body:"${3:snippet}",description:"${4:description}"}}}],type:"object",description:o.localize(4,null),additionalProperties:{type:"object",required:["prefix","body"],properties:r,additionalProperties:!1}},l={id:"vscode://schemas/global-snippets",allowComments:!0,allowTrailingCommas:!0,defaultSnippets:[{label:o.localize(5,null),body:{"${1:snippetName}":{scope:"${2:scope}",prefix:"${3:prefix}",body:"${4:snippet}",description:"${5:description}"}}}],type:"object",description:o.localize(6,null),additionalProperties:{type:"object",required:["prefix","body"], properties:Object.assign(Object.assign({},r),{scope:{description:o.localize(7,null),type:"string"}}),additionalProperties:!1}},c=i.Registry.as(n.Extensions.JSONContribution);c.registerSchema("vscode://schemas/snippets",a),c.registerSchema("vscode://schemas/global-snippets",l)})),define(e[623],t([0,1,137,24,18,50,236,1338,272,87]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetCompletionProvider=t.SnippetCompletion=void 0;class u{constructor(e,t){this.snippet=e,this.label={name:e.prefix,type:c.localize(0,null,e.description||e.name,e.source)},this.detail=this.label.type,this.insertText=e.codeSnippet,this.range=t,this.sortText=`${3===e.snippetSource?"z":"a"}-${e.prefix}`,this.kind=27,this.insertTextRules=4}resolve(){return this.documentation=(new i.MarkdownString).appendCodeblock("",(new l.SnippetParser).text(this.snippet.codeSnippet)),this}static compareByLabel(e,t){return n.compare(e.label.name,t.label.name)}}t.SnippetCompletion=u;let g=class{ constructor(e,t){this._modeService=e,this._snippets=t,this._debugDisplayName="snippetCompletions"}async provideCompletionItems(e,t,i){if(1===i.triggerKind&&" "===i.triggerCharacter)return{suggestions:[]};const n=this._getLanguageIdAtPosition(e,t),o=await this._snippets.getSnippets(n);let r={lineNumber:t.lineNumber,column:1},a=[];const l=e.getLineContent(t.lineNumber).toLowerCase(),d=/\s/.test(l[t.column-2]);for(;r.column{if(h.isPatternInWord(l,e,t.column-1,i.prefixLow,0,i.prefixLow.length)){const n=i.prefixLow.substr(t.column-(1+e)),o=l.indexOf(n,t.column-1)>=0?t.column+n.length:t.column,r=s.Range.fromPositions(t.delta(0,-(t.column-(1+e))),{lineNumber:t.lineNumber,column:o}),a=r.setEndPosition(t.lineNumber,t.column) ;p.push(new u(i,{replace:r,insert:a})),g.delete(i)}});(d||0===a.length)&&g.forEach(e=>{const i=s.Range.fromPositions(t),n=l.indexOf(e.prefixLow,t.column-1)>=0?i.setEndPosition(t.lineNumber,t.column+e.prefixLow.length):i;p.push(new u(e,{replace:n,insert:i}))}),p.sort(u.compareByLabel);for(let e=0;ee+1&&(p[e].label.name=c.localize(2,null,p[e].label.name,p[e].snippet.name),e=i)}return{suggestions:p}}resolveCompletionItem(e){return e instanceof u?e.resolve():e}_getLanguageIdAtPosition(e,t){e.tokenizeIfCheap(t.lineNumber);let i=e.getLanguageIdAtPosition(t.lineNumber,t.column);const n=this._modeService.getLanguageIdentifier(i);return n&&!this._modeService.getLanguageName(n.language)&&(i=e.getLanguageIdentifier().id),i}};g=o([r(0,a.IModeService),r(1,d.ISnippetsService)],g),t.SnippetCompletionProvider=g})), define(e[624],t([0,1,93,141,1340,48,236,591,24,15]),(function(e,t,i,n,o,s,r,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetFile=t.SnippetSource=t.Snippet=void 0;class d{constructor(e){this.isBogous=!1,this.needsClipboard=!1,this.codeSnippet=e;const t=(new r.SnippetParser).parse(e,!1);let i=new Map,n=0;for(const e of t.placeholders)n=Math.max(n,e.index);let o=[...t.children];for(;o.length>0;){const e=o.shift();if(e instanceof r.Variable){if(0===e.children.length&&!a.KnownSnippetVariableNames[e.name]){const o=i.has(e.name)?i.get(e.name):++n;i.set(e.name,o);const s=new r.Placeholder(o).appendChild(new r.Text(e.name));t.replace(e,[s]),this.isBogous=!0}"CLIPBOARD"===e.name&&(this.needsClipboard=!0)}else o.push(...e.children)}this.isBogous&&(this.codeSnippet=t.toTextmateString())}}class h{constructor(e,t,i,n,o,s,r){this.scopes=e,this.name=t,this.prefix=i,this.description=n,this.body=o,this.source=s,this.snippetSource=r,this.prefixLow=i?i.toLowerCase():i, this._bodyInsights=new c.IdleValue(()=>new d(this.body))}get codeSnippet(){return this._bodyInsights.value.codeSnippet}get isBogous(){return this._bodyInsights.value.isBogous}get needsClipboard(){return this._bodyInsights.value.needsClipboard}static compare(e,t){return e.snippetSourcet.snippetSource?1:e.name>t.name?1:e.name=0&&this._scopeSelect(e.substring(0,i),t)}async _load(){if(this._extension)return this._extensionResourceLoaderService.readExtensionResource(this.location);return(await this._fileService.readFile(this.location)).value.toString()}load(){return this._loadPromise||(this._loadPromise=Promise.resolve(this._load()).then(e=>{const t=i.parse(e);return"object"===i.getNodeType(t)&&n.forEach(t,e=>{const{key:t,value:i}=e;!function(e){return Boolean(e.body)&&Boolean(e.prefix)}(i)?n.forEach(i,e=>{const{key:t,value:i}=e;this._parseSnippet(t,i,this.data)}):this._parseSnippet(t,i,this.data)}),this})),this._loadPromise}reset(){this._loadPromise=void 0,this.data.length=0}_parseSnippet(e,t,i){let n,s,{prefix:r,body:a,description:c}=t;Array.isArray(a)&&(a=a.join("\n")),Array.isArray(c)&&(c=c.join("\n")), "string"!=typeof r&&!Array.isArray(r)||"string"!=typeof a||(n=this.defaultScopes?this.defaultScopes:"string"==typeof t.scope?t.scope.split(",").map(e=>e.trim()).filter(e=>!l.isFalsyOrWhitespace(e)):[],s=this._extension?this._extension.displayName||this._extension.name:2===this.source?o.localize(0,null):this.isGlobalSnippets?o.localize(1,null):o.localize(2,null),(Array.isArray(r)?r:[r]).forEach(t=>{i.push(new h(n,e,t,c,a,s,this.source))}))}}})),define(e[1686],t([0,1,1337,37,50,32,272,168,58,624,49,88]),(function(e,t,i,n,o,s,r,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u{constructor(e,t,i){this.snippet=e,this.name=t,this.langId=i}static fromUser(e){if(!e||"object"!=typeof e)return u._empty;let{snippet:t,name:i,langId:n}=e;return"string"!=typeof t&&(t=void 0),"string"!=typeof i&&(i=void 0),"string"!=typeof n&&(n=void 0),new u(t,i,n)}}u._empty=new u(void 0,void 0,void 0);class g extends n.EditorAction{constructor(){super({id:"editor.action.insertSnippet", label:i.localize(0,null),alias:"Insert Snippet",precondition:l.EditorContextKeys.writable,description:{description:"Insert Snippet",args:[{name:"args",schema:{type:"object",properties:{snippet:{type:"string"},langId:{type:"string"},name:{type:"string"}}}}]}})}async run(e,t,n){const s=e.get(o.IModeService),l=e.get(r.ISnippetsService);if(!t.hasModel())return;const g=e.get(h.IClipboardService),p=e.get(d.IQuickInputService),m=await new Promise(async(e,o)=>{const{lineNumber:r,column:a}=t.getPosition();let{snippet:d,name:h,langId:g}=u.fromUser(n);if(d)return e(new c.Snippet([],"","","",d,"",1));let m=0;if(g){const e=s.getLanguageIdentifier(g);e&&(m=e.id)}else{t.getModel().tokenizeIfCheap(r),m=t.getModel().getLanguageIdAtPosition(r,a);const e=s.getLanguageIdentifier(m);e&&!s.getLanguageName(e.language)&&(m=t.getModel().getLanguageIdentifier().id)}if(!h){const t=(await l.getSnippets(m)).sort(c.Snippet.compare),n=[];let s;for(const e of t){const t={label:e.prefix,detail:e.description,snippet:e} ;if(!s||s.snippetSource!==e.snippetSource){let t="";switch(e.snippetSource){case 1:t=i.localize(1,null);break;case 3:t=i.localize(2,null);break;case 2:t=i.localize(3,null)}n.push({type:"separator",label:t})}n.push(t),s=e}return p.pick(n,{matchOnDetail:!0}).then(t=>e(t&&t.snippet),o)}(await l.getSnippets(m)).every(t=>t.name!==h||(e(t),!1))});if(!m)return;let v;m.needsClipboard&&(v=await g.readText()),a.SnippetController2.get(t).insert(m.codeSnippet,{clipboardText:v})}}n.registerEditorAction(g),s.CommandsRegistry.registerCommand("editor.action.showSnippets",e=>e.get(s.ICommandService).executeCommand("editor.action.insertSnippet"))})),define(e[1687],t([0,1,1343,12,56,16,23,26,116,61,28,42,10,182]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let v=class{constructor(e,t,n,o,s,r){if(!r.npsSurveyUrl)return;if(t.registerStorageKey({key:"nps/sessionCount",version:1}),t.registerStorageKey({key:"nps/lastSessionDate",version:1}),t.registerStorageKey({ key:"nps/skipVersion",version:1}),t.registerStorageKey({key:"nps/isCandidate",version:1}),e.get("nps/skipVersion",0,""))return;const a=(new Date).toDateString();if(a===e.get("nps/lastSessionDate",0,new Date(0).toDateString()))return;const l=(e.getNumber("nps/sessionCount",0,0)||0)+1;if(e.store("nps/lastSessionDate",a,0),e.store("nps/sessionCount",l,0),l<9)return;const c=e.getBoolean("nps/isCandidate",0,!1)||Math.random()<.15;e.store("nps/isCandidate",c,0),c?n.prompt(u.Severity.Info,i.localize(0,null),[{label:i.localize(1,null),run:()=>{o.getTelemetryInfo().then(t=>{s.open(p.URI.parse(`${r.npsSurveyUrl}?o=${encodeURIComponent(m.platform)}&v=${encodeURIComponent(r.version)}&m=${encodeURIComponent(t.machineId)}`)),e.store("nps/isCandidate",!1,0),e.store("nps/skipVersion",r.version,0)})}},{label:i.localize(2,null),run:()=>e.store("nps/sessionCount",l-3,0)},{label:i.localize(3,null),run:()=>{e.store("nps/isCandidate",!1,0),e.store("nps/skipVersion",r.version,0)}}],{sticky:!0 }):e.store("nps/skipVersion",r.version,0)}};if(v=o([r(0,c.IStorageService),r(1,d.IStorageKeysSyncRegistryService),r(2,u.INotificationService),r(3,l.ITelemetryService),r(4,g.IOpenerService),r(5,h.IProductService)],v),"en"===n.language){a.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(v,3)}})),define(e[459],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceTagsService=void 0,t.IWorkspaceTagsService=i.createDecorator("workspaceTagsService")})),define(e[1688],t([0,1,76,26,34,25,23,14,459,13,243,1209]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicWorkspaceRecommendations=void 0;let p=class extends u.ExtensionRecommendations{constructor(e,t,i,n,o,s){super(),this.extensionTipsService=e,this.workspaceTagsService=t,this.contextService=i,this.fileService=n,this.telemetryService=o,this.storageService=s,this._recommendations=[]}get recommendations(){return this._recommendations} async doActivate(){await this.fetch(),this._register(this.contextService.onDidChangeWorkbenchState(()=>this._recommendations=[]))}async fetch(){if(this._register(this.contextService.onDidChangeWorkbenchState(()=>this._recommendations=[])),this._recommendations.length||2!==this.contextService.getWorkbenchState()||!this.fileService.canHandleResource(this.contextService.getWorkspace().folders[0].uri))return;const e=this.contextService.getWorkspace().folders[0],t=this.getCachedDynamicWorkspaceRecommendations();if(t)return this._recommendations=t.map(t=>this.toExtensionRecommendation(t,e)),void this.telemetryService.publicLog2("dynamicWorkspaceRecommendations",{count:this._recommendations.length,cache:1});const[i,n]=await Promise.all([this.workspaceTagsService.getHashedRemotesFromUri(e.uri,!1),this.workspaceTagsService.getHashedRemotesFromUri(e.uri,!0)]),o=(i||[]).concat(n||[]);if(!o.length)return;const s=await this.extensionTipsService.getAllWorkspacesTips();if(s.length)for(const t of o){ const i=s.filter(e=>c.isNonEmptyArray(e.remoteSet)&&e.remoteSet.indexOf(t)>-1)[0];if(i)return this._recommendations=i.recommendations.map(t=>this.toExtensionRecommendation(t,e)),this.storageService.store("extensionsAssistant/dynamicWorkspaceRecommendations",JSON.stringify({recommendations:i.recommendations,timestamp:Date.now()}),1),void this.telemetryService.publicLog2("dynamicWorkspaceRecommendations",{count:this._recommendations.length,cache:0})}}getCachedDynamicWorkspaceRecommendations(){try{const e=JSON.parse(this.storageService.get("extensionsAssistant/dynamicWorkspaceRecommendations",1,"{}"));if(c.isNonEmptyArray(e.recommendations)&&h.isNumber(e.timestamp)&&e.timestamp>0&&(Date.now()-e.timestamp)/864e5<14)return e.recommendations}catch(e){this.storageService.remove("extensionsAssistant/dynamicWorkspaceRecommendations",1)}}toExtensionRecommendation(e,t){return{extensionId:e.toLowerCase(),reason:{reasonId:4,reasonText:g.localize(0,null,t.name)}}}} ;p=o([r(0,i.IExtensionTipsService),r(1,d.IWorkspaceTagsService),r(2,s.IWorkspaceContextService),r(3,a.IFileService),r(4,l.ITelemetryService),r(5,n.IStorageService)],p),t.DynamicWorkspaceRecommendations=p})),define(e[1689],t([0,1,33,459]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpWorkspaceTagsService=void 0;class o{getTags(){return Promise.resolve({})}getTelemetryWorkspaceId(e,t){}getHashedRemotesFromUri(e,t){return Promise.resolve([])}}t.NoOpWorkspaceTagsService=o,i.registerSingleton(n.IWorkspaceTagsService,o,!0)})),define(e[205],t([0,1,5,8]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USER_TASKS_GROUP_KEY=t.ITaskService=t.ProcessExecutionSupportedContext=t.ShellExecutionSupportedContext=t.CustomExecutionSupportedContext=void 0,t.CustomExecutionSupportedContext=new n.RawContextKey("customExecutionSupported",!0),t.ShellExecutionSupportedContext=new n.RawContextKey("shellExecutionSupported",!1), t.ProcessExecutionSupportedContext=new n.RawContextKey("processExecutionSupported",!1),t.ITaskService=i.createDecorator("taskService"),t.USER_TASKS_GROUP_KEY="settings"})),define(e[1690],t([0,1,1183,97,244,205,9,71,13,107,211,38]),(function(e,t,i,n,s,a,l,c,d,h,u,g){"use strict";function p(e,t){return(i,n=null,o)=>{const s=t(t=>{if(e(t))return s.dispose(),i.call(n,t)},null,o);return s}}Object.defineProperty(t,"__esModule",{value:!0}),t.DebugTaskRunner=t.TaskRunResult=void 0,function(e){e[e.Failure=0]="Failure",e[e.Success=1]="Success"}(t.TaskRunResult||(t.TaskRunResult={}));let m=class{constructor(e,t,i,n,o){this.taskService=e,this.markerService=t,this.configurationService=i,this.viewsService=n,this.dialogService=o,this.canceled=!1}cancel(){this.canceled=!0}async runTaskAndCheckErrors(e,t,o){try{this.canceled=!1;const o=await this.runTask(e,t);if(this.canceled||o&&void 0===o.exitCode)return 0 ;const r=t?this.markerService.getStatistics().errors:0,a=o&&0===o.exitCode,l=o&&0!==o.exitCode,c=this.configurationService.getValue("debug").onTaskErrors;if(a||"debugAnyway"===c||0===r&&!l)return 1;if("showErrors"===c)return await this.viewsService.openView(s.default.MARKERS_VIEW_ID,!0),Promise.resolve(0);if("abort"===c)return Promise.resolve(0);const d="string"==typeof t?t:t?t.name:"",h=r>1?i.localize(0,null,d):1===r?i.localize(1,null,d):o&&"number"==typeof o.exitCode?i.localize(2,null,d,o.exitCode):i.localize(3,null,d),u=await this.dialogService.show(n.default.Warning,h,[i.localize(4,null),i.localize(5,null),i.localize(6,null)],{checkbox:{label:i.localize(7,null)},cancelId:2}),g=0===u.choice,p=2===u.choice;return u.checkboxChecked&&this.configurationService.updateValue("debug.onTaskErrors",0===u.choice?"debugAnyway":p?"abort":"showErrors"),p?Promise.resolve(0):g?1:(await this.viewsService.openView(s.default.MARKERS_VIEW_ID,!0),Promise.resolve(0))}catch(e){ return await o(e.message,[this.taskService.configureAction()]),0}}async runTask(e,t){if(!t)return Promise.resolve(null);if(!e)return Promise.reject(new Error(i.localize(8,null,"string"==typeof t?t:t.type)));const o=await this.taskService.getTask(e,t);if(!o){const e="string"==typeof t?i.localize(9,null,t):i.localize(10,null);return Promise.reject(u.createErrorWithActions(e))}let s=!1;const r=new Promise((e,t)=>p(e=>("inactive"===e.kind||"processEnded"===e.kind&&void 0===e.exitCode)&&e.taskId===o._id,this.taskService.onDidStateChange)(t=>{s=!0,e("processEnded"===t.kind?{exitCode:t.exitCode}:null)})),a=this.taskService.getActiveTasks().then(async e=>{if(e.find(e=>e._id===o._id)){return(await this.taskService.getBusyTasks()).find(e=>e._id===o._id)?(s=!0,r):Promise.resolve(null)}p(e=>("active"===e.kind||"dependsOnStarted"===e.kind)&&e.taskId===o._id,this.taskService.onDidStateChange)(()=>{s=!0});const t=this.taskService.run(o);return o.configurationProperties.isBackground?r:t.then(d.withUndefinedAsNull)}) ;return new Promise((e,o)=>{a.then(t=>{s=!0,e(t)},e=>o(e)),setTimeout(()=>{if(!s){const e="string"==typeof t?i.localize(11,null):i.localize(12,null,JSON.stringify(t));o({severity:n.default.Error,message:e})}},1e4)})}};m=o([r(0,a.ITaskService),r(1,h.IMarkerService),r(2,l.IConfigurationService),r(3,g.IViewsService),r(4,c.IDialogService)],m),t.DebugTaskRunner=m})),define(e[625],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskExecuteKind=t.Triggers=t.TaskError=t.TaskErrors=void 0,function(e){e[e.NotConfigured=0]="NotConfigured",e[e.RunningTask=1]="RunningTask",e[e.NoBuildTask=2]="NoBuildTask",e[e.NoTestTask=3]="NoTestTask",e[e.ConfigValidationError=4]="ConfigValidationError",e[e.TaskNotFound=5]="TaskNotFound",e[e.NoValidTaskRunner=6]="NoValidTaskRunner",e[e.UnknownError=7]="UnknownError"}(t.TaskErrors||(t.TaskErrors={}));t.TaskError=class{constructor(e,t,i){this.severity=e,this.message=t,this.code=i}},function(e){e.shortcut="shortcut",e.command="command" }(t.Triggers||(t.Triggers={})),function(e){e[e.Started=1]="Started",e[e.Active=2]="Active"}(t.TaskExecuteKind||(t.TaskExecuteKind={}))})),define(e[1691],t([0,1,1357]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplates=void 0;const n={id:"dotnetCore",label:".NET Core",sort:"NET Core",autoDetect:!1,description:i.localize(0,null), content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "build",','\t\t\t"command": "dotnet",','\t\t\t"type": "shell",','\t\t\t"args": [','\t\t\t\t"build",',"\t\t\t\t// Ask dotnet build to generate full paths for file names.",'\t\t\t\t"/property:GenerateFullPaths=true",',"\t\t\t\t// Do not generate summary otherwise it leads to duplicate errors in Problems panel",'\t\t\t\t"/consoleloggerparameters:NoSummary"',"\t\t\t],",'\t\t\t"group": "build",','\t\t\t"presentation": {','\t\t\t\t"reveal": "silent"',"\t\t\t},",'\t\t\t"problemMatcher": "$msCompile"',"\t\t}","\t]","}"].join("\n")},o={id:"msbuild",label:"MSBuild",autoDetect:!1,description:i.localize(1,null), content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "build",','\t\t\t"type": "shell",','\t\t\t"command": "msbuild",','\t\t\t"args": [',"\t\t\t\t// Ask msbuild to generate full paths for file names.",'\t\t\t\t"/property:GenerateFullPaths=true",','\t\t\t\t"/t:build",',"\t\t\t\t// Do not generate summary otherwise it leads to duplicate errors in Problems panel",'\t\t\t\t"/consoleloggerparameters:NoSummary"',"\t\t\t],",'\t\t\t"group": "build",','\t\t\t"presentation": {',"\t\t\t\t// Reveal the output only if unrecognized errors occur.",'\t\t\t\t"reveal": "silent"',"\t\t\t},","\t\t\t// Use the standard MS compiler pattern to detect errors, warnings and infos",'\t\t\t"problemMatcher": "$msCompile"',"\t\t}","\t]","}"].join("\n")},s={id:"externalCommand",label:"Others",autoDetect:!1,description:i.localize(2,null), content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "echo",','\t\t\t"type": "shell",','\t\t\t"command": "echo Hello"',"\t\t}","\t]","}"].join("\n")},r={id:"maven",label:"maven",sort:"MVN",autoDetect:!1,description:i.localize(3,null),content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "verify",','\t\t\t"type": "shell",','\t\t\t"command": "mvn -B verify",','\t\t\t"group": "build"',"\t\t},","\t\t{",'\t\t\t"label": "test",','\t\t\t"type": "shell",','\t\t\t"command": "mvn -B test",','\t\t\t"group": "test"',"\t\t}","\t]","}"].join("\n")};let a=null;t.getTemplates=function(){return a||(a=[n,o,r].sort((e,t)=>(e.sort||e.label).localeCompare(t.sort||t.label))).push(s),a}})),define(e[1692],t([0,1]),(function(e,t){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0}),t.CommandTrackerAddon=t.ScrollPosition=void 0;const i=2;var n;!function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom"}(n||(n={})),function(e){e[e.Top=0]="Top",e[e.Middle=1]="Middle"}(t.ScrollPosition||(t.ScrollPosition={}));t.CommandTrackerAddon=class{constructor(){this._currentMarker=n.Bottom,this._selectionStart=null,this._isDisposable=!1}activate(e){this._terminal=e,e.onKey(e=>this._onKey(e.key))}dispose(){}_onKey(e){"\r"===e&&this._onEnter(),this._currentMarker=n.Bottom,this._selectionStart=null}_onEnter(){this._terminal&&this._terminal.buffer.active.cursorX>=i&&this._terminal.registerMarker(0)}scrollToPreviousCommand(e=0,t=!1){if(!this._terminal)return;let i;t||(this._selectionStart=null);const o=Math.min(this._getLine(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),s=this._terminal.buffer.active.viewportY ;if(t||o===s)this._currentMarker===n.Bottom?i=this._terminal.markers.length-1:this._currentMarker===n.Top?i=-1:this._isDisposable?(i=this._findPreviousCommand(this._terminal),this._currentMarker.dispose(),this._isDisposable=!1):i=this._terminal.markers.indexOf(this._currentMarker)-1;else{const e=this._terminal.markers.filter(e=>e.line>=s).length;i=this._terminal.markers.length-e-1}if(i<0)return this._currentMarker=n.Top,void this._terminal.scrollToTop();this._currentMarker=this._terminal.markers[i],this._scrollToMarker(this._currentMarker,e)}scrollToNextCommand(e=0,t=!1){if(!this._terminal)return;let i;t||(this._selectionStart=null);const o=Math.min(this._getLine(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),s=this._terminal.buffer.active.viewportY;if(t||o===s)this._currentMarker===n.Bottom?i=this._terminal.markers.length:this._currentMarker===n.Top?i=0:this._isDisposable?(i=this._findNextCommand(this._terminal),this._currentMarker.dispose(), this._isDisposable=!1):i=this._terminal.markers.indexOf(this._currentMarker)+1;else{i=this._terminal.markers.filter(e=>e.line<=s).length}if(i>=this._terminal.markers.length)return this._currentMarker=n.Bottom,void this._terminal.scrollToBottom();this._currentMarker=this._terminal.markers[i],this._scrollToMarker(this._currentMarker,e)}_scrollToMarker(e,t){if(!this._terminal)return;let i=e.line;1===t&&(i=Math.max(i-Math.floor(this._terminal.rows/2),0)),this._terminal.scrollToLine(i)}selectToPreviousCommand(){this._terminal&&(null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToPreviousCommand(1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}selectToNextCommand(){this._terminal&&(null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToNextCommand(1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}selectToPreviousLine(){ this._terminal&&(null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToPreviousLine(this._terminal,1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}selectToNextLine(){this._terminal&&(null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToNextLine(this._terminal,1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}_selectLines(e,t,i){null===i&&(i=n.Bottom);let o=this._getLine(e,t),s=this._getLine(e,i);if(o>s){const e=o;o=s,s=e}s-=1,e.selectLines(o,s)}_getLine(e,t){return t===n.Bottom?e.buffer.active.baseY+e.rows-1:t===n.Top?0:t.line}scrollToPreviousLine(e,t=0,i=!1){if(i||(this._selectionStart=null),this._currentMarker!==n.Top){if(this._currentMarker===n.Bottom)this._currentMarker=this._addMarkerOrThrow(e,this._getOffset(e)-1);else{const t=this._getOffset(e);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._addMarkerOrThrow(e,t-1)}this._isDisposable=!0, this._scrollToMarker(this._currentMarker,t)}else e.scrollToTop()}scrollToNextLine(e,t=0,i=!1){if(i||(this._selectionStart=null),this._currentMarker!==n.Bottom){if(this._currentMarker===n.Top)this._currentMarker=this._addMarkerOrThrow(e,this._getOffset(e)+1);else{const t=this._getOffset(e);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._addMarkerOrThrow(e,t+1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,t)}else e.scrollToBottom()}_addMarkerOrThrow(e,t){const i=e.addMarker(t);if(!i)throw new Error(`Could not create marker for ${t}`);return i}_getOffset(e){if(this._currentMarker===n.Bottom)return 0;if(this._currentMarker===n.Top)return 0-(e.buffer.active.baseY+e.buffer.active.cursorY);{let t=this._getLine(e,this._currentMarker);return t-=e.buffer.active.baseY+e.buffer.active.cursorY}}_findPreviousCommand(e){if(this._currentMarker===n.Top)return 0;if(this._currentMarker===n.Bottom)return e.markers.length-1;let t ;for(t=e.markers.length-1;t>=0;t--)if(e.markers[t].linethis._currentMarker.line)return t;return e.markers.length}}})),define(e[1693],t([0,1,7]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationModeAddon=void 0;t.NavigationModeAddon=class{constructor(e){this._navigationModeContextKey=e}activate(e){this._terminal=e}dispose(){}exitNavigationMode(){this._terminal&&(this._terminal.scrollToBottom(),this._terminal.focus())}focusPreviousLine(){if(!this._terminal||!this._terminal.element)return;if(document.activeElement&&document.activeElement.parentElement&&document.activeElement.parentElement.classList.contains("xterm-accessibility-tree")){const e=document.activeElement.previousElementSibling;if(e){e.focus();const t=i.addDisposableListener(e,"blur",()=>{ this._navigationModeContextKey.set(!1),t.dispose()});this._navigationModeContextKey.set(!0)}return}const e=this._terminal.element.querySelector(".xterm-accessibility-tree");if(!e)return;const t=Math.max(this._terminal.buffer.active.cursorY-1,0);if(e.childElementCount{this._navigationModeContextKey.set(!1),o.dispose()});this._navigationModeContextKey.set(!0)}focusNextLine(){if(!this._terminal||!this._terminal.element)return;if(document.activeElement&&document.activeElement.parentElement&&document.activeElement.parentElement.classList.contains("xterm-accessibility-tree")){const e=document.activeElement.nextElementSibling;if(e){e.focus();const t=i.addDisposableListener(e,"blur",()=>{this._navigationModeContextKey.set(!1),t.dispose()});this._navigationModeContextKey.set(!0)}return}const e=this._terminal.element.querySelector(".xterm-accessibility-tree");if(!e)return;const t=this._terminal.buffer.active.cursorY ;if(e.childElementCount{this._navigationModeContextKey.set(!1),o.dispose()});this._navigationModeContextKey.set(!0)}}})),define(e[372],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalBaseLinkProvider=void 0;t.TerminalBaseLinkProvider=class{async provideLinks(e,t){var i;null===(i=this._activeLinks)||void 0===i||i.forEach(e=>e.dispose),this._activeLinks=await this._provideLinks(e),t(this._activeLinks)}}})),define(e[373],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.positionIsInRange=t.getXtermLineContent=t.convertBufferRangeToViewport=t.convertLinkRangeToBuffer=void 0,t.convertLinkRangeToBuffer=function(e,t,i,n){const o={start:{x:i.startColumn,y:i.startLineNumber+n},end:{x:i.endColumn-1,y:i.endLineNumber+n}};let s=0;const r=Math.ceil(i.startColumn/t);for(let n=0;n1&&(r-=i.length-1)}s+=r}let a=0;const l=Math.ceil(i.endColumn/t);for(let n=Math.max(0,r-1);nt;)o.start.x-=t,o.start.y++;for(;o.end.x>t;)o.end.x-=t,o.end.y++;return o},t.convertBufferRangeToViewport=function(e,t){return{start:{x:e.start.x-1,y:e.start.y-t-1},end:{x:e.end.x-1,y:e.end.y-t-1}}},t.getXtermLineContent=function(e,t,i,n){let o="";for(let s=t;s<=i;s++){const t=e.getLine(s);t&&(o+=t.translateToString(!0,0,n))}return o},t.positionIsInRange=function(e,t){return!(e.yt.end.y)&&(!(e.y===t.start.y&&e.xt.end.x))}})), define(e[374],t([0,1,2,7,15,373,9,12,1360,6]),(function(e,t,i,n,s,a,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLink=t.FOLDER_NOT_IN_WORKSPACE_LABEL=t.FOLDER_IN_WORKSPACE_LABEL=t.OPEN_FILE_LABEL=void 0,t.OPEN_FILE_LABEL=d.localize(0,null),t.FOLDER_IN_WORKSPACE_LABEL=d.localize(1,null),t.FOLDER_NOT_IN_WORKSPACE_LABEL=d.localize(2,null);let u=class extends i.DisposableStore{constructor(e,t,i,n,o,s,r,a,l){super(),this._xterm=e,this.range=t,this.text=i,this._viewportY=n,this._activateCallback=o,this._tooltipCallback=s,this._isHighConfidenceLink=r,this.label=a,this._configurationService=l,this._onInvalidated=new h.Emitter,this.decorations={pointerCursor:!1,underline:this._isHighConfidenceLink}}get onInvalidated(){return this._onInvalidated.event}dispose(){var e,t;super.dispose(),null===(e=this._hoverListeners)||void 0===e||e.dispose(),this._hoverListeners=void 0,null===(t=this._tooltipScheduler)||void 0===t||t.dispose(),this._tooltipScheduler=void 0}activate(e,t){ this._activateCallback(e,t)}hover(e,t){if(this._hoverListeners=new i.DisposableStore,this._hoverListeners.add(n.addDisposableListener(document,"keydown",e=>{!e.repeat&&this._isModifierDown(e)&&this._enableDecorations()})),this._hoverListeners.add(n.addDisposableListener(document,"keyup",e=>{e.repeat||this._isModifierDown(e)||this._disableDecorations()})),this._hoverListeners.add(this._xterm.onRender(e=>{const t=this.range.start.y-this._viewportY;t>=e.start&&t<=e.end&&this._onInvalidated.fire()})),this._isHighConfidenceLink){const e=this._configurationService.getValue("editor.hover.delay");this._tooltipScheduler=new s.RunOnceScheduler(()=>{var e;this._tooltipCallback(this,a.convertBufferRangeToViewport(this.range,this._viewportY),this._isHighConfidenceLink?()=>this._enableDecorations():void 0,this._isHighConfidenceLink?()=>this._disableDecorations():void 0),null===(e=this._tooltipScheduler)||void 0===e||e.dispose(),this._tooltipScheduler=void 0},e),this.add(this._tooltipScheduler), this._tooltipScheduler.schedule()}const o={x:e.pageX,y:e.pageY};this._hoverListeners.add(n.addDisposableListener(document,n.EventType.MOUSE_MOVE,e=>{var t;this._isModifierDown(e)?this._enableDecorations():this._disableDecorations(),(Math.abs(e.pageX-o.x)>2*window.devicePixelRatio||Math.abs(e.pageY-o.y)>2*window.devicePixelRatio)&&(o.x=e.pageX,o.y=e.pageY,null===(t=this._tooltipScheduler)||void 0===t||t.schedule())}))}leave(){var e,t;null===(e=this._hoverListeners)||void 0===e||e.dispose(),this._hoverListeners=void 0,null===(t=this._tooltipScheduler)||void 0===t||t.dispose(),this._tooltipScheduler=void 0}_enableDecorations(){this.decorations.pointerCursor||(this.decorations.pointerCursor=!0),this.decorations.underline||(this.decorations.underline=!0)}_disableDecorations(){this.decorations.pointerCursor&&(this.decorations.pointerCursor=!1),this.decorations.underline!==this._isHighConfidenceLink&&(this.decorations.underline=this._isHighConfidenceLink)}_isModifierDown(e){ return"ctrlCmd"===this._configurationService.getValue("editor.multiCursorModifier")?!!e.altKey:c.isMacintosh?e.metaKey:e.ctrlKey}};u=o([r(8,l.IConfigurationService)],u),t.TerminalLink=u})),define(e[1694],t([0,1,373,374,5,372]),(function(e,t,i,n,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalExternalLinkProviderAdapter=void 0;let l=class extends a.TerminalBaseLinkProvider{constructor(e,t,i,n,o,s){super(),this._xterm=e,this._instance=t,this._externalLinkProvider=i,this._wrapLinkHandler=n,this._tooltipCallback=o,this._instantiationService=s}async _provideLinks(e){var t,o;let s=e-1,r=s;const a=[this._xterm.buffer.active.getLine(s)];for(;null===(t=this._xterm.buffer.active.getLine(s))||void 0===t?void 0:t.isWrapped;)a.unshift(this._xterm.buffer.active.getLine(s-1)),s--;for(;null===(o=this._xterm.buffer.active.getLine(r+1))||void 0===o?void 0:o.isWrapped;)a.push(this._xterm.buffer.active.getLine(r+1)),r++;const l=i.getXtermLineContent(this._xterm.buffer.active,s,r,this._xterm.cols) ;if(0===l.trim().length)return[];const c=await this._externalLinkProvider.provideLinks(this._instance,l);return c?c.map(e=>{const t=i.convertLinkRangeToBuffer(a,this._xterm.cols,{startColumn:e.startIndex+1,startLineNumber:1,endColumn:e.startIndex+e.length+1,endLineNumber:1},s),o=l.substr(e.startIndex,e.length)||"",r=this._wrapLinkHandler((t,i)=>e.activate(i));return this._instantiationService.createInstance(n.TerminalLink,this._xterm,t,o,this._xterm.buffer.active.viewportY,r,this._tooltipCallback,!0,e.label)}):[]}};l=o([r(5,s.IInstantiationService)],l),t.TerminalExternalLinkProviderAdapter=l})),define(e[1695],t([0,1,538,373,374,5,10,372,29]),(function(e,t,i,n,s,a,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProtocolLinkProvider=void 0;let h=class extends c.TerminalBaseLinkProvider{constructor(e,t,i,n){super(),this._xterm=e,this._activateCallback=t,this._tooltipCallback=i,this._instantiationService=n}_provideLinks(e){var t,o;let r=e-1,a=r ;const c=[this._xterm.buffer.active.getLine(r)];for(;null===(t=this._xterm.buffer.active.getLine(r))||void 0===t?void 0:t.isWrapped;)c.unshift(this._xterm.buffer.active.getLine(r-1)),r--;for(;null===(o=this._xterm.buffer.active.getLine(a+1))||void 0===o?void 0:o.isWrapped;)c.push(this._xterm.buffer.active.getLine(a+1)),a++;return this._linkComputerTarget=new u(this._xterm,r,a),i.LinkComputer.computeLinks(this._linkComputerTarget).map(e=>{var t;const i=n.convertLinkRangeToBuffer(c,this._xterm.cols,e.range,r),o=e.url?"string"==typeof e.url?l.URI.parse(e.url):e.url:void 0,a=(null==o?void 0:o.scheme)===d.Schemas.file?s.OPEN_FILE_LABEL:void 0;return this._instantiationService.createInstance(s.TerminalLink,this._xterm,i,(null===(t=e.url)||void 0===t?void 0:t.toString())||"",this._xterm.buffer.active.viewportY,this._activateCallback,this._tooltipCallback,!0,a)})}};h=o([r(3,a.IInstantiationService)],h),t.TerminalProtocolLinkProvider=h;class u{constructor(e,t,i){this._xterm=e,this._lineStart=t,this._lineEnd=i} getLineCount(){return 1}getLineContent(){return n.getXtermLineContent(this._xterm.buffer.active,this._lineStart,this._lineEnd,this._xterm.cols)}}})),define(e[132],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowsShellType=t.Direction=t.ITerminalInstanceService=t.ITerminalService=void 0,t.ITerminalService=i.createDecorator("terminalService"),t.ITerminalInstanceService=i.createDecorator("terminalInstanceService"),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down"}(t.Direction||(t.Direction={})),function(e){e.CommandPrompt="cmd",e.PowerShell="pwsh",e.Wsl="wsl",e.GitBash="gitbash"}(t.WindowsShellType||(t.WindowsShellType={}))})),define(e[1696],t([0,1,82,132]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupTerminalCommands=void 0,t.setupTerminalCommands=function(){!function(){for(let e=0;e<9;e++){const t=e,o=e+1;i.KeybindingsRegistry.registerCommandAndKeybindingRule({ id:`workbench.action.terminal.focusAtIndex${o}`,weight:200,when:void 0,primary:0,handler:e=>{const i=e.get(n.ITerminalService);return i.setActiveInstanceByIndex(t),i.showPanel(!0)}})}}()}})),define(e[1697],t([0,1,132,6,33]),(function(e,t,i,n,o){"use strict";let s,r,a,l;Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalInstanceService=void 0;class c{constructor(){this._onRequestDefaultShellAndArgs=new n.Emitter}get onRequestDefaultShellAndArgs(){return this._onRequestDefaultShellAndArgs.event}async getXtermConstructor(){return s||(s=(await new Promise((t,i)=>{e(["xterm"],t,i)})).Terminal),s}async getXtermSearchConstructor(){return r||(r=(await new Promise((t,i)=>{e(["xterm-addon-search"],t,i)})).SearchAddon),r}async getXtermUnicode11Constructor(){return a||(a=(await new Promise((t,i)=>{e(["xterm-addon-unicode11"],t,i)})).Unicode11Addon),a}async getXtermWebglConstructor(){return l||(l=(await new Promise((t,i)=>{e(["xterm-addon-webgl"],t,i)})).WebglAddon),l}createWindowsShellHelper(){ throw new Error("Not implemented")}createTerminalProcess(){throw new Error("Not implemented")}getDefaultShellAndArgs(e){return new Promise(t=>this._onRequestDefaultShellAndArgs.fire({useAutomationShell:e,callback:(e,i)=>t({shell:e,args:i})}))}async getMainProcessParentEnv(){return{}}}t.TerminalInstanceService=c,o.registerSingleton(i.ITerminalInstanceService,c,!0)})),define(e[626],t([0,1,1368,200,87,132,32]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalQuickAccessProvider=void 0;let c=class e extends n.PickerQuickAccessProvider{constructor(t,i){super(e.PREFIX,{canAcceptInBackground:!0}),this.terminalService=t,this.commandService=i}getPicks(e){const t=[],o=this.terminalService.terminalTabs;for(let r=0;r{switch(e){case 0:return this.commandService.executeCommand("workbench.action.terminal.rename",l),n.TriggerAction.NO_ACTION;case 1:return l.dispose(!0),n.TriggerAction.REMOVE_ITEM}return n.TriggerAction.NO_ACTION},accept:(e,t)=>{this.terminalService.setActiveInstance(l),this.terminalService.showPanel(!t.inBackground)}})}}t.length>0&&t.push({type:"separator"});const r=i.localize(2,null);return t.push({label:`$(plus) ${r}`,ariaLabel:r,accept:()=>this.commandService.executeCommand("workbench.action.terminal.new")}),t}};c.PREFIX="term ",c=o([r(0,a.ITerminalService),r(1,l.ICommandService)],c),t.TerminalQuickAccessProvider=c})),define(e[1698],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalWidgetManager=void 0;t.TerminalWidgetManager=class{constructor(){this._attached=new Map}attachToElement(e){this._container||(this._container=document.createElement("div"), this._container.classList.add("terminal-widget-container"),e.appendChild(this._container))}dispose(){this._container&&this._container.parentElement&&(this._container.parentElement.removeChild(this._container),this._container=void 0)}attachWidget(e){var t;if(this._container)return null===(t=this._attached.get(e.id))||void 0===t||t.dispose(),e.attach(this._container),this._attached.set(e.id,e),{dispose:()=>{this._attached.get(e.id)===e&&(this._attached.delete(e.id),e.dispose())}}}}})),define(e[327],t([0,1,5]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentVariableMutatorType=t.IEnvironmentVariableService=void 0,t.IEnvironmentVariableService=i.createDecorator("environmentVariableService"),function(e){e[e.Replace=1]="Replace",e[e.Append=2]="Append",e[e.Prepend=3]="Prepend"}(t.EnvironmentVariableMutatorType||(t.EnvironmentVariableMutatorType={}))})),define(e[1699],t([0,1,327,132,1359]),(function(e,t,i,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.EnvironmentVariableInfoChangesActive=t.EnvironmentVariableInfoStale=void 0;let a=class{constructor(e,t,i){this._diff=e,this._terminalId=t,this._terminalService=i,this.requiresAction=!0}getInfo(){const e=[],t=[];this._diff.added.forEach((t,i)=>{t.forEach(t=>e.push(l(t.type,t.value,i)))}),this._diff.changed.forEach((t,i)=>{t.forEach(t=>e.push(l(t.type,t.value,i)))}),this._diff.removed.forEach((e,i)=>{e.forEach(e=>t.push(l(e.type,e.value,i)))});let i="";return e.length>0&&(i=s.localize(0,null),i+="\n\n",i+="```\n",i+=e.join("\n"),i+="\n```"),t.length>0&&(i+=i.length>0?"\n\n":"",i+=s.localize(1,null),i+="\n\n",i+="```\n",i+=t.join("\n"),i+="\n```"),i}getIcon(){return"warning"}getActions(){return[{label:s.localize(2,null),run:()=>{var e;return null===(e=this._terminalService.getInstanceFromId(this._terminalId))||void 0===e?void 0:e.relaunch()},commandId:"workbench.action.terminal.relaunch"}]}};a=o([r(2,n.ITerminalService)],a),t.EnvironmentVariableInfoStale=a;function l(e,t,n){switch(e){ case i.EnvironmentVariableMutatorType.Prepend:return`${n}=${t}\${env:${n}}`;case i.EnvironmentVariableMutatorType.Append:return`${n}=\${env:${n}}${t}`;default:return`${n}=${t}`}}t.EnvironmentVariableInfoChangesActive=class{constructor(e){this._collection=e,this.requiresAction=!1}getInfo(){const e=[];return this._collection.map.forEach((t,i)=>{t.forEach(t=>e.push(l(t.type,t.value,i)))}),s.localize(3,null)+"\n\n```\n"+e.join("\n")+"\n```"}getIcon(){return"info"}}})),define(e[1700],t([0,1,327,12]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergedEnvironmentVariableCollection=void 0;function o(e,t){if(!t)return e;const i=new Set;t.forEach(e=>i.add(e.extensionIdentifier));const n=[];return e.forEach(e=>{i.has(e.extensionIdentifier)||n.push(e)}),0===n.length?void 0:n}t.MergedEnvironmentVariableCollection=class{constructor(e){this.map=new Map,e.forEach((e,t)=>{const n=e.map.entries();let o=n.next();for(;!o.done;){const e=o.value[0];let s=this.map.get(e);if(s||(s=[], this.map.set(e,s)),s.length>0&&s[0].type===i.EnvironmentVariableMutatorType.Replace){o=n.next();continue}const r=o.value[1];s.unshift({extensionIdentifier:t,value:r.value,type:r.type}),o=n.next()}})}applyToProcessEnvironment(e){let t;n.isWindows&&(t={},Object.keys(e).forEach(e=>t[e.toLowerCase()]=e)),this.map.forEach((o,s)=>{const r=n.isWindows&&t[s.toLowerCase()]||s;o.forEach(t=>{switch(t.type){case i.EnvironmentVariableMutatorType.Append:e[r]=(e[r]||"")+t.value;break;case i.EnvironmentVariableMutatorType.Prepend:e[r]=t.value+(e[r]||"");break;case i.EnvironmentVariableMutatorType.Replace:e[r]=t.value}})})}diff(e){const t=new Map,i=new Map,n=new Map;if(e.map.forEach((e,i)=>{const n=o(e,this.map.get(i));n&&t.set(i,n)}),this.map.forEach((t,i)=>{const s=o(t,e.map.get(i));s&&n.set(i,s)}),this.map.forEach((t,n)=>{const o=function(e,t){if(!t)return;const i=new Map;t.forEach(e=>i.set(e.extensionIdentifier,e));const n=[];return e.forEach(e=>{const t=i.get(e.extensionIdentifier) ;!t||e.type===t.type&&e.value===t.value||n.push(t)}),0===n.length?void 0:n}(t,e.map.get(n));o&&i.set(n,o)}),0!==t.size||0!==i.size||0!==n.size)return{added:t,changed:i,removed:n}}}})),define(e[627],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeEnvironmentVariableCollection=t.serializeEnvironmentVariableCollection=void 0,t.serializeEnvironmentVariableCollection=function(e){return[...e.entries()]},t.deserializeEnvironmentVariableCollection=function(e){return new Map(e)}})),define(e[152],t([0,1,1371,8]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.terminalContributionsDescriptor=t.DEFAULT_COMMANDS_TO_SKIP_SHELL=t.TERMINAL_COMMAND_ID=t.TitleEventSource=t.LinuxDistro=t.ProcessState=t.SUGGESTIONS_FONT_WEIGHT=t.DEFAULT_BOLD_FONT_WEIGHT=t.DEFAULT_FONT_WEIGHT=t.MAXIMUM_FONT_WEIGHT=t.MINIMUM_FONT_WEIGHT=t.DEFAULT_LINE_HEIGHT=t.MINIMUM_LETTER_SPACING=t.DEFAULT_LETTER_SPACING=t.TERMINAL_ACTION_CATEGORY=t.TERMINAL_CONFIG_SECTION=t.TerminalCursorStyle=t.EXT_HOST_CREATION_DELAY=t.NEVER_MEASURE_RENDER_TIME_STORAGE_KEY=t.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY=t.KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED=t.KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_NOT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FIND_NOT_VISIBLE=t.KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE=t.KEYBINDING_CONTEXT_TERMINAL_TEXT_NOT_SELECTED=t.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED=t.KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS=t.KEYBINDING_CONTEXT_TERMINAL_NOT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE=t.KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY=t.KEYBINDING_CONTEXT_TERMINAL_FOCUS=t.KEYBINDING_CONTEXT_TERMINAL_IS_OPEN=t.TERMINAL_VIEW_ID=void 0, t.TERMINAL_VIEW_ID="terminal",t.KEYBINDING_CONTEXT_TERMINAL_IS_OPEN=new n.RawContextKey("terminalIsOpen",!1),t.KEYBINDING_CONTEXT_TERMINAL_FOCUS=new n.RawContextKey("terminalFocus",!1),t.KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY="terminalShellType",t.KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE=new n.RawContextKey(t.KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY,void 0),t.KEYBINDING_CONTEXT_TERMINAL_NOT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FOCUS.toNegated(),t.KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS=new n.RawContextKey("terminalA11yTreeFocus",!1),t.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED=new n.RawContextKey("terminalTextSelected",!1),t.KEYBINDING_CONTEXT_TERMINAL_TEXT_NOT_SELECTED=t.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.toNegated(),t.KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE=new n.RawContextKey("terminalFindVisible",!1),t.KEYBINDING_CONTEXT_TERMINAL_FIND_NOT_VISIBLE=t.KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE.toNegated(), t.KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED=new n.RawContextKey("terminalFindInputFocused",!1),t.KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED=new n.RawContextKey("terminalFindFocused",!1),t.KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_NOT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED.toNegated(),t.KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED=new n.RawContextKey("terminalProcessSupported",!1),t.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY="terminal.integrated.isWorkspaceShellAllowed",t.NEVER_MEASURE_RENDER_TIME_STORAGE_KEY="terminal.integrated.neverMeasureRenderTime",t.EXT_HOST_CREATION_DELAY=100,t.TerminalCursorStyle={BLOCK:"block",LINE:"line",UNDERLINE:"underline"},t.TERMINAL_CONFIG_SECTION="terminal.integrated",t.TERMINAL_ACTION_CATEGORY=i.localize(0,null),t.DEFAULT_LETTER_SPACING=0,t.MINIMUM_LETTER_SPACING=-5,t.DEFAULT_LINE_HEIGHT=1,t.MINIMUM_FONT_WEIGHT=1,t.MAXIMUM_FONT_WEIGHT=1e3,t.DEFAULT_FONT_WEIGHT="normal",t.DEFAULT_BOLD_FONT_WEIGHT="bold", t.SUGGESTIONS_FONT_WEIGHT=["normal","bold","100","200","300","400","500","600","700","800","900"],function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LAUNCHING=1]="LAUNCHING",e[e.RUNNING=2]="RUNNING",e[e.KILLED_DURING_LAUNCH=3]="KILLED_DURING_LAUNCH",e[e.KILLED_BY_USER=4]="KILLED_BY_USER",e[e.KILLED_BY_PROCESS=5]="KILLED_BY_PROCESS"}(t.ProcessState||(t.ProcessState={})),function(e){e[e.Fedora=0]="Fedora",e[e.Ubuntu=1]="Ubuntu",e[e.Unknown=2]="Unknown"}(t.LinuxDistro||(t.LinuxDistro={})),function(e){e[e.Api=0]="Api",e[e.Process=1]="Process",e[e.Sequence=2]="Sequence"}(t.TitleEventSource||(t.TitleEventSource={})),function(e){e.FIND_NEXT="workbench.action.terminal.findNext",e.FIND_PREVIOUS="workbench.action.terminal.findPrevious",e.TOGGLE="workbench.action.terminal.toggleTerminal",e.KILL="workbench.action.terminal.kill",e.QUICK_KILL="workbench.action.terminal.quickKill",e.COPY_SELECTION="workbench.action.terminal.copySelection",e.SELECT_ALL="workbench.action.terminal.selectAll", e.DELETE_WORD_LEFT="workbench.action.terminal.deleteWordLeft",e.DELETE_WORD_RIGHT="workbench.action.terminal.deleteWordRight",e.DELETE_TO_LINE_START="workbench.action.terminal.deleteToLineStart",e.MOVE_TO_LINE_START="workbench.action.terminal.moveToLineStart",e.MOVE_TO_LINE_END="workbench.action.terminal.moveToLineEnd",e.NEW="workbench.action.terminal.new",e.NEW_WITH_CWD="workbench.action.terminal.newWithCwd",e.NEW_LOCAL="workbench.action.terminal.newLocal",e.NEW_IN_ACTIVE_WORKSPACE="workbench.action.terminal.newInActiveWorkspace",e.SPLIT="workbench.action.terminal.split",e.SPLIT_IN_ACTIVE_WORKSPACE="workbench.action.terminal.splitInActiveWorkspace",e.RELAUNCH="workbench.action.terminal.relaunch",e.FOCUS_PREVIOUS_PANE="workbench.action.terminal.focusPreviousPane",e.FOCUS_NEXT_PANE="workbench.action.terminal.focusNextPane",e.RESIZE_PANE_LEFT="workbench.action.terminal.resizePaneLeft",e.RESIZE_PANE_RIGHT="workbench.action.terminal.resizePaneRight",e.RESIZE_PANE_UP="workbench.action.terminal.resizePaneUp", e.RESIZE_PANE_DOWN="workbench.action.terminal.resizePaneDown",e.FOCUS="workbench.action.terminal.focus",e.FOCUS_NEXT="workbench.action.terminal.focusNext",e.FOCUS_PREVIOUS="workbench.action.terminal.focusPrevious",e.PASTE="workbench.action.terminal.paste",e.SELECT_DEFAULT_SHELL="workbench.action.terminal.selectDefaultShell",e.RUN_SELECTED_TEXT="workbench.action.terminal.runSelectedText",e.RUN_ACTIVE_FILE="workbench.action.terminal.runActiveFile",e.SWITCH_TERMINAL="workbench.action.terminal.switchTerminal",e.SCROLL_DOWN_LINE="workbench.action.terminal.scrollDown",e.SCROLL_DOWN_PAGE="workbench.action.terminal.scrollDownPage",e.SCROLL_TO_BOTTOM="workbench.action.terminal.scrollToBottom",e.SCROLL_UP_LINE="workbench.action.terminal.scrollUp",e.SCROLL_UP_PAGE="workbench.action.terminal.scrollUpPage",e.SCROLL_TO_TOP="workbench.action.terminal.scrollToTop",e.CLEAR="workbench.action.terminal.clear",e.CLEAR_SELECTION="workbench.action.terminal.clearSelection", e.MANAGE_WORKSPACE_SHELL_PERMISSIONS="workbench.action.terminal.manageWorkspaceShellPermissions",e.RENAME="workbench.action.terminal.rename",e.RENAME_WITH_ARG="workbench.action.terminal.renameWithArg",e.FIND_FOCUS="workbench.action.terminal.focusFind",e.FIND_HIDE="workbench.action.terminal.hideFind",e.QUICK_OPEN_TERM="workbench.action.quickOpenTerm",e.SCROLL_TO_PREVIOUS_COMMAND="workbench.action.terminal.scrollToPreviousCommand",e.SCROLL_TO_NEXT_COMMAND="workbench.action.terminal.scrollToNextCommand",e.SELECT_TO_PREVIOUS_COMMAND="workbench.action.terminal.selectToPreviousCommand",e.SELECT_TO_NEXT_COMMAND="workbench.action.terminal.selectToNextCommand",e.SELECT_TO_PREVIOUS_LINE="workbench.action.terminal.selectToPreviousLine",e.SELECT_TO_NEXT_LINE="workbench.action.terminal.selectToNextLine",e.TOGGLE_ESCAPE_SEQUENCE_LOGGING="toggleEscapeSequenceLogging",e.SEND_SEQUENCE="workbench.action.terminal.sendSequence",e.TOGGLE_FIND_REGEX="workbench.action.terminal.toggleFindRegex", e.TOGGLE_FIND_WHOLE_WORD="workbench.action.terminal.toggleFindWholeWord",e.TOGGLE_FIND_CASE_SENSITIVE="workbench.action.terminal.toggleFindCaseSensitive",e.NAVIGATION_MODE_EXIT="workbench.action.terminal.navigationModeExit",e.NAVIGATION_MODE_FOCUS_NEXT="workbench.action.terminal.navigationModeFocusNext",e.NAVIGATION_MODE_FOCUS_PREVIOUS="workbench.action.terminal.navigationModeFocusPrevious",e.SHOW_ENVIRONMENT_INFORMATION="workbench.action.terminal.showEnvironmentInformation",e.SEARCH_WORKSPACE="workbench.action.terminal.searchWorkspace"}(t.TERMINAL_COMMAND_ID||(t.TERMINAL_COMMAND_ID={})), t.DEFAULT_COMMANDS_TO_SKIP_SHELL=["workbench.action.terminal.clearSelection","workbench.action.terminal.clear","workbench.action.terminal.copySelection","workbench.action.terminal.deleteToLineStart","workbench.action.terminal.deleteWordLeft","workbench.action.terminal.deleteWordRight","workbench.action.terminal.focusFind","workbench.action.terminal.hideFind","workbench.action.terminal.findNext","workbench.action.terminal.findPrevious","workbench.action.terminal.toggleFindRegex","workbench.action.terminal.toggleFindWholeWord","workbench.action.terminal.toggleFindCaseSensitive","workbench.action.terminal.focusNextPane","workbench.action.terminal.focusNext","workbench.action.terminal.focusPreviousPane","workbench.action.terminal.focusPrevious","workbench.action.terminal.focus","workbench.action.terminal.kill","workbench.action.terminal.moveToLineEnd","workbench.action.terminal.moveToLineStart","workbench.action.terminal.newInActiveWorkspace","workbench.action.terminal.new","workbench.action.terminal.paste","workbench.action.terminal.resizePaneDown","workbench.action.terminal.resizePaneLeft","workbench.action.terminal.resizePaneRight","workbench.action.terminal.resizePaneUp","workbench.action.terminal.runActiveFile","workbench.action.terminal.runSelectedText","workbench.action.terminal.scrollDown","workbench.action.terminal.scrollDownPage","workbench.action.terminal.scrollToBottom","workbench.action.terminal.scrollToNextCommand","workbench.action.terminal.scrollToPreviousCommand","workbench.action.terminal.scrollToTop","workbench.action.terminal.scrollUp","workbench.action.terminal.scrollUpPage","workbench.action.terminal.sendSequence","workbench.action.terminal.selectAll","workbench.action.terminal.selectToNextCommand","workbench.action.terminal.selectToNextLine","workbench.action.terminal.selectToPreviousCommand","workbench.action.terminal.selectToPreviousLine","workbench.action.terminal.splitInActiveWorkspace","workbench.action.terminal.split","workbench.action.terminal.toggleTerminal","workbench.action.terminal.navigationModeExit","workbench.action.terminal.navigationModeFocusNext","workbench.action.terminal.navigationModeFocusPrevious","editor.action.toggleTabFocusMode","workbench.action.quickOpen","workbench.action.quickOpenPreviousEditor","workbench.action.showCommands","workbench.action.tasks.build","workbench.action.tasks.restartTask","workbench.action.tasks.runTask","workbench.action.tasks.reRunTask","workbench.action.tasks.showLog","workbench.action.tasks.showTasks","workbench.action.tasks.terminate","workbench.action.tasks.test","workbench.action.toggleFullScreen","workbench.action.terminal.focusAtIndex1","workbench.action.terminal.focusAtIndex2","workbench.action.terminal.focusAtIndex3","workbench.action.terminal.focusAtIndex4","workbench.action.terminal.focusAtIndex5","workbench.action.terminal.focusAtIndex6","workbench.action.terminal.focusAtIndex7","workbench.action.terminal.focusAtIndex8","workbench.action.terminal.focusAtIndex9","workbench.action.focusSecondEditorGroup","workbench.action.focusThirdEditorGroup","workbench.action.focusFourthEditorGroup","workbench.action.focusFifthEditorGroup","workbench.action.focusSixthEditorGroup","workbench.action.focusSeventhEditorGroup","workbench.action.focusEighthEditorGroup","workbench.action.focusNextPart","workbench.action.focusPreviousPart","workbench.action.nextPanelView","workbench.action.previousPanelView","workbench.action.nextSideBarView","workbench.action.previousSideBarView","workbench.action.debug.start","workbench.action.debug.stop","workbench.action.debug.run","workbench.action.debug.restart","workbench.action.debug.continue","workbench.action.debug.pause","workbench.action.debug.stepInto","workbench.action.debug.stepOut","workbench.action.debug.stepOver","workbench.action.nextEditor","workbench.action.previousEditor","workbench.action.nextEditorInGroup","workbench.action.previousEditorInGroup","workbench.action.openNextRecentlyUsedEditor","workbench.action.openPreviousRecentlyUsedEditor","workbench.action.openNextRecentlyUsedEditorInGroup","workbench.action.openPreviousRecentlyUsedEditorInGroup","workbench.action.quickOpenPreviousRecentlyUsedEditor","workbench.action.quickOpenLeastRecentlyUsedEditor","workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup","workbench.action.quickOpenLeastRecentlyUsedEditorInGroup","workbench.action.focusActiveEditorGroup","workbench.action.focusFirstEditorGroup","workbench.action.focusLastEditorGroup","workbench.action.firstEditorInGroup","workbench.action.lastEditorInGroup","workbench.action.navigateUp","workbench.action.navigateDown","workbench.action.navigateRight","workbench.action.navigateLeft","workbench.action.togglePanel","workbench.action.quickOpenView","workbench.action.toggleMaximizedPanel"], t.terminalContributionsDescriptor={extensionPoint:"terminal",defaultExtensionKind:"workspace",jsonSchema:{description:i.localize(1,null),type:"object",properties:{types:{type:"array",description:i.localize(2,null),items:{type:"object",required:["command","title"],properties:{command:{description:i.localize(3,null),type:"string"},title:{description:i.localize(4,null),type:"string"}}}}}}}})),define(e[1701],t([0,1,1629,36,152,8,132]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalFindWidget=void 0;let c=class extends i.SimpleFindWidget{constructor(e,t,i,n){super(t,i,e,!0),this._contextKeyService=i,this._terminalService=n,this._register(e.onFindReplaceStateChange(()=>{this.show()})),this._findInputFocused=s.KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED.bindTo(this._contextKeyService),this._findWidgetFocused=s.KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED.bindTo(this._contextKeyService)}find(e){const t=this._terminalService.getActiveInstance() ;null!==t&&(e?t.findPrevious(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}):t.findNext(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}))}hide(){super.hide();const e=this._terminalService.getActiveInstance();e&&e.focus()}onInputChanged(){const e=this._terminalService.getActiveInstance();return null!==e&&e.findPrevious(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue(),incremental:!0})}onFocusTrackerFocus(){const e=this._terminalService.getActiveInstance();e&&e.notifyFindWidgetFocusChanged(!0),this._findWidgetFocused.set(!0)}onFocusTrackerBlur(){const e=this._terminalService.getActiveInstance();e&&e.notifyFindWidgetFocusChanged(!1),this._findWidgetFocused.reset()}onFindInputFocusTrackerFocus(){this._findInputFocused.set(!0)}onFindInputFocusTrackerBlur(){this._findInputFocused.reset() }findFirst(){const e=this._terminalService.getActiveInstance();e&&(e.hasSelection()&&e.clearSelection(),e.findPrevious(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}))}};c=o([r(1,n.IContextViewService),r(2,a.IContextKeyService),r(3,l.ITerminalService)],c),t.TerminalFindWidget=c})),define(e[328],t([0,1,1372,27,81]),(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerColors=t.ansiColorMap=t.TERMINAL_BORDER_COLOR=t.TERMINAL_SELECTION_BACKGROUND_COLOR=t.TERMINAL_CURSOR_BACKGROUND_COLOR=t.TERMINAL_CURSOR_FOREGROUND_COLOR=t.TERMINAL_FOREGROUND_COLOR=t.TERMINAL_BACKGROUND_COLOR=t.ansiColorIdentifiers=void 0,t.ansiColorIdentifiers=[],t.TERMINAL_BACKGROUND_COLOR=n.registerColor("terminal.background",null,i.localize(0,null)),t.TERMINAL_FOREGROUND_COLOR=n.registerColor("terminal.foreground",{light:"#333333",dark:"#CCCCCC",hc:"#FFFFFF"},i.localize(1,null)), t.TERMINAL_CURSOR_FOREGROUND_COLOR=n.registerColor("terminalCursor.foreground",null,i.localize(2,null)),t.TERMINAL_CURSOR_BACKGROUND_COLOR=n.registerColor("terminalCursor.background",null,i.localize(3,null)),t.TERMINAL_SELECTION_BACKGROUND_COLOR=n.registerColor("terminal.selectionBackground",{light:"#00000040",dark:"#FFFFFF40",hc:"#FFFFFF80"},i.localize(4,null)),t.TERMINAL_BORDER_COLOR=n.registerColor("terminal.border",{dark:o.PANEL_BORDER,light:o.PANEL_BORDER,hc:o.PANEL_BORDER},i.localize(5,null)),t.ansiColorMap={"terminal.ansiBlack":{index:0,defaults:{light:"#000000",dark:"#000000",hc:"#000000"}},"terminal.ansiRed":{index:1,defaults:{light:"#cd3131",dark:"#cd3131",hc:"#cd0000"}},"terminal.ansiGreen":{index:2,defaults:{light:"#00BC00",dark:"#0DBC79",hc:"#00cd00"}},"terminal.ansiYellow":{index:3,defaults:{light:"#949800",dark:"#e5e510",hc:"#cdcd00"}},"terminal.ansiBlue":{index:4,defaults:{light:"#0451a5",dark:"#2472c8",hc:"#0000ee"}},"terminal.ansiMagenta":{index:5,defaults:{light:"#bc05bc",dark:"#bc3fbc", hc:"#cd00cd"}},"terminal.ansiCyan":{index:6,defaults:{light:"#0598bc",dark:"#11a8cd",hc:"#00cdcd"}},"terminal.ansiWhite":{index:7,defaults:{light:"#555555",dark:"#e5e5e5",hc:"#e5e5e5"}},"terminal.ansiBrightBlack":{index:8,defaults:{light:"#666666",dark:"#666666",hc:"#7f7f7f"}},"terminal.ansiBrightRed":{index:9,defaults:{light:"#cd3131",dark:"#f14c4c",hc:"#ff0000"}},"terminal.ansiBrightGreen":{index:10,defaults:{light:"#14CE14",dark:"#23d18b",hc:"#00ff00"}},"terminal.ansiBrightYellow":{index:11,defaults:{light:"#b5ba00",dark:"#f5f543",hc:"#ffff00"}},"terminal.ansiBrightBlue":{index:12,defaults:{light:"#0451a5",dark:"#3b8eea",hc:"#5c5cff"}},"terminal.ansiBrightMagenta":{index:13,defaults:{light:"#bc05bc",dark:"#d670d6",hc:"#ff00ff"}},"terminal.ansiBrightCyan":{index:14,defaults:{light:"#0598bc",dark:"#29b8db",hc:"#00ffff"}},"terminal.ansiBrightWhite":{index:15,defaults:{light:"#a5a5a5",dark:"#e5e5e5",hc:"#ffffff"}}},t.registerColors=function(){for(const e in t.ansiColorMap){ const o=t.ansiColorMap[e],s=e.substring(13);t.ansiColorIdentifiers[o.index]=n.registerColor(e,o.defaults,i.localize(6,null,s))}}})),define(e[1702],t([0,1,55,328]),(function(e,t,i,n){"use strict";function o(e,t,n,o,s,r,a){if(!e||!t)return;const l=o.linkify(t,!0,s.root);l.className=n.join(" "),r&&(l.style.color=i.Color.Format.CSS.formatRGB(new i.Color(r))),a&&(l.style.backgroundColor=i.Color.Format.CSS.formatRGB(new i.Color(a))),e.appendChild(l)}function s(e){if(e%1==0){if(e>=16&&e<=231){let t=(e-=16)%6,n=(e=(e-t)/6)%6,o=e=(e-n)/6;const s=51;return t=Math.round(t*s),n=Math.round(n*s),o=Math.round(o*s),new i.RGBA(o,n,t)}if(e>=232&&e<=255){e-=232;const t=Math.round(e/23*255);return new i.RGBA(t,t,t)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.calcANSI8bitColor=t.appendStylizedStringToContainer=t.handleANSIOutput=void 0,t.handleANSIOutput=function(e,t,r,a){const l=document.createElement("span"),c=e.length;let d,h,u=[],g=0,p="";for(;g""!==e).map(e=>parseInt(e,10));if(38===e[0]||48===e[0]){const t=38===e[0]?"foreground":"background";5===e[1]?S(e,t):2===e[1]&&f(e,t)}else v(e)}}else g=n}!1===i&&(p+=e.charAt(g),g++)}return p&&o(l,p,u,t,a,d,h),l;function m(e,t){"foreground"===e?d=t:"background"===e&&(h=t),u=u.filter(t=>t!==`code-${e}-colored`),void 0!==t&&u.push(`code-${e}-colored`)}function v(e){for(let t of e)switch(t){case 0:u=[],d=void 0,h=void 0;break;case 1:u.push("code-bold");break;case 3:u.push("code-italic");break;case 4:u.push("code-underline");break;case 39:m("foreground",void 0);break;case 49:m("background",void 0);break;default:b(t)}}function f(e,t){if(e.length>=5&&e[2]>=0&&e[2]<=255&&e[3]>=0&&e[3]<=255&&e[4]>=0&&e[4]<=255){ m(t,new i.RGBA(e[2],e[3],e[4]))}}function S(e,t){let i=e[2];const n=s(i);n?m(t,n):i>=0&&i<=15&&((i+=30)>=38&&(i+=52),"background"===t&&(i+=10),b(i))}function b(e){const t=r.getColorTheme();let i,o;if(e>=30&&e<=37?(o=e-30,i="foreground"):e>=90&&e<=97?(o=e-90+8,i="foreground"):e>=40&&e<=47?(o=e-40,i="background"):e>=100&&e<=107&&(o=e-100+8,i="background"),void 0!==o&&i){const e=n.ansiColorIdentifiers[o],s=t.getColor(e);s&&m(i,s.rgba)}}},t.appendStylizedStringToContainer=o,t.calcANSI8bitColor=s})),define(e[628],t([0,1,91,370,55,328,11]),(function(e,t,i,n,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcANSI8bitColor=t.appendStylizedStringToContainer=t.handleANSIOutput=void 0;let c=class{constructor(e,t){this.editor=e,this.themeService=t}render(e,t){const i=document.createElement("div"),n=e.ename&&e.evalue?`${e.ename}: ${e.evalue}`:e.ename||e.evalue;n&&(i.innerText=n,t.appendChild(i));const o=document.createElement("pre");if(o.classList.add("traceback"), e.traceback)for(let t=0;t""!==e).map(e=>parseInt(e,10));if(38===e[0]||48===e[0]){const t=38===e[0]?"foreground":"background";5===e[1]?v(e,t):2===e[1]&&m(e,t)}else p(e)}}else c=s}!1===t&&(d+=e.charAt(c),c++)}return d&&h(i,d,l,o,r),i;function g(e,t){"foreground"===e?o=t:"background"===e&&(r=t),l=l.filter(t=>t!==`code-${e}-colored`),void 0!==t&&l.push(`code-${e}-colored`)}function p(e){ for(const t of e)switch(t){case 0:l=[],o=void 0,r=void 0;break;case 1:l.push("code-bold");break;case 3:l.push("code-italic");break;case 4:l.push("code-underline");break;case 39:g("foreground",void 0);break;case 49:g("background",void 0);break;default:f(t)}}function m(e,t){if(e.length>=5&&e[2]>=0&&e[2]<=255&&e[3]>=0&&e[3]<=255&&e[4]>=0&&e[4]<=255){g(t,new s.RGBA(e[2],e[3],e[4]))}}function v(e,t){let i=e[2];const n=u(i);n?g(t,n):i>=0&&i<=15&&((i+=30)>=38&&(i+=52),"background"===t&&(i+=10),f(i))}function f(e){const i=t.getColorTheme();let n,o;if(e>=30&&e<=37?(o=e-30,n="foreground"):e>=90&&e<=97?(o=e-90+8,n="foreground"):e>=40&&e<=47?(o=e-40,n="background"):e>=100&&e<=107&&(o=e-100+8,n="background"),void 0!==o&&n){const e=a.ansiColorIdentifiers[o],t=i.getColor(e);t&&g(n,t.rgba)}}}function h(e,t,i,n,o){if(!e||!t)return;const r=function e(t,i){if(i){const i=t.split("\n");for(let e=0;ee(t));if(1===n.length)return n[0] ;const o=document.createElement("span");return n.forEach(e=>o.appendChild(e)),o}const n=document.createElement("span");n.appendChild(document.createTextNode(t));return n}(t,!0);r.className=i.join(" "),n&&(r.style.color=s.Color.Format.CSS.formatRGB(new s.Color(n))),o&&(r.style.backgroundColor=s.Color.Format.CSS.formatRGB(new s.Color(o))),e.appendChild(r)}function u(e){if(e%1==0){if(e>=16&&e<=231){let t=(e-=16)%6,i=(e=(e-t)/6)%6,n=e=(e-i)/6;const o=51;return t=Math.round(t*o),i=Math.round(i*o),n=Math.round(n*o),new s.RGBA(n,i,t)}if(e>=232&&e<=255){e-=232;const t=Math.round(e/23*255);return new s.RGBA(t,t,t)}}}c=o([r(1,l.IThemeService)],c),n.NotebookRegistry.registerOutputTransform("notebook.output.error",i.CellOutputKind.Error,c),t.handleANSIOutput=d,t.appendStylizedStringToContainer=h,t.calcANSI8bitColor=u})),define(e[1703],t([0,1,91,370,7,13,5,46,50,140,10,611,11,628,17]),(function(e,t,i,n,s,a,l,c,d,h,u,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.getOutputSimpleEditorOptions=void 0;let f=class{constructor(e,t,i,n,o){this.notebookEditor=e,this.instantiationService=t,this.modelService=i,this.modeService=n,this.themeService=o,this._richMimeTypeRenderers=new Map,this._richMimeTypeRenderers.set("application/json",this.renderJSON.bind(this)),this._richMimeTypeRenderers.set("application/javascript",this.renderJavaScript.bind(this)),this._richMimeTypeRenderers.set("text/html",this.renderHTML.bind(this)),this._richMimeTypeRenderers.set("image/svg+xml",this.renderSVG.bind(this)),this._richMimeTypeRenderers.set("text/markdown",this.renderMarkdown.bind(this)),this._richMimeTypeRenderers.set("image/png",this.renderPNG.bind(this)),this._richMimeTypeRenderers.set("image/jpeg",this.renderJPEG.bind(this)),this._richMimeTypeRenderers.set("text/plain",this.renderPlainText.bind(this)),this._richMimeTypeRenderers.set("text/x-javascript",this.renderCode.bind(this))}render(e,t,i,n){if(!e.data){const e=document.createElement("p") ;return e.innerText="No data could be found for output.",t.appendChild(e),{type:0,hasDynamicHeight:!1}}if(!i||!this._richMimeTypeRenderers.has(i)){const n=document.createElement("p"),o=[];for(const t in e.data)o.push(t);const s=o.join(", ");return n.innerText=i?`No renderer could be found for MIME type: ${i}`:`No renderer could be found for output. It has the following MIME types: ${s}`,t.appendChild(n),{type:0,hasDynamicHeight:!1}}return this._richMimeTypeRenderers.get(i)(e,n,t)}renderJSON(e,t,i){const n=e.data["application/json"],o=JSON.stringify(n,null,"\t"),s=this.instantiationService.createInstance(h.CodeEditorWidget,i,Object.assign(Object.assign({},{readOnly:!0,wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",minimap:{enabled:!1},lineNumbers:"off",scrollbar:{alwaysConsumeMouseWheel:!1}}),{dimension:{width:0,height:0}}),{ isSimpleWidget:!0}),r=this.modeService.create("json"),a=u.URI.parse(`notebook-output-${Date.now()}.json`),l=this.modelService.createModel(o,r,a,!1);s.setModel(l);const c=this.notebookEditor.getLayoutInfo().width,d=this.notebookEditor.getLayoutInfo().fontInfo,g=Math.min(l.getLineCount(),16)*(d.lineHeight||18);return s.layout({height:g,width:c}),i.style.height=`${g+16}px`,{type:0,hasDynamicHeight:!0}}renderCode(e,t,i){const n=e.data["text/x-javascript"],o=a.isArray(n)?n.join(""):n,s=this.instantiationService.createInstance(h.CodeEditorWidget,i,Object.assign(Object.assign({},{readOnly:!0,wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",minimap:{enabled:!1},lineNumbers:"off",scrollbar:{alwaysConsumeMouseWheel:!1}}),{dimension:{width:0,height:0}}),{isSimpleWidget:!0 }),r=this.modeService.create("javascript"),l=u.URI.parse(`notebook-output-${Date.now()}.js`),c=this.modelService.createModel(o,r,l,!1);s.setModel(c);const d=this.notebookEditor.getLayoutInfo().width,g=this.notebookEditor.getLayoutInfo().fontInfo,p=Math.min(c.getLineCount(),16)*(g.lineHeight||18);return s.layout({height:p,width:d}),i.style.height=`${p+16}px`,{type:0,hasDynamicHeight:!0}}renderJavaScript(e,t,i){const n=e.data["application/javascript"];return{type:1,source:e,htmlContent:` ${t}
    `}postRendererMessage(e,t){this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customRendererMessage",message:t,rendererId:e})}resolveOutputId(e){var t;const i=this.reversedInsetMapping.get(e);if(!i)return;const n=this.insetMapping.get(i).cell,o=null===(t=this.notebookEditor.viewModel)||void 0===t?void 0:t.viewCells.find(e=>e.handle===n.handle);return o!==n&&void 0!==o&&(this.insetMapping.get(i).cell=o),{cell:this.insetMapping.get(i).cell,output:i}}async createWebview(){const t=i.getPathFromAmdModule(e,"vs/loader.js"),n=v.asWebviewUri(this.environmentService,this.id,c.URI.file(t));let o,s="";this._initalized=new Promise((e,t)=>{o=e});const r=v.asWebviewUri(this.environmentService,this.id,S.dirname(this.documentUri));if(l.isWeb)fetch(t).then(async e=>{if(200!==e.status)throw new Error(e.statusText);const t=await e.text();s=`\n